/* ===========================================================================
   Keepora — website design system
   Colour tokens mirror keepora-app/lib/app/theme/app_colors.dart exactly.
   No third-party requests: fonts are self-hosted, nothing is loaded off-site.
   =========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}

/* --- Tokens --------------------------------------------------------------- */
:root {
  /* AppColors.light */
  --primary: #0F766E;
  --on-primary: #FFFFFF;
  --primary-soft: #E6F2F0;
  --background: #F5F8F7;
  --card: #FFFFFF;
  --ink: #10211E;
  --dim: #596B67;
  --line: #E2EAE8;
  --critical: #B3261E;
  --critical-soft: #FBE9E7;
  --warning: #8F5700;
  --warning-soft: #FBF0E0;
  --ok: #156B3C;
  --ok-soft: #E6F2EB;

  /* Logo blue — secondary accent, used only in gradients and glows. */
  --accent: #1D6BF0;
  --accent-soft: #E8F0FE;

  --grad-brand: linear-gradient(118deg, #0F766E 0%, #14968B 42%, #1D6BF0 100%);
  --grad-text: linear-gradient(100deg, #0F766E 0%, #15A396 50%, #1D6BF0 100%);

  --shadow-sm: 0 1px 2px rgba(16, 33, 30, .06), 0 1px 3px rgba(16, 33, 30, .04);
  --shadow-md: 0 8px 24px -8px rgba(16, 33, 30, .14), 0 2px 8px rgba(16, 33, 30, .05);
  --shadow-lg: 0 32px 64px -24px rgba(16, 33, 30, .22), 0 8px 24px -12px rgba(16, 33, 30, .1);
  --glow: 0 0 0 1px rgba(15, 118, 110, .12), 0 20px 60px -24px rgba(15, 118, 110, .4);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  --nav-h: 68px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* AppColors.dark */
:root[data-theme='dark'] {
  --primary: #2DD4BF;
  --on-primary: #06231F;
  --primary-soft: #13302B;
  --background: #0C1614;
  --card: #13211E;
  --ink: #E4EFEC;
  --dim: #93A8A3;
  --line: #223632;
  --critical: #FF9A8F;
  --critical-soft: #3A1A17;
  --warning: #F2C377;
  --warning-soft: #352711;
  --ok: #7CD9A2;
  --ok-soft: #113024;

  --accent: #5B9CFF;
  --accent-soft: #15243D;

  --grad-brand: linear-gradient(118deg, #0F766E 0%, #189A8D 45%, #2F6FE4 100%);
  --grad-text: linear-gradient(100deg, #2DD4BF 0%, #5FE3D2 50%, #7FB4FF 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, .7);
  --glow: 0 0 0 1px rgba(45, 212, 191, .16), 0 20px 60px -24px rgba(45, 212, 191, .3);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--background);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
ul, ol { padding-left: 1.25rem; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--primary); color: var(--on-primary); }

/* --- Layout primitives ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--tight { padding: clamp(48px, 6vw, 80px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 20px;
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.025em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 6.2vw, 4.1rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.85rem, 4vw, 2.85rem); letter-spacing: -.032em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

.lede {
  font-size: clamp(1.03rem, 1.7vw, 1.2rem);
  color: var(--dim);
  max-width: 62ch;
}

.section-head { max-width: 42rem; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 16px; color: var(--dim); font-size: 1.05rem; }

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

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: .95rem;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }

.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow);
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .28) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-md); }

.btn--lg { padding: 16px 32px; font-size: 1rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* --- Navigation ----------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.12rem; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; transition: transform .5s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--dim);
  border-radius: var(--r-sm);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--primary-soft); }
.nav-links a.is-active { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--dim);
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .4s var(--ease);
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); transform: rotate(18deg); }
.theme-toggle svg { width: 18px; height: 18px; }
:root[data-theme='dark'] .icon-moon { display: none; }
:root:not([data-theme='dark']) .icon-sun { display: none; }

.nav-burger { display: none; width: 40px; height: 40px; place-items: center; border-radius: var(--r-sm); }
.nav-burger span {
  display: block; width: 19px; height: 2px; border-radius: 2px;
  background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
.nav-burger span + span { margin-top: 5px; }
.nav-burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 auto 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 12px 24px 28px;
  z-index: 99;
  display: none;
  flex-direction: column;
  gap: 2px;
  transform-origin: top;
  animation: menuIn .32s var(--ease-out);
}
.mobile-menu.is-open { display: flex; }
@keyframes menuIn {
  from { opacity: 0; transform: translateY(-10px) scaleY(.96); }
  to   { opacity: 1; transform: none; }
}
.mobile-menu a {
  padding: 14px 10px;
  font-size: 1.02rem;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .btn { margin-top: 18px; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(60px, 8vw, 110px);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
/* A grid track's automatic minimum is min-content, so one long unbreakable
   headline would otherwise widen the column past the viewport. */
.hero .wrap > * { min-width: 0; }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lede { margin-bottom: 34px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .87rem; color: var(--dim); }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 15px; height: 15px; color: var(--ok); flex: none; }

/* Animated background mesh */
.mesh { position: absolute; inset: -20% -10% auto; height: 150%; z-index: -1; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; top: -6%;  left: -8%;  background: color-mix(in srgb, var(--primary) 55%, transparent); animation: drift1 22s var(--ease) infinite alternate; }
.blob-2 { width: 38vw; height: 38vw; top: 12%;  right: -6%; background: color-mix(in srgb, var(--accent) 45%, transparent);  animation: drift2 26s var(--ease) infinite alternate; }
.blob-3 { width: 30vw; height: 30vw; top: 46%;  left: 34%;  background: color-mix(in srgb, var(--ok) 32%, transparent);      animation: drift3 30s var(--ease) infinite alternate; }
:root[data-theme='dark'] .blob { opacity: .3; }

@keyframes drift1 { to { transform: translate3d(9vw, 6vh, 0) scale(1.14); } }
@keyframes drift2 { to { transform: translate3d(-7vw, 9vh, 0) scale(.88); } }
@keyframes drift3 { to { transform: translate3d(5vw, -7vh, 0) scale(1.2); } }

.grid-overlay {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 32%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 32%, #000 0%, transparent 100%);
}

/* --- Phone mockup --------------------------------------------------------- */
.phone-stage { position: relative; display: grid; place-items: center; perspective: 1400px; }

.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 19;
  background: var(--card);
  border: 9px solid #121b1a;
  border-radius: 42px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  overflow: hidden;
  transform: rotateY(-12deg) rotateX(5deg);
  animation: float 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes float {
  0%, 100% { transform: rotateY(-12deg) rotateX(5deg) translateY(0); }
  50%      { transform: rotateY(-9deg)  rotateX(3deg) translateY(-16px); }
}
/* Same drift without the 3D tilt, for the narrow layout. */
@keyframes floatFlat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
.phone::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 94px; height: 21px;
  background: #121b1a;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}

/* text-align: left resists the hero's centred text once the layout stacks —
   the mockup is a UI screenshot and must stay left-aligned at every width. */
.screen { height: 100%; display: flex; flex-direction: column; background: var(--background); text-align: left; }

.screen-top {
  padding: 34px 18px 14px;
  background: var(--grad-brand);
  color: #fff;
}
.screen-top .hi { font-size: .72rem; opacity: .82; }
.screen-top .count { font-size: 1.42rem; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; }

.screen-body { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }

.mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  animation: cardIn .6s var(--ease-out) forwards;
}
.mini-card:nth-child(1) { animation-delay: .45s; }
.mini-card:nth-child(2) { animation-delay: .62s; }
.mini-card:nth-child(3) { animation-delay: .79s; }
.mini-card:nth-child(4) { animation-delay: .96s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.mini-ico {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.mini-ico svg { width: 15px; height: 15px; }
.mini-meta { min-width: 0; flex: 1; }
.mini-meta strong { display: block; font-size: .76rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-meta span { display: block; font-size: .66rem; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.screen-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 11px 8px 15px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.screen-nav span { color: var(--dim); opacity: .55; }
.screen-nav span.is-on { color: var(--primary); opacity: 1; }
.screen-nav svg { width: 17px; height: 17px; }

.pill { font-size: .56rem; font-weight: 600; padding: 3px 7px; border-radius: var(--r-pill); white-space: nowrap; flex: none; }
.pill--critical { background: var(--critical-soft); color: var(--critical); }
.pill--warning  { background: var(--warning-soft);  color: var(--warning); }
.pill--ok       { background: var(--ok-soft);       color: var(--ok); }

/* Floating chips around the phone */
.float-chip {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 16px;
  font-size: .79rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  z-index: 2;
}
.float-chip svg { width: 15px; height: 15px; flex: none; }
.chip-a { top: 12%;  left: -6%;  color: var(--ok);      animation: float 6s ease-in-out infinite .4s; }
.chip-b { top: 44%;  right: -8%; color: var(--primary); animation: float 6.8s ease-in-out infinite 1.1s; }
.chip-c { bottom: 13%; left: -2%; color: var(--warning); animation: float 7.6s ease-in-out infinite .7s; }

/* --- Stats --------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat { background: var(--card); padding: 28px 22px; text-align: center; transition: background-color .3s var(--ease); }
.stat:hover { background: var(--primary-soft); }
.stat b { display: block; font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 600; letter-spacing: -.04em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .83rem; color: var(--dim); }

/* --- Feature cards -------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  overflow: hidden;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              color-mix(in srgb, var(--primary) 12%, transparent), transparent 62%);
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 32%, var(--line)); }
.card:hover::before { opacity: 1; }

.card-ico {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 18px;
  transition: transform .45s var(--ease), background-color .45s var(--ease);
}
.card:hover .card-ico { transform: scale(1.1) rotate(-6deg); }
.card-ico svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--dim); font-size: .94rem; }

/* --- Privacy split -------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.ledger {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
}
.ledger h4 { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); margin-bottom: 16px; }
.ledger ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.ledger li { display: flex; align-items: flex-start; gap: 11px; font-size: .93rem; }
.ledger li svg { width: 17px; height: 17px; margin-top: 4px; flex: none; }
.ledger--local li svg { color: var(--ok); }
.ledger--server li svg { color: var(--dim); }
.ledger + .ledger { margin-top: 18px; }

/* --- Steps ---------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; counter-reset: step; position: relative; }
.step { position: relative; padding-top: 14px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: .9;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 7px; }
.step p { color: var(--dim); font-size: .93rem; }

/* --- Pricing -------------------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.plan--featured { border-color: var(--primary); box-shadow: var(--glow); }
.plan--featured::after {
  content: 'Most popular';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.plan h3 { margin-bottom: 6px; }
.plan .price { font-size: 2.2rem; font-weight: 600; letter-spacing: -.04em; margin: 12px 0 4px; }
.plan .price small { font-size: .9rem; font-weight: 400; color: var(--dim); letter-spacing: 0; }
.plan .note { font-size: .85rem; color: var(--dim); min-height: 2.6em; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 26px; display: flex; flex-direction: column; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: .92rem; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; margin-top: 4px; flex: none; color: var(--primary); }
.plan .btn { margin-top: auto; width: 100%; }

/* --- FAQ ------------------------------------------------------------------ */
.faq { max-width: 780px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  font-weight: 500;
  font-size: 1.03rem;
  position: relative;
  transition: color .25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--primary); }
.faq summary::after {
  content: '';
  position: absolute;
  right: 6px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .35s var(--ease);
  opacity: .55;
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq .answer { overflow: hidden; }
.faq details[open] .answer { animation: answerIn .4s var(--ease-out); }
.faq .answer p { color: var(--dim); font-size: .96rem; padding-bottom: 24px; max-width: 68ch; }
@keyframes answerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

/* --- CTA band ------------------------------------------------------------- */
.cta-band {
  position: relative;
  background: var(--grad-brand);
  border-radius: var(--r-xl);
  padding: clamp(44px, 6vw, 76px) clamp(28px, 5vw, 64px);
  text-align: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: -50%;
  z-index: -1;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255, 255, 255, .16) 25%, transparent 50%);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { opacity: .9; max-width: 54ch; margin: 0 auto 30px; }
.cta-band .btn--ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }
.cta-band .btn--ghost:hover { background: rgba(255, 255, 255, .24); }
.cta-band .btn--primary { background: #fff; color: var(--primary); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .5); }

/* --- Footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) 0 32px; background: var(--card); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px 28px; }
.footer-brand p { color: var(--dim); font-size: .92rem; margin-top: 14px; max-width: 34ch; }
.footer h5 { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; font-weight: 600; }
.footer ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: .93rem; color: var(--dim); transition: color .25s var(--ease), padding-left .25s var(--ease); }
.footer a:hover { color: var(--primary); padding-left: 4px; }
.footer-base {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: .86rem;
  color: var(--dim);
}

/* --- Legal pages ---------------------------------------------------------- */
.legal-hero {
  padding-top: calc(var(--nav-h) + 64px);
  padding-bottom: 44px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.legal-hero .meta { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .86rem; color: var(--dim); }
.legal-hero .meta b { font-weight: 500; color: var(--ink); }

.legal-layout { display: grid; grid-template-columns: 250px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding: clamp(40px, 5vw, 64px) 0 clamp(60px, 8vw, 96px); }

.toc { position: sticky; top: calc(var(--nav-h) + 24px); }
.toc h5 { font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); margin-bottom: 12px; font-weight: 600; }
.toc ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  padding: 7px 14px;
  font-size: .87rem;
  color: var(--dim);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--primary); border-left-color: var(--primary); background: var(--primary-soft); font-weight: 500; }

.prose { max-width: 72ch; }
.prose section + section { margin-top: 48px; }
.prose h2 { font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 14px; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h3 { font-size: 1.05rem; margin: 26px 0 8px; }
.prose p { color: var(--dim); margin-bottom: 14px; }
.prose ul, .prose ol { color: var(--dim); display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.prose li::marker { color: var(--primary); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.callout {
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin: 20px 0;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.callout svg { width: 19px; height: 19px; flex: none; margin-top: 3px; }
.callout p { margin: 0; font-size: .94rem; }
.callout--ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.callout--ok svg, .callout--ok strong { color: var(--ok); }
.callout--warn { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 26%, transparent); }
.callout--warn svg, .callout--warn strong { color: var(--warning); }

.table-wrap { overflow-x: auto; margin: 18px 0 22px; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 520px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--primary-soft); color: var(--ink); font-weight: 600; font-size: .82rem; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
td { color: var(--dim); }

/* --- Scroll reveal -------------------------------------------------------- */
/* Progressive enhancement: content is visible by default and only starts
   hidden once the inline head script has confirmed scripting is available.
   Without JS — or if main.js throws — every page still renders in full. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .75s var(--ease-out), transform .75s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Scroll progress bar */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--grad-brand);
  z-index: 101;
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lede { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  /* The mockup stays below the copy once stacked — the headline and the call
     to action must be what loads above the fold, not the decoration. */
  .phone-stage { margin-top: 28px; }
  .split { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ul { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 6px; }
  .toc a { border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 14px; margin: 0; }
  .toc a.is-active { border-color: var(--primary); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .wrap { padding-inline: 20px; }
  /* The headline wraps naturally on phones instead of holding its two-line
     break, which no longer fits. */
  .br-wide { display: none; }
  /* Flat and narrower on phones: the 3D rotation pushed the mockup past the
     viewport edge, and the floating chips only repeat the trust row below. */
  .phone {
    width: min(270px, 72vw);
    transform: none;
    animation: floatFlat 7s ease-in-out infinite;
  }
  .float-chip { display: none; }
  .cta-band { border-radius: var(--r-lg); }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-base { flex-direction: column; }
}

@media (max-width: 420px) {
  .hero-cta .btn { width: 100%; }
  .stats { grid-template-columns: 1fr; }
}

/* --- Motion preferences --------------------------------------------------- */
@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 [data-reveal] { opacity: 1; transform: none; }
  .phone { transform: none; }
}

@media print {
  .nav, .mobile-menu, .progress, .mesh, .grid-overlay, .footer, .cta-band { display: none !important; }
  body { background: #fff; color: #000; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}
