/* =============================================================
   Flowency — "Waveform Studio" (light)
   A broadcast-console design language recolored to the Flowency
   purple brand. Speech is the material, so the waveform is the
   signature motif: it is the logo glyph, the section divider,
   and the live accent. Shared by every page for a consistent,
   fast, SEO-friendly experience.
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Surfaces — light "studio paper" */
  --bg-page: #F5F4FB;        /* app background, soft lavender-white */
  --bg-surface: #FFFFFF;     /* cards, header, dialogs */
  --bg-raised: #EEEBF9;      /* hover, chip tracks, subtle fills */
  --bg-well: #EFEEF6;        /* inset wells: screenshot mattes, inputs */
  --bg-ink: #1C1930;         /* dark console: footer, deep panels */
  --bg-ink-raised: #272243;  /* raised rows on the dark console */

  /* Ink */
  --ink: #2A2740;            /* headings / primary text (purple-charcoal) */
  --ink-body: #5A6072;       /* body copy (brand light-text, tuned) */
  --ink-soft: #767C8C;       /* secondary */
  --ink-faint: #98909F;      /* meta / timecodes only, 12px+ */
  --ink-on-dark: #F3F1FB;
  --ink-on-dark-soft: #B7B1D4;
  --ink-on-dark-faint: #8A83A8;

  /* Lines */
  --line: #E7E3F3;
  --line-strong: #D8D2EC;
  --line-on-dark: rgba(255, 255, 255, 0.10);

  /* Brand signal (the VU-meter amber, replaced by Flowency purple) */
  --signal: #7460EE;
  --signal-deep: #5A4AD1;
  --signal-light: #8C7EF5;
  --signal-tint: rgba(116, 96, 238, 0.10);
  --signal-tint-2: rgba(116, 96, 238, 0.18);

  /* Accent hues (kept from the app: gems, stars, streaks, checks) */
  --gem: #2AA5EA;            --gem-tint: rgba(85, 193, 255, 0.16);
  --star: #E0A400;           --star-tint: rgba(255, 217, 61, 0.20);
  --flame: #FF5C3D;          --flame-tint: rgba(255, 92, 61, 0.14);
  --success: #23B24A;        --success-tint: rgba(55, 208, 88, 0.16);

  /* Type */
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-card: 18px;
  --r-control: 11px;
  --r-monitor: 22px;
  --r-chip: 999px;

  /* Elevation (light, purple-tinted) */
  --shadow-sm: 0 1px 2px rgba(28, 25, 48, 0.05), 0 3px 10px rgba(116, 96, 238, 0.05);
  --shadow-card: 0 6px 26px rgba(116, 96, 238, 0.09), 0 1px 3px rgba(28, 25, 48, 0.05);
  --shadow-pop: 0 18px 44px rgba(28, 25, 48, 0.16);
  --glow-signal: 0 10px 30px rgba(116, 96, 238, 0.30);
  --ring-focus: 0 0 0 3px rgba(116, 96, 238, 0.38);

  /* Motion */
  --ease: cubic-bezier(0.3, 0.9, 0.35, 1);
  --dur: 200ms;

  /* Layout */
  --content-max: 1180px;
  --gutter: clamp(18px, 5vw, 40px);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-body);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--signal-deep); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--signal); }

img { max-width: 100%; height: auto; display: block; }

strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }

::selection { background: var(--signal-tint-2); color: var(--ink); }

:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 6px; }

/* ---------- 3. Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--content-max); margin: 0 auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 860px; }
.wrap--reading { max-width: 760px; }

.section { padding: clamp(56px, 9vw, 104px) 0; position: relative; }
.section--tint { background: linear-gradient(180deg, #FBFAFF 0%, var(--bg-page) 100%); }
.section--surface { background: var(--bg-surface); }
.section--ink { background: var(--bg-ink); color: var(--ink-on-dark-soft); }
.section--tight { padding: clamp(40px, 6vw, 64px) 0; }

.center { text-align: center; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---------- 4. The waveform motif ---------- */
.wave { display: inline-flex; align-items: center; gap: 3px; height: 1em; }
.wave__bar {
  width: 3px; border-radius: 999px; background: currentColor;
  height: 40%; transform-origin: center;
}
.wave--brand .wave__bar { background: var(--signal); }
/* Static bar rhythm (5-bar logo glyph shape) */
.wave__bar:nth-child(1) { height: 42%; }
.wave__bar:nth-child(2) { height: 78%; }
.wave__bar:nth-child(3) { height: 100%; }
.wave__bar:nth-child(4) { height: 64%; }
.wave__bar:nth-child(5) { height: 34%; }

