/* ============================================================================
   Vizaxis site system: base stylesheet (shared by vizaxis.com + warranty-vault).
   Same v2.0 design language as the Pain Journal site, expressed through SEMANTIC
   ROLE tokens (--accent / --signal / --paper / --ink) so each brand keeps its own
   colour + type while sharing one shell, one set of components, one quality bar.

   Default skin below = the Vizaxis "house" (warm graphite + Inter). App pages
   override the role tokens in their own skin file (e.g. warranty-vault.css maps
   the roles to violet + amber + Space Grotesk). Never hard-code a brand hex in a
   component: use the roles, so a new app is a skin file, not a fork.

   Reference system: ../pain-journal/assets/css/base.css + docs/growth/
   WEBSITE-DESIGN-SYSTEM.md. Keep this in step with them.
   ========================================================================== */

:root {
  /* ---- Skin roles (Vizaxis house defaults; skins override these) ---- */
  --accent: #2E2C25;          /* primary brand: chrome, headings, footer, band */
  --accent-deep: #23211B;
  --accent-darker: #1A1813;
  --accent-soft: #9A9689;     /* soft wash / glow tint */
  --accent-light: #C6C2B4;    /* text on the dark accent surface */

  --signal: #A85A34;          /* secondary accent: fills, glow, selection, focus */
  --signal-soft: #E7C4AE;     /* emphasis on the dark accent surface */
  --emphasis: var(--signal);  /* on-paper emphasis (kicker, em, step num); a skin
                                 whose signal fails contrast on paper remaps this */

  --paper: #F4F1EA;           /* page background */
  --paper-raised: #FCFAF5;    /* cards, header */
  --paper-deep: #E9E4D9;      /* hovers */

  --ink: #20201C;             /* body text */
  --ink-muted: #585549;       /* secondary text (AA on --paper) */

  --rule: #CFC7B5;
  --rule-soft: #E0D9C9;

  --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* ---- System tokens (brand-agnostic) ---- */
  --maxw: 1200px;
  --header-h: 66px;
  --pad-x: clamp(20px, 5vw, 48px);
  --measure: 44rem;
  --wide: 60rem;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 26px;
  --r-phone: 44px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 16, 0.05), 0 3px 10px rgba(20, 20, 16, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(20, 20, 16, 0.18), 0 2px 8px rgba(20, 20, 16, 0.05);
  --shadow-lg: 0 30px 70px -24px color-mix(in srgb, var(--accent) 34%, transparent), 0 10px 28px -14px rgba(20, 20, 16, 0.20);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Dark committed brand surface, shared by the .band sections + the CTA band. */
  --grad-wedge:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent-soft) 20%, transparent), transparent 55%),
    linear-gradient(165deg, var(--accent) 0%, var(--accent-deep) 55%, var(--accent-darker) 100%);

  /* Subtle page wash: accent glow + a whisper of the signal. Static, not fixed. */
  --grad-page:
    radial-gradient(120% 70% at 88% -6%, color-mix(in srgb, var(--accent-soft) 16%, transparent), transparent 52%),
    radial-gradient(80% 45% at 0% 0%, color-mix(in srgb, var(--signal) 6%, transparent), transparent 46%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--grad-page);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

a { color: inherit; }
img { display: block; max-width: 100%; }

h1, h2, h3, h4, blockquote { text-wrap: balance; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; }
p { text-wrap: pretty; }

::selection { background: var(--signal); color: var(--paper-raised); }

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--accent);
  color: var(--paper-raised);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.site-header.scrolled {
  border-bottom-color: var(--rule-soft);
  box-shadow: 0 6px 24px -18px rgba(20, 20, 16, 0.5);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }

.nav-cluster { display: flex; align-items: center; gap: 28px; }

.nav-links { display: flex; align-items: center; gap: 28px; }

.nav-links a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--accent); }

/* Primary pill button (nav CTA). */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  font-size: 0.9rem;
  background: var(--accent);
  color: var(--paper-raised);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-out), background 0.18s ease;
}

.nav-cta:hover { background: var(--accent-deep); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--rule-soft);
  border-radius: var(--r-sm);
  background: var(--paper-raised);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease;
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] { background: var(--paper-deep); }

/* ---------- Store badges + trust row ---------- */
.store-badges { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.badge-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: 12px;
  transition: transform 0.18s var(--ease-out);
}

.badge-link:hover { transform: translateY(-2px); }
.badge-gplay img { height: 56px; width: auto; }
.badge-appstore img { height: 40px; width: auto; }

.microtrust {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--ink-muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.microtrust .mt-item { display: inline-flex; align-items: center; white-space: nowrap; }

/* Leading-dot separator so it wraps with its label, never dangling at line end. */
.microtrust .mt-item + .mt-item::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-soft);
  margin-right: 14px;
  flex-shrink: 0;
}

/* ---------- Phone frame (one component for every app screenshot) ----------
   img is width:100% height:auto so a shot is never cropped; all screenshots
   must share one pixel resolution so frames stay uniform. */
