/* ===========================================================================
   Yappit — one stylesheet for the whole site.
   ---------------------------------------------------------------------------
   Every value here is the app's own. The colours come from lib/theme/brand.dart
   and the launch gradient in yappit_login_v2_view.dart; the typefaces are the
   two the app actually ships (Sora for headings, Nunito Sans for body, see
   lib/theme/app_theme.dart). Nothing was invented to look "web".

   The site is dark on purpose, not for fashion: Yappit is a black OLED app and
   a visitor should recognise the product before they read a word. So there is
   no light theme to switch to - every colour is painted explicitly and the
   page holds on any host background.
   =========================================================================== */

:root {
  /* ---- Brand ------------------------------------------------------------ */
  /* The three logo-gradient stops, in order. Used as LIGHT behind the product,
     never as a surface fill. */
  --yappit-purple: #9F5BE6;
  --yappit-pink:   #EE449F;
  --yappit-blue:   #64A6E8;
  /* The app's one accent - every button, every active state (kYappitBlue). */
  --yappit-wine:      #BC2155;
  --yappit-wine-deep: #D41E5F;  /* pressed / hover (kYappitBlueSecondary) */

  /* ---- Ground ----------------------------------------------------------- */
  --bg:        #000000;   /* _dBg */
  --surface:   #161618;   /* _dSurface */
  --surface-2: #202024;   /* _dSurfaceAlt */
  --text:      #F4F3F7;   /* _dText - off-white; pure white glares on OLED */
  --text-2:    #9A97A8;   /* _dTextMuted */
  /* The app's _dTextFaint is #6B6875. On the web it carries captions and
     meta lines, and at 3.86:1 on black that fails WCAG AA - so the web
     token is lifted to the nearest tone that passes (5.53:1). Everything
     else is the app's value unchanged. */
  --text-3:    #85818F;
  --border:    rgba(255, 255, 255, .08);
  --divider:   rgba(255, 255, 255, .07);  /* the feed's hairline, kDivider */

  /* ---- Type ------------------------------------------------------------- */
  --font-head: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-display: clamp(2.375rem, 5.6vw, 3.75rem);
  --fs-h1:      clamp(1.9rem, 4.4vw, 2.9rem);
  --fs-h2:      clamp(1.45rem, 3vw, 2.05rem);
  --fs-h3:      1.2rem;
  --fs-body:    1.0625rem;
  --fs-small:   0.9375rem;
  --fs-caption: 0.8125rem;

  /* ---- Space ------------------------------------------------------------ */
  --s1: 4px;  --s2: 8px;   --s3: 12px;  --s4: 16px;  --s5: 24px;
  --s6: 32px; --s7: 48px;  --s8: 64px;  --s9: 96px;  --s10: 128px;
  --gutter: 20px;
  --container: 1120px;
  --header-h: 62px;

  /* ---- Shape ------------------------------------------------------------ */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-phone: 30px;    /* the phone frame's outer radius */
  --r-pill: 999px;

  /* ---- Motion ----------------------------------------------------------- */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: .5s;
}

/* ===== Reset ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;    /* belt and braces; nothing should exceed the viewport */
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.025em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--yappit-wine); color: #fff; }

/* Keyboard focus is visible everywhere, and only for the keyboard. */
:focus-visible {
  outline: 2px solid var(--yappit-blue);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Layout ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.rule { border: 0; border-top: 1px solid var(--divider); margin: 0; }

/* A section label. Small, tracked, in one of the three brand colours - the
   only place raw brand colour touches type. */
.eyebrow {
  font-family: var(--font-head);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yappit-pink);
  margin-bottom: var(--s3);
}
.eyebrow--blue   { color: var(--yappit-blue); }
.eyebrow--purple { color: var(--yappit-purple); }

/* Every section heading is the same size and sits the same distance from its
   eyebrow. Three of them were carrying one-off inline font-size overrides. */
.section__h { font-size: var(--fs-h1); margin-bottom: var(--s6); }
.section__h + .lede { margin-top: calc(var(--s6) * -1 + var(--s4)); }