/* Live animated variant */
.wave--live .wave__bar { animation: vu 1.1s var(--ease) infinite; }
.wave--live .wave__bar:nth-child(1) { animation-delay: 0ms; }
.wave--live .wave__bar:nth-child(2) { animation-delay: 130ms; }
.wave--live .wave__bar:nth-child(3) { animation-delay: 260ms; }
.wave--live .wave__bar:nth-child(4) { animation-delay: 90ms; }
.wave--live .wave__bar:nth-child(5) { animation-delay: 200ms; }
@keyframes vu { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .wave--live .wave__bar { animation: none; } }

/* Full-width decorative waveform divider */
.wave-divider {
  height: 34px; width: 100%;
  color: var(--signal);
  opacity: 0.5;
  -webkit-mask: var(--wave-svg) repeat-x center / auto 100%;
  mask: var(--wave-svg) repeat-x center / auto 100%;
  background: linear-gradient(90deg, var(--signal-light), var(--signal), var(--signal-light));
}
:root {
  --wave-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='34' viewBox='0 0 120 34'%3E%3Cg fill='%23000'%3E%3Crect x='2' y='13' width='3' height='8' rx='1.5'/%3E%3Crect x='9' y='9' width='3' height='16' rx='1.5'/%3E%3Crect x='16' y='4' width='3' height='26' rx='1.5'/%3E%3Crect x='23' y='11' width='3' height='12' rx='1.5'/%3E%3Crect x='30' y='15' width='3' height='4' rx='1.5'/%3E%3Crect x='37' y='8' width='3' height='18' rx='1.5'/%3E%3Crect x='44' y='2' width='3' height='30' rx='1.5'/%3E%3Crect x='51' y='10' width='3' height='14' rx='1.5'/%3E%3Crect x='58' y='14' width='3' height='6' rx='1.5'/%3E%3Crect x='65' y='6' width='3' height='22' rx='1.5'/%3E%3Crect x='72' y='12' width='3' height='10' rx='1.5'/%3E%3Crect x='79' y='9' width='3' height='16' rx='1.5'/%3E%3Crect x='86' y='3' width='3' height='28' rx='1.5'/%3E%3Crect x='93' y='13' width='3' height='8' rx='1.5'/%3E%3Crect x='100' y='7' width='3' height='20' rx='1.5'/%3E%3Crect x='107' y='11' width='3' height='12' rx='1.5'/%3E%3Crect x='114' y='14' width='3' height='6' rx='1.5'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- 5. Eyebrows & section headings ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal-deep);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--signal); border-radius: 2px; }
.section--ink .eyebrow { color: var(--signal-light); }