.phone {
  position: relative;
  width: clamp(230px, 30vw, 300px);
  background: linear-gradient(155deg, #211d19, #14100e);
  border-radius: var(--r-phone);
  padding: 9px;
  box-shadow: var(--shadow-lg);
}

.phone::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: calc(var(--r-phone) - 3px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.phone img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--r-phone) - 9px);
  background: var(--paper-raised);
}

.phone.tilt { transform: rotate(-2deg); }
.phone.tilt-r { transform: rotate(2deg); }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding-block: clamp(60px, 9vw, 116px); }

.kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emphasis);
}

.section-title {
  font-size: clamp(1.95rem, 3.9vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-top: 14px;
  max-width: 22ch;
}

.section-title em { font-style: normal; color: var(--emphasis); }

/* ---------- Hero (asymmetric, product-led) ---------- */
.hero {
  padding-top: clamp(40px, 6vw, 76px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 0;
}

.hero h1 em { font-style: normal; color: var(--emphasis); }

.hero .lede {
  font-family: var(--font-display);
  font-size: clamp(1.14rem, 1.9vw, 1.4rem);
  color: var(--ink);
  max-width: 32ch;
  margin: 20px 0 0;
  line-height: 1.4;
  text-wrap: balance;
}

.hero .sub { color: var(--ink-muted); max-width: 48ch; margin: 14px 0 0; font-size: 1rem; }
.hero .cta-row { margin-top: 30px; }
.hero .microtrust { margin-top: 20px; }

.hero-visual { position: relative; justify-self: center; }

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -10% -6% -4% -8%;
  background: radial-gradient(56% 50% at 52% 42%, color-mix(in srgb, var(--signal) 12%, transparent), transparent 72%);
  z-index: 0;
}

.hero-visual .phone { z-index: 1; width: clamp(240px, 32vw, 318px); }

/* ---------- Steps 01 / 02 / 03 ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(40px, 5vw, 64px);
}

.step { padding-top: 26px; border-top: 2px solid var(--rule); }

.step .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--emphasis);
}

.step h3 { font-size: 1.34rem; letter-spacing: -0.01em; color: var(--accent); margin: 14px 0 8px; }
.step p { color: var(--ink-muted); font-size: 0.98rem; }

/* ---------- Committed dark surface: full-bleed .band + the showcase .wedge ---- */
.band { color: var(--paper); background: var(--grad-wedge); }
.band .kicker { color: var(--signal-soft); }
.band h1, .band h2, .band .section-title { color: var(--paper); }
.band h1 em, .band h2 em, .band .section-title em { font-style: normal; color: var(--signal-soft); }
.band .lede { color: var(--paper); }
.band .sub, .band p.body, .band p { color: var(--accent-light); }
.band .microtrust { color: var(--accent-light); }
.band .microtrust .mt-item + .mt-item::before { background: var(--signal-soft); }

.wedge-grid {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
}

.wedge p.body { font-size: 1.06rem; line-height: 1.66; margin-top: 18px; max-width: 46ch; }

.checks { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }

.check-row { display: flex; align-items: center; gap: 13px; font-size: 0.98rem; color: var(--paper); }

.check-row .mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--signal-soft) 24%, transparent);
  color: var(--signal-soft);
}

.wedge-visual { justify-self: center; position: relative; }
.wedge-visual .phone { width: clamp(240px, 30vw, 316px); }

/* ---------- Features (alternating media rows; also the studio app rows) ---- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
}

.section-title + .feature-row { margin-top: clamp(40px, 5vw, 64px); }
.feature-row + .feature-row { margin-top: clamp(52px, 7vw, 96px); }
.feature-row.reverse .feature-visual { order: -1; }

.feature-copy h3 {
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--accent);
  margin: 0;
}

.feature-copy p { color: var(--ink-muted); margin-top: 14px; font-size: 1.04rem; max-width: 42ch; }

.feature-visual { justify-self: center; position: relative; }
.feature-visual .phone { z-index: 1; width: clamp(214px, 27vw, 272px); }

/* ---------- Value list (compact traits, distinct from media rows) ---------- */
.values {
  margin-top: clamp(56px, 8vw, 100px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.value { padding-top: 20px; border-top: 1px solid var(--rule); }
.value .v-ico { color: var(--accent); margin-bottom: 12px; }
.value h3 { font-size: 1.14rem; letter-spacing: -0.01em; color: var(--accent); }
.value p { color: var(--ink-muted); font-size: 0.95rem; line-height: 1.6; margin-top: 8px; }

/* ---------- Dark app CTA band (one component, closes every landing) ---------- */
.cta-band {
  max-width: var(--wide);
  margin-inline: auto;
  text-align: center;
  color: var(--paper);
  border-radius: var(--r-lg);
  padding: clamp(40px, 5vw, 66px) clamp(24px, 4vw, 56px);
  background: var(--grad-wedge);
}

.cta-band h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--paper);
  max-width: 20ch;
  margin-inline: auto;
}

.cta-band h2 em { font-style: normal; color: var(--signal-soft); }

