/* =====================================================================
   Hairio — landing styles
   Shared by index.html, privacy.html, terms.html, 404.html

   Design language taken from the app UI: near-black aubergine canvas
   with a purple glow, translucent cards, coral→purple gradient accents,
   small-caps category labels, pill navigation. Dark only, like the app.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --coral:  #f4576b;
  --orange: #f97a3d;
  --purple: #a855f7;
  --violet: #7c3aed;

  --grad: linear-gradient(95deg, var(--coral), var(--purple));
  --grad-soft: linear-gradient(95deg, rgb(244 87 107 / 18%), rgb(168 85 247 / 18%));

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  --container: 1140px;
  --header-h: 70px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  --bg:         #08060c;
  --bg-subtle:  #0e0a14;
  --card:       #16101f;
  --bg-elev:    #1b1426;
  --border:     rgb(255 255 255 / 8%);
  --border-str: rgb(255 255 255 / 18%);
  --text:       #f7f4fb;
  --text-soft:  #bdb4cb;
  --text-muted: #918799;
  --accent:     var(--purple);
  --accent-ink: #ffffff;
  --accent-soft: rgb(168 85 247 / 14%);
  --shadow:     0 24px 60px -30px rgb(0 0 0 / 90%);
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  position: relative;
  font-family: var(--font-sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.05rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The purple glow that sits behind the top of every screen in the app */
body::before {
  content: "";
  position: fixed;
  inset: -30vh -20vw auto -20vw;
  height: 80vh;
  z-index: -1;
  background:
    radial-gradient(ellipse 45% 55% at 30% 45%, rgb(124 58 237 / 30%), transparent 70%),
    radial-gradient(ellipse 40% 45% at 72% 35%, rgb(244 87 107 / 16%), transparent 70%);
  pointer-events: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { font-weight: 800; line-height: 1.06; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.6vw, 4.6rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.8rem, 1.3rem + 2.2vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .45vw, 1.4rem); }
p  { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--purple); color: #fff; }

.skip-link {
  position: absolute;
  left: 14px; top: -100px;
  z-index: 200;
  padding: .7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

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

/* Category label — small caps, letter-spaced, colour per module */
.label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--purple);
}
.label--coral  { color: var(--coral); }
.label--orange { color: var(--orange); }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, .6rem + 2vw, 2rem);
}

.section { padding-block: clamp(3rem, 2rem + 4.5vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.2rem); }

.head { margin-bottom: clamp(1.8rem, 1.2rem + 2vw, 3rem); }
.head--center { text-align: center; }
.head .label { margin-bottom: 1rem; }
.head p { margin-top: 1rem; max-width: 56ch; color: var(--text-soft); font-size: 1.05rem; }
.head--center p { margin-inline: auto; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: 1rem 1.8rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--grad);
  color: #fff;
  font-size: 1.01rem;
  font-weight: 750;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px rgb(168 85 247 / 70%);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), filter .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -14px rgb(168 85 247 / 85%); filter: saturate(1.1); }
.btn:active { transform: translateY(0) scale(.99); }
.btn svg { width: 19px; height: 19px; }

.btn--ghost {
  background: rgb(255 255 255 / 5%);
  box-shadow: inset 0 0 0 1px var(--border-str);
  color: var(--text);
}
.btn--ghost:hover { background: rgb(255 255 255 / 9%); box-shadow: inset 0 0 0 1px var(--border-str); }

.btn--sm { padding: .6rem 1.2rem; font-size: .92rem; }

/* Mobile-first sizing: full-width, calmer buttons on narrow screens */
@media (max-width: 560px) {
  .btn { padding: .9rem 1.4rem; font-size: .97rem; width: 100%; }
  .btn--sm { width: auto; padding: .55rem 1rem; font-size: .88rem; }
  .hero__cta, .cta__row, .error-actions { width: 100%; }
  .hero__cta .btn, .cta__row .btn { flex: 1 1 100%; }
}