.sec-head { max-width: 720px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.sec-head .eyebrow { justify-content: center; margin-bottom: 16px; }
.sec-head__title { font-size: clamp(28px, 4.2vw, 42px); font-weight: 600; }
.sec-head__sub { margin-top: 16px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: var(--r-control);
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary {
  background: var(--signal); color: #fff;
  border-bottom: 2px solid var(--signal-deep);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--signal-deep); color: #fff; box-shadow: var(--glow-signal); }
.btn--primary:active { transform: translateY(1px); border-bottom-width: 1px; }
.btn--secondary {
  background: var(--bg-surface); color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--secondary:hover { border-color: var(--signal); color: var(--signal-deep); background: var(--bg-surface); }
.btn--ghost { background: transparent; color: var(--signal-deep); padding-inline: 8px; }
.btn--ghost:hover { color: var(--signal); }
.btn--lg { font-size: 16px; padding: 16px 30px; }
.btn--on-dark { background: var(--signal); color: #fff; border-bottom: 2px solid #3f31a8; }
.btn--on-dark:hover { background: var(--signal-light); color: #1c1930; box-shadow: var(--glow-signal); }

/* App store lockups */
.stores { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.stores--center { justify-content: center; }
.stores a { display: inline-block; transition: transform var(--dur) var(--ease), filter var(--dur) var(--ease); border-radius: 12px; }
.stores a:hover { transform: translateY(-3px); }
.stores img { height: 52px; width: auto; display: block; }

/* ---------- 7. Tally-light chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: var(--r-chip);
  background: var(--signal-tint); color: var(--signal-deep);
  border: 1px solid var(--signal-tint-2);
  line-height: 1;
}
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip--gem { background: var(--gem-tint); color: var(--gem); border-color: var(--gem-tint); }
.chip--star { background: var(--star-tint); color: var(--star); border-color: var(--star-tint); }
.chip--flame { background: var(--flame-tint); color: var(--flame); border-color: var(--flame-tint); }
.chip--success { background: var(--success-tint); color: var(--success); border-color: var(--success-tint); }

/* ---------- 8. Cards ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: clamp(24px, 3vw, 34px);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.card--spine { position: relative; overflow: hidden; }
.card--spine::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--signal); }
.card--hover:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(116, 96, 238, 0.16); }

/* ---------- 9. Header / navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: url("../images/app-icon.png") center / cover no-repeat;
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(28, 25, 48, 0.05);
  display: inline-block; flex: none;
}
.brand__mark .wave { display: none; } /* logo is now the official app icon */
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--ink); letter-spacing: -0.02em; }

.nav__menu { display: flex; align-items: center; gap: 6px; }
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__link {
  font-size: 14.5px; font-weight: 500; color: var(--ink-body);
  padding: 9px 14px; border-radius: 9px; transition: all var(--dur) var(--ease);
}
.nav__link:hover { color: var(--signal-deep); background: var(--signal-tint); }
.nav__cta { margin-left: 10px; }
.nav__toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong);
  border-radius: 10px; background: var(--bg-surface); cursor: pointer;
  align-items: center; justify-content: center; color: var(--ink);
}
.nav__toggle svg { width: 22px; height: 22px; }
.nav__toggle .icon-close { display: none; }
.nav.is-open .nav__toggle .icon-open { display: none; }
.nav.is-open .nav__toggle .icon-close { display: block; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg-surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-pop);
    padding: 14px var(--gutter) 22px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  }
  .nav.is-open .nav__menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { padding: 13px 12px; font-size: 16px; border-radius: 10px; }
  .nav__cta { margin: 8px 0 0; }
  .nav__cta .btn { width: 100%; }
}

/* ---------- 10. Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 84px) 0 clamp(56px, 8vw, 92px); background: radial-gradient(120% 90% at 85% -10%, rgba(140, 126, 245, 0.14), transparent 60%), linear-gradient(180deg, #FBFAFF, var(--bg-page)); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__eyebrow { margin-bottom: 20px; }
.hero__title { font-size: clamp(34px, 5.4vw, 58px); font-weight: 700; letter-spacing: -0.03em; color: var(--ink); }
.hero__title .accent { color: var(--signal); }
.hero__tagline { margin-top: 20px; font-size: clamp(17px, 2.2vw, 21px); color: var(--ink-soft); max-width: 30ch; }
.hero__cta { margin-top: 32px; display: flex; }
.hero__note { margin-top: 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; font-size: 13.5px; color: var(--ink-soft); }
.hero__note .dot { color: var(--signal); }
.hero__note .mono { color: var(--ink); font-size: 13px; }

.hero__media { position: relative; display: flex; justify-content: center; }

/* Screenshot "monitor" — the app screen floats on a soft brand glow (no flat matte) */
.monitor { position: relative; border-radius: var(--r-monitor); }
.monitor::before {
  content: ""; position: absolute; z-index: 0; inset: 10% 2% -6%;
  background: radial-gradient(closest-side, rgba(116, 96, 238, 0.30), transparent 78%);
  filter: blur(30px); pointer-events: none;
}
.monitor__screen {
  position: relative; z-index: 1; display: block;
  border-radius: var(--r-monitor); overflow: hidden;
  border: 1px solid rgba(216, 210, 236, 0.7);
  box-shadow: 0 28px 52px -22px rgba(116, 96, 238, 0.48), 0 10px 22px -12px rgba(28, 25, 48, 0.16);
  background: #fff;
}
.monitor__screen img { width: 100%; display: block; }
.monitor__label {
  position: absolute; top: 22px; left: 26px; z-index: 2;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.8); padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--line);
}
.hero__media .monitor { max-width: 340px; animation: float-y 6s ease-in-out infinite; will-change: transform; }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .hero__media .monitor { animation: none; } }
.hero__media .wave-badge {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: var(--bg-surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; box-shadow: var(--shadow-card);
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink); white-space: nowrap;
}
.hero__media .wave-badge .wave { height: 16px; color: var(--signal); }

