/* Filomou — marketing site styles.
   The web translation of the app's "Macaw v4" design system
   (docs/planning/DESIGN.md). style.css stays as the quiet stylesheet for the
   legal pages; this file dresses index.html (and any future marketing page).

   House rules carried over from the app, do not break them:
   - Macaw blue #1CB0F6 is the brand. Leaf green ONLY means live/call/success.
   - Depth is ONE hard lower edge in a darker shade. Never a blurred shadow.
   - CTAs are chunky and UPPERCASE, and travel down 3px when pressed.
   - Blue #1CB0F6 fails contrast as body text — display sizes only. Links use
     humpback blue.

   APPEARANCE: the site is pinned to the app's LIGHT theme — snow-white canvas,
   cool greys, macaw blue — and does NOT follow the visitor's system setting.
   The dark palette is kept below under :root[data-theme="dark"]; to bring it
   back, either set that attribute on <html> or change the selector back to
   `@media (prefers-color-scheme: dark)`. Dark flips NEUTRALS only — accent
   faces and the blue call stage stay constant.
*/

/* ---------- fonts (self-hosted, same family as the app) ---------- */

@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/Nunito-400.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/Nunito-700.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Nunito';
  src: url('assets/fonts/Nunito-900.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* ---------- tokens (app/lib/theme/tokens.dart) ---------- */

:root {
  /* Keeps form fields, scrollbars and other UA-painted chrome light even when
     the visitor's OS is in dark mode. Without this the email inputs render
     dark against a white page. */
  color-scheme: light;

  --brand: #1CB0F6;
  --brand-pressed: #1899D6;
  --brand-soft: #E3F4FE;

  --leaf: #58CC02;          /* live / call / success ONLY */
  --leaf-pressed: #46A302;
  --fox: #FF9600;
  --bee: #FFC800;
  --pig: #F065A8;
  --humpback: #2B70C9;      /* information + links */
  --cardinal: #FF4B4B;
  --cardinal-pressed: #E63F3F;

  --ink: #4B4B4B;           /* never pure black */
  --ink-muted: #6E7175;
  --line: #E5E5E5;
  --canvas: #FFFFFF;
  --surface: #F7F9FA;
  --night: #131F24;

  --edge: rgba(0, 0, 0, 0.18); /* the 18%-black lower edge on colored faces */

  /* Constants — these sit ON colored/physical surfaces, so they must NOT flip
     with the theme (the app learned this the hard way: flipping ink gave the
     buddy portrait white eyes). */
  --bezel: #3C3C3C;      /* the phone's physical frame */
  --mark-ink: #4B4B4B;   /* eyes + smile inside the phi mark */
  --radius: 16px;
  --radius-lg: 24px;
  --shell: 1520px;
}

:root[data-theme="dark"] {
    --ink: #F1F7FB;
    --ink-muted: #9AB0BC;
    --line: #2C3D45;
    --canvas: #131F24;
    --surface: #1B2C33;
    --brand-soft: #16323F;
    /* The mark's face is drawn FOR its backdrop — white on dark, as in
       logo-dark-filomou.svg. The blue stroke is identical in both. */
    --mark-ink: #FFFFFF;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 48px);
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.08; font-weight: 900; }
h1 { font-size: clamp(38px, 6.2vw, 62px); }
h2 { font-size: clamp(30px, 3.2vw, 46px); text-wrap: balance; } /* even two-line headings */
h3 { font-size: 21px; letter-spacing: -0.01em; }
p  { margin: 0; text-wrap: pretty; }                          /* no one-word last lines */

/* The sticky header would otherwise sit on top of whatever an in-page link
   jumps to. */
[id] { scroll-margin-top: 92px; }

a { color: var(--humpback); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:root[data-theme="dark"] a { color: var(--brand); }

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

.section { padding: clamp(68px, 6vw, 104px) 0; }
.section--tight { padding: clamp(60px, 5vw, 84px) 0; }

/* Tiny uppercase grey label — the app's SectionLabel. */
.label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.label--onBrand { color: rgba(255, 255, 255, 0.75); }

.lede { font-size: clamp(18px, 1.45vw, 21px); color: var(--ink-muted); max-width: 48ch; }

/* One rule owns the gap under a heading, so every section breathes the same.
   Without it `p { margin: 0 }` leaves the roster's lede welded to its h2. */
h2 + .lede { margin-top: 16px; }
.lede + .lede { margin-top: 14px; }

/* ---------- chunky button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 26px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: var(--brand);
  color: #FFFFFF;
  box-shadow: 0 4px 0 var(--edge);
  transition: transform 90ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 90ms ease;
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--edge);
}
@media (hover: hover) {
  .btn:hover:not(:active):not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 var(--edge);
  }
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}
.btn--onBrand { background: #FFFFFF; color: var(--brand-pressed); }

/* ---------- card: flat face, 2px border, hard lower edge ---------- */

.card {
  background: var(--canvas);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--line);
  padding: 22px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--canvas);   /* fallback where color-mix is unsupported */
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.site-header .shell {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--brand);
  font-weight: 900;
  font-size: 25px;
  letter-spacing: -0.03em;
}
.wordmark svg { width: 24px; height: auto; display: block; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.site-nav a:hover { color: var(--ink); }
.site-nav .btn { color: #FFFFFF; }
@media (max-width: 780px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 5vh, 64px) 0 clamp(28px, 4vh, 52px);
  background: linear-gradient(180deg, #F6FCFF 0%, var(--canvas) 88%);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(48px, 5vw, 96px);
  align-items: center;
}
.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(38px, 3.7vw, 60px);
  line-height: 1.06;
}
@media (min-width: 981px) {
  .hero__first-line { white-space: nowrap; }
}

/* the rotating language word */
.swap {
  color: var(--brand);
  display: inline-block;
  transition: opacity 260ms ease, transform 260ms ease;
}
.swap.is-out { opacity: 0; transform: translateY(-8px); }

.hero__head { animation: hero-enter 560ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero__copy { animation: hero-enter 560ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.stage { animation: hero-enter 650ms 140ms cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__sub { margin-bottom: 28px; }

.signup {
  position: relative;
  max-width: 480px;
}
.signup__fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear;
}
.signup input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 14px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--canvas);
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--line);
}
.signup input::placeholder { color: var(--ink-muted); }
.signup input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 4px 0 var(--brand-pressed);
}
.signup .btn { position: relative; min-width: 162px; }
.signup__button-label { transition: opacity 90ms ease; }
.signup__spinner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
}
.signup.is-loading .signup__button-label { opacity: 0; }
.signup.is-loading .signup__spinner {
  opacity: 1;
  transform: scale(1);
  animation: signup-spin 700ms linear infinite;
}
.signup.is-loading .btn { opacity: 1; }