/* ---------- 5. Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; gap: 1.4rem; width: 100%; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-right: auto;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -.04em;
}
.logo__mark {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--grad);
  color: #fff;
  transition: transform .3s var(--ease);
}
.logo:hover .logo__mark { transform: rotate(-6deg) scale(1.06); }
.logo__mark svg { width: 18px; height: 18px; }

/* Pill navigation, like the app's bottom bar */
.nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  padding: .25rem;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 4%);
  box-shadow: inset 0 0 0 1px var(--border);
}
.nav a {
  padding: .5rem 1rem;
  border-radius: var(--r-pill);
  font-size: .93rem;
  font-weight: 650;
  color: var(--text-soft);
  transition: color .2s var(--ease), background .25s var(--ease);
}
.nav a:hover { color: var(--text); background: rgb(255 255 255 / 6%); }
.nav a[aria-current="page"] { color: #fff; background: var(--grad); }

.header__actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 0;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 5%);
  box-shadow: inset 0 0 0 1px var(--border);
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s var(--ease);
}
.icon-btn:hover { color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }

/* The two CTAs live in the header on desktop and inside the menu on mobile */
.nav__cta { display: none; }

@media (max-width: 940px) {
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .3rem;
    padding: 1rem clamp(1.1rem, .6rem + 2vw, 2rem) 1.4rem;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), visibility .2s;
  }
  .nav[data-open="true"] { opacity: 1; visibility: visible; }
  .nav a { padding: .85rem 1rem; background: rgb(255 255 255 / 4%); font-size: 1.02rem; }
  .nav-toggle { display: grid; }

  /* Header keeps only the logo and the burger — the CTAs move into the menu */
  .header__actions .btn { display: none; }
  .nav__cta {
    display: grid;
    gap: .5rem;
    margin-top: .6rem;
    padding-top: .9rem;
    border-top: 1px solid var(--border);
  }
  .nav__cta .btn { padding: .85rem 1.2rem; font-size: .98rem; }
  .nav .nav__cta a { background: none; }
  .nav .nav__cta .btn--ghost { background: rgb(255 255 255 / 5%); }
}

/* ---------- 6. Hero ---------- */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 1rem + 4vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}

.hero .label { margin-bottom: 1.2rem; }
.hero__lead {
  margin-top: 1.3rem;
  max-width: 42ch;
  font-size: clamp(1.04rem, 1rem + .35vw, 1.18rem);
  color: var(--text-soft);
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.1rem; }
@media (max-width: 900px) { .hero__cta { justify-content: center; } }
.hero__note {
  display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
  margin-top: 1.5rem;
  font-size: .86rem;
  color: var(--text-muted);
}
.hero__note span { display: inline-flex; align-items: center; gap: .4rem; }
.hero__note svg { width: 15px; height: 15px; color: var(--purple); }

/* ---------- 7. Phone mock ---------- */
.hero__visual { position: relative; display: grid; place-items: center; width: 100%; }

/* Real app screenshot — the export already includes the device frame,
   so the corners are clipped to match instead of drawing a bezel. */
.shot {
  width: min(330px, 84vw);
  height: auto;
  border-radius: 46px;
  box-shadow:
    0 40px 80px -40px #000,
    0 0 70px -24px rgb(168 85 247 / 45%);
}

.phone {
  position: relative;
  width: min(330px, 84vw);
  aspect-ratio: 9 / 19.3;
  padding: 9px;
  border-radius: 48px;
  background: #000;
  box-shadow: 0 40px 80px -40px #000, inset 0 0 0 1px rgb(255 255 255 / 12%);
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 40px;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgb(124 58 237 / 38%), transparent 70%),
    #0a070f;
  padding: 1.6rem .9rem 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  font-size: .78rem;
}
.screen__notch {
  position: absolute;
  left: 50%; top: .55rem;
  translate: -50% 0;
  width: 84px; height: 22px;
  border-radius: var(--r-pill);
  background: #000;
}
.screen__bar {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .7rem; font-weight: 700;
  padding-inline: .35rem;
}
.screen__bar i { display: inline-block; width: 15px; height: 8px; border: 1px solid rgb(255 255 255 / 55%); border-radius: 2px; }

