/* ===========================================================================
   CLIQ website — built on the CLIQ Design Kit (from "CLIQ Showcase")
   Tokens below are taken from the Design Kit verbatim; DESIGN.md accessibility
   floors override where stricter (body ≥ 18px, captions ≥ 16px, tap ≥ 48px).
   Fonts: Poppins (display) + Nunito Sans (body/UI) + IBM Plex Mono (technical).
   =========================================================================== */

:root {
  /* --- Brand core (canonical brand tokens) --- */
  --cliq-navy:    #1B2254;
  --cliq-teal:    #22D4A4;
  --cliq-violet:  #6C63FF;
  --cliq-surface: #F5F5F5;
  --cliq-alert:   #E53E3E;
  --cliq-warn:    #F6AD55;

  /* --- Navy / indigo scale --- */
  --navy-950: #12173A;  --navy-900: #161C49;  --navy-800: #1B2254;
  --navy-700: #272F6B;  --navy-600: #3A4385;  --navy-500: #4E58A0;
  --navy-400: #6B73B4;  --navy-300: #9097CB;  --navy-200: #C2C6E2;
  --navy-100: #E4E6F2;  --navy-050: #F2F3F9;

  /* --- Teal scale --- */
  --teal-700: #0F6E56;  --teal-600: #16A085;  --teal-500: #22D4A4;
  --teal-400: #4FE0BA;  --teal-300: #84ECD0;  --teal-200: #B6F2E2;
  --teal-100: #E1F5EE;  --teal-050: #F0FBF8;

  /* --- Violet scale --- */
  --violet-700: #4A41B0; --violet-600: #534AB7; --violet-500: #6C63FF;
  --violet-400: #8B84FF; --violet-300: #ABA6FF; --violet-200: #CFCCFF;
  --violet-100: #F4F3FB; --violet-050: #FAFAFE;

  /* --- Alert / warn scales --- */
  --alert-700: #A32D2D; --alert-600: #C53030; --alert-500: #E53E3E;
  --alert-100: #FCEBEB; --alert-050: #FEF5F5;
  --warn-800: #7A4E00;  --warn-700: #BA7517;  --warn-600: #DD8B2E;
  --warn-500: #F6AD55;  --warn-100: #FAEEDA;  --warn-050: #FEF8EF;

  /* --- Neutral / ink scale --- */
  --ink-900: #1B2254; --ink-700: #3D3B52; --ink-600: #5B5870;
  --ink-500: #767391; --ink-400: #9C9AB0; --ink-300: #C7C6D4;
  --ink-200: #E2E1EA; --ink-100: #EFEFF3; --ink-050: #F5F5F5;
  --white:   #FFFFFF;

  /* --- Semantic aliases --- */
  --surface-page:      var(--white);
  --surface-page-dark: var(--navy-950);
  --surface-card:      var(--white);
  --surface-card-tint: var(--violet-100);
  --surface-sunken:    var(--ink-050);
  --surface-safe:      var(--teal-100);
  --surface-danger:    var(--alert-100);
  --surface-caution:   var(--warn-100);
  --text-heading:      var(--navy-800);
  --text-body:         var(--ink-600);
  --text-strong:       var(--navy-800);
  --text-on-dark:      var(--white);
  --text-on-dark-muted: var(--navy-200);
  --text-safe:         var(--teal-700);
  --text-danger:       var(--alert-700);
  --text-caution:      var(--warn-800);
  --text-link:         var(--violet-600);
  --border-subtle:     var(--ink-200);
  --border-on-dark:    rgba(255,255,255,0.16);
  --focus-ring:        var(--violet-500);

  /* --- Typography --- */
  --font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-sans:    'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --fs-display-xl: clamp(2.75rem, 5.5vw, 4.25rem);
  --fs-display-md: clamp(2.25rem, 4vw, 2.75rem);
  --fs-h1: 2.25rem;  --fs-h2: 1.75rem;  --fs-h3: 1.5rem;  --fs-h4: 1.25rem;
  /* DESIGN.md floors: body ≥ 18px, captions ≥ 16px (stricter than kit) */
  --fs-body-lg: 1.375rem;   /* 22px */
  --fs-body:    1.1875rem;  /* 19px — site body */
  --fs-caption: 1rem;       /* 16px — captions only, never primary content */

  /* --- Spacing / radius / shadows / motion --- */
  --space-2: 0.5rem;  --space-3: 0.75rem; --space-4: 1rem;  --space-5: 1.25rem;
  --space-6: 1.5rem;  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;
  --radius-sm: 8px;  --radius-md: 12px;  --radius-lg: 16px;  --radius-xl: 20px;
  --radius-2xl: 24px; --radius-3xl: 32px; --radius-pill: 999px;
  --tap-min: 48px;      /* DESIGN.md floor (kit lists 44; 48 governs) */
  --tap-senior: 64px;   /* senior-facing primary actions */
  --shadow-sm: 0 2px 6px rgba(27,34,84,0.08);
  --shadow-md: 0 6px 18px rgba(27,34,84,0.10);
  --shadow-lg: 0 14px 36px rgba(27,34,84,0.14);
  --shadow-focus: 0 0 0 4px rgba(108,99,255,0.45);
  --shadow-teal: 0 8px 24px rgba(34,212,164,0.30);
  --ease-gentle: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-normal: 200ms;
  --container-lg: 1140px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
}
h1 { font-size: var(--fs-display-xl); font-weight: 700; }
h2 { font-size: var(--fs-display-md); font-weight: 700; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p { margin: 0 0 var(--space-4); }
a { color: var(--text-link); }
.lead { font-size: var(--fs-body-lg); line-height: 1.45; }
.caption { font-size: var(--fs-caption); color: var(--ink-500); }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.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; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; background: var(--white); color: var(--navy-800); padding: 14px 22px; z-index: 100; border-radius: var(--radius-sm); font-weight: 700; }