.signup__success {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px 14px;
  color: var(--ink);
  text-align: left;
  background: #D7FFB8;
  border: 2px solid var(--leaf);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--leaf-pressed);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.92);
  pointer-events: none;
}
.signup__success-icon {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  background: var(--leaf);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--leaf-pressed);
}
.signup__success-copy { display: flex; min-width: 0; flex-direction: column; line-height: 1.25; }
.signup__success-copy strong { font-size: 17px; font-weight: 900; }
.signup__success-copy small { color: var(--ink-muted); font-size: 13px; font-weight: 700; }
.signup.is-success .signup__fields {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transition-delay: 0s, 0s, 150ms;
}
.signup.is-success .signup__success {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: signup-pop 560ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.signup.is-success .signup__success-icon {
  animation: signup-check 560ms 90ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.signup__error {
  margin-top: 12px;
  padding: 9px 12px;
  color: var(--cardinal-pressed);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  background: #FFDFE0;
  border: 2px solid var(--cardinal);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--cardinal-pressed);
  animation: signup-error 260ms ease-out both;
}
.signup__error[hidden] { display: none; }
.signup.is-error input[type="email"] {
  border-color: var(--cardinal);
  box-shadow: 0 4px 0 var(--cardinal-pressed);
}

@keyframes signup-spin { to { transform: rotate(360deg); } }
@keyframes signup-pop {
  0% { opacity: 0; transform: translateY(8px) scale(0.92); }
  65% { opacity: 1; transform: translateY(-2px) scale(1.025); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes signup-check {
  0% { opacity: 0; transform: rotate(-18deg) scale(0.3); }
  100% { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes signup-error {
  0% { opacity: 0; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}
.form-notice {
  max-width: 480px;
  margin-top: 12px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.4;
}
.form-notice a { color: var(--humpback); font-weight: 800; }
.form-notice--onBrand { color: rgba(255, 255, 255, 0.82); }
.form-notice--onBrand a { color: #FFFFFF; }

/* ---------- the phone: the app's incoming-call screen ----------
   A rebuild of app/lib/features/call/incoming_call_screen.dart at real device
   scale (390pt content), then scaled to fit the hero. Every number below is
   that file's number — 60pt name, 280pt disc, 88pt coins, AppSpacing gaps.
   This screen is the product shot: if it drifts, the site advertises something
   that doesn't ship. */

.stage { display: flex; justify-content: center; }

.phone-shell {
  --s: 0.78;                      /* device pt → hero px */
  width: calc(414px * var(--s));  /* 390 content + 2×12 bezel */
  height: calc(868px * var(--s));
  flex: none;
}
.phone {
  width: 414px;
  height: 868px;
  transform: scale(var(--s));
  transform-origin: top left;
  background: var(--brand);       /* Scaffold backgroundColor: AppColors.brand */
  border: 12px solid var(--bezel);
  border-radius: 56px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.22);
  padding: 44px 24px 20px;        /* SafeArea + EdgeInsets.fromLTRB(24,20,24,20) */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #FFFFFF;
  overflow: hidden;
}

.ring__status {                   /* 17 / w600 / AppColors.onBrand */
  margin-top: 8px;
  font-size: 17px;
  font-weight: 600;
  color: #DDF4FF;
}
.ring__name {                     /* the hero of the screen: 60 / w900 */
  margin-top: 16px;
  font-size: 60px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.ring__city {                     /* "Madrid, ES" — 18 / w700 */
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
}
.ring__recall {                   /* the "it remembers me" line — 14.5 / w600 */
  margin-top: 12px;
  max-width: 300px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}
.phone__fade { transition: opacity 200ms ease; }
.phone__fade.is-out { opacity: 0; }

/* Flutter Spacer(flex: 2) / Spacer(flex: 3) around the portrait. */
.ring__gap--2 { flex: 2 1 0; }
.ring__gap--3 { flex: 3 1 0; }

.ring__avatar {                   /* one clean disc, no outer glow */
  width: 280px;
  height: 280px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: #40BDF7;            /* AppColors.brandRaised = lerp(brand, white, .16) */
}
.ring__avatar > svg,
.ring__avatar > .buddy-image { display: block; width: 100%; height: 100%; }

.ring__actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: 0 20px;                /* EdgeInsets.symmetric(horizontal: xl) */
}
.callbtn { display: flex; flex-direction: column; align-items: center; }
.coin {                           /* _RoundCallButton: 88pt, AppDepth.hero = 6 */
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 0 var(--coin-edge);
}
.coin svg { width: 36px; height: 36px; fill: #FFFFFF; }
.coin--decline { background: var(--cardinal); --coin-edge: #EA2B2B; }
.coin--decline svg { transform: rotate(133deg); }
.coin--accept { background: var(--leaf); --coin-edge: #46A302; }
.callbtn__label { margin-top: 12px; font-size: 15px; font-weight: 700; }

.ring__message {                  /* MessageInsteadButton */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 11px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  border: 2px solid rgba(255, 255, 255, 0.38);
  font-size: 15px;
  font-weight: 800;
}
.ring__chat { width: 20px; height: 20px; flex: none; }

/* ---------- Rive avatar slots ----------
   Every avatar is a slot holding a local PNG portrait. When a real .riv loads,
   the script appends a <canvas class="rive"> and marks the slot `.has-rive`,
   which hides the fallback. Nothing here activates until the runtime and the
   .riv files are added — see the RIVE block in index.html. */

/* The SLOT owns the circular crop. Putting `border-radius` on the canvas
   instead looks right until the art is scaled — the transform scales the
   canvas's own rounded clip along with it, so the character spills out of the
   frame as a bigger circle rather than being cropped by a fixed one. */
.rive-slot {
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  /* Belt and braces: the canvas is transformed and sits inside the transformed
     .phone, and rounded-corner clipping of composited descendants has a history
     of failing in Blink/WebKit. clip-path is applied to the composited layer. */
  clip-path: circle(50% at 50% 50%);
}

/* _RingingAvatar + BuddyAvatar's framing, expressed proportionally so it holds
   at any disc size. The box is 105% of the disc, bottom-aligned and nudged
   right by 18/280 of the diameter, so the waving arm and shoulders stay in view
   and the raised arm doesn't drag the weight off-centre.

   Inside it, BuddyAvatar does: scale by riveScale about the CENTRE, then
   translate DOWN by (0.09 + riveBottomShift) of the box — the 0.09 is
   _kBaseBottomShift, shared by every bust, cropping the empty canvas Rive
   exports below the shoulders. Order matters: the translate is applied after
   the scale and is NOT multiplied by it, which is why translateY is written
   first here (CSS applies transforms right-to-left). */
canvas.rive {
  position: absolute;
  top: auto;
  right: auto;
  bottom: 0;
  left: 3.93%;        /* centre the 105% box (−2.5%) + the app's right nudge (6.43%) */
  width: 105%;
  height: 105%;
  transform: translateY(calc((0.09 + var(--rive-shift, 0)) * 100%))
             scale(var(--rive-scale, 1));
  transform-origin: 50% 50%;
}

.rive-slot.has-rive > svg,
.rive-slot.has-rive > .buddy-image { visibility: hidden; }
.rive-slot > .buddy-image[hidden] { display: none !important; }

/* A .riv is transparent, so a mounted roster tile would leave the character
   floating on the card while its neighbours sit on a coloured disc. Put the
   buddy's accent behind it to keep the row's rhythm. (The hero slot keeps its
   white contact-photo face — that one reads as a real call screen.) */
.buddy__face.has-rive { background: var(--face); }

/* ---------- proof strip ---------- */

.proof {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--surface);
}
.proof ul {
  list-style: none;
  margin: 0;
  padding: 22px 0;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 16px 32px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-muted);
}

/* ---------- beats ---------- */

.beat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(56px, 6vw, 104px);
  align-items: center;
  padding: clamp(64px, 6vw, 88px) 0;
}
.beat + .beat { border-top: 2px solid var(--line); }
/* heading→lede and lede→lede gaps come from the shared rules above */
.beat__art { display: flex; justify-content: center; }
.beat:nth-of-type(even) .beat__art { order: -1; }

/* beat art — window cards, transcript, lookup sheet */
.art { width: 100%; max-width: 520px; }

.window-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0;
}
.window-row + .window-row { border-top: 2px solid var(--line); }
.window-row b { font-weight: 800; }
.window-row span { color: var(--ink-muted); font-size: 14px; font-weight: 700; }
.pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 3px 0 var(--edge);
}
.pill--muted { background: var(--line); color: var(--ink-muted); box-shadow: none; }

.bubble {
  padding: 13px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  max-width: 86%;
  border: 2px solid var(--line);
  box-shadow: 0 3px 0 var(--line);
}
.bubble--them { background: var(--surface); border-bottom-left-radius: 4px; }
.bubble--you {
  background: var(--brand); color: #FFFFFF;
  margin-left: auto;
  border-color: transparent;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 0 var(--edge);
}
.stack { display: flex; flex-direction: column; gap: 12px; }

.memory-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 150, 0, 0.14);
  color: var(--fox);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
:root[data-theme="dark"] .memory-tag { color: #FFB74D; }

.tapped {
  background: var(--bee);
  color: #4B4B4B;
  border-radius: 6px;
  padding: 0 3px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
}
.lookup { margin-top: 14px; }
.lookup__word { font-size: 22px; font-weight: 900; letter-spacing: -0.01em; }
.lookup__pos { font-size: 13px; font-weight: 800; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.lookup__mean { margin: 8px 0 14px; font-weight: 600; }

/* ---------- pricing ---------- */

.pricing {
  text-align: center;
  background: var(--surface);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.pricing .card { max-width: 860px; margin: 0 auto; padding: clamp(32px, 4vw, 52px); }
/* Centre the measure without clobbering the shared heading→lede gap. */
.pricing .lede { margin-left: auto; margin-right: auto; }
.pricing__aside {
  margin-top: 22px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* ---------- roster ---------- */

.roster {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 36px auto 0;
}
.buddy { text-align: center; padding: 24px 16px; }
/* Fixed square so the circular crop is a true circle — a bare <figure> is
   block-level and full-width, which would make border-radius an ellipse. */
.buddy figure { width: 88px; height: 88px; margin: 0 auto 14px; }
.buddy svg { width: 100%; height: 100%; border-radius: 50%; }
.buddy .buddy-image { display: block; width: 100%; height: 100%; }
.buddy b { display: block; font-size: 18px; font-weight: 900; letter-spacing: -0.01em; }
.buddy span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.buddy em {
  display: inline-block;
  margin-top: 9px;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
#languages { text-align: center; }
#languages .lede { margin-right: auto; margin-left: auto; }

/* ---------- FAQ ---------- */

.faq { max-width: 940px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.faq details { padding: 0; overflow: hidden; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 22px;
  font-weight: 800;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--surface); }
.faq summary::after {
  content: '+';
  font-size: 26px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details p { padding: 0 22px 20px; color: var(--ink-muted); font-weight: 600; }
#faq { text-align: center; }

/* ---------- closing CTA ---------- */

.closer {
  background: var(--brand);
  color: #FFFFFF;
  text-align: center;
  padding: clamp(72px, 7vw, 108px) 0;
}
.closer h2 { margin-bottom: 14px; }
/* Scoped to the subtitle so the compact disclosure stays close to the form. */
.closer__sub { color: rgba(255, 255, 255, 0.9); max-width: 44ch; margin: 0 auto 28px; }
.closer .signup { margin: 0 auto; }
.closer .signup__fields { justify-content: center; }
.closer .signup input { border-color: transparent; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.closer .form-notice { margin-right: auto; margin-left: auto; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 2px solid var(--line);
  background: var(--surface);   /* lifts it off the white page, under the blue band */
  padding: clamp(44px, 4vw, 64px) 0 40px;
  color: var(--ink-muted);
  font-size: 15px;
}
.site-footer a { color: var(--ink-muted); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px 48px;
}
/* `.site-footer a` would otherwise repaint the wordmark muted grey. */
.footer__brand .wordmark { font-size: 23px; color: var(--brand); }
.footer__brand .wordmark:hover { text-decoration: none; }
.footer__brand p { margin-top: 10px; }
.footer__brand em { font-style: normal; font-weight: 800; color: var(--ink); }

.footer__links { display: flex; flex-wrap: wrap; gap: 10px 24px; }

.footer__legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 2px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 24px;
  font-size: 14px;
}

/* ---------- responsive ---------- */

@media (min-width: 1400px) and (min-height: 900px) {
  .phone-shell { --s: 0.84; }
  .buddy figure { width: 96px; height: 96px; }
}

@media (min-width: 1800px) and (min-height: 1000px) {
  .phone-shell { --s: 0.88; }
}

/* Keep the complete hero inside short desktop viewports. The phone owns the
   hero's height, so these tiers reduce it before any content can be clipped. */
@media (min-width: 981px) and (max-height: 850px) {
  .hero { padding-top: 32px; padding-bottom: 28px; }
  .phone-shell { --s: 0.72; }
}

@media (min-width: 981px) and (max-height: 760px) {
  .site-header .shell { height: 68px; }
  .hero { padding-top: 24px; padding-bottom: 20px; }
  .phone-shell { --s: 0.64; }
}

@media (min-width: 981px) and (max-height: 650px) {
  .hero { padding-top: 20px; padding-bottom: 16px; }
  .phone-shell { --s: 0.55; }
}

@media (min-width: 981px) and (max-height: 600px) {
  .site-header .shell { height: 60px; }
  .hero { padding-top: 14px; padding-bottom: 12px; }
  .hero h1 { font-size: clamp(34px, 3.2vw, 48px); }
  .hero__sub { margin-bottom: 16px; }
  .phone-shell { --s: 0.50; }
}

@media (min-width: 981px) and (max-height: 520px) {
  .site-header .shell { height: 56px; }
  .hero { padding-top: 10px; padding-bottom: 8px; }
  .phone-shell { --s: 0.44; }
}

@media (min-width: 981px) and (max-height: 460px) {
  .site-header .shell { height: 52px; }
  .hero { padding-top: 8px; padding-bottom: 6px; }
  .phone-shell { --s: 0.38; }
}

@media (max-width: 980px) {
  .hero__grid, .beat { grid-template-columns: 1fr; gap: clamp(24px, 4vw, 36px); }
  /* A full-height phone would push the signup form most of a screen down, so
     the money shot shrinks once it's stacked rather than side-by-side. */
  .phone-shell { --s: 0.60; }
  /* Lift the ringing phone directly under the headline — the money shot is the
     hook and must not sit below a fold. `display: contents` promotes the
     headline and the copy to grid items so all three can be ordered; desktop
     keeps them in one column-1 block, untouched. */
  .hero__text { display: contents; }
  .hero__head { order: 1; }
  .stage { order: 2; }
  .hero__copy { order: 3; }
  .beat:nth-of-type(even) .beat__art { order: 0; }
  .hero { padding: 32px 0 36px; }
  .section { padding: 60px 0; }
  .beat { padding: 44px 0; }
  .lede, .pricing .lede { max-width: none; }
  .footer__top { gap: 24px; }   /* it's flex — it wraps on its own */
  .beat__art { order: 0; }
}

@media (max-width: 780px) {
  .site-header .shell { height: 68px; }
  .proof ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .buddy { padding: 20px 12px; }
  .buddy figure { width: 76px; height: 76px; }
  .faq { margin-top: 28px; }
}

@media (max-width: 560px) {
  .signup { max-width: none; }
  .signup input[type="email"] { flex-basis: 160px; }
  .signup .btn { min-width: 140px; padding-right: 18px; padding-left: 18px; }
  .phone-shell { --s: 0.52; }
  .hero { padding: 26px 0 30px; }
  .hero__grid { gap: 24px; }
  .hero__sub { margin-bottom: 20px; }
  .form-notice { margin-top: 10px; }
  .proof ul { gap: 12px 18px; font-size: 12px; }
  .pricing .card { padding: 28px 20px; }
  .closer .form-notice { max-width: 38ch; }
}

/* The phone is a fixed-size element scaled by a factor, so it can't reflow —
   step the factor down instead, or it overflows a 320px screen. */
@media (max-width: 400px) {
  .site-nav .btn { padding: 12px 16px; font-size: 13px; }
  .phone-shell { --s: 0.50; }
}

@media (max-width: 340px) {
  .signup__fields input[type="email"],
  .signup__fields .btn { flex: 1 1 100%; width: 100%; }
  .phone-shell { --s: 0.46; }
}

/* ---------- motion & focus ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

:focus-visible {
  outline: 3px solid var(--humpback);
  outline-offset: 3px;
  border-radius: 6px;
}