.screen h4 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.05em; padding-inline: .35rem; margin-top: .5rem; }
.screen__sub { padding-inline: .35rem; font-size: .72rem; color: var(--text-muted); margin-bottom: .3rem; }

/* Scan frame + progress list, from the analysis screen */
.scanbox {
  position: relative;
  margin-top: .2rem;
  border-radius: 18px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, rgb(168 85 247 / 14%), rgb(10 7 15 / 60%));
  box-shadow: inset 0 0 0 1px rgb(168 85 247 / 65%), 0 10px 30px -16px rgb(168 85 247 / 70%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.scanbox__face { font-size: 3rem; }
.scanbox__tag {
  position: absolute;
  left: .6rem; bottom: .5rem;
  display: flex; align-items: center; gap: .35rem;
  font-size: .58rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}
.scanbox__tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--purple); animation: blink 1.6s var(--ease) infinite; }
.scanline {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--grad);
  filter: blur(.4px);
  animation: sweep 3.4s var(--ease) infinite;
}

.bar {
  height: 5px;
  border-radius: 3px;
  background: rgb(255 255 255 / 10%);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: 3px;
  background: var(--grad);
  transform-origin: 0 50%;
  animation: grow 1.8s var(--ease) .5s backwards;
}
.prog-row { display: flex; align-items: center; justify-content: space-between; font-size: .6rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); }
.prog-row b { color: var(--text); letter-spacing: 0; font-size: .78rem; }

.checks { display: grid; gap: .5rem; margin-top: .45rem; }
.checks li { display: flex; align-items: center; gap: .5rem; font-size: .74rem; }
.checks i {
  width: 17px; height: 17px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .6rem;
  font-style: normal;
}
.checks .done i { background: var(--coral); color: #fff; }
.checks .now  i { box-shadow: inset 0 0 0 2px var(--purple); }
.checks .now  { font-weight: 750; }
.checks .todo { color: var(--text-muted); }
.checks .todo i { box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 18%); }

/* Floating badges */
.badge {
  position: absolute;
  display: flex; align-items: center; gap: .55rem;
  padding: .6rem .85rem;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--border);
  font-size: .82rem;
  font-weight: 700;
  animation: float 7s ease-in-out infinite;
}
.badge em { font-style: normal; font-size: 1.1rem; }
.badge small { display: block; font-weight: 500; font-size: .7rem; color: var(--text-muted); }
.badge--a { top: 12%; left: -7%; }
.badge--b { bottom: 20%; right: -7%; animation-delay: -3.5s; }
@media (max-width: 1060px) { .badge { display: none; } }

/* ---------- 8. Module cards (Hairstyle / Hair health / Mewing) ---------- */
.modules { display: grid; gap: clamp(.9rem, .7rem + .6vw, 1.2rem); }
.module {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.4rem, 1.2rem + 1vw, 2.2rem);
  border-radius: var(--r-xl);
  background: rgb(255 255 255 / 3.5%);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.module:hover { transform: translateY(-2px); }
.module--coral {
  background: linear-gradient(100deg, rgb(244 87 107 / 9%), rgb(168 85 247 / 5%));
  box-shadow: inset 0 0 0 1px rgb(244 87 107 / 45%), 0 20px 50px -34px rgb(244 87 107 / 75%);
}
.module--purple { background: linear-gradient(100deg, rgb(124 58 237 / 12%), rgb(168 85 247 / 5%)); }
.module h3 { margin: .7rem 0 .6rem; font-size: clamp(1.35rem, 1.15rem + 1vw, 2rem); }
.module p { color: var(--text-soft); max-width: 52ch; }
.module__link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: 1.1rem;
  font-size: .92rem; font-weight: 700;
  color: var(--text);
}
.module__link:hover { color: var(--purple); }
.module__link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.module:hover .module__link svg { transform: translateX(4px); }
.module__soon {
  display: inline-block;
  margin-top: 1.1rem;
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 7%);
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-muted);
}
.module__art {
  width: clamp(92px, 16vw, 150px);
  aspect-ratio: 1 / 1;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgb(255 255 255 / 12%), rgb(255 255 255 / 3%));
  display: grid; place-items: center;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  flex: none;
}
@media (max-width: 640px) {
  .module { grid-template-columns: 1fr; }
  .module__art { width: 78px; font-size: 2.1rem; }
}