.wrap { max-width: var(--container-lg); margin: 0 auto; padding: 0 var(--space-6); }
section { padding: var(--space-20) 0; }

/* ---------- Dark marketing surfaces (Showcase style) ---------- */
.dark {
  background: var(--surface-page-dark);
  background-image: radial-gradient(120% 70% at 50% -10%, var(--navy-800) 0%, var(--navy-950) 64%);
  color: var(--text-on-dark-muted);
  position: relative;
  overflow: hidden;
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--text-on-dark); }
.dark .lead { color: var(--text-on-dark-muted); }
.dark a { color: var(--white); }
.glow { position: absolute; border-radius: 50%; pointer-events: none; }
.glow-violet { width: 680px; height: 680px; right: -160px; top: -120px; background: radial-gradient(circle at 35% 35%, rgba(108,99,255,.26), transparent 62%); }
.glow-teal { width: 640px; height: 640px; left: -200px; bottom: -240px; background: radial-gradient(circle at 50% 50%, rgba(34,212,164,.16), transparent 64%); }

.glass {
  background: rgba(255,255,255,.03);
  border: 3px solid var(--border-on-dark);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
}
/* ---------- iPhone frame (hero preview) ---------- */
.iphone {
  width: 296px; margin: 0 auto; background: #0b0f24;
  border-radius: 48px; padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 70px rgba(8,12,38,.55), inset 0 0 0 2px rgba(255,255,255,.04);
  position: relative;
}
.iphone .island {
  position: absolute; top: 24px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 30px; background: #05070f; border-radius: 999px; z-index: 2;
}
.iphone .screen {
  background: var(--white); border-radius: 38px;
  padding: 64px 22px 30px; min-height: 540px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 14px;
}
.iphone .screen h3 { color: var(--text-heading); }
.iphone .screen p { color: var(--text-body); margin: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(34,212,164,.14); color: var(--cliq-teal);
  font-size: var(--fs-body); font-weight: 700;
  border-radius: var(--radius-pill); padding: 8px 18px;
}
.pill-violet { background: rgba(108,99,255,.18); color: var(--violet-300); }
.eyebrow {
  display: inline-block; font-family: var(--font-sans);
  font-size: var(--fs-caption); font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-link); margin-bottom: var(--space-3);
}
.dark .eyebrow { color: var(--cliq-teal); }

/* ---------- Nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; background: var(--navy-950); border-bottom: 1px solid var(--border-on-dark); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: var(--space-4); flex-wrap: wrap; padding-block: 8px; }
.logo { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap-min); text-decoration: none; }
.logo-img { height: 46px; width: auto; display: block; }
.logo .mark { width: 44px; height: 44px; border-radius: 13px; background: var(--cliq-violet); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.logo .word { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: .5px; color: var(--white); }
.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-links a { display: inline-flex; align-items: center; min-height: var(--tap-min); padding: 0 16px; color: var(--navy-200); text-decoration: none; font-weight: 700; border-radius: var(--radius-md); }
.nav-links a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav-links a[aria-current="page"] { color: var(--cliq-teal); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap-min); min-width: var(--tap-min);
  padding: 13px 30px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 800;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform var(--dur-normal) var(--ease-gentle), filter var(--dur-normal) var(--ease-gentle);
}
.btn:active { transform: scale(0.98); }
.btn-safe { background: var(--cliq-teal); color: var(--navy-800); box-shadow: var(--shadow-teal); } /* SafeButton */
.btn-safe:hover { background: var(--teal-600); color: var(--white); }
.btn-violet { background: var(--cliq-violet); color: var(--white); }
.btn-violet:hover { background: var(--violet-600); }
.btn-outline { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.dark .btn-outline, .site-nav .btn-outline { color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface-card); border: 1.5px solid var(--border-subtle); border-radius: var(--radius-2xl); padding: var(--space-8); box-shadow: var(--shadow-sm); }
.card h3 { margin-top: 0; }
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------- Stats ---------- */
.stat { border-left: 4px solid var(--cliq-teal); padding-left: var(--space-5); }
.stat .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 3.5vw, 46px); line-height: 1.1; display: block; color: var(--text-heading); }
.dark .stat .num { color: var(--white); }
.stat .why { font-size: var(--fs-body); }