.hero__float { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero__grid > * { position: relative; z-index: 1; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .hero__tagline { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__note { justify-content: center; }
  .hero__eyebrow { justify-content: center; }
}

/* ---------- 11. Benefits ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 28px); }
.benefit { text-align: left; }
.benefit__icon {
  width: 58px; height: 58px; border-radius: 15px; margin-bottom: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--signal-tint); padding: 12px;
}
.benefit__icon img { width: 100%; height: 100%; object-fit: contain; }
.benefit__title { font-size: 20px; margin-bottom: 10px; }
.benefit__text { color: var(--ink-body); font-size: 15.5px; }

@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- 12. Feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature--reverse .feature__media { order: -1; }
.feature__body { max-width: 480px; }
.feature__title { font-size: clamp(24px, 3vw, 32px); margin: 16px 0 16px; }
.feature__text { color: var(--ink-body); font-size: 16.5px; margin-bottom: 14px; }
.feature__text:last-child { margin-bottom: 0; }
.feature__media { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.feature__media .monitor { max-width: 300px; flex: 1 1 240px; }
.feature__media--stack { flex-direction: column; align-items: center; }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature--reverse .feature__media { order: 0; }
  .feature__body { max-width: none; }
}

/* Scroll-reveal for feature rows (class 'reveal' is added by JS only) */
.feature.reveal .feature__body {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.feature.reveal .feature__media {
  opacity: 0; transform: translateY(36px) scale(0.985);
  transition: opacity 0.8s var(--ease) 0.08s, transform 0.8s var(--ease) 0.08s;
}
.feature.reveal.is-visible .feature__body,
.feature.reveal.is-visible .feature__media { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .feature.reveal .feature__body, .feature.reveal .feature__media { opacity: 1; transform: none; transition: none; }
}

/* ---------- 13. Trust / research band ---------- */
.trust { text-align: center; }
.trust__text { max-width: 720px; margin: 0 auto 32px; font-size: clamp(16px, 2vw, 20px); color: var(--ink-soft); }
.logos {
  background: var(--bg-surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow-card); max-width: 860px; margin: 0 auto;
}
.logos img { margin: 0 auto; max-width: 100%; }

/* ---------- 14. CTA console band ---------- */
.cta {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--signal) 0%, var(--signal-deep) 70%, #47379e 100%);
  color: #fff; border-radius: clamp(20px, 3vw, 30px);
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 60px);
  text-align: center; box-shadow: var(--glow-signal);
}
.cta::after {
  content: ""; position: absolute; inset: 0; opacity: 0.16; pointer-events: none;
  background: var(--wave-svg) repeat center / 240px auto;
  -webkit-mask: linear-gradient(180deg, transparent, #000 40%, transparent);
  mask: linear-gradient(180deg, transparent, #000 40%, transparent);
  filter: invert(1);
}
.cta > * { position: relative; z-index: 1; }
.cta .eyebrow { color: rgba(255, 255, 255, 0.85); justify-content: center; margin-bottom: 16px; }
.cta .eyebrow::before { background: rgba(255,255,255,0.7); }
.cta__title { color: #fff; font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; }
.cta__text { color: rgba(255, 255, 255, 0.92); max-width: 640px; margin: 18px auto 0; font-size: clamp(16px, 2vw, 18px); }
.cta .stores { margin-top: 32px; }

/* ---------- 15. Footer ---------- */
.site-footer { background: var(--bg-ink); color: var(--ink-on-dark-soft); padding: 0 0 36px; }
.footer-wave { color: var(--signal); }
.site-footer .wave-divider { opacity: 0.6; }
.footer__top { padding: clamp(48px, 6vw, 72px) 0 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer__brand .brand__name { color: #fff; }
.footer__tagline { margin-top: 16px; font-size: 14.5px; color: var(--ink-on-dark-faint); max-width: 28ch; }
.footer__head {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-on-dark-faint);
  margin-bottom: 18px;
}
.footer__links { list-style: none; }
.footer__links li { margin-bottom: 11px; }
.footer__links a { color: var(--ink-on-dark-soft); font-size: 15px; }
.footer__links a:hover { color: #fff; }
.social { display: flex; gap: 12px; list-style: none; margin-bottom: 18px; }
.social a {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line-on-dark);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink-on-dark-soft);
  transition: all var(--dur) var(--ease);
}
.social a:hover { color: #fff; border-color: var(--signal); background: var(--signal-tint); transform: translateY(-2px); }
.social svg { width: 19px; height: 19px; }
.footer__contact a { color: var(--ink-on-dark-soft); font-size: 14.5px; }
.footer__contact a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid var(--line-on-dark); padding-top: 26px; margin-top: 8px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
}
.footer__bottom p { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-on-dark-faint); }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- 16. Page hero (sub-pages) ---------- */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px); background: radial-gradient(90% 120% at 100% 0%, rgba(140,126,245,0.10), transparent 55%); text-align: center; }
.breadcrumbs { display: flex; justify-content: center; gap: 8px; list-style: none; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-faint); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--ink-soft); }
.breadcrumbs a:hover { color: var(--signal); }
.breadcrumbs li::after { content: "/"; margin-left: 8px; color: var(--line-strong); }
.breadcrumbs li:last-child::after { content: ""; }
.page-hero__title { font-size: clamp(30px, 5vw, 48px); font-weight: 700; }
.page-hero__sub { margin: 16px auto 0; max-width: 640px; font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); }

