:root {
  --bg: #f7f7f7;
  --ink: #1b3a34;
  --ink-soft: #1b3a34;
  --text: #10231f;
  --accent: #28534b;
  --border: rgba(27, 58, 52, 0.1);
  --font-display: "Bellefair", "Heebo", serif;
  --font-body: "Heebo", sans-serif;
  --pad: clamp(16px, 2.3vw, 32px);
  --breath-duration: 18s;
}

* { box-sizing: border-box; margin: 0; }

html { background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

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

/* two full-screen sections; the logo and Instagram link stay fixed on top */
.screen {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 124px var(--pad); /* equal top and bottom: content sits at the true centre */
}

.screen-hero {
  background: var(--bg);
  grid-template-rows: 1fr auto;   /* the centred text, then the sign-up bar along the bottom */
  place-items: stretch;
  padding: 0;
}

/* header */
.top {
  position: fixed;
  top: 24px;
  inset-inline: 0;
  z-index: 10;
  padding-inline: clamp(16px, 1.7vw, 24px);
  display: flex;
  justify-content: flex-start; /* RTL: start = right */
  align-items: flex-start;
  pointer-events: none; /* the strip never blocks what is under it */
}
.top a, .top button { pointer-events: auto; }

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: auto;
  color: var(--ink-soft);
  text-decoration: none;
  text-align: center;
  transition: color 0.35s;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--accent);   /* #28534b */
  color: #6FFFC6;
  transition: background 0.35s, color 0.35s;
  font-family: "LXGW WenKai Mono TC", serif;
  font-size: 18.9px;
  letter-spacing: 2.4px;
  padding-inline-start: 2.4px; /* balance trailing letter-spacing */
}

.logo-name {
  font-size: 22px;
  letter-spacing: 2.64px;
  line-height: 1;
  margin-top: 0;
}

.logo-tagline {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 1.54px;
  white-space: nowrap;
  line-height: 1;
  opacity: 0.7;
  margin-top: -3px;
}