/* ---------- StatusChip — always icon + label, never colour alone ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 16px; border-radius: var(--radius-pill); font-weight: 800; font-size: var(--fs-body); }
.chip svg, .chip .ic { flex: none; }
.chip-safe    { background: var(--surface-safe);    color: var(--teal-700); }
.chip-paused  { background: var(--surface-caution); color: var(--warn-800); }
.chip-blocked { background: var(--surface-danger);  color: var(--alert-700); }
.chip-violet  { background: var(--violet-200);       color: var(--violet-700); }

/* ---------- Pricing ---------- */
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card .price { font-family: var(--font-display); font-size: 44px; font-weight: 700; color: var(--text-heading); }
.price-card .per { font-size: var(--fs-body); color: var(--ink-500); font-family: var(--font-sans); font-weight: 400; }
.price-card ul { padding-left: 24px; margin: 0 0 var(--space-6); }
.price-card li { margin-bottom: 10px; }
.price-card .btn { margin-top: auto; }
.price-card.featured { border: 2px solid var(--cliq-violet); box-shadow: var(--shadow-md); }
.badge-popular { position: absolute; top: -18px; left: var(--space-8); background: var(--cliq-violet); color: var(--white); padding: 6px 18px; border-radius: var(--radius-pill); font-weight: 800; font-size: var(--fs-caption); }

/* ---------- Tables ---------- */
.tier-table { width: 100%; border-collapse: collapse; }
.tier-table th, .tier-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.tier-table th { font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); }
.tier-table td { color: var(--ink-600); }
.tier-table td strong { color: var(--text-strong); }