/* Two columns: a heading on the left, the substance on the right. Used by the
   identity, safety and screens sections so they share one rhythm. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--text-2);
  max-width: 54ch;
}
.measure { max-width: 60ch; }

/* ===== Launching soon ===================================================
   The app is not on either store yet, so there is nothing to link to. A
   button that leads to a 404 is worse than no button: this states the fact
   and stops asking for a tap. It carried a glowing dot, which made a plain
   sentence look like a live status light for something. It is a label. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--font-head);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
}
.soon--sm { min-height: 36px; padding: 0 14px; font-size: .8125rem; }
.soon--plain {
  min-height: 0; padding: 0; border: 0; background: none;
  font-family: var(--font-body); font-weight: 400;
  font-size: var(--fs-small); color: var(--text-2);
}

/* ===== Buttons =========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;              /* touch target */
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-size: .96875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--yappit-wine); color: #fff; }
.btn--primary:hover { background: var(--yappit-wine-deep); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: rgba(255, 255, 255, .22); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: .875rem; }

/* ===== Header ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
/* At the top of the page the header sits on the hero with no seam. The bar and
   its hairline appear once there is content behind it to separate from. */
.header.is-stuck {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--divider);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
/* The wordmark is the app's own, lifted from assets/logo/splash_wordmark.png
   and given an alpha channel. It was previously the app icon next to the word
   "Yappit" set in Sora - which is not the logo, it is a typeface imitating
   one, and it threw away the ghost counter in the A. */
.logo { display: block; text-decoration: none; flex: none; }
/* Sized by HEIGHT, not width: the mark is the word, so its cap height is what
   has to line up with the nav beside it. */
.logo img { height: 22px; width: auto; }
.logo--lg img { height: 26px; }
.nav { display: flex; align-items: center; gap: var(--s5); margin-left: auto; }
.nav a {
  position: relative;
  font-size: var(--fs-small);
  color: var(--text-2);
  text-decoration: none;
  padding-block: 6px;
  transition: color .2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
/* The underline grows from the centre - the one nav flourish. */
.nav a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: 0;
  height: 2px;
  background: var(--yappit-wine);
  border-radius: 2px;
  transition: left .22s var(--ease), right .22s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { left: 0; right: 0; }
.nav__cta { margin-left: var(--s2); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav__toggle { display: flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--s3) var(--gutter) var(--s5);
    background: #0A0A0C;
    border-bottom: 1px solid var(--divider);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
  }
  .nav[data-open="true"] { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 14px 0; font-size: 1.0625rem; border-bottom: 1px solid var(--divider); }
  .nav a::after { display: none; }
  .nav__cta { margin: var(--s4) 0 0; }
  .nav .btn { width: 100%; }
}

/* ===== Footer ============================================================ */
.footer { border-top: 1px solid var(--divider); padding-block: var(--s7) var(--s6); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s7) var(--s5);
}
.footer__brand p {
  color: var(--text-2);
  font-size: var(--fs-small);
  margin-top: var(--s4);
  max-width: 34ch;
}
.footer h3 {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--s4);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a {
  font-size: var(--fs-small);
  color: var(--text-2);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.footer a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer__note {
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--divider);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  justify-content: space-between;
  color: var(--text-3);
  font-size: var(--fs-caption);
}
@media (max-width: 720px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ===== The phone ========================================================= */
/* The screenshots are cropped to 717x1506 - the Android status bar (clock,
   battery, signal) and the gesture pill are the phone's furniture, not the
   product, and a frame around someone else's 8:39 and 84% reads as a photo of
   a phone rather than a picture of an app. The frame is built FROM that ratio,
   so nothing is stretched or cut again here. */
.phone {
  position: relative;
  width: 100%;
  max-width: 290px;
  aspect-ratio: 717 / 1506;
  margin-inline: auto;
  padding: 7px;
  background: linear-gradient(170deg, #26262B, #0C0C0E 58%);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--r-phone);
  box-shadow: 0 32px 70px -22px rgba(0, 0, 0, .95),
              0 0 0 1px rgba(0, 0, 0, .6);
}
.phone__screen {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  border-radius: calc(var(--r-phone) - 8px);
  background: #000;
}
.phone__screen img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;       /* ratios match exactly, so nothing is actually cut */
  object-position: top center;
}
/* No speaker slot, no notch, no chin. The screenshot already shows a phone;
   drawing hardware on top of it only puts a grey nub over the search bar. */

/* The one gradient moment on the site: the logo's own three stops, blurred to
   light and sat behind the product. Never a surface, never on type. */
.glow {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  pointer-events: none;
}

/* ===== Hero ============================================================== */
.hero { position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 84px) 0; }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -.035em;
  margin-bottom: var(--s5);
  max-width: 13ch;        /* breaks after "without", where the sense breaks */
}
.hero__sub { font-size: clamp(1.0625rem, 1.7vw, 1.3125rem); color: var(--text-2); max-width: 46ch; }
/* The pill is a sentence, not a button, so it gets its own line and the one
   real action sits under it as a link rather than competing as a second
   button for a tap that does not exist yet. */