/* ---------- 17. Prose / documents (legal, long-form) ---------- */
.doc { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: clamp(28px, 5vw, 56px); }
.doc__meta { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); margin-bottom: 26px; }
.doc h2 { font-size: clamp(22px, 3vw, 28px); margin: 40px 0 16px; position: relative; padding-bottom: 12px; }
.doc h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--signal); border-radius: 3px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font-size: 20px; margin: 30px 0 12px; }
.doc h4 { font-size: 17px; margin: 26px 0 10px; color: var(--ink); }
.doc p { margin-bottom: 16px; color: var(--ink-body); }
.doc ul, .doc ol { margin: 0 0 18px; padding-left: 24px; color: var(--ink-body); }
.doc li { margin-bottom: 9px; }
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.callout { border-left: 4px solid var(--signal); background: var(--signal-tint); padding: 16px 22px; margin: 22px 0; border-radius: 0 var(--r-control) var(--r-control) 0; }
.def-box { background: var(--bg-well); border: 1px solid var(--line); border-radius: var(--r-control); padding: 22px 24px; margin: 22px 0; }
.def-box h4 { margin-top: 0; color: var(--signal-deep); }
.def-box ul:last-child, .def-box p:last-child { margin-bottom: 0; }

/* ---------- 18. FAQ accordion ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__cat { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 26px); color: var(--ink); margin: 46px 0 22px; padding-bottom: 12px; position: relative; }
.faq__cat:first-child { margin-top: 0; }
.faq__cat::after { content: ""; position: absolute; left: 0; bottom: 0; width: 44px; height: 3px; background: var(--signal); border-radius: 3px; }
.faq__item { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-control); box-shadow: var(--shadow-sm); margin-bottom: 12px; overflow: hidden; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.faq__item.is-open { border-color: var(--signal-tint-2); box-shadow: var(--shadow-card); }
.faq__q {
  width: 100%; text-align: left; background: transparent; border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 16.5px; color: var(--ink);
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq__q:hover { color: var(--signal-deep); }
.faq__icon { flex: none; width: 22px; height: 22px; color: var(--signal); transition: transform var(--dur) var(--ease); }
.faq__item.is-open .faq__icon { transform: rotate(180deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq__a-inner { padding: 0 24px 22px; color: var(--ink-body); }
.faq__a-inner p { margin-bottom: 12px; }
.faq__a-inner ul { margin: 0 0 12px; padding-left: 22px; }
.faq__a-inner li { margin-bottom: 8px; }
.faq__a-inner :last-child { margin-bottom: 0; }

/* ---------- 19. Contact ---------- */
.contact-card { max-width: 640px; margin: 0 auto; }
.contact-card > p { font-size: 17px; margin-bottom: 28px; }
.contact-row { display: flex; align-items: flex-start; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-row:first-of-type { border-top: none; }
.contact-row__icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--signal-tint); color: var(--signal-deep); display: inline-flex; align-items: center; justify-content: center; }
.contact-row__icon svg { width: 22px; height: 22px; }
.contact-row__label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.contact-row__value { font-size: 16px; color: var(--ink); }
.contact-row__value a { font-weight: 500; }