/* ---------- Footer ---------- */
footer { background: var(--navy-950); color: var(--text-on-dark-muted); padding: var(--space-16) 0; }
footer a { color: var(--white); }
.foot-cols { display: grid; gap: var(--space-8); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li a { display: inline-flex; align-items: center; min-height: var(--tap-min); text-decoration: none; }
footer li a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: var(--space-24) 0 var(--space-20); }
.hero-grid { display: grid; gap: var(--space-12); grid-template-columns: 1.1fr 0.9fr; align-items: center; position: relative; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.tick-list { list-style: none; padding: 0; margin: 0 0 var(--space-6); }
.tick-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.tick-list .tick { color: var(--navy-800); background: var(--cliq-teal); border-radius: 50%; width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }

/* ---------- Demo (Senior-audience surfaces) ---------- */
.device { background: rgba(255,255,255,.03); border: 3px solid var(--border-on-dark); border-radius: var(--radius-3xl); padding: var(--space-6); max-width: 470px; margin: 0 auto; }
.device .screen { background: var(--white); border-radius: var(--radius-xl); padding: var(--space-7, 28px); min-height: 600px; display: flex; flex-direction: column; gap: var(--space-4); }
.senior-surface { font-size: 20px; color: var(--ink-700); }          /* Senior base 20–22px */
.senior-surface h2 { font-size: 30px; margin-bottom: var(--space-2); }
.senior-tile {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: var(--tap-senior); padding: var(--space-4) var(--space-5);
  background: var(--navy-050); border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-family: var(--font-sans); font-size: 20px; font-weight: 800; color: var(--navy-800);
  cursor: pointer; text-align: left;
}
.senior-tile:hover { border-color: var(--cliq-violet); }
.pause-card { background: var(--warn-050); border: 2px solid var(--cliq-warn); border-radius: var(--radius-lg); padding: var(--space-5); }
.demo-actions { display: flex; flex-direction: column; gap: 12px; margin-top: var(--space-2); }
.demo-actions .btn { width: 100%; min-height: var(--tap-senior); font-size: 20px; }
.demo-tabs { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: var(--space-8); }
.demo-tabs button {
  min-height: var(--tap-min); padding: 10px 26px;
  border-radius: var(--radius-pill); border: 2px solid rgba(255,255,255,.6);
  background: transparent; color: var(--white);
  font-size: var(--fs-body); font-weight: 800; font-family: var(--font-sans); cursor: pointer;
}
.demo-tabs button[aria-selected="true"] { background: var(--cliq-teal); border-color: var(--cliq-teal); color: var(--navy-800); }
.masked { font-family: var(--font-mono); letter-spacing: 2px; }

/* ===========================================================================
   Narrative storytelling rows (Umami-style) — added 2026-07-06
   One short claim + one real product shot per row, alternating sides, on a
   light surface so the real interface pops. Navy hero + CTA stay as brand
   bookends. Reveal animation is gated behind BOTH prefers-reduced-motion:
   no-preference AND a .js class, so content is always visible without motion
   or without JS.
   =========================================================================== */
.narrative { background: var(--navy-050); }
.narr-intro { max-width: 640px; margin: 0 auto var(--space-16); }
.narr-intro--split { max-width: 1120px; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: center; text-align: left; }
@media (max-width: 859px) { .narr-intro--split { grid-template-columns: 1fr; } }
.narr-intro .lead { color: var(--text-body); }

.narr-rows { display: flex; flex-direction: column; gap: var(--space-16); }
.narr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.narr-text .eyebrow { color: var(--text-link); }
.narr-text h3 { font-size: var(--fs-display-md); font-weight: 700; margin-bottom: var(--space-4); }
.narr-text .lead { color: var(--text-body); max-width: 46ch; }
.narr-media { display: flex; justify-content: center; }

/* Alternate image/text sides on desktop; DOM stays text-first for reading order */
@media (min-width: 860px) {
  .narr-row:nth-child(even) .narr-media { order: -1; }
}
@media (max-width: 859px) {
  .narr-row { grid-template-columns: 1fr; gap: var(--space-6); }
  .narr-rows { gap: var(--space-12); }
}

.narr-foot { max-width: 640px; margin: var(--space-16) auto 0; }
.narr-foot .caption { color: var(--ink-600); margin-top: var(--space-5); }

/* ---------- .shot — flat white card holding real interface (no bezel) ---------- */
.shot {
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-7, 28px);
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.shot .senior-surface { display: flex; flex-direction: column; gap: var(--space-3); }
.shot-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-h4); color: var(--text-heading);
  letter-spacing: -0.02em; line-height: 1.15; margin: 0;
}
.shot-hd { /* senior "Good morning" line — visual heading, presentational */
  font-family: var(--font-display); font-weight: 700;
  font-size: 28px; color: var(--text-heading);
  letter-spacing: -0.02em; line-height: 1.15; margin: 0;
}
.shot p { margin: 0; font-size: var(--fs-body); color: var(--text-body); }
.shot .caption { font-size: var(--fs-caption); color: var(--ink-500); }
/* Non-interactive, button-shaped element used inside shots (visual only) */
.faux-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--tap-min); padding: 12px 24px; align-self: flex-start;
  border-radius: var(--radius-pill); border: 2px solid transparent;
  font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 800;
}
.faux-btn.is-safe   { background: var(--cliq-teal); color: var(--navy-800); }
.faux-btn.is-violet { background: var(--cliq-violet); color: var(--white); }
.faux-btn.is-outline { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }

/* Light-surface label tags (dark-enough text for AA on white) */
.tag {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--font-sans); font-weight: 800; font-size: var(--fs-caption);
  border-radius: var(--radius-pill); padding: 6px 14px;
}
.tag-teal   { background: var(--teal-100);   color: var(--teal-700); }
.tag-violet { background: var(--violet-100); color: var(--violet-700); }

/* Masked-field row (co-browse / support) — icon+label, never colour alone */
.masked-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-sunken); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.masked-row .lbl { font-size: var(--fs-caption); color: var(--ink-600); }
.masked-row .val { color: var(--text-strong); font-weight: 800; }

/* Non-interactive senior tile (presentational copy of the real tile) */
.shot .senior-tile { cursor: default; }
.shot .senior-tile:hover { border-color: var(--border-subtle); }

/* Compact tier-table inside a shot */
.shot .tier-table th, .shot .tier-table td { padding: 10px 8px; }
.shot .tier-table th:first-child, .shot .tier-table td:first-child { padding-left: 0; }

/* ---------- Scroll reveal (accessibility-gated) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0; transform: translateY(14px);
    transition: opacity 400ms var(--ease-gentle), transform 400ms var(--ease-gentle);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