.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); margin-top: var(--s6); }
.hero__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-size: .96875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  padding-block: 4px;
}
.hero__link svg { transition: transform .2s var(--ease); }
.hero__link:hover svg { transform: translateX(3px); }
.hero__meta { margin-top: var(--s5); color: var(--text-3); font-size: var(--fs-small); }
/* One phone, straight on. The old hero tucked a second phone behind the
   first at -7deg; a tilted stack of devices is the single most recognisable
   template move in app marketing, and it makes the product harder to read for
   the sake of looking busy. */
.hero__stage { position: relative; display: flex; justify-content: center; }
.phone--lg { max-width: 320px; }
.hero .glow--a {
  width: 460px; height: 460px;
  top: -80px; right: -60px;
  background: var(--yappit-pink);
  opacity: .34;
}
.hero .glow--b {
  width: 380px; height: 380px;
  bottom: -120px; right: 180px;
  background: var(--yappit-purple);
  opacity: .28;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: left; }
  .hero__stage { margin-top: var(--s6); justify-content: flex-start; }
  .hero__phones .phone { max-width: 250px; }
  .phone--lg { max-width: 260px; }
  .hero .glow--a { width: 320px; height: 320px; right: -80px; }
  .hero .glow--b { display: none; }
}

/* ===== Plain facts strip ================================================= */
.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
  padding-block: var(--s7);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.facts dt {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.facts dd { margin: 0; color: var(--text-2); font-size: var(--fs-small); max-width: 34ch; }
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; gap: var(--s5); }
}

/* ===== Feature accordion ================================================
   Was a sticky phone driven by five viewport-tall scroll blocks. Scroll-jacked
   storytelling is the thing that makes a product site read as a showreel: the
   visitor cannot skip, cannot go back, and cannot look at the one screen they
   actually came for. Now the headings are buttons. Open one and the phone
   changes; the motion is the same, the control moved to the reader. ======= */