/* ---------- 9. Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: clamp(.9rem, .7rem + .6vw, 1.2rem); }
.step {
  padding: clamp(1.3rem, 1.1rem + .8vw, 1.8rem);
  border-radius: var(--r-xl);
  background: rgb(255 255 255 / 3.5%);
  box-shadow: inset 0 0 0 1px var(--border);
}
.step__num {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: .9rem; font-weight: 800;
  margin-bottom: 1rem;
}
.step h3 { margin-bottom: .5rem; }
.step p { color: var(--text-soft); font-size: .96rem; }

/* ---------- 10. FAQ ---------- */
.faq { display: grid; gap: .6rem; max-width: 52rem; margin-inline: auto; }
.faq details {
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 3.5%);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: hidden;
}
.faq summary {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  list-style: none;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--purple);
  transition: rotate .3s var(--ease);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq summary:hover { color: var(--purple); }
.faq__body { padding: 0 1.3rem 1.3rem; color: var(--text-soft); font-size: .97rem; }
.faq__body a { color: var(--purple); font-weight: 650; }

/* ---------- 11. Notice ---------- */
.notice {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: clamp(1.4rem, 1.2rem + 1.2vw, 2.3rem);
  border-radius: var(--r-xl);
  background: linear-gradient(100deg, rgb(244 87 107 / 8%), rgb(168 85 247 / 5%));
  box-shadow: inset 0 0 0 1px rgb(244 87 107 / 35%);
}
.notice__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 14px;
  background: rgb(244 87 107 / 16%);
  font-size: 1.3rem;
}
.notice h2 { font-size: clamp(1.3rem, 1.15rem + .8vw, 1.8rem); margin-bottom: .7rem; }
.notice p { color: var(--text-soft); font-size: .98rem; }
.notice p + p { margin-top: .7rem; }
.notice a { color: var(--purple); font-weight: 650; }

/* ---------- 12. Support launcher (ping-ping) ----------
   Geometry, icon size and shadow copied from the official loader (.sw-fab)
   so the button reads the same as on evenly / beamo / foodzee; the gradient
   is the loader's own "Night" theme, i.e. the one it assigns to hairio.
   Only the safe-area offsets and the ping rings are ours. */
.help-fab {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(95deg, #f4576b, #a855f7);
  box-shadow: 0 10px 26px -6px rgb(168 85 247 / 45%);
  cursor: pointer;
  transition: transform .15s ease;
}
.help-fab:hover { transform: scale(1.06); }
.help-fab:active { transform: scale(.98); }
.help-fab svg { position: relative; z-index: 1; display: block; width: 26px; height: 26px; }

/* Two rings leaving the button one after the other — the ping-ping.
   Ease-out curve so they shoot out quickly and fade slowly; the second
   ring starts mid-cycle, which is what reads as "ping-ping". */
.help-fab::before,
.help-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--coral);
  animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
  pointer-events: none;
}
.help-fab::after {
  border-color: var(--purple);
  animation-delay: 1.2s;
}

/* The shadow breathes in step with the rings, so the button glows softly */
.help-fab { animation: fab-glow 2.4s ease-in-out infinite; }
@keyframes fab-glow {
  0%, 100% { box-shadow: 0 10px 26px -6px rgb(168 85 247 / 45%); }
  50%      { box-shadow: 0 12px 32px -6px rgb(244 87 107 / 62%); }
}