.top-links {
  position: absolute;
  inset-inline-end: clamp(16px, 1.7vw, 24px); /* RTL: end = left */
  top: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.insta {
  transition: color 0.35s;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.4;
}
.insta:hover { color: var(--accent); }
/* "מיני קורס מתנה" is a button (it opens the sign-up dialog) dressed like the header links */
.gift-link { padding: 0; border: 0; background: none; font-family: inherit; font-weight: inherit; letter-spacing: inherit; cursor: pointer; }
.gift-link span:last-child { text-decoration: underline; }
.gift-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

.insta-icon { position: relative; display: block; width: 20px; height: 20px; }
.insta-icon img { position: absolute; inset: 0; transition: opacity 0.35s; }
.icon-light { opacity: 0; }

/* the logo and the Instagram link turn light over a dark background (script.js picks by what is under them) */
.top.logo-light .logo { color: #fff; }
.top.logo-light .logo-mark { background: #fff; color: var(--ink); }
.top.insta-light .insta { color: #fff; }
.top.insta-light .icon-dark { opacity: 0; }
.top.insta-light .icon-light { opacity: 1; }

/* breathing circle: behind the first screen, peaks at 90vh.
   --min-scale is set by script.js from the resting size / peak size.
   A single circle, centred on the screen. */
.breath {
  --min-scale: 0.3;
  position: absolute;
  inset: 0;
  margin: auto;
  width: 90vh;
  width: 90svh;
  aspect-ratio: 1;
  z-index: 0;
  pointer-events: none;
  transform: translateY(-52px); /* centred above the 104px sign-up bar, like the text */
}

/* To hide the circles again, add class "no-circles" to <div class="page"> in index.html. */
.no-circles .breath { display: none; }

.rig {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.rig {
  animation: breathe var(--breath-duration) ease-in-out infinite;
  will-change: transform;
}

.circle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  display: block;
}

/* inhale 9s, exhale 9s */
@keyframes breathe {
  0%, 100% { transform: scale(var(--min-scale)); }
  50%      { transform: scale(1); }
}

.content { position: relative; z-index: 2; }

/* content */
.content {
  justify-self: center;
  align-self: center;
  width: 100%;
  padding: 0 var(--pad); /* centred in the space above the sign-up bar, as in the design */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
}

/* small Chinese line above every section's main heading - same font and size as the module labels */
.section-zh {
  font-family: "LXGW WenKai Mono TC", serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.13em;
  color: #FF4242;                         /* all the Chinese text is in this red */
}
[data-tone="dark"] .section-zh { color: #6FFFC6; }   /* on the dark sections the Chinese line is mint */
.story-head .section-zh { margin-bottom: -14px; }   /* 8px to the title inside the 22px gap */
.course-main .section-zh { margin-bottom: -32px; }  /* 8px to the title inside the 40px gap */
.faq-head .section-zh { margin-bottom: 0; }

h1 {
  font-weight: 400;
  font-size: clamp(36px, 8.6vw, 78px);
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

.lede {
  width: min(564px, 100%);
  font-size: 24px;
  line-height: 1.4;
  color: var(--text);
}

/* bottom of the first screen: the same pill as the phone's floating bar (text + "שלחו לי", which opens the sign-up dialog) */
.hero-foot {
  position: relative;
  z-index: 2;
  height: 104px;
  padding-inline: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cta {
  width: min(460px, 100%);
  min-height: 68px;
  padding: 11px 24px 11px 11px;     /* the text side (right) is 24, the button side (left) is 11 */
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 84px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.7));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 32px rgba(27, 58, 52, 0.26);
}
.hero-cta-text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  text-align: right;
}
.hero-cta-btn {
  flex: none;
  height: 44px;
  padding: 0 22px;
  white-space: nowrap;
  border: 0;
  border-radius: 68px;
  box-shadow: 0 4px 11px rgba(40, 83, 75, 0.7);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.hero-cta-btn:hover { background: #1d3f38; }
.hero-cta-btn:active { transform: scale(0.97); }
.hero-cta-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.foot-form {
  position: relative;
  flex: none;
  width: min(471px, 100%);
}

/* orange bar to the right of the newsletter sentence */
.offer-wrap {
  width: min(506px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.offer-bar {
  flex: none;
  width: 4px;
  height: 44px;
  background: var(--accent);
}

.offer {
  flex: 0 1 490px;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  text-align: right;
}

.signup {
  display: flex;
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(247, 247, 247, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.signup { transition: border-color 0.2s; }
.signup:has(input:hover) { border-color: rgba(27, 58, 52, 0.4); }
.signup:focus-within { border-color: var(--accent); }

.signup input {
  flex: 1;
  min-width: 0;
  padding: 0 11px;
  border: 0;
  background: transparent;
  font: inherit;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  text-align: right;
}
.signup input::placeholder { color: rgba(16, 35, 31, 0.6); }
.signup input:focus { outline: none; }

.signup button {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.signup button .arrow {
  transform: scaleX(-1); /* points left, flipped horizontally */
  transition: translate 0.25s ease;
}
.signup button:hover .arrow { translate: -4px 0; } /* nudges left */
.signup button:hover { background: #1d3f38; }
.signup button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }

/* small print under the field; it also shows the thank-you / error message for a moment */
.form-msg {
  margin-top: 8px;
  text-align: right;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(27, 58, 52, 0.6);
}
.form-msg.is-status { font-size: 14px; color: var(--accent); }

/* mobile */
@media (max-width: 900px) {
  .breath { inset: auto; top: calc(50% - var(--foot-h, 0px) / 2); left: 50%; margin: 0; transform: translate(-50%, -50%); } /* centred above the sign-up bar like the text; can be wider than the screen, so centre it explicitly */
  .hero-foot { height: auto; padding: 20px 16px 28px; }
  .foot-form { width: 100%; }
  .offer-wrap { width: 100%; }
  .offer-bar { align-self: stretch; height: auto; }
}

@media (max-width: 640px) {
  .screen { padding-block: 112px 64px; }
  .screen-hero { padding: 0; height: 100vh; min-height: 0; grid-template-rows: 1fr; }
  .hero-foot { display: none; } /* sign-up bar is dropped on mobile; a sticky one comes later */
  .content { padding-top: 112px; top: -32px; } /* the Chinese label makes the block look low, so lift it a little */
  h1 { white-space: normal; }
  .hero { width: 100%; }
  .lede { width: 100%; font-size: 20px; }
  .logo { width: 100px; gap: 5px; }
  .logo-mark { width: 46px; height: 46px; font-size: 15px; letter-spacing: 1.9px; padding-inline-start: 1.9px; }
  .logo-name { font-size: 16px; letter-spacing: 1.9px; }
  .logo-tagline { font-size: 10px; letter-spacing: 1px; }
  .insta { font-size: 16px; }
}

/* ---- second screen: "what brought you here?" ---- */
.screen-ask {
  background: var(--accent);
  color: #fff;
}

/* pale circle that drifts around the screen like the old DVD screensaver:
   straight lines, bouncing off the edges, slowly swelling and shrinking (script.js moves it) */
.ask-circle {
  position: absolute;
  left: 0;
  top: 0;
  width: 320px;  /* script.js sets the real size from the screen width */
  aspect-ratio: 1;
  transform: translate(-9999px, -9999px); /* parked until script.js places it */
  will-change: transform;
  pointer-events: none;
}
.ask-circle img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
}

.ask {
  position: relative;
  z-index: 1;
  width: min(868px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.ask-head {
  width: min(523px, 100%);
  height: 129px; /* fixed, as in the design: the text is centred and may overflow evenly */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

h2 {
  font-weight: 400;
  font-size: clamp(34px, 8vw, 64px);
  line-height: 1.1;
  letter-spacing: 0.08em;
}

/* the question stays on one line at every width: it scales with the screen instead of wrapping */
.ask-head h2 {
  white-space: nowrap;
  font-size: clamp(22px, 6.6vw, 64px);
}

.ask-offer {
  font-size: 22px;
  line-height: 1.6;
  width: 100%;
}

.chips {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.chip {
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}
.chip:hover { background: rgba(255, 255, 255, 0.2); }
.chip:active { transform: scale(0.97); }
.chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (max-width: 640px) {
  .ask-head { height: auto; }

  .ask-offer { font-size: 18px; }

}

/* ---- side drawer with the explanation ---- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(27, 58, 52, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  /* the blur and tint build up gradually */
  transition: background 0.7s ease, -webkit-backdrop-filter 0.9s ease, backdrop-filter 0.9s ease;
}
.scrim.is-open {
  background: rgba(27, 58, 52, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.drawer {
  position: fixed;
  z-index: 21;
  top: 24px;
  bottom: 24px;
  left: 24px;
  width: min(424px, calc(100% - 24px));
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 16px 32px rgba(16, 35, 31, 0.16);
  overflow: auto;
  display: flex;
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.drawer.is-open { opacity: 1; transform: none; }

.drawer-close {
  position: absolute;
  top: 16px;
  inset-inline-start: 16px; /* RTL: right side */
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.3s ease, color 0.3s;
}
.drawer-close:hover { color: var(--accent); transform: rotate(90deg); }
.drawer-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.drawer-body {
  width: min(360px, calc(100% - 64px));
  margin: auto; /* centred vertically; scrolls if the text is long */
  padding-block: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.drawer-head { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }

.drawer-zh {
  font-family: "LXGW WenKai Mono TC", serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.13em;
  color: #FF4242;
}

.drawer h3 {
  font-weight: 400;
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.drawer-text {
  font-size: 22px;
  line-height: 1.4;
  color: var(--text);
  width: 100%;
}

/* the words arrive one beat after the panel */
.drawer.is-open .drawer-head,
.drawer.is-open .drawer-text {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.drawer.is-open .drawer-head { animation-delay: 0.2s; }
.drawer.is-open .drawer-text { animation-delay: 0.35s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 640px) {
  .drawer { top: 12px; bottom: 12px; left: 12px; width: calc(100% - 24px); }
  .drawer h3 { font-size: 32px; }
  .drawer-text { font-size: 19px; }
}

/* ---- third screen: Alon's story ---- */
.story {
  --panel: #0F2420;
  --paper: var(--bg);
  --ink-deep: #10231f;
  overflow: visible; /* a scroll container here would stop the dark half from sticking */
  display: grid;
  grid-template-columns: 1fr 1fr;   /* RTL: the dark half is on the right */
  align-items: start;
  place-items: start stretch;
  padding: 0;
  background: var(--paper);
}

/* the dark half stays pinned at exactly one screen high; only the text on the other side scrolls */
.story-dark {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  background: var(--panel);
  display: grid;
  place-items: center;
  padding: 124px clamp(24px, 5vw, 72px);
  overflow: hidden;
  isolation: isolate;
}

/* the video sits on the orange panel at 70%, fading in once real frames are moving */
.story-media { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.story-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.story.is-playing .story-video { opacity: 0.25; }

.story-head {
  width: min(576px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.story-title {
  font-weight: 400;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.2;
  letter-spacing: 0;
  color: #fff;
}

.story-divider { display: block; width: 254px; max-width: 100%; height: auto; }

.story-sub {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: #fff;
}

.quote {
  position: absolute;
  inset-inline: 24px;
  bottom: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.quote-text {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  color: #fff;
  text-align: center;
}

.quote-help {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s;
}
.quote-help:hover { transform: scale(1.12); background: #b0d1bc; }
.quote-help:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.quote-pop {
  position: absolute;
  bottom: calc(100% + 12px);
  inset-inline-start: auto;
  right: 24px;
  max-width: min(320px, calc(100% - 48px));
  padding: 12px 16px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-deep);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 12px 28px rgba(1, 13, 17, 0.28);
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.quote-pop[hidden] { display: none; }

.story-text {
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink-deep);
  padding: 80px clamp(24px, 5.5vw, 80px);
  font-size: 22px;
  line-height: 1.4;
  text-align: right;
  /* the whole text block sits in the middle of its half, both ways (lines stay right-aligned) */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.story-text p {
  width: 100%;
  max-width: 560px;
  margin: 0 0 11px;
  text-wrap: pretty;
}
.story-text .story-sign { margin-top: 36px; }

/* the heading words arrive one after another when the section scrolls in */
.story-head > * { opacity: 0; }
.story.in-view .story-head > * { animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.story.in-view .story-divider { animation-delay: 0.25s; }
.story.in-view .story-sub { animation-delay: 0.45s; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-dark { position: relative; height: auto; min-height: 80svh; padding-block: 140px 110px; }
  .story-text { min-height: 0; }
  .story-title { font-size: clamp(34px, 9vw, 52px); }
  .quote { flex-wrap: wrap; bottom: 20px; }
  .quote-text { font-size: 13px; letter-spacing: 0.06em; flex: 1 1 200px; }
  .story-text { padding: 56px 16px 72px; }
}

/* ---- text that rises out of a blur as each section comes into view ---- */
.js [data-reveal] { opacity: 0; }

.screen.in-view [data-reveal],
.story-text [data-reveal].shown {
  opacity: 1;
  animation: rise 1s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  animation-delay: calc(var(--i, 0) * 0.14s);
}

/* ---- course structure ---- */
.course {
  background: #1b3a34;             /* plain dark brown, no video */
  color: #fff;
  display: flex;
  align-items: center;
  padding: 124px clamp(24px, 3vw, 32px);
}

.course-grid {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 77px;
}

.course-main { flex: 0 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }

.course-title {
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: -33px; /* 7px to the text, inside the 40px flow gap */
  text-align: center;
}
.course-main > .section-zh { text-align: center; }

.course-text p {
  font-size: 22px;
  line-height: 1.4;
  color: #fff;
  margin-bottom: 11px;
  text-align: center;
}
.course-text p:last-child { margin-bottom: 0; }

.course-form { width: 100%; }

.course .form-msg { color: rgba(255, 255, 255, 0.6); }
.course .form-msg.is-status { color: #b0d1bc; }

.module-zh {
  font-family: "LXGW WenKai Mono TC", serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.13em;
  color: #FF4242;
  margin-bottom: -8px;
}

.module-title {
  font-weight: 400;
  font-size: 32px;
  line-height: 1.6;
  color: #FF4242;
  margin-bottom: 11px;
}

.course-lessons {
  counter-reset: lesson;
  display: flex;
  flex-direction: column;
  gap: 32px;
  text-align: right;
}

.module ol {
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  color: #fff;
}

/* numbered lessons: a big number, then the title; each one opens to show more */
.module li {
  counter-increment: lesson;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.module li:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.module li::before {
  content: counter(lesson);
  flex: none;
  min-width: 2ch;
  padding-top: 10px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
  color: #b0d1bc;
  font-variant-numeric: tabular-nums;
}

.module details { flex: 1; min-width: 0; }
.module summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding-block: 12px;
  cursor: pointer;
  list-style: none;
  transition: color 0.3s;
}
.module summary::-webkit-details-marker { display: none; }
.module summary:hover,
.module details[open] summary { color: #b0d1bc; }
.module summary:focus-visible { outline: 2px solid #b0d1bc; outline-offset: 2px; border-radius: 2px; }

/* a plus that turns into a cross */
.lesson-icon { position: relative; flex: none; width: 14px; height: 14px; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.lesson-icon::before,
.lesson-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.lesson-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.lesson-icon::before, .lesson-icon::after { background: #FF4242; }   /* the lesson plus / close mark in our red */
.module details[open] .lesson-icon { transform: rotate(135deg); }

.module details p {
  padding: 0 0 18px;
  max-width: 52ch;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  animation: lesson-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes lesson-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .module details p { animation: none; } .lesson-icon { transition: none; } }

@media (max-width: 640px) {
  .module li::before { font-size: 22px; padding-top: 15px; min-width: 2ch; } /* smaller lesson numbers on phones, still lined up with the title */
}

@media (max-width: 900px) {
  .course { padding: 112px 16px 72px; }
  .course-grid { flex-direction: column; align-items: stretch; gap: 40px; }
  .course-main { flex: none; }
  .course-text p { font-size: 18px; }
}

/* ---- fourth screen: frequently asked questions ---- */
.faq {
  background: var(--bg);
  place-items: center;
  padding: 96px clamp(24px, 6vw, 96px);
}

.faq-grid {
  position: relative;
  width: min(1180px, 100%);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 713px);   /* RTL: the title sits on the right */
  justify-content: space-between;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;                /* title and list share the same centre line */
}

.faq-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-title {
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.faq-sub {
  font-size: 22px;
  line-height: 1.6;
  color: rgba(16, 35, 31, 0.75);
}

.faq-list { border-top: 0; }

.faq-item {
  position: relative;
  border-bottom: 1px solid rgba(27, 58, 52, 0.14);
}
.faq-item:last-child { border-bottom: 0; }

/* an orange bar slides in beside the open question */
.faq-item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 22px;
  width: 4px;
  height: 0;
  background: var(--accent);
  transition: height 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.faq-item:first-child::before { top: 0; }
.faq-item.is-open::before { height: 44px; }

.faq-item h3 { margin: 0; }

.faq-q {
  width: 100%;
  margin: 0;
  padding: 24px 20px 24px 4px;
  padding-inline-start: 24px;     /* room for the bar */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-body);   /* Heebo 16, like the lesson titles in the syllabus */
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: right;
  cursor: pointer;
  transition: color 0.35s, padding 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.faq-item:first-child .faq-q { padding-top: 2px; }
.faq-item:last-child .faq-q { padding-bottom: 0; }
.faq-item.is-open .faq-q { padding-bottom: 0; }   /* the answer brings its own 16px */
.faq-q:hover { color: var(--accent); }
.faq-q:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.faq-item.is-open .faq-q { color: var(--accent); }

/* a plus that turns into a cross */
.faq-icon {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-inline-end: 4px;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-icon::before, .faq-icon::after { background: #FF4242; }   /* the plus / close mark in red */
.faq-item.is-open .faq-icon { transform: rotate(135deg); }

/* smooth height without measuring: the row grows from 0fr to 1fr */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.55s;
}
.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}
.faq-a-inner { overflow: hidden; min-height: 0; }

.faq-a p {
  max-width: 560px;
  padding: 16px 8px 24px 24px;
  padding-inline: 24px 8px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  text-wrap: pretty;
  opacity: 0;
  filter: blur(5px);
  transform: translateY(10px);
  transition: opacity 0.4s ease, filter 0.4s ease, transform 0.4s ease;
}
.faq-item.is-open .faq-a p {
  opacity: 1;
  filter: none;
  transform: none;
  transition: opacity 0.8s ease 0.15s, filter 0.8s ease 0.15s, transform 0.8s ease 0.15s;
}

@media (max-width: 900px) {
  .faq { padding: 120px 16px 80px; }
  .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .faq-q { font-size: 16px; padding-block: 20px; }
  .faq-item:first-child .faq-q { padding-top: 2px; }
}

/* ---- last screen: ready to set out? (the footer) ---- */
.cta {
  background: #0F2420;             /* very dark green under the video */
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100svh;
  max-height: 1100px;
  padding: 124px 16px;
  overflow: hidden;
}

.cta-media { position: absolute; inset: 0; z-index: 0; }
.cta-video {
  position: absolute;
  left: 50%;
  top: 0;
  height: max(100%, 960px);     /* at least 960px tall -> 1707px wide, a little wider than the screen, as in the design */
  aspect-ratio: 16 / 9;
  min-width: 100%;
  max-width: none;
  transform: translateX(-50%);
  object-fit: cover;
  opacity: 0.25;                  /* lets the green background through so the text reads */
}

.cta-card {
  position: relative;
  z-index: 2;
  width: min(592px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  /* no box: the text sits straight on the video, a soft shadow keeps it readable */
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.35);
}

.cta-title {
  font-weight: 400;
  font-size: clamp(34px, 9vw, 56px);
  line-height: 1.6;
  letter-spacing: 0;
  white-space: nowrap;
}

.cta-text {
  width: min(490px, 100%);
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.6;
}

.cta-form { width: min(480px, 100%); margin-top: 24px; }

.cta-legal {
  position: absolute;
  inset-inline: 0;
  bottom: 16px;
  z-index: 2;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  opacity: 0.8;
}
.cta-legal { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding-inline: 16px; }
.cta-legal-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.4); }
.cta-credit { color: #fff; text-decoration: none; transition: opacity 0.3s; }
.cta-credit:hover { opacity: 0.7; text-decoration: underline; text-underline-offset: 3px; }
.cta-credit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 2px; }
.cta .form-msg { color: rgba(255, 255, 255, 0.6); }
.cta .form-msg.is-status { color: #b0d1bc; }

@media (max-width: 640px) {
  .cta { height: auto; min-height: 100svh; max-height: none; padding: 112px 16px 72px; }
  .cta-card { transform: none; }
  .cta-text { font-size: 18px; }
  .cta-title { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .rig { animation-duration: 24s; }
  .underline, .screen-ask.in-view .underline { transition: none; }
  .scrim, .drawer, .drawer-head, .drawer-text { transition-duration: 0.01s; animation: none; }
  .story-head > *, .quote-pop { animation: none !important; opacity: 1; }
  .js [data-reveal] { opacity: 1; }
  .faq-a, .faq-a p, .faq-item::before, .faq-icon { transition-duration: 0.01s !important; transition-delay: 0s !important; }
  .screen.in-view [data-reveal], .story-text [data-reveal].shown { animation: none; }
}

/* tap-to-play, shown only when a phone refuses to autoplay the background video */
.video-play {
  position: absolute;
  z-index: 3;
  inset-inline-end: 16px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.85);
  color: #1b3a34;
  cursor: pointer;
}

/* ---- loading screen (phones only; index.html switches it on) ---- */
.splash { display: none; }
@media (max-width: 640px) {
  html.splash-on { overflow: hidden; }
  .splash {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: var(--bg);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.4, 0, 0.2, 1), filter 0.9s ease;
  }
  .splash .logo { animation: splash-in 0.9s ease both; gap: 7px; width: auto; }
  .splash .logo-mark { width: 67px; height: 67px; font-size: 21.7px; letter-spacing: 2.8px; padding-inline-start: 2.8px; }   /* 15% larger than the header logo */
  .splash .logo-name { font-size: 25.3px; letter-spacing: 3px; }
  .splash .logo-tagline { font-size: 12.7px; letter-spacing: 1.8px; margin-top: -3px; }
  .splash.is-done { opacity: 0; transform: scale(1.06); filter: blur(8px); pointer-events: none; }
  .splash-line {
    width: 160px;
    height: 2px;
    border-radius: 1px;
    overflow: hidden;
    background: rgba(27, 58, 52, 0.1);
    animation: splash-in 0.9s ease 0.15s both;
  }
  .splash-line i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;           /* RTL: fills from the right */
    transition: transform 1.5s cubic-bezier(0.25, 0.6, 0.3, 1);
  }
}
@keyframes splash-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  .splash, .splash .logo, .splash-line { animation: none; }
  .splash.is-done { transform: none; filter: none; }
  .splash-line i { transition-duration: 0.01s !important; }
}

/* phones: the story screen fills the display, and the heading breaks before "אמר די" so "די" is never left alone */
@media (max-width: 640px) {
  .story-dark { height: 100vh; min-height: 0; padding-block: 110px 90px; }
  .story-title-end { display: block; }
}

/* phones: the quote makes room for a small "my story" cue that scrolls down to the text */
.story-cue { display: none; }
@media (max-width: 640px) {
  .quote { display: none; }
  .story-cue {
    position: absolute;
    inset-inline: 0;
    bottom: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 15px;
    letter-spacing: 0.04em;
    text-decoration: none;
  }
  .story-cue svg { animation: cue-bob 2.2s ease-in-out infinite; }
  .story-cue:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 2px; }
}
@keyframes cue-bob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .story-cue svg { animation: none; } }

/* phones: a 24px side gutter across the whole page */
@media (max-width: 640px) {
  :root { --pad: 24px; }
  .top { padding-inline: 24px; }
  .top-links { inset-inline-end: 24px; }
  .story-head { padding-inline: 0; }          /* the story panel already has its own 24px */
  .story-text { padding-inline: 24px; }
  .course { padding-inline: 24px; }
  .faq { padding-inline: 24px; }
  .cta { padding-inline: 24px; }
  .cta-legal { padding-inline: 24px; font-size: 10px; }
  .cta-legal-sep { height: 10px; background: rgba(255, 255, 255, 0.2); }   /* a small divider at 20% opacity between the two lines of credit */

  /* FAQ: centred heading, questions start right at the edge of the line */
  .faq-head { align-items: center; text-align: center; }
  .faq-q { padding-inline-start: 0; }
  .faq-a p { padding-inline-start: 0; }     /* the answer lines up with the question above it */
  .faq-item::before { display: none; }       /* the orange bar would sit on top of the text; the open question turns orange instead */
}

/* phones: the story stops after "ככה זה התחיל" until the visitor asks for the rest */
.story-more { display: contents; }
.story-more-btn { display: none; }
@media (max-width: 640px) {
  .story-more { display: none; width: 100%; }
  .story-text.is-open .story-more { display: block; }
  .story-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;               /* RTL: sits on the right, under the text */
    margin-top: 10px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--accent);
    background: none;
    color: var(--ink-deep);
    font-family: var(--font-body);
    font-size: 16px;
    letter-spacing: 0.04em;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.3s;
  }
  .story-more-btn:hover { opacity: 1; }
  .story-more-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
  .story-more-btn svg { animation: cue-bob 2.2s ease-in-out infinite; }
  .story-text.is-open .story-more-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { .story-more-btn svg { animation: none; } }

/* ---- floating sign-up pill: sticky at the bottom on every screen size until the footer comes into view ---- */
@media all {
  .float-cta {
    position: fixed;
    inset-inline: 0;
    margin-inline: auto;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 15;
    width: min(354px, calc(100% - 24px));
    min-height: 68px;
    padding: 11px 21px 11px 11px;     /* the text side (right) is 21, the button side (left) is 11 */
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 84px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.7));
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 32px rgba(27, 58, 52, 0.26);
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .float-cta.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .float-cta-text {
    flex: 1;
    min-width: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink);
    text-align: right;
  }
  .float-cta-btn {
    flex: none;
    width: 73px;
    height: 44px;
    padding: 11px 0;
    white-space: nowrap;
    border: 0;
    border-radius: 68px;
    box-shadow: 0 4px 11px rgba(255, 66, 66, 0.55);
    background: #FF4242;                  /* the sticky's button in red */
    color: #fff;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
  }
  .float-cta-btn:active { transform: scale(0.97); }
  .float-cta-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
}
/* small mail icon to the right of the pill's text */
.float-cta-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;                             /* desktop pill is 72px tall: 8px clear above, below and on the right */
  height: 56px;
  margin-block: -4px;                      /* so the circle doesn't make the pill taller */
  border-radius: 50%;
  background: rgba(40, 83, 75, 0.08);     /* our orange at 8%, a light circle behind the icon */
  color: var(--accent);
}
.float-cta-icon svg { display: block; width: 24px; height: 24px; }
@media (max-width: 640px) {
  .float-cta { padding-right: 11px; }
  .float-cta-icon { width: 44px; height: 44px; margin-block: 0; }   /* phones: the text runs to 3 lines, so a fixed, smaller circle */
  .float-cta-icon svg { width: 22px; height: 22px; }
}

/* larger screens: a little wider, with roomier text and button */
@media (min-width: 641px) {
  .float-cta { width: min(532px, calc(100% - 48px)); padding: 11px 7px 11px 11px; gap: 16px; bottom: 32px; }   /* 32px above the bottom of the window */
  .float-cta-text { font-size: 16px; line-height: 1.5; }
  .float-cta-btn { width: auto; padding: 0 22px; }
  /* the button fills the pill's height, so the space above, below and to its left is the same 11px */
  .float-cta-btn { align-self: stretch; height: auto; min-height: 44px; }
  .float-cta-btn:hover { background: #e63535; }
}
/* the sticky's button breathes gently: a soft red ring grows out of it and fades, with a tiny swell */
@keyframes cta-pulse {
  0%   { transform: scale(1);    box-shadow: 0 4px 11px rgba(255, 66, 66, 0.55), 0 0 0 0 rgba(255, 66, 66, 0.45); }
  50%  { transform: scale(1.03); }
  70%  { box-shadow: 0 4px 11px rgba(255, 66, 66, 0.55), 0 0 0 10px rgba(255, 66, 66, 0); }
  100% { transform: scale(1);    box-shadow: 0 4px 11px rgba(255, 66, 66, 0.55), 0 0 0 0 rgba(255, 66, 66, 0); }
}
.float-cta.is-shown .float-cta-btn { animation: cta-pulse 2.6s ease-in-out infinite; }
.float-cta .float-cta-btn:hover, .float-cta .float-cta-btn:focus-visible { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .float-cta.is-shown .float-cta-btn { animation: none; } }
@media all {
}
@media (prefers-reduced-motion: reduce) { .float-cta { transition: none; } }

/* phones: the sign-up field in "what you will learn" is gone (the floating bar replaces it) */
@media (max-width: 640px) {
  .course-form { display: none; }
}

/* ---- sign-up dialog (opened from the floating bar on phones and the first-screen pill everywhere) ---- */
@media all {                         /* the dialog now opens from the first screen on every size, not only on phones */
  .join {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
    background: rgba(27, 58, 52, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    transition: background 0.5s ease, -webkit-backdrop-filter 0.5s ease, backdrop-filter 0.5s ease;
  }
  .join[hidden] { display: none; }
  .join.is-open { background: rgba(27, 58, 52, 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

  .join-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    margin: auto;
    padding: 36px 24px 24px;
    border-radius: 24px;
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 8px 32px rgba(27, 58, 52, 0.26);
    text-align: right;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .join.is-open .join-card { opacity: 1; transform: none; }

  .join-close {
    position: absolute;
    inset-block-start: 12px;
    inset-inline-end: 12px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--ink);
    cursor: pointer;
  }
  .join-close:focus-visible, .join-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

  .join-form, .join-done { display: flex; flex-direction: column; gap: 0; }
  .join-done[hidden] { display: none; }

  .join-zh {
    margin-bottom: 8px;
    font-family: "LXGW WenKai Mono TC", serif;
    font-size: 14px;
    letter-spacing: 0.13em;
    color: #FF4242;
  }
  .join-title {
    font-weight: 400;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--ink);
  }
  .join-text {
    margin-top: 12px;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.7;
    color: rgba(16, 35, 31, 0.8);
  }

  .join-label {
    margin-top: 24px;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 14px;
    color: var(--ink);
  }
  .join-input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(27, 58, 52, 0.2);
    border-radius: 12px;
    background: #fff;
    font-family: var(--font-body);
    font-size: 16px;      /* 16px so iPhones do not zoom the page on focus */
    color: var(--text);
    text-align: right;
    transition: border-color 0.2s;
  }
  .join-input::placeholder { color: rgba(16, 35, 31, 0.4); text-align: right; }
  .join-input:focus { outline: none; border-color: var(--accent); }
  .join-input.is-invalid { border-color: #b3261e; }

  .join-check {
    position: relative;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
  }
  .join-check input {                    /* the real checkbox stays for keyboards and screen readers */
    position: absolute;
    width: 22px;
    height: 22px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }
  .join-box {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(27, 58, 52, 0.4);
    border-radius: 6px;
    background: #fff;
    transition: background 0.2s, border-color 0.2s;
  }
  .join-box::after {
    content: "";
    width: 6px;
    height: 11px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease;
  }
  .join-check input:checked + .join-box { background: var(--accent); border-color: var(--accent); }
  .join-check input:checked + .join-box::after { transform: rotate(45deg) scale(1); }
  .join-check input:focus-visible + .join-box { outline: 2px solid var(--ink); outline-offset: 2px; }
  .join-check.is-invalid .join-box { border-color: #b3261e; }
  .join-check-text {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(16, 35, 31, 0.85);
  }

  .join-msg {
    min-height: 20px;
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: #b3261e;
  }
  .join-submit {
    width: 100%;
    height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 11px rgba(40, 83, 75, 0.45);
    transition: background 0.3s, transform 0.3s;
  }
  .join-submit:active { transform: scale(0.98); }
  .join-done .join-submit { margin-top: 24px; }
  .join-small {
    margin-top: 12px;
    text-align: center;
    font-family: var(--font-body);
    font-size: 12px;
    color: rgba(16, 35, 31, 0.6);
  }
}
@media (prefers-reduced-motion: reduce) { .join, .join-card { transition: none; } }

/* footer: larger text on phones; the consent checkbox under the field */
@media (max-width: 640px) {
  .cta-text { font-size: 22px; }
}
.cta-check {
  position: relative;
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: right;
  cursor: pointer;
}
.cta-check input {                      /* the real checkbox stays for keyboards and screen readers */
  position: absolute;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.cta-box {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.2s, border-color 0.2s;
}
.cta-box::after {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}
.cta-check input:checked + .cta-box { background: var(--accent); border-color: var(--accent); }
.cta-check input:checked + .cta-box::after { transform: rotate(45deg) scale(1); }
.cta-check input:focus-visible + .cta-box { outline: 2px solid #fff; outline-offset: 2px; }
.cta-check.is-invalid .cta-box { border-color: #ffb4ab; }
.cta-check-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}
.cta .form-msg { color: rgba(255, 255, 255, 0.75); }
.cta .form-msg.is-status { color: #ffb4ab; }
.cta .form-msg:empty { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .cta-box, .cta-box::after { transition: none; } }

/* footer sign-up field: frosted glass over the video, from the Figma design */
.cta-form { width: min(471px, 100%); }
.cta .signup {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.32));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(27, 58, 52, 0.26);
}
.cta .signup:has(input:hover) { border-color: rgba(255, 255, 255, 0.3); }
.cta .signup:focus-within { border-color: rgba(255, 255, 255, 0.6); }
.cta .signup input { color: #fff; }
.cta .signup input::placeholder { color: rgba(255, 255, 255, 0.7); }
.cta .signup button { margin: -1px 0 -1px -1px; background: #FF4242; }   /* footer button in red */
.cta .signup button:hover { background: #e63535; }      /* the orange button sits over the border, as in the design */

/* a hand-drawn arrow under the symptoms: "pick the symptom you suffer from" (desktop only) */
.chip-row { position: relative; }
.chips-hint {
  position: absolute;
  top: calc(100% + 14px);
  right: -19px;                       /* physical: the hint hangs off the right end of the last row, as in the design */
  width: 215px;
  height: 76px;
  pointer-events: none;
}
.chips-hint-arrow {
  position: absolute;
  left: 0;                            /* the arrow sits at the left edge of the 215px block, the text to its right */
  top: 0;
  width: 94.5px;
  height: 67.9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chips-hint-arrow img { display: block; width: 95.9px; height: 23px; max-width: none; transform: rotate(30deg) scaleY(-1); }
.chips-hint-text {
  position: absolute;
  left: 102px;
  top: 34px;
  width: 113px;
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
  text-align: left;          /* left-aligned lines, as in the design */
}
@media (max-width: 640px) { .chips-hint { display: none; } }

/* the arrow and its text drop in from above, top to bottom, after the last symptom */
.screen.in-view .chips-hint[data-reveal] {
  animation: hint-drop 1.6s cubic-bezier(0.3, 0.7, 0.3, 1) backwards;
  animation-delay: calc(var(--i, 0) * 0.14s);
}
@keyframes hint-drop {
  0%   { opacity: 0; transform: translateY(-48px); clip-path: inset(0 0 100% 0); }
  35%  { opacity: 1; }
  100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) { .screen.in-view .chips-hint[data-reveal] { animation: none; } }

/* phones and tablets: one wrapping flow instead of the three desktop rows; the order pairs long symptoms with short ones so every line fills out */
@media (max-width: 900px) {
  .chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; }
  .chip-row { display: contents; }
  .chip { flex: 1 1 auto; text-align: center; }   /* each line stretches to the full width */
  .chip[data-why="why-10"] { order: 1; }
  .chip[data-why="why-14"] { order: 2; }
  .chip[data-why="why-5"] { order: 3; }
  .chip[data-why="why-12"] { order: 4; }
  .chip[data-why="why-1"] { order: 5; }
  .chip[data-why="why-8"] { order: 6; }
  .chip[data-why="why-17"] { order: 7; }
  .chip[data-why="why-13"] { order: 8; }
  .chip[data-why="why-3"] { order: 9; }
  .chip[data-why="why-15"] { order: 10; }
  .chip[data-why="why-18"] { order: 11; }
  .chip[data-why="why-4"] { order: 12; }
  .chip[data-why="why-9"] { order: 13; }
  .chip[data-why="why-6"] { order: 14; }
  .chip[data-why="why-11"] { order: 15; }
  .chip[data-why="why-2"] { order: 16; }
  .chip[data-why="why-16"] { order: 17; }
  .chip[data-why="why-7"] { order: 18; }
  .chips-hint { display: none; }                  /* the arrow points at the three-row layout, so it stays on desktop */
}

/* "Coming soon": data-soon elements are switched off, with a small tooltip on hover (or after a tap) */
[data-soon] { position: relative; cursor: not-allowed; }
[data-soon]::after {
  content: "יעלה ממש בקרוב 💚";
  position: absolute;
  inset-inline-start: 50%;
  transform: translateX(50%);
  top: calc(100% + 10px);
  padding: 7px 12px;
  border-radius: 8px;
  background: #0F2420;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 20;
}
[data-soon]:hover::after, [data-soon]:focus-visible::after, [data-soon].show-tip::after { opacity: 1; }
.gift-link[data-soon] > * { opacity: 0.45; }
.float-cta-btn[data-soon]::after { top: auto; bottom: calc(100% + 14px); }
.float-cta .float-cta-btn[data-soon] { background: #c9c9c9; box-shadow: none; animation: none; }
.float-cta .float-cta-btn[data-soon]:hover { background: #c9c9c9; }
