/* Formula Familie — brand tokens from Formula_Familie_Brand_Guidelines_v1 */
:root {
  --forest: #2F3E31;
  --terracotta: #C45F3C;
  --terracotta-deep: #A34D2D;
  --sage: #A9B9A2;
  --cream: #F4EFE5;
  --sand: #D7C9B3;
  --rose: #CFAEA3;
  --ink: #3D302A;

  --radius-card: 16px;
  --radius-panel: 26px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Newsreader', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--forest);
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; }
h3 { font-size: 1.25rem; }

.dot { color: var(--terracotta); }

em, .standfirst {
  font-style: italic;
}

p { margin: 0 0 1em; }

a { color: inherit; }

.label {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--terracotta-deep);
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.rule {
  width: 56px;
  height: 3px;
  background: var(--terracotta);
  border: none;
  margin: 10px 0 18px;
}

.signoff {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 2rem;
  color: var(--cream);
}

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  max-width: 1080px;
  margin: 0 auto;
}

.site-header img.logo { height: 54px; width: auto; display: block; }

.ig-link {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--forest);
  border: 2px solid var(--forest);
  border-radius: 999px;
  padding: 10px 20px;
  transition: background .15s ease, color .15s ease;
}
.ig-link:hover { background: var(--forest); color: var(--cream); }

/* ---------- hero + gate (combined top section) ---------- */
.hero-gate {
  padding: 48px 0 80px;
}
.hero-gate .wrap {
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.hero-copy {
  flex: 1 1 50%;
  min-width: 0;
  text-align: left;
}
.hero-copy .eyebrow { display: block; margin-bottom: 14px; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .standfirst {
  font-size: 1.25rem;
  margin: 0;
  color: var(--forest);
}

@media (max-width: 900px) {
  .hero-gate { text-align: center; }
  .hero-gate .wrap { flex-direction: column; gap: 28px; }
  .hero-copy {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
  }
  .hero-copy .standfirst { max-width: 560px; margin: 0 auto; }
}

/* Compact mobile: keep the whole form (through the Next/Submit button)
   visible without scrolling on common phone sizes, the way the
   itsmodernmillie reference does — one pitch, not three, and a tighter
   headline. */
@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .site-header img.logo { height: 44px; }

  .hero-gate { padding: 16px 0 32px; }
  .hero-gate .wrap { gap: 16px; }
  .hero-copy .eyebrow { margin-bottom: 6px; }
  .hero-copy h1 {
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: 8px;
  }
  .hero-copy .standfirst { font-size: 0.9rem; margin: 0 auto; }
}
.btn {
  display: inline-block;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: var(--terracotta);
  color: var(--cream);
  padding: 16px 34px;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--terracotta-deep); transform: translateY(-1px); }

/* ---------- about ---------- */
.about {
  padding: 60px 0;
}
.about .grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.about .badge-wrap { display: flex; justify-content: center; align-items: center; }
.about .badge-wrap img { width: 260px; height: auto; }
@media (max-width: 760px) {
  /* The logo sits right under the dark form box at this width (badge-wrap
     is reordered above the text below), so trim the section's own top
     padding too — together with hero-gate's reduced bottom padding, this
     cuts the box-to-logo gap by about a third. */
  .about { padding-top: 40px; }
  .about .grid { grid-template-columns: 1fr; }
  .about .badge-wrap { order: -1; }
  .about .badge-wrap img { width: 200px; height: auto; }
}

/* ---------- whats inside ---------- */
.inside {
  background: var(--sand);
  padding: 64px 0;
}
.inside .intro { max-width: 620px; margin: 0 auto 36px; text-align: center; }
.inside .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
/* Two cards per line all the way down, instead of dropping to one on the
   smallest phones — keeps the section condensed. */
@media (max-width: 860px) { .inside .grid { grid-template-columns: repeat(2, 1fr); } }