/* Greeting bubble that types itself out next to the button */
.help-hint {
  position: fixed;
  z-index: 2147483000;
  right: calc(max(20px, env(safe-area-inset-right)) + 6px);
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + 56px + 16px);
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  max-width: min(268px, calc(100vw - 44px));
  padding: .7rem .85rem;
  border-radius: 18px 18px 6px 18px;
  background: var(--card);
  box-shadow: 0 22px 50px -22px #000, inset 0 0 0 1px var(--border-str);
  cursor: pointer;
  animation: hint-in .45s var(--ease-spring, cubic-bezier(.34, 1.4, .64, 1));
}
.help-hint[hidden] { display: none; }
.help-hint__avatar {
  width: 32px; height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: .82rem;
  font-weight: 800;
  overflow: hidden;
}
.help-hint__avatar img { width: 100%; height: 100%; object-fit: cover; }
.help-hint__text {
  font-size: .92rem;
  line-height: 1.35;
  font-weight: 600;
  padding-top: .15rem;
}
/* Blinking caret while the greeting types itself */
.help-hint__text::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  translate: 0 .15em;
  background: var(--purple);
  animation: caret 1s steps(1) infinite;
}
.help-hint.is-typed .help-hint__text::after { display: none; }
.help-hint__close {
  position: absolute;
  top: -8px; right: -8px;
  display: grid;
  place-items: center;
  width: 22px; height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--border-str);
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1;
  cursor: pointer;
}
.help-hint__close:hover { color: var(--text); }
body.help-open .help-hint { display: none; }

@keyframes hint-in {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes caret {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* In-page chat panel. Desktop: a card above the button.
   Mobile: the whole screen, so the chat gets its own full-screen layout. */
.help-panel {
  position: fixed;
  z-index: 2147483001;
  right: max(20px, env(safe-area-inset-right));
  bottom: calc(max(20px, env(safe-area-inset-bottom)) + 56px + 14px);
  display: flex;
  flex-direction: column;
  width: min(392px, calc(100vw - 40px));
  height: min(660px, calc(100svh - var(--header-h) - 7rem));
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 40px 90px -30px #000, inset 0 0 0 1px var(--border-str);
  transform-origin: 100% 100%;
  animation: panel-in .26s var(--ease);
}
.help-panel[hidden] { display: none; }

.help-panel__bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem .9rem;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 3%);
}
.help-panel__dot {
  width: 26px; height: 26px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
}
.help-panel__dot svg { width: 15px; height: 15px; }
.help-panel__title { font-size: .95rem; font-weight: 750; letter-spacing: -.02em; }
.help-panel__close {
  margin-left: auto;
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 6%);
  color: var(--text-soft);
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.help-panel__close:hover { color: var(--text); background: rgb(255 255 255 / 12%); }
.help-panel__close svg { width: 15px; height: 15px; }

.help-panel__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--bg);
}

@media (max-width: 640px) {
  .help-panel {
    inset: 0;
    width: 100%;
    height: 100svh;
    border-radius: 0;
  }
  .help-panel__bar { padding-top: max(.75rem, env(safe-area-inset-top)); }
  .help-panel__frame { padding-bottom: env(safe-area-inset-bottom); }
}

