/* ==========================================================================
   THEME: edit colours here. Dark is the default; light follows the OS
   (prefers-color-scheme) until the visitor picks one with the toggle,
   which sets <html data-theme="dark|light">.
   The light values are repeated twice (media query + [data-theme="light"]);
   change both together.
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #17151c;
  --card: #221f29;
  --line: #34303d;
  --text: #f4efe6;
  --muted: #bdb6c6;
  --accent: #ffc93c;
  --on-accent: #17151c;
  --progress: #7fd8ae;
  --link: #ffc93c;
  --control-border: #8a8398;
  --focus: #ffc93c;

  /* WhatsApp buttons: same in both themes, do not recolour */
  --wa-bg: #25d366;
  --wa-text: #111b21;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #fbf7ee;
    --card: #ffffff;
    --line: #e4dccb;
    --text: #1f1b24;
    --muted: #5a5466;
    --progress: #1f7a55;
    --link: #7a4f00;
    --control-border: #857d91;
    --focus: #1f1b24;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf7ee;
  --card: #ffffff;
  --line: #e4dccb;
  --text: #1f1b24;
  --muted: #5a5466;
  --progress: #1f7a55;
  --link: #7a4f00;
  --control-border: #857d91;
  --focus: #1f1b24;
}

/* ==========================================================================
   FONT: Heebo, self-hosted (variable, one file per script covers 400-800).
   Licence: assets/fonts/OFL.txt. Hebrew is preloaded in each page's <head>.
   ========================================================================== */
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/heebo-hebrew.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/heebo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Heebo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: var(--link);
}

img,
svg {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  border-radius: 10px;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 32px;
}