.feature {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.feature__list { border-top: 1px solid var(--divider); }
.feature__item { border-bottom: 1px solid var(--divider); }

.feature__btn {
  display: flex;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  padding: var(--s5) 0;
  background: none;
  border: 0;
  color: var(--text-2);
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: -.015em;
  text-align: left;
  cursor: pointer;
  transition: color .2s var(--ease);
}
.feature__btn:hover { color: var(--text); }
.feature__item.is-open .feature__btn { color: var(--text); }

/* The number is the position in the list, which is why it is allowed to be
   there: it tells you how many of these there are and where you have got to. */
.feature__num {
  flex: none;
  font-size: var(--fs-caption);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  transition: color .2s var(--ease);
}
.feature__item.is-open .feature__num { color: var(--yappit-wine); }
.feature__title { flex: 1; }
.feature__chev {
  flex: none;
  color: var(--text-3);
  transition: transform .25s var(--ease), color .2s var(--ease);
}
.feature__item.is-open .feature__chev { transform: rotate(180deg); color: var(--text-2); }

/* Height is animated on a grid row rather than max-height, so the open state
   is exactly as tall as the text and never clips a long paragraph. */
/* Closed is the ENHANCED state, not the default one. With no JS every row is
   open and the section reads as five headed paragraphs; the collapsing only
   starts once the code that can reopen them is running. */
.feature__body {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows .32s var(--ease);
}
.feature__chev { display: none; }
.js-ui .feature__chev { display: block; }
.js-ui .feature__btn { cursor: pointer; }
.feature__btn { cursor: default; }
.js-ui .feature__body { grid-template-rows: 0fr; }
.js-ui .feature__item.is-open .feature__body { grid-template-rows: 1fr; }
.feature__bodyInner { overflow: hidden; }
.feature__body p {
  color: var(--text-2);
  font-size: var(--fs-small);
  max-width: 52ch;
  padding-bottom: var(--s5);
}

/* The stage mirrors whichever row is open. Decorative: the text above says
   everything it says, so it is aria-hidden and never focusable. */
.feature__stage {
  position: sticky;
  top: calc(var(--header-h) + var(--s6));
}
.feature__stage .phone { max-width: 286px; }
.feature__stage .phone__screen img {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.feature__stage .phone__screen img.is-active { opacity: 1; transform: none; }

/* Below the breakpoint the stage is dead weight - the visitor is holding the
   device it is imitating - so each open row carries its own screenshot. */
.feature__shot { display: none; }
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature__stage { display: none; }
  .feature__shot { display: block; padding-bottom: var(--s5); }
  .feature__shot .phone { max-width: 232px; margin-inline: 0; }
}

/* ===== Live actions ====================================================
   Five arrangements of eight screenshots were tried here and none of them
   worked, because a screenshot is the wrong medium for the question. A still
   of a vote button cannot show what a vote button does.

   So none of this is an image. Each one is the real component rebuilt in
   HTML and CSS and left running. The colours are not guesses either - they
   were sampled out of the app's own screenshots:

     #B82050  the pink on the FAB and the active feed tab (kYappitBlue)
     #40A868  the green an upvote turns
     #132519  the vote pill's surface once it is green
     #161618  the neutral track behind the feed tabs

   Everything loops slowly and everything stops dead under reduced motion,
   resting on the state that makes the point: voted, typed, unlocked.
   ====================================================================== */
.acts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 26px);
}
.act { margin: 0; }
.act__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 190px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: radial-gradient(120% 90% at 50% 0%, #131316, #000 70%);
  overflow: hidden;
}
.act figcaption { margin-top: var(--s4); color: var(--text-2); font-size: var(--fs-small); }
.act figcaption b {
  display: block;
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.015em;
  margin-bottom: 4px;
}
@media (max-width: 900px) { .acts__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .acts__grid { grid-template-columns: 1fr; } }