/* The launcher steps aside while the panel is open */
body.help-open .help-fab { opacity: 0; pointer-events: none; }
@media (min-width: 641px) {
  body.help-open .help-fab { opacity: 1; pointer-events: auto; }
  body.help-open .help-fab::before,
  body.help-open .help-fab::after { display: none; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 13. CTA ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(2.2rem, 1.8rem + 3vw, 4rem);
  text-align: center;
  background: linear-gradient(105deg, rgb(244 87 107 / 16%), rgb(124 58 237 / 20%));
  box-shadow: inset 0 0 0 1px var(--border-str);
}
.cta h2 { max-width: 28ch; margin-inline: auto; }
.cta p { max-width: 48ch; margin: 1.1rem auto 2rem; color: var(--text-soft); font-size: 1.04rem; }
.cta__row { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.cta__mail {
  display: inline-block;
  margin-top: 1.6rem;
  font-size: 1.05rem;
  font-weight: 750;
}
.cta__mail:hover { color: var(--purple); }

/* ---------- 14. Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem) 2rem;
  background: var(--bg-subtle);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.6rem, 1rem + 2vw, 3rem);
}
@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__about p { margin-top: 1rem; max-width: 34ch; color: var(--text-muted); font-size: .92rem; }
.footer h2, .footer h3 {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.footer ul { display: grid; gap: .55rem; }
.footer li, .footer li a { font-size: .93rem; color: var(--text-soft); }
.footer li a { transition: color .2s var(--ease); }
.footer li a:hover { color: var(--purple); }

.footer__bottom {
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem;
  align-items: center; justify-content: space-between;
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  font-size: .85rem;
  color: var(--text-muted);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer__legal a:hover { color: var(--purple); }

.disclaimer {
  margin-top: 1.6rem;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 80ch;
}
.disclaimer + .disclaimer { margin-top: .8rem; }
.disclaimer a { color: var(--purple); }

/* ---------- 15. Legal pages ---------- */
.legal-hero { padding-block: clamp(2rem, 1.5rem + 2.5vw, 3.5rem) clamp(1.2rem, 1rem + 1.5vw, 2rem); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .45rem; opacity: .5; }
.breadcrumbs a:hover { color: var(--purple); }
.legal-hero h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); }
.legal-hero p { margin-top: .8rem; color: var(--text-muted); font-size: .92rem; }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
  align-items: start;
  padding-bottom: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
@media (max-width: 900px) { .legal-layout { grid-template-columns: 1fr; } }

.toc {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  max-height: calc(100svh - var(--header-h) - 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.2rem 1.3rem;
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 3.5%);
  box-shadow: inset 0 0 0 1px var(--border);
}
@media (max-width: 900px) { .toc { position: static; max-height: none; } }
.toc h2 { font-size: .7rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .9rem; }
.toc ol { display: grid; gap: .3rem; }
.toc a { display: block; padding: .2rem 0; font-size: .89rem; color: var(--text-muted); transition: color .2s var(--ease); }
.toc a:hover, .toc a.is-active { color: var(--purple); }

.prose {
  max-width: 72ch;
  padding: clamp(1.3rem, 1.1rem + 1.5vw, 2.5rem);
  border-radius: var(--r-xl);
  background: rgb(255 255 255 / 3%);
  box-shadow: inset 0 0 0 1px var(--border);
}
.prose h2 {
  font-size: clamp(1.2rem, 1.1rem + .7vw, 1.6rem);
  margin-top: 2.4rem;
  margin-bottom: .8rem;
  scroll-margin-top: calc(var(--header-h) + 1.2rem);
}
.prose > p:first-child { color: var(--text-soft); }
.prose h3 { font-size: 1.06rem; margin-top: 1.8rem; margin-bottom: .5rem; scroll-margin-top: calc(var(--header-h) + 1.2rem); }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; color: var(--text-soft); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--purple); font-weight: 650; }
.prose strong { color: var(--text); font-weight: 750; }
.prose table { width: 100%; border-collapse: collapse; font-size: .89rem; margin-bottom: 1.2rem; }
.prose th, .prose td { text-align: left; padding: .75rem .85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); font-weight: 800; }
.table-wrap { overflow-x: auto; }

/* ---------- 16. Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 17. Keyframes ---------- */
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sweep {
  0%       { top: 0; opacity: 0; }
  12%, 75% { opacity: 1; }
  100%     { top: 100%; opacity: 0; }
}
@keyframes ping {
  0%        { opacity: .8; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.9); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* ---------- 18. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .scanline { display: none; }
  .help-fab::before, .help-fab::after { display: none; }
  .help-fab { animation: none; }
  .help-hint, .help-hint__text::after { animation: none; }
}

@media print {
  .header, .footer, .toc, .btn, .hero__visual { display: none !important; }
  body { color: #000; background: #fff; }
  body::before { display: none; }
  .prose { max-width: none; padding: 0; box-shadow: none; background: none; }
  .prose p, .prose li { color: #000; }
}