.topic-card {
  background: var(--cream);
  border-radius: var(--radius-card);
  padding: 22px 18px;
  text-align: center;
}
.disc {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.disc svg { width: 22px; height: 22px; stroke: var(--forest); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topic-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.topic-card p { font-size: 0.9rem; color: var(--ink); opacity: 0.85; margin: 0; }

/* ---------- download gate (condensed, multi-step) ---------- */
.gate-panel {
  background: var(--forest);
  color: var(--cream);
  border-radius: var(--radius-panel);
  padding: 40px clamp(22px, 5vw, 48px) 36px;
  width: 100%;
  max-width: 460px;
  flex: 0 0 min(440px, 100%);
  margin: 0;
  text-align: left;
}

@media (max-width: 900px) {
  .gate-panel { flex: none; margin: 0 auto; }
}
.gate-panel .rule { background: var(--terracotta); }
.gate-panel h2 { color: var(--cream); margin-bottom: 8px; }

/* Compact mobile panel: equal space above and below the standalone
   heading (box-top ↔ heading, heading ↔ First name). The selector here is
   boosted (.gate-panel .gate-heading, not just .gate-heading) so it
   reliably beats .gate-panel h2's margin-bottom above. */
@media (max-width: 640px) {
  .gate-panel { padding: 18px 16px 16px; }
  .gate-panel .gate-heading {
    font-size: 1rem;
    line-height: 1.2;
    margin: 0 0 18px;
  }
}

.form-steps { overflow: hidden; }
/* Off-screen steps still get painted inside the clipped track, which can
   leak a stray sliver of their content past the clip edge at some zoom
   levels. Hide them from rendering too — but only once their slide
   finishes, and reveal the incoming step immediately, so the slide
   animation itself still looks the same. */
.form-step { transition: visibility 0s linear .4s; }
.form-step:not([inert]) { visibility: visible; transition-delay: 0s; }
.form-step[inert] { visibility: hidden; }
.step-track {
  display: flex;
  align-items: stretch;
  transition: transform .4s cubic-bezier(.65, 0, .35, 1);
}
.form-step {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* .step-body grows to soak up the panel's locked-height leftover (instead
   of all of it collecting in the gap below), so a step's own content can
   decide where that space goes. .step-foot stays pinned to its natural
   size at a fixed distance below. */
.step-body { flex: 1 1 auto; min-height: 0; }
.step-foot { flex: 0 0 auto; }

/* Steps 2–4: vertically centre the answer options (pills / radio cards)
   in the space between the question and the Next button, instead of
   them sitting pushed up directly under the question. */
.step-body .question-block {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.question-block .pill-group,
.question-block .radio-card-group {
  margin-top: auto;
  margin-bottom: auto;
}

/* Tighter minimum gap on mobile so the panel's locked height (set by the
   tallest step) shrinks too, helping the whole box clear the fold. Set to
   match .field-stack's 18px gap so the space below the Email box feels the
   same as the space between the Name and Email boxes above it. */
@media (max-width: 640px) {
  .form-step { gap: 18px; }
}

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

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.step-actions .btn { flex: 1; text-align: center; }

.btn-link {
  background: none;
  border: none;
  padding: 8px 0;
  color: var(--rose);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: underline;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
  font-size: 0.86rem;
  white-space: nowrap;
}
.btn-link:hover { color: var(--cream); }

.step-dots { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  opacity: 0.5;
  transition: opacity .2s ease, background .2s ease, transform .2s ease;
}
.step-dot.is-active { opacity: 1; background: var(--terracotta); transform: scale(1.3); }

.gate-fineprint {
  margin: 14px 0 0;
  font-size: 0.78rem;
  text-align: center;
  color: var(--cream);
  opacity: 0.65;
}

.step-final-copy { font-size: 0.95rem; opacity: 0.92; margin: 0 0 14px; }

label.field-label {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--rose);
  margin-bottom: 8px;
}

input[type="text"], input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border-radius: 10px;
  border: none;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
}
input[type="text"]:focus, input[type="email"]:focus { outline: 3px solid var(--sage); }

.question-block { margin: 0; }
.question-block .q-title {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: var(--cream);
}
.question-block .q-hint {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 14px;
}

.pill-group { display: flex; flex-wrap: wrap; gap: 9px; }
.pill-group.compact-scroll {
  max-height: 180px;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
}

.pill {
  position: relative;
}
.pill input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--sage);
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--cream);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
  user-select: none;
}
.pill input:checked + span {
  background: var(--terracotta);
  border-color: var(--terracotta);
  color: var(--cream);
}
.pill input:focus-visible + span { outline: 2px solid var(--cream); outline-offset: 2px; }