/* ---------- 20. Form container (Android / Tally) ---------- */
.form-panel { max-width: 720px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: clamp(26px, 4vw, 44px); }
.form-panel iframe { width: 100%; border: 0; }

/* ---------- 21. Blog index ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 30px); }
.post-card { background: var(--bg-surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.post-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(116, 96, 238, 0.16); }
.post-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-well); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card__date { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-bottom: 10px; }
.post-card__title { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--signal-deep); }
.post-card__excerpt { font-size: 14.5px; color: var(--ink-body); margin-bottom: 18px; flex: 1; }
.post-card__more { font-weight: 600; font-size: 14.5px; color: var(--signal-deep); display: inline-flex; align-items: center; gap: 6px; }
.post-card__more:hover { gap: 9px; color: var(--signal); }

@media (max-width: 720px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- 22. Blog article ---------- */
.post { max-width: 760px; margin: 0 auto; padding: clamp(30px, 5vw, 52px) 0 20px; }
.post__title { font-size: clamp(28px, 4.6vw, 42px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.post__meta { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); margin-bottom: 24px; display: flex; gap: 14px; flex-wrap: wrap; }
.post__hero { border-radius: var(--r-card); overflow: hidden; margin-bottom: 8px; border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.post__hero img { width: 100%; }
.toc { background: var(--bg-well); border: 1px solid var(--line); border-left: 4px solid var(--signal); border-radius: 0 var(--r-control) var(--r-control) 0; padding: 22px 26px; margin: 32px 0; }
.toc h2 { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal-deep); margin: 0 0 14px; padding: 0; }
.toc h2::after { display: none; }
.toc ul { list-style: none; padding: 0; }
.toc li { margin-bottom: 9px; padding-left: 18px; position: relative; }
.toc li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--signal-tint-2); border: 1.5px solid var(--signal); }
.toc a { color: var(--ink-body); font-size: 15px; }
.toc a:hover { color: var(--signal-deep); }
.post__body { font-size: 17.5px; line-height: 1.85; color: var(--ink-body); }
.post__body section { scroll-margin-top: 90px; margin-bottom: 8px; }
.post__body h2 { font-size: clamp(23px, 3vw, 30px); margin: 44px 0 16px; padding-bottom: 12px; position: relative; }
.post__body h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--signal); border-radius: 3px; }
.post__body h3 { font-size: 21px; margin: 30px 0 12px; }
.post__body p { margin-bottom: 18px; }
.post__body ul, .post__body ol { margin: 0 0 18px; padding-left: 26px; }
.post__body li { margin-bottom: 10px; }
.post__body a { text-decoration: underline; text-underline-offset: 2px; }
.post__body blockquote { border-left: 4px solid var(--signal); background: var(--signal-tint); margin: 24px 0; padding: 16px 24px; border-radius: 0 var(--r-control) var(--r-control) 0; font-size: 18px; color: var(--ink); }

.post-cta {
  position: relative; overflow: hidden; margin: 48px 0 10px;
  background: linear-gradient(135deg, var(--signal) 0%, var(--signal-deep) 75%, #47379e 100%);
  color: #fff; border-radius: var(--r-card); padding: clamp(30px, 4vw, 44px); text-align: center;
  box-shadow: var(--glow-signal);
}
.post-cta::after { content: ""; position: absolute; inset: 0; opacity: 0.14; background: var(--wave-svg) repeat center / 200px auto; filter: invert(1); pointer-events: none; }
.post-cta > * { position: relative; z-index: 1; }
.post-cta h2 { color: #fff; font-size: clamp(22px, 3vw, 30px); margin: 0 0 12px; padding: 0; }
.post-cta h2::after { display: none; }
.post-cta p { color: rgba(255,255,255,0.92); font-size: 16px; margin-bottom: 4px; }
.post-cta .stores { justify-content: center; margin-top: 22px; }

/* ---------- 23. Back-to-top ---------- */
.to-top {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--signal); color: #fff; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-signal); opacity: 0; visibility: hidden;
  transform: translateY(10px); transition: all var(--dur) var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--signal-deep); color: #fff; transform: translateY(-3px); }
.to-top svg { width: 22px; height: 22px; }

/* ---------- 24. Image fade-in ---------- */
.fade-img { opacity: 0; transition: opacity 0.6s var(--ease); }
.fade-img.is-loaded, .no-js .fade-img { opacity: 1; }
