/* ==========================================================================
   Momo · shared styles (every page)
   Tokens, base, page-to-page transition, type, buttons, chat bubbles, footer, inner-page top bar.
   Page-specific styles live in landing.css and talk.css.
   ========================================================================== */

/* ---------- tokens ---------- */
/* Light only, to match the color-scheme meta tag: no dark styles exist, and browsers must not darken the page themselves. */
html { color-scheme: only light; }
:root {
  --bg: #f7f3ee;          /* warm off-white (Figma 122:7222) */
  --paper: #fff;
  --ink: #1d3557;
  --blue: #0a84ff;
  --me: var(--blue);      /* your message bubbles: classic iMessage blue */
  --me-text: #fff;
  --cta: #282828;        /* buttons: near-black, same as the lockup */
  --text: #2a2638;
  --muted: #7d7a8c;
  --line: rgba(42, 38, 56, .1);
  --sf: -apple-system, "SF Pro Text", "SF Pro", system-ui, sans-serif;
  --avenir: "Avenir", "Avenir Next", "Nunito Sans", system-ui, sans-serif;
  --display: "Fraunces", "Times New Roman", serif;
  /* one body style everywhere (intro, features, FAQ, privacy, terms) */
  --body: 400 16px/24px "Public Sans", var(--avenir);   /* Regular. Not chat bubbles: those stay SF */
  --body-color: #707070;
  --body-strong: #1c1c1c;  /* the important bit of a paragraph: same weight, black instead of grey */
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }   /* no grey tap box on iOS; keyboard focus rings stay */
:focus:not(:focus-visible) { outline: none; }

/* ---------- page-to-page transition ---------- */
/* the page you're leaving slides left and fades fast, the next one follows in from the right
   (going back home runs the other way). Browsers without cross-page view transitions just switch pages. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .2s cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation: vtIn .3s cubic-bezier(0,0,.2,1) both; }
html:active-view-transition-type(back)::view-transition-old(root) { animation-name: vtOutBack; }
html:active-view-transition-type(back)::view-transition-new(root) { animation-name: vtInBack; }
@keyframes vtOut { to { opacity: 0; transform: translateX(-56px); } }
@keyframes vtIn { from { opacity: 0; transform: translateX(56px); } }
@keyframes vtOutBack { to { opacity: 0; transform: translateX(56px); } }
@keyframes vtInBack { from { opacity: 0; transform: translateX(-56px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; } }

/* ---------- type: Fraunces display face ---------- */
/* Fraunces at weight 480, "Soft" (rounded terminals), display optical size */
.display { font-family: var(--display); font-weight: 480; color: var(--text); letter-spacing: -.01em; font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 144; }
.display em { font-style: italic; color: var(--ink); }

/* ---------- buttons ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 19px;
  background: var(--cta);
  color: #fff;
  text-decoration: none;
  font: 500 13.5px var(--avenir);
  border: 0;
  cursor: pointer;
  transition: transform .3s cubic-bezier(.2,1.6,.4,1), box-shadow .3s ease;
}
@media (hover: hover) {
  .pill:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 8px 18px -6px color-mix(in srgb, var(--cta) 70%, transparent); }
}
.pill img { width: 18px; height: 18px; display: block; }
/* buttons that open a new page: a quick press-in as you tap */
.pill:active { transform: scale(.95) !important; transition-duration: .08s !important; }