.other-input { margin-top: 12px; max-width: 320px; display: none; }
.other-input.show { display: block; }

.radio-card-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.radio-card {
  position: relative;
  display: block;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 78px;
}
.radio-card input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.radio-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3px;
  height: 100%;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--sage);
  transition: background .12s ease, border-color .12s ease;
}
.radio-card-main {
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.25;
  color: var(--cream);
}
.radio-card-sub {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-size: 0.7rem;
  line-height: 1.25;
  color: var(--rose);
  opacity: 0.9;
}
.radio-card input:checked + .radio-card-body {
  background: var(--terracotta);
  border-color: var(--terracotta);
}
.radio-card input:checked + .radio-card-body .radio-card-sub { color: var(--cream); opacity: 0.85; }
.radio-card input:focus-visible + .radio-card-body { outline: 2px solid var(--cream); outline-offset: 2px; }

/* Steps 2 and 3's options only carry one line of text (no sub-label), so on
   their own they'd render shorter than the two-line cards on step 4.
   Match that box height so all three steps' radio cards feel the same size. */
[data-step="2"] .radio-card-body,
[data-step="3"] .radio-card-body { min-height: 69px; }

.consent {
  font-size: 0.82rem;
  opacity: 0.8;
  margin: 0;
}
.consent a { color: var(--rose); text-decoration: underline; }

.gate-panel .btn { background: var(--cream); color: var(--forest); }
.gate-panel .btn:hover { background: var(--rose); }
.gate-panel .btn:disabled { opacity: 0.7; cursor: default; }

.form-status {
  display: none;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--cream);
}
.form-status.show { display: block; }
.form-status.error { color: #F2C9B8; }

/* Mobile: step 5 (the final/submit step) is the tallest step because of
   its two paragraphs plus a button that was wrapping to 2 lines — and
   since all 5 steps share one locked height (align-items:stretch on
   .step-track), that one step was pushing the whole panel past the fold.
   Placed at the very end of the sheet so these overrides reliably beat
   every unconditional rule above regardless of selector specificity. */
@media (max-width: 640px) {
  .step-final-copy {
    font-size: 0.85rem;
    line-height: 1.3;
    margin: 0 0 10px;
  }
  .consent {
    font-size: 0.74rem;
    line-height: 1.3;
  }
  .step-actions { gap: 10px; }
  .gate-panel .btn {
    padding: 13px 20px;
    font-size: 0.88rem;
    letter-spacing: 0.02em;
  }
  .step-dots { margin-top: 14px; }
  .gate-fineprint { margin: 10px 0 0; }
}

/* ---------- footer ---------- */
footer {
  background: var(--forest);
  color: var(--cream);
  padding: 50px 0 36px;
  text-align: center;
}
footer .badge { width: 170px; height: auto; margin: 0 auto 18px; }
footer .foot-links { margin: 18px 0; font-size: 0.9rem; opacity: 0.85; }
footer .foot-links a { text-decoration: none; margin: 0 10px; }
footer .foot-links a:hover { text-decoration: underline; }
footer .copyright { font-size: 0.75rem; opacity: 0.55; margin-top: 18px; }