@media (max-width: 600px) {
  .container {
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   HERO TEXT
   ========================================================================== */
.hero {
  max-width: 900px;
  margin-inline: auto;
  padding: 48px 32px 72px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero h1 {
  max-width: 860px;
  font-size: clamp(2rem, 4.2vw, 3.375rem);
  font-weight: 800;
}

.hero__sub {
  max-width: 640px;
  font-size: 1.25rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .hero {
    padding-inline: 20px;
  }

  .hero__sub {
    font-size: 1.125rem;
  }
}

/* ==========================================================================
   FUNNEL
   ========================================================================== */
.funnel {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: start;
}

@media (min-width: 600px) {
  .funnel {
    padding: 36px;
  }
}

.funnel__progress {
  margin-bottom: 22px;
}

.funnel__progress.is-done {
  margin-bottom: 0;
}

.funnel__head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.funnel__bar {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.funnel__fill {
  height: 100%;
  width: 0;
  background: var(--progress);
  transition: width 0.3s ease;
}

.funnel__back,
.funnel__restart {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--link);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
}

.funnel__step,
.funnel__result {
  animation: funnel-in 0.3s ease both;
}

@keyframes funnel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.funnel__step {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.funnel legend {
  padding: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
}

.funnel legend {
  float: inline-start;
  width: 100%;
  margin-bottom: 14px;
}

.funnel__hint {
  clear: both;
  margin-bottom: 18px;
  font-size: 1.0625rem;
  color: var(--muted);
}

.funnel__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.funnel__opt {
  min-height: 60px;
  padding: 12px 18px;
  border: 2px solid var(--control-border);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.funnel__opt:hover {
  border-color: var(--link);
  background: var(--bg);
}

.funnel__result {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.funnel__lead {
  font-size: 1.1875rem;
}

.funnel__recs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.funnel__recs li {
  padding: 16px 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Text colour, not yellow: yellow is reserved for actions */
.funnel__rec-title {
  font-size: 1.3125rem;
  font-weight: 800;
}

.funnel__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.funnel__or {
  text-align: center;
  color: var(--muted);
}

/* Phone: icon on phones, number instead on wider screens (where tel: can't dial) */
.funnel__phone-num {
  display: none;
}

@media (min-width: 600px) {
  .funnel__actions {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .funnel__phone-icon {
    display: none;
  }

  .funnel__phone-num {
    display: inline;
  }
}

.funnel__note {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}

.btn img {
  flex: none;
}

/* Every WhatsApp CTA: fixed colours, glyph used unchanged */
.btn--wa {
  background: var(--wa-bg);
  color: var(--wa-text);
}

.btn--wa:hover {
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
}

/* Non-WhatsApp primary actions (404 "back home") */
.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--accent:hover {
  box-shadow: 0 4px 16px rgba(255, 201, 60, 0.35);
}

/* Secondary action beside a WhatsApp button (phone on the result screen) */
.btn--secondary {
  border: 2px solid var(--control-border);
  background: transparent;
  color: var(--text);
}

.btn--secondary:hover {
  border-color: var(--link);
  background: var(--bg);
}

.btn--lg {
  min-height: 56px;
  padding-inline: 16px;
  font-size: 1.0625rem;
  font-weight: 800;
}

@media (min-width: 600px) {
  .btn--lg {
    padding-inline: 26px;
    font-size: 1.125rem;
  }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
/* Mobile first: row 1 = brand + CTA, row 2 = nav. From 880px: one row. */
.site-header__inner {
  padding-block: 12px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "brand cta"
    "nav nav";
  align-items: center;
  gap: 4px 12px;
}

.wordmark {
  grid-area: brand;
  justify-self: start;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  color: var(--text);
  text-decoration: none;
}

.wordmark__name {
  font-size: 1.375rem;
  font-weight: 800;
}

.wordmark__sep {
  display: none;
}

.wordmark__tag {
  font-size: 0.875rem;
  color: var(--muted);
}

.site-header .btn {
  grid-area: cta;
  padding-inline: 14px;
  gap: 8px;
  font-size: 0.9375rem;
}

/* Nav links + theme toggle share the second row on phones */
.site-header__bar {
  grid-area: nav;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.site-nav {
  flex: 1;
  min-width: 0;
}

.theme-toggle {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--control-border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--card);
}

/* pressed = dark is on, so the icon offers the other mode */
.theme-toggle[aria-pressed="true"] .theme-toggle__moon,
.theme-toggle[aria-pressed="false"] .theme-toggle__sun {
  display: none;
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  font-weight: 500;
}

.site-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 4px;
  white-space: nowrap;
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Very narrow phones: the toggle moves up beside the brand and the CTA gets its own
   full-width row, so the three nav links keep the whole last row. */
@media (max-width: 359px) {
  .site-header__inner {
    grid-template-areas:
      "brand theme"
      "cta cta"
      "nav nav";
  }

  .site-header__bar {
    display: contents;
  }

  .site-nav {
    grid-area: nav;
    border-top: 1px solid var(--line);
  }

  .theme-toggle {
    grid-area: theme;
  }

  .site-header .btn {
    width: 100%;
  }
}

@media (min-width: 880px) {
  .site-header__inner {
    padding-block: 20px;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav cta";
    gap: 24px;
  }

  .wordmark {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    line-height: 1;
  }

  .wordmark__name {
    font-size: 1.625rem;
  }

  .wordmark__sep {
    display: inline;
  }

  .wordmark__sep,
  .wordmark__tag {
    font-size: 1rem;
  }

  .site-header .btn {
    padding-inline: 20px;
    gap: 10px;
    font-size: 1.0625rem;
  }

  .site-header__bar {
    border-top: 0;
  }

  .site-nav ul {
    justify-content: center;
    gap: 8px;
  }

  .site-nav a {
    min-height: 44px;
    padding-inline: 12px;
  }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
  padding-block: 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
}

.muted {
  font-size: 1.0625rem;
  color: var(--muted);
}

/* Work tiles */
.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.tile {
  width: 280px;
  height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
}

.tile[hidden] {
  display: none;
}

.tile--logo {
  background: #fbf7ee;
}

.tile--logo img {
  max-width: 100%;
  height: auto;
}

.tile--reserved {
  border: 2px dashed var(--control-border);
  color: var(--text);
}

.tile--reserved:hover {
  border-color: var(--link);
}

.tile__title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.tile__sub {
  font-size: 1rem;
  color: var(--muted);
}

/* About */
.about {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 820px;
}

/* The <picture> is the flex item, so it must hold its size or the global
   img { max-width: 100% } shrinks the photo to fit beside the text. */
.about picture {
  flex: none;
  width: 176px;
}

.about__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Trust facts, lifted out of the paragraph so they get the loudest type below the hero */
.stats {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stats li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--progress);
}

.stats strong {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.stats span {
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--muted);
}

@media (max-width: 600px) {
  .stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stats li {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .stats strong {
    flex: none;
    min-width: 5.5ch;
  }
}

.about__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

@media (max-width: 600px) {
  .about {
    flex-direction: column;
    align-items: flex-start;
  }

  .about picture {
    width: 160px;
  }
}

/* How it works */
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  align-items: start;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 0.9;
  color: var(--progress);
}

.steps h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.steps p {
  color: var(--muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.site-footer__inner {
  padding-block: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 28px;
}

.site-footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   SECONDARY PAGES (404, accessibility statement)
   ========================================================================== */
.page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 12px;
}

@media (min-width: 880px) {
  .page-header__inner {
    padding-block: 20px;
  }
}

.page-actions {
  width: 100%;
  max-width: 420px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 600px) {
  .page-actions {
    width: auto;
    max-width: none;
    flex-direction: row;
    justify-content: center;
  }
}

.page {
  max-width: 824px;
  padding-block: 48px 72px;
}

.page h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
}

.page h2 {
  margin: 40px 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
}

.page p,
.page ul,
.page dl {
  margin: 0 0 12px;
}

.page ul {
  padding-inline-start: 24px;
}

.page li {
  margin-bottom: 6px;
}

.contact {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px 20px;
}

.contact dt {
  font-weight: 700;
}

.contact dd {
  margin: 0;
}

.contact a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Placeholders Guy must fill in. Loud on purpose so none ships by accident. */
mark.todo {
  padding: 0 6px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
}