/* ---------- chat bubbles (home page threads + Momo's lines on Meet Momo) ---------- */
/* Momo's chat avatar (Figma 103:2803): blue photo crop + black serif M, scaled by --s */
.av-momo {
  --s: 59.5px;
  position: relative;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  flex: none;
  box-shadow: 0 2.6px 6.5px rgba(0,0,0,.1);
  background:
    url("../img/momo-avatar-m.svg") no-repeat calc(var(--s) * .2086) calc(var(--s) * .2536) / calc(var(--s) * .5783) auto,
    url("../img/momo-avatar-bg.jpg") no-repeat calc(var(--s) * -.9916) calc(var(--s) * -1.0588) / calc(var(--s) * 2.2353) auto,
    #000;
}
.msg {
  position: relative;
  padding: 10px 13px;
  border-radius: 18px;
  font: 400 14.5px/20px var(--sf);
  letter-spacing: -.43px;
  width: fit-content;
}
.msg span { position: relative; }   /* text sits above the bubble tail */
.delivered { text-align: right; padding: 0 4px; margin-top: -2px; font: 500 11px var(--sf); color: #8a8a8f; }
@keyframes tblink { 30% { opacity: 1; } }   /* typing dots blink */

/* ---------- footer (home, privacy, terms) ---------- */
.footer {
  text-align: center;
  padding: 48px 24px calc(72px + env(safe-area-inset-bottom));
}
.footer nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
  font: 400 12.5px var(--avenir);
}
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
.footer small { display: block; margin-top: 16px; font: 400 11px var(--avenir); color: #9a9a9a; }

/* ---------- simple top bar for inner pages ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;   /* Back on the left, logo centred */
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.topbar .logo { display: block; line-height: 0; grid-column: 2; }
.topbar .logo img { display: block; height: 24px; width: auto; }
.topbar .close { grid-column: 1; justify-self: start; font: 500 12.5px var(--avenir); color: var(--muted); text-decoration: none; }
.topbar .close:hover { color: var(--ink); }

/* ==========================================================================
   Momo · home page (index.html)
   1. base          4. iMessage pieces (hero + footer)   7. FAQ
   2. top bar       5. intro + feature rows             8. footer lockup + pieces
   3. hero          6. example chats                    9. scroll reveal
   ========================================================================== */

/* ---------- 1. base ---------- */
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body { background: var(--bg); color: var(--text); overflow-x: hidden; -webkit-font-smoothing: antialiased; }

/* ---------- 2. top bar: only appears once you're past the hero ---------- */
.mast {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 .5px 0 rgba(42, 38, 56, .14);
  transform: translateY(-110%); transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s linear .45s;
  visibility: hidden;
}
/* taken out of the page while tucked away: iOS Safari tints the status bar from any fixed bar at the top */
.mast.gone { display: none; }
.mast.solid { transform: none; visibility: visible; transition: transform .45s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.mast .logo img { display: block; height: 22px; width: auto; }
.mast nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); font: 500 13px var(--avenir); }
.mast nav a:not(.pill) { color: var(--text); text-decoration: none; opacity: .7; }
.mast nav a:not(.pill):hover { opacity: 1; }
.pill.sm { padding: 8px 13px; font-size: 12.5px; }
.pill.sm img { width: 15px; height: 15px; }
@media (max-width: 640px) { .mast nav a:not(.pill) { display: none; } }

/* ---------- 3. hero (Figma 102:2134) ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; }
/* the pieces' own layer: over the logo, under the top fade */
.spill { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 25; }
.spill .tile { position: absolute; left: 0; top: 0; width: 402px; transform-origin: 0 0; }
/* soft fade at the very top edge */
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 70px; z-index: 30; pointer-events: none;
  background: linear-gradient(180deg, var(--bg) 10%, color-mix(in srgb, var(--bg) 75%, transparent) 45%, transparent);
}