.cta-band p {
  color: var(--accent-light);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 48ch;
  margin: 14px auto 0;
}

.cta-band .store-badges { justify-content: center; margin-top: 28px; }
.cta-band .microtrust { justify-content: center; margin-top: 18px; color: var(--accent-light); }
.cta-band .microtrust .mt-item + .mt-item::before { background: var(--signal-soft); }

/* ---------- Legal / long-form doc (privacy, terms). Token-only, brand-agnostic;
   any app's legal pages reuse it, so it lives in the shared layer. ---------- */
.legal { max-width: var(--measure); margin-inline: auto; }

.legal h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -0.02em; color: var(--accent); }
.legal .meta { margin-top: 8px; color: var(--ink-muted); font-size: 0.92rem; }
.legal h2 { font-size: 1.22rem; letter-spacing: -0.01em; color: var(--accent); margin-top: 2.3rem; }
.legal p, .legal li { color: var(--ink); font-size: 0.98rem; line-height: 1.7; margin-top: 0.7rem; }
.legal ul { padding-left: 1.4rem; margin-top: 0.5rem; }
.legal li::marker { color: var(--accent); }
.legal strong { color: var(--accent); font-weight: 600; }

.legal a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.legal a:hover { text-decoration-thickness: 2px; }

/* Callout: full border + tint, never a side-stripe. */
.legal .callout {
  background: var(--paper-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r);
  padding: 18px 22px;
  margin: 24px 0;
}

.legal .callout strong { color: var(--accent); }

.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--paper-deep);
  padding: 1px 6px;
  border-radius: 6px;
}

.legal .table-scroll { overflow-x: auto; margin-top: 1rem; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.9rem; }
.legal .table-scroll table { min-width: 720px; margin-top: 0; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.legal th { background: var(--paper-deep); font-weight: 600; color: var(--accent); }
.legal td small { color: var(--ink-muted); }

/* ---------- Reveal on scroll (transform + opacity only) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.06s; }
[data-reveal][data-delay="2"] { transition-delay: 0.12s; }
[data-reveal][data-delay="3"] { transition-delay: 0.18s; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--accent-deep);
  color: var(--accent-light);
  margin-top: clamp(60px, 9vw, 116px);
  padding-block: clamp(44px, 6vw, 68px);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}

.footer-brand img { width: 34px; height: 34px; border-radius: 9px; }

.footer-brand + p { margin-top: 12px; max-width: 34ch; font-size: 0.94rem; color: var(--accent-light); }

.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 56px; }

.footer-nav a {
  color: var(--accent-light);
  text-decoration: none;
  font-size: 0.94rem;
  transition: color 0.15s ease;
}

.footer-nav a:hover { color: var(--paper); }

.footer-bottom {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--accent-light) 20%, transparent);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.84rem;
  color: var(--accent-light);
}

.footer-bottom .disclaimer { max-width: 62ch; }

/* ---------- Shared responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 44px; }
  .hero .lede, .hero .sub { margin-inline: auto; }
  .hero .cta-row, .hero .microtrust { justify-content: center; }
  .wedge-grid { grid-template-columns: 1fr; gap: 44px; }
  .wedge-visual { order: -1; }
  .feature-row { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .feature-row .feature-visual { order: -1; }
  .feature-copy p { margin-inline: auto; }
}

@media (max-width: 680px) {
  body { font-size: 17px; }

  .nav-cluster { gap: 12px; }
  .nav-toggle { display: inline-flex; }
  /* Keep the "Get the app" pill a slim single-line button on phones (nowrap on
     the base rule stops the two-line wrap). A wide display wordmark like
     "WarrantyVault" + pill + toggle is tight on a narrow header, so trim the
     brand a touch to leave room instead of dropping the CTA. */
  .brand { font-size: 1.05rem; }
  .brand img { width: 28px; height: 28px; }
  .nav-cta { padding: 8px 15px; font-size: 0.88rem; }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--pad-x);
    right: var(--pad-x);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--paper-raised);
    border: 1px solid var(--rule-soft);
    border-radius: var(--r);
    box-shadow: var(--shadow-md);
    padding: 10px;
    display: none;
  }

  .nav-links.open { display: flex; }

  .nav-links a { padding: 12px 14px; border-radius: var(--r-sm); font-size: 1rem; }
  .nav-links a:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

  .microtrust { font-size: 0.74rem; gap: 5px 8px; }
  .microtrust .mt-item + .mt-item::before { margin-right: 8px; }

  .steps { grid-template-columns: 1fr; gap: 6px; }
  .step { padding-block: 22px; border-top: none; border-bottom: 1px solid var(--rule); }
  .step:first-child { border-top: 2px solid var(--rule); }

  .values { grid-template-columns: 1fr; gap: 4px; }
  .value { padding-block: 20px; border-top: none; border-bottom: 1px solid var(--rule); }
  .value:first-child { border-top: 1px solid var(--rule); }

  .footer-top { flex-direction: column; gap: 28px; }
}

@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;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .phone.tilt, .phone.tilt-r { transform: none; }
}