/* ---- 1 · the vote pill ------------------------------------------------ */
.vote { display: flex; align-items: center; gap: 10px; transform: scale(1.5); }
.vote__up, .vote__down {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px;
  border: 0; border-radius: var(--r-pill);
  background: #131313; color: #8D8D8D;
  font: 600 .875rem/1 var(--font-body);
}
.vote__down { padding: 0; width: 34px; justify-content: center; }
.vote__up svg, .vote__down svg { width: 15px; height: 15px; }
.vote__up { animation: voteFill 4.6s var(--ease) infinite; }
.vote__up svg { animation: voteArrow 4.6s var(--ease) infinite; }
@keyframes voteFill {
  0%, 22%   { background: #131313; color: #8D8D8D; transform: none; }
  27%       { transform: scale(.9); }
  32%, 82%  { background: #132519; color: #40A868; transform: none; }
  90%, 100% { background: #131313; color: #8D8D8D; }
}
@keyframes voteArrow {
  0%, 22%  { transform: none; }
  30%      { transform: translateY(-7px); }
  36%, 100%{ transform: none; }
}
/* The count is two digits stacked in a 1em window; the window scrolls. */
.vote__n { display: block; height: 1em; overflow: hidden; }
.vote__n b { display: block; height: 1em; font-weight: 600; animation: voteN 4.6s var(--ease) infinite; }
@keyframes voteN {
  0%, 26%   { transform: none; }
  34%, 84%  { transform: translateY(-1em); }
  92%, 100% { transform: none; }
}

/* ---- 2 · compose ------------------------------------------------------ */
.compose { display: flex; align-items: center; gap: 12px; width: 78%; }
.compose__line {
  flex: 1; display: flex; align-items: center;
  height: 42px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-pill);
  background: #0F0F11; overflow: hidden; white-space: nowrap;
}
.compose__txt {
  font-size: .9375rem; color: var(--text);
  max-width: 0; overflow: hidden;
  animation: type 5.2s steps(18) infinite;
}
@keyframes type { 0%, 6% { max-width: 0; } 52%, 88% { max-width: 12em; } 96%, 100% { max-width: 0; } }
.compose__caret {
  width: 2px; height: 17px; margin-left: 2px; flex: none;
  background: var(--yappit-wine);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.compose__btn {
  flex: none; display: inline-flex; align-items: center;
  height: 42px; padding: 0 20px; border-radius: var(--r-pill);
  background: #B82050; color: #fff;
  font: 600 .9375rem/1 var(--font-head);
  animation: press 5.2s var(--ease) infinite;
}
@keyframes press {
  0%, 60%   { transform: none; filter: none; }
  66%       { transform: scale(.92); filter: brightness(1.25); }
  74%, 100% { transform: none; filter: none; }
}

/* ---- 3 · the feed tabs ------------------------------------------------ */
.tabs {
  position: relative; display: flex; align-items: center;
  padding: 5px; border-radius: var(--r-pill); background: #161618;
  transform: scale(1.22);
}
.tabs span {
  position: relative; z-index: 1;
  padding: 7px 16px; font: 600 .8125rem/1 var(--font-body); color: var(--text-2);
  animation: tabTxt 7.5s steps(1) infinite;
}
.tabs span:nth-of-type(2) { animation-delay: -2.5s; }
.tabs span:nth-of-type(3) { animation-delay: -5s; }
@keyframes tabTxt { 0%, 33% { color: #fff; } 34%, 100% { color: var(--text-2); } }
.tabs__pill {
  position: absolute; top: 5px; left: 5px; z-index: 0;
  height: calc(100% - 10px); width: 58px;
  border-radius: var(--r-pill); background: #B82050;
  animation: tabSlide 7.5s var(--ease) infinite;
}
@keyframes tabSlide {
  0%, 28%   { transform: translateX(0); width: 58px; }
  33%, 61%  { transform: translateX(58px); width: 74px; }
  66%, 94%  { transform: translateX(132px); width: 66px; }
  100%      { transform: translateX(0); width: 58px; }
}

/* ---- 4 · the ghost avatar --------------------------------------------- */
.ghost {
  width: 104px; height: 104px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: ghostBg 9s var(--ease) infinite;
}
/* The app's own ghost, used as a mask so one PNG paints in any colour -
   exactly how the avatars are tinted in the app. */
.ghost__mask {
  width: 58%; height: 58%; background: #fff;
  -webkit-mask: url(/assets/ghost-mask.png) center/contain no-repeat;
  mask: url(/assets/ghost-mask.png) center/contain no-repeat;
  animation: ghostPop 9s var(--ease) infinite;
}
@keyframes ghostBg {
  0%, 22%   { background: #9F5BE6; }
  33%, 55%  { background: #EE449F; }
  66%, 88%  { background: #64A6E8; }
  100%      { background: #9F5BE6; }
}
@keyframes ghostPop {
  0%, 20%, 33%, 53%, 66%, 86%, 100% { transform: none; }
  25%, 58%, 91% { transform: scale(.88); }
}

/* ---- 5 · a badge unlocking -------------------------------------------- */
.badge { position: relative; width: 108px; height: 108px; }
.badge__disc, .badge__ring { position: absolute; inset: 0; border-radius: 50%; }
.badge__disc {
  background: linear-gradient(150deg, #EE449F, #9F5BE6);
  animation: badgePop 5s var(--ease) infinite;
}
.badge__ring { border: 2px solid var(--yappit-pink); animation: badgeRing 5s var(--ease) infinite; }
@keyframes badgePop {
  0%, 30%   { transform: scale(.68); filter: grayscale(1) brightness(.4); }
  44%       { transform: scale(1.06); filter: none; }
  52%, 88%  { transform: scale(1); filter: none; }
  100%      { transform: scale(.68); filter: grayscale(1) brightness(.4); }
}
@keyframes badgeRing {
  0%, 34%   { transform: scale(.68); opacity: 0; }
  56%       { transform: scale(1.35); opacity: .55; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}
.badge__tag {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  white-space: nowrap;
  font: 600 .6875rem/1 var(--font-head);
  letter-spacing: .12em; text-transform: uppercase; color: var(--yappit-pink);
  animation: tagIn 5s var(--ease) infinite;
}
@keyframes tagIn { 0%, 40% { opacity: 0; } 58%, 86% { opacity: 1; } 96%, 100% { opacity: 0; } }

/* ---- 6 · a reply ------------------------------------------------------ */
.reply { position: relative; display: flex; align-items: center; gap: 10px; transform: scale(1.4); }
.reply__icon { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font: 600 .875rem/1 var(--font-body); }
.reply__icon svg { width: 17px; height: 17px; animation: replyNudge 5.4s var(--ease) infinite; }
@keyframes replyNudge { 0%, 40% { transform: none; } 47% { transform: scale(.85); } 55%, 100% { transform: none; } }
.reply__n { display: block; height: 1em; overflow: hidden; }
.reply__n b { display: block; height: 1em; font-weight: 600; animation: replyN 5.4s var(--ease) infinite; }
@keyframes replyN { 0%, 46% { transform: none; } 54%, 88% { transform: translateY(-1em); } 96%, 100% { transform: none; } }
.reply__bubble {
  padding: 7px 13px; border-radius: 14px 14px 14px 4px;
  background: #B82050; color: #fff; font-size: .8125rem; white-space: nowrap;
  animation: bubbleIn 5.4s var(--ease) infinite;
}
@keyframes bubbleIn {
  0%, 50%   { opacity: 0; transform: translateY(8px) scale(.9); }
  60%, 88%  { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(8px) scale(.9); }
}

/* ===== Safety block ====================================================== */
.safety { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.safety__list { display: grid; gap: 0; }
.safety__item { padding-block: var(--s5); border-top: 1px solid var(--divider); }
.safety__item:last-child { border-bottom: 1px solid var(--divider); }
.safety__item h3 { font-size: var(--fs-h3); margin-bottom: 6px; }
.safety__item p { color: var(--text-2); font-size: var(--fs-small); max-width: 48ch; }
@media (max-width: 860px) { .safety { grid-template-columns: 1fr; } }

/* ===== Closing CTA ======================================================= */
/* The close was a centred app icon on a coloured glow. Left-aligned on a rule
   instead: it is the last thing said, not a poster. */
.cta-band { border-top: 1px solid var(--divider); }
.cta-band__inner { max-width: 44ch; }
.cta-band h2 { font-size: var(--fs-h1); margin-bottom: var(--s4); }
.cta-band p { color: var(--text-2); }
.cta-band__soon { margin-top: var(--s6); }

/* ===== Legal / document pages ============================================ */
.doc { padding-block: var(--s8) var(--s9); }
.doc__head { padding-bottom: var(--s6); border-bottom: 1px solid var(--divider); margin-bottom: var(--s7); }
.doc__head h1 { font-size: var(--fs-h1); margin-bottom: var(--s3); }
.doc__meta { color: var(--text-3); font-size: var(--fs-small); }
.doc__body { max-width: 68ch; }
.doc__body h2 {
  font-size: 1.25rem;
  margin: var(--s8) 0 var(--s3);
  scroll-margin-top: calc(var(--header-h) + 24px);
}
.doc__body h2:first-of-type { margin-top: 0; }
.doc__body p, .doc__body li { color: #DCDAE4; }
.doc__body p + p { margin-top: var(--s4); }
.doc__body ul, .doc__body ol { padding-left: 22px; margin: var(--s4) 0; }
.doc__body li + li { margin-top: 10px; }
.doc__body a { color: var(--yappit-blue); text-underline-offset: 3px; }
.doc__body strong { color: var(--text); }
.doc__body .note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--yappit-wine);
  border-radius: var(--r-sm);
  padding: var(--s5);
  margin: var(--s6) 0;
  color: var(--text);
}
.doc__body footer {
  margin-top: var(--s8);
  padding-top: var(--s5);
  border-top: 1px solid var(--divider);
  color: var(--text-3);
  font-size: var(--fs-caption);
}
/* Contents rail - desktop only, because on a phone it is just a second menu. */
.doc__layout { display: grid; grid-template-columns: 1fr; gap: var(--s7); }
@media (min-width: 1000px) {
  .doc__layout { grid-template-columns: 200px 1fr; gap: var(--s8); }
}
.toc { display: none; }
@media (min-width: 1000px) {
  .toc {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 32px);
    align-self: start;
  }
  .toc h2 {
    font-size: var(--fs-caption);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: var(--s4);
  }
  .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
  .toc a {
    font-size: .875rem;
    line-height: 1.35;
    color: var(--text-2);
    text-decoration: none;
    display: block;
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: color .18s var(--ease), border-color .18s var(--ease);
  }
  .toc a:hover { color: var(--text); border-left-color: var(--border); }
  .toc a.is-active { color: var(--text); border-left-color: var(--yappit-wine); }
}

/* ===== Motion ============================================================
   Two tiers, and the page is complete without either.

   TIER 1, everywhere: a one-shot fade when an element first enters, driven by
   an IntersectionObserver. This is the floor.

   TIER 2, where the browser has scroll-driven animations: the same reveals
   plus the action cards and the hero parallax become SCROLL-LINKED. The
   difference is not decorative. A time-based animation fires near the right
   moment and then plays on its own schedule, so scrolling back up shows
   nothing and a fast flick shows it half-done. A scroll-linked one is a pure
   function of scroll position - it tracks the scrollbar exactly, reverses
   when you scroll back, and runs on the compositor, off the main thread.
   Chrome/Edge 115+, Firefox 132+, Safari 18+.

   Tier 2 is behind @supports, so a browser without it keeps tier 1 and
   nothing is ever left parked invisible. ================================= */
.js .reveal { opacity: 0; }
.js .reveal.in { opacity: 1; transition: opacity .45s var(--ease); }

.js .hero .reveal { transform: translateY(14px); }
.js .hero .reveal.in {
  transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .hero .reveal.in.d1 { transition-delay: .08s; }
.js .hero .reveal.in.d2 { transition-delay: .16s; }
.js .hero .reveal.in.d3 { transition-delay: .24s; }

@supports (animation-timeline: view()) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes sink   { from { transform: none; } to { transform: translateY(-40px); } }

  .js .reveal, .js .reveal.in { transition: none; }
  .js .reveal:not(.hero .reveal) {
    opacity: 1;
    animation: rise linear both;
    animation-timeline: view();
    /* Finished well before the element reaches the middle of the screen, so
       nothing is still arriving while it is being read. */
    animation-range: entry 4% cover 26%;
  }

  /* Each card fades up as it arrives. Scroll-linked, so the grid resolves as
     you come down the page rather than all at once on a timer. */
  .js .act {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 2% cover 20%;
  }

  /* The hero phone falls behind the text as the page moves off. */
  .js .hero__stage .phone {
    animation: sink linear both;
    animation-timeline: view();
    animation-range: exit -20% exit 100%;
  }
}

/* A same-origin navigation crossfades instead of flashing white-to-black.
   Both pages must opt in, which every page here does - this file is the only
   stylesheet on the site. Ignored where unsupported. */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal, .js .hero .reveal { opacity: 1; transform: none; }
  /* Scroll-linked animations ignore transition-duration, so they have to be
     switched off by name rather than shortened like the rest. */
  .js .reveal:not(.hero .reveal), .js .act, .js .hero__stage .phone {
    animation: none !important;
  }
  /* The live components stop on the frame that makes the point - voted,
     typed, unlocked - rather than on frame zero, which would show a page of
     controls that look switched off. */
  .vote__up, .vote__up svg, .vote__n b, .compose__txt, .compose__caret,
  .compose__btn, .tabs span, .tabs__pill, .ghost, .ghost__mask,
  .badge__disc, .badge__ring, .badge__tag, .reply__icon svg, .reply__n b,
  .reply__bubble { animation: none !important; }
  .vote__up { background: #132519; color: #40A868; }
  .vote__n b:first-child, .reply__n b:first-child { display: none; }
  .compose__txt { max-width: 12em; }
  .tabs span:nth-of-type(2) { color: #fff; }
  .tabs__pill { transform: translateX(58px); width: 74px; }
  .ghost { background: #EE449F; }
  .badge__disc { transform: none; filter: none; }
  .badge__ring { opacity: 0; }
  .badge__tag { opacity: 1; }
  .reply__bubble { opacity: 1; transform: none; }
  .feature__stage .phone__screen img { transition: none; }
  /* The row still opens and closes - it just does it at once. Suppressing the
     transition is not the same as suppressing the control. */
  .feature__body { transition: none; }
}

/* Skip link - first thing a keyboard reaches. */
.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 16px;
  text-decoration: none;
}
.skip:focus { left: 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