/* logo lockup: logo, handwritten tagline, Meet Momo button */
.lock { position: absolute; left: 50%; top: 50%; z-index: 20; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 0; }
.lock h1 { line-height: 0; }
.lock .logo { display: block; width: 137.4px; height: 36.8px; filter: drop-shadow(0 0 .5px #282828); }
.lock .tagline { position: relative; width: 151.9px; height: 23.3px; margin-top: 1.2px; }
.lock .tagline svg { display: block; }
/* logo letters: fade in one at a time, then each floats on its own slow cycle */
.logo .bob { transform-box: fill-box; animation: bob 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.9s); }
@keyframes bob { 0%, 100% { transform: translateY(.7px); } 50% { transform: translateY(-.9px); } }
.logo .lt { transform-box: fill-box; transform-origin: 50% 100%; transition: opacity .7s ease, transform .9s cubic-bezier(.2,1.2,.3,1), filter .7s ease; }
#logoArt { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.js .logo .lt { opacity: 0; transform: translateY(5px) scale(.94); filter: blur(2px); }
.js .logo .lt.on { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .logo .lt, .logo .bob { transition: none; animation: none; } }
.settled .lock *, .settled .hero .more { transition: none !important; }   /* return visits: everything simply there */

/* the button: enters as a typing bubble that grows into the button, then two thought dots pop in */
.lock .cta { position: relative; margin-top: 40px; }
.lock .cta .pill { position: relative; padding: 10px 13px; border-radius: 18px; font: 500 14px var(--avenir); overflow: hidden; white-space: nowrap; }
.lock .cta .lbl { display: inline-flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.lock .cta .typing { z-index: 1; }
.lock .cta .tail { position: absolute; left: -2px; top: -10px; width: 17.6px; height: 15.6px; transform: rotate(132deg); pointer-events: none; overflow: visible; fill: var(--cta); }
.lock .cta .tail circle { transform-box: fill-box; transform-origin: center; }
.cta .typing { position: absolute; left: 0; top: 0; bottom: 0; width: 58px; display: flex; align-items: center; justify-content: center; gap: 4px; opacity: 0; pointer-events: none; }
.cta .typing i { width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .45; animation: tblink .5s infinite; }
.cta .typing i:nth-child(2) { animation-delay: .08s; }
.cta .typing i:nth-child(3) { animation-delay: .16s; }
.js .lock .cta .pill { opacity: 0; transform: scale(.4); transform-origin: 0 50%; }
.js .lock .cta .lbl { opacity: 0; }
.js .lock .cta .tail circle { transform: scale(0); }
.cta .tail circle.on { transform: scale(1); transition: transform .38s cubic-bezier(.2,1.9,.4,1); }
.js .lock .cta.in .pill { opacity: 1; transform: none; }
/* desktop hover: the bubble lifts and glows and its icon wiggles */
.lock .cta .pill { transition: transform .35s cubic-bezier(.2,1.6,.4,1), box-shadow .35s ease; }
.lock .cta .lbl img { transition: transform .35s cubic-bezier(.2,1.8,.4,1); }
@media (hover: hover) {
  .lock .cta.in .pill:hover { transform: translateY(-2px) scale(1.05); box-shadow: 0 10px 22px -6px rgba(40,40,40,.45); }
  .lock .cta.in .pill:hover .lbl img { transform: rotate(-12deg) scale(1.12); }
}

/* "Who is Momo?" at the bottom of the hero */
.more {
  position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 50px;
  font: 500 14px var(--avenir); color: var(--text); text-decoration: none; white-space: nowrap;
}
.more img { width: 24px; height: 24px; transform: rotate(90deg); animation: nudge 2.4s ease-in-out infinite; }
.more:hover img { animation-duration: 1.1s; }
@keyframes nudge { 0%, 100% { translate: 0 0; } 50% { translate: 0 3px; } }
.js .more { opacity: 0; transform: translateX(-50%) translateY(10px); }
.lock .go, .hero .more.go { transition: opacity .8s ease, transform .9s cubic-bezier(.2,.8,.2,1); opacity: 1 !important; transform: none !important; }
.hero .more.go { transform: translateX(-50%) !important; }
.hero .more.go.away { opacity: 0 !important; pointer-events: none; transition: opacity .45s ease; }   /* scrolled down: fades away */

/* ---------- 4. iMessage pieces (hero pile + footer) ---------- */
.art { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; user-select: none; -webkit-user-select: none; will-change: transform; }
.art img { display: block; pointer-events: none; -webkit-user-drag: none; }
.art .fall { display: block; position: relative; }
/* link cards */
.card { position: relative; background: #e9e9eb; border-radius: 11.9px; overflow: hidden; box-shadow: 0 5.1px 13.6px rgba(38,31,77,.16); font-family: var(--sf); }
.card .media { position: relative; overflow: hidden; }
.card .media img { width: 100%; height: 100%; object-fit: cover; }
.card .meta { padding: 5.1px 8.5px 0; }
.card b { display: block; font: 590 9.35px/1.2 var(--sf); color: #000; }
.card small { display: block; margin-top: 2.5px; font: 400 8.5px/1.2 var(--sf); color: #8a8a8e; white-space: nowrap; }
.card .playbtn { position: absolute; left: 50%; top: 50%; width: 27.2px; height: 27.2px; margin: -13.6px 0 0 -13.6px; border-radius: 50%; background: rgba(0,0,0,.45); display: grid; place-items: center; }
.card .playbtn img { width: 11.4px; height: 11.4px; margin-left: 1px; }
.loc .media { background: #eef0e8; }
.card.loc { border-radius: 14px; box-shadow: 0 6px 16px rgba(38,31,77,.16); }
.card.loc .meta { padding: 9px 10px 0; }
.card.loc b { font-size: 11px; }
.card.loc small { font-size: 10px; margin-top: 3px; }
.card.insta .meta { padding: 5.5px 8px 0; }   /* Instagram reel link */
.card.insta b { font-size: 8.8px; }
.card.insta small { display: flex; align-items: center; gap: 3px; font-size: 7.8px; }
.card.insta .ig { width: 9px; height: 9px; flex: none; color: #111; }
.card.event { background: #fff; border-radius: 12.5px; }   /* event RSVP (Figma 122:7410) */
.card.event .meta { padding: 6px 9.4px 0; }
.card.event em { display: block; font: 590 7px var(--sf); font-style: normal; color: #8a8a8f; }
.card.event b { font-size: 10.9px; margin-top: 2px; }
.card.event .rsvp { display: flex; gap: 4.7px; margin-top: 6px; }
.card.event .rsvp i { font: 590 8.6px/20.3px var(--sf); font-style: normal; width: 56.2px; text-align: center; border-radius: 10.1px; background: #f0f0f2; color: #000; }
.card.event .rsvp i.yes { background: var(--blue); color: #fff; }
.card.clip { border-radius: 12.5px; }   /* video clip (Figma 122:7418) */
.card.clip > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.clip .dur { position: absolute; right: 9px; bottom: 9px; font: 590 7.8px/14px var(--sf); color: #fff; background: rgba(0,0,0,.45); border-radius: 7px; padding: 0 6px; }
/* message bubbles (--k scales them to match the Meet Momo button) */
.bub { display: block; padding: calc(10px * var(--k, 1)) calc(13px * var(--k, 1)); border-radius: calc(18px * var(--k, 1)); font: 400 calc(14px * var(--k, 1))/calc(19px * var(--k, 1)) var(--sf); white-space: nowrap; box-shadow: 0 8px 18px rgba(31,26,64,.2); }
/* the same blue and grey as the example chats below (Kern's iMessage colours) */
.bub.blue { background: #08f; color: #fff; }
.bub.grey { background: #e9e9eb; color: #000; }
/* voice memo */
.memo { display: flex; align-items: center; gap: 6.8px; padding: 9.35px 11.9px 9.35px 10.2px; border-radius: 17px; background: #e9e9eb; box-shadow: 0 5.1px 13.6px rgba(38,31,77,.12); font: 510 9.35px var(--sf); color: #6b6b70; }
.memo .mic, .memo .wv { flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.memo .mic { width: 11px; height: 11px; --m: url("../img/mic.svg"); }
.memo .wv { width: 93.5px; height: 18.7px; --m: url("../img/wave.svg"); }
/* song */
.song { display: flex; align-items: center; gap: 8.5px; padding: 8.5px; width: 217.6px; height: 62.9px; }
.song .cover { width: 45.9px; height: 45.9px; border-radius: 6.8px; overflow: hidden; flex: none; }
.song .cover img { width: 100%; height: 100%; object-fit: cover; }
.song .meta { padding: 0; flex: 1; }
.song b { font-size: 10.2px; }
.song .pb { width: 22.1px; height: 22.1px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; flex: none; }
.song .pb img { width: 8.5px; height: 8.5px; margin-left: 1px; }
/* photo stack */
.stack { position: relative; width: 127.5px; height: 144.5px; }
.stack .p { position: absolute; width: 100.3px; height: 127.5px; border-radius: 11.9px; overflow: hidden; box-shadow: 0 5.1px 13.6px rgba(38,31,77,.16); }
.stack .p img { width: 100%; height: 100%; object-fit: cover; }
.stack .count { position: absolute; left: 6.8px; bottom: 6.8px; padding: 3.4px 6.8px; border-radius: 8.5px; background: rgba(0,0,0,.45); font: 590 8.5px var(--sf); color: #fff; }
/* photo with a ❤️ reaction */
.tb { position: relative; width: 119px; height: 144.5px; }
.tb .p { position: absolute; left: 0; top: 8.5px; width: 110.5px; height: 136px; border-radius: 13.6px; overflow: hidden; box-shadow: 0 5.1px 13.6px rgba(38,31,77,.16); }
.tb .p img { width: 100%; height: 100%; object-fit: cover; }
.tb .heart { position: absolute; left: 97px; top: -3px; width: 25px; height: 25px; border-radius: 50%; background: #08f; border: 1px solid var(--bg); display: grid; place-items: center; font-size: 11px; line-height: 1; }
.tb .heart::before, .tb .heart::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }   /* the two dots trailing down to the photo */
.tb .heart::before { left: 1px; bottom: -2.5px; width: 7px; height: 7px; }
.tb .heart::after { left: -2px; bottom: -6px; width: 3.5px; height: 3.5px; }
.tb.wide { width: 178px; height: 128px; }
.tb.wide .p { width: 170px; height: 120px; }
.tb.wide .heart { left: 156px; }
.tb.small { width: 70px; height: 84px; }
.tb.small .p { top: 6px; width: 62px; height: 78px; border-radius: 10px; }
.tb.small .heart { left: 50px; width: 21px; height: 21px; font-size: 9px; }
/* a plain photo, and a price that dropped */
.card.photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .drop { position: absolute; left: 6px; top: 6px; padding: 2.5px 6px; border-radius: 8px; background: rgba(40,40,40,.82); color: #fff; font: 590 8.5px/1.2 var(--sf); }
.card small s { color: #b1b1b6; }

/* tap a piece (or wait): a reaction pops on, or a message retypes itself */
.typing-dots { display: inline-flex; gap: 3px; align-items: center; height: 19px; vertical-align: middle; }
.typing-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; animation: tdot 1s infinite; }
.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 30% { opacity: 1; } }
/* drawn as the example chats draw a tapback: a round grey badge on the corner, trailing two dots down to the message */
.tapback {
  position: absolute; top: -19px; right: -12px; z-index: 3;
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  font: 14px/1 var(--sf); background: #e9e9eb; border: 1px solid var(--bg); pointer-events: none;
  animation: tbpop .45s cubic-bezier(.2,1.8,.4,1) both;
}
.tapback::before, .tapback::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.tapback::before { right: 2px; bottom: -3px; width: 8px; height: 8px; }
.tapback::after { right: -2px; bottom: -7px; width: 4px; height: 4px; }
.tapback.bye { animation: tbbye .35s ease-in both; }
@keyframes tbpop { from { transform: scale(0) rotate(-20deg); } }
@keyframes tbbye { to { transform: scale(0); opacity: 0; } }
.pulse { animation: pulse .42s ease-out; }
@keyframes pulse { 40% { transform: scale(1.07); } }

/* ---------- 5. intro + feature rows ---------- */
.section { max-width: 1040px; margin: 0 auto; padding: 112px 24px; }
.section-title { font-size: clamp(44px, 7.4vw, 84px); line-height: .98; margin-bottom: 28px; letter-spacing: -.02em; }
.lede { font: var(--body); color: var(--body-color); max-width: 34em; }
.lede strong, .feature p strong, .faq .answer strong { font-weight: inherit; color: var(--body-strong); }
/* intro: title in quiet grey with the callout in black, the purple M beside it */
.intro-head { display: flex; align-items: center; gap: 22px; margin-bottom: 34px; }
.intro-head .section-title {
  margin-bottom: 0; flex: none; color: #8c8c8c;
  font-size: max(30px, min(17.4vw - 24.5px, 44px), min(7.4vw, 84px));   /* narrow phones: a touch smaller, so the M still fits */
}
.intro-head .section-title em, .intro-head .section-title .dot { color: #000; }
/* the M floats with translate/rotate, so it doesn't fight the fade-in's transform */
.intro-m { order: 2; flex: 0 1 clamp(92px, 12vw, 160px); min-width: 60px; height: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-drag: none; animation: mFloat 4.2s ease-in-out infinite alternate; }
@keyframes mFloat { 0% { translate: -2px 6px; rotate: -4deg; } 50% { translate: 2px -8px; rotate: 3deg; } 100% { translate: 0 2px; rotate: -1deg; } }
@media (prefers-reduced-motion: reduce) { .intro-m { animation: none; } }
@media (min-width: 820px) {   /* desktop: the intro sits centred */
  .intro-head { justify-content: center; }
  .intro-head + .lede { margin: 0 auto; text-align: center; }
}
/* feature rows: copy + an example chat */
.feature { display: grid; gap: 32px; align-items: center; padding: 60px 0; }
.feature:first-of-type { margin-top: 56px; }
.feature h3 { font: 480 25px/1.15 var(--display); font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 144; letter-spacing: -.01em; color: var(--text); margin-bottom: 12px; }
.feature p { font: var(--body); color: var(--body-color); max-width: 30em; }
@media (min-width: 820px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 80px; }
  .feature:nth-of-type(even) .copy { order: 2; }
}

/* ---------- 6. example chats (Figma: group 13:6179, solo 13:6095) ---------- */
.thread { padding: 4px 0 0; display: flex; flex-direction: column; gap: 20px; max-width: 386px; width: 100%; justify-self: center; }
/* header: avatar + name pill, drawn at Figma size and shown smaller */
.thread-head { display: flex; flex-direction: column; align-items: center; zoom: .74; }
.thread-head .pill-name {
  margin-top: -3.8px; display: flex; align-items: center; gap: 6.6px; height: 33px; padding: 6.6px 9.9px 6.6px 12px;
  border-radius: 26.4px; background: #fffffe; box-shadow: 0 2.6px 6.5px rgba(0,0,0,.1);
  font: 700 16.5px "Inter", var(--sf); color: #000; white-space: nowrap; position: relative;
}
.thread-head .pill-name img { width: 5.4px; height: 14.5px; display: block; transform: rotate(180deg); }
.av-group { position: relative; width: 60px; height: 60px; border-radius: 30px; background: #e3e3e8; overflow: hidden; z-index: 1; }
.av-group .m { position: absolute; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: "Inter", var(--sf); }
.av-group .m.lg { left: 9px; top: 7px; width: 30px; height: 30px; background: #a7b2db; font-size: 14px; }
.av-group .m.sm { left: 14px; top: 36px; width: 18px; height: 18px; background: #c4cbe8; font-size: 9px; }
.av-group .av-momo { --s: 30px; position: absolute; left: 25.75px; top: 18px; box-shadow: 0 1.3px 3.3px rgba(0,0,0,.1); }
/* messages */
.msgs { display: flex; flex-direction: column; gap: 4px; }
.stamp { height: 20px; padding-bottom: 2px; display: flex; gap: 3px; align-items: center; justify-content: center; font: 400 12px var(--sf); color: #88888c; }
.stamp b { font-weight: 590; }
.who { padding: 4px 0 0 30px; font: 400 11px var(--sf); color: #8a8a8f; }
.row { display: flex; }
.row.me { justify-content: flex-end; padding-left: 16px; }
.row.them { padding-right: 16px; }
.row.them .msg { background: #e4e4e9; color: #000; max-width: 250.7px; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.05); }
.row.me .msg { background: var(--me); color: var(--me-text); max-width: 254px; }
/* tail on the last bubble of each run of your messages (a mask, so it's always the bubble's colour) */
.row.me:not(:has(+ .row.me)) { padding-bottom: 6px; }
.row.me:not(:has(+ .row.me)) .msg::before {
  content: ""; position: absolute; right: 0; bottom: -7.1px; width: 20px; height: 27.1px; background: var(--me);
  -webkit-mask: url("../img/tail-me.svg") no-repeat; mask: url("../img/tail-me.svg") no-repeat;
}
/* senders (set by home.js): Momo's bubbles white, friends grey; group chats get an avatar beside each run */
.row.them.momo .msg { background: #fff; box-shadow: 0 1px 1.5px rgba(0,0,0,.05), 0 4px 14px rgba(38,31,77,.07); }
.thread.group .row.them { position: relative; padding-left: 30px; }
.row-av { position: absolute; left: 0; bottom: 0; }
.row-av.av-momo { --s: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.row-av.friend { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 11px "Inter", var(--sf); color: #fff; }
.thread.group .msg.typing.ghost { left: 30px; }
/* playback: messages appear one by one; Momo "types" first, with the dots in its reply's own slot */
.thread.play .msgs > * { opacity: 0; transform: translateY(8px) scale(.98); transform-origin: left bottom; transition: opacity .3s ease, transform .4s cubic-bezier(.2,1.4,.4,1); }
.thread.play .msgs > .row.me { transform-origin: right bottom; }
.thread.play .msgs > .shown { opacity: 1; transform: none; }
.thread.play .msgs > .row.typing-now { opacity: 1; transform: none; position: relative; }
.row.typing-now > .msg:not(.typing) { visibility: hidden; }
/* Momo's typing dots */
.msg.typing { display: flex; gap: 4px; align-items: center; padding: 13px 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: #8e8e93; opacity: .35; animation: tblink 1.1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .18s; }
.msg.typing i:nth-child(3) { animation-delay: .36s; }
.msg.typing.ghost { position: absolute; left: 0; bottom: 0; }

/* ---------- 7. FAQ ---------- */
#how { padding-bottom: 0; }                    /* the chats run straight into the FAQ: one comfortable gap, not three */
#how .feature:last-of-type { padding-bottom: 44px; }
#how, #faq { scroll-margin-top: 64px; }        /* jumping here from a link: clear of the top bar */
.faq { max-width: 760px; padding-top: 96px; padding-bottom: 96px; }
.faq-title { font: 480 44px/1 var(--display); font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 144; letter-spacing: -.01em; color: var(--text); margin-bottom: 26px; }
.faq details { margin: 0 -14px; padding: 0 14px; border-radius: 14px; transition: background .2s ease; box-shadow: 0 .5px 0 rgba(42, 38, 56, .14); }
.faq details[open] { background: rgba(40,40,40,.035); cursor: pointer; }
@media (hover: hover) { .faq details:not([open]):hover { background: rgba(40,40,40,.03); } }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  min-height: 48px;                 /* a full finger's height per question */
  padding: 12px 0;
  font: var(--body); font-weight: 500;
  color: var(--body-color);         /* grey until opened, then black with its answer */
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {             /* plus that turns into a cross */
  content: ""; flex: none; width: 12px; height: 12px;
  background: linear-gradient(currentColor, currentColor) center / 12px 1px no-repeat, linear-gradient(currentColor, currentColor) center / 1px 12px no-repeat;
  transition: transform .3s ease;
}
.faq details[open]:not(.closing) summary::after { transform: rotate(45deg); }
.faq details[open]:not(.closing) summary, .faq details[open]:not(.closing) .answer { color: var(--body-strong); }
@media (hover: hover) { .faq details:not([open]) summary:hover { color: var(--body-strong); } }
.faq .answer { overflow: hidden; padding: 0 40px 16px 0; font: var(--body); color: var(--body-color); max-width: 34em; transition: color .2s ease; }
.faq .answer a { color: inherit; text-underline-offset: 3px; }

/* ---------- 8. footer: lockup the same size as the hero's (x1, up to x1.2 past 900px) + sliding pieces ---------- */
.footer { position: relative; overflow-x: clip; }
.footer > :not(.fspill) { position: relative; z-index: 1; }
.footer .flogo { display: block; width: clamp(137.4px, 15.267vw, 164.88px); height: auto; margin: 0 auto; }
.footer .ftag { display: block; width: clamp(151.9px, 16.878vw, 182.28px); height: auto; margin: 1.2px auto 30px; }
.fspill { position: absolute; inset: 0; pointer-events: none; }
.fp { position: absolute; opacity: 0; will-change: transform, opacity; pointer-events: none; user-select: none; -webkit-user-select: none; }   /* placed by the scroll in home.js */
.fp.left { transform-origin: 0 0; }
.fp.right { transform-origin: 100% 0; }
.fp-float { animation: fpFloat 7s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.7s); }
@keyframes fpFloat { from { transform: translate(0, -2px) rotate(-.4deg); } to { transform: translate(1px, 2px) rotate(.4deg); } }
.fp .bub, .fp .memo { box-shadow: 0 5px 14px rgba(38,31,77,.12); }
@media (prefers-reduced-motion: reduce) { .fp-float { animation: none; } }

/* ---------- 9. scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .thread.play .msgs > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* A real photo of friends at dinner, above the group picture. */
.friends-photo{display:block;width:100%;max-width:720px;height:auto;margin:40px auto 8px;border-radius:18px}

/* the song link, as Messages shows one from Apple Music: art, title, a red play button and the service's name */
.song { height: 66px; }
.song .am { display: flex; align-items: center; gap: 3px; margin-top: 4px; font: 590 7.6px/1 var(--sf); color: #8a8a8e; }
.song .am svg { width: 9px; height: 9px; flex: none; }
.song .pb { background: #fa243c; }
/* the party invite, in the style of an invite app: a dark card, a big serif title and emoji replies */
.card.event { background: #121212; border-radius: 14px; padding-bottom: 9px; }
.card.event .meta { padding: 8px 9.4px 0; }
.card.event b { font: 600 13px/1.1 var(--display, Fraunces, serif); font-style: italic; color: #fff; margin-top: 0; letter-spacing: -.01em; }
.card.event em { margin-top: 3px; font: 500 7.4px var(--sf); color: #c9b8ff; }
.card.event .rsvp { gap: 3.5px; margin-top: 7px; }
.card.event .rsvp i { width: auto; padding: 0 6.5px; font: 590 7.6px/18px var(--sf); border-radius: 9px; background: rgba(255,255,255,.12); color: #fff; }
.card.event .rsvp i.yes { background: #fff; color: #121212; }
