/* ============================================================
   Dhi Money - Foundations: Colour & Type
   "Ink & Indigo" - calm precision for the top 5%.
   ------------------------------------------------------------
   A fresh visual direction (2026). Monochrome-forward warm
   neutrals + one confident INDIGO accent (single-accent system).
   Disciplined finance semantics (calm emerald
   gains / measured red losses) ALWAYS paired with sign+arrow.

   Domain rules inherited from brand-kit/dhi/BRAND.md are
   non-negotiable: ₹ symbol, Indian comma grouping, lakh/crore,
   tabular figures, green=gain / red=loss (never reversed).

   Load order:
     <link rel="stylesheet" href="colors_and_type.css">
   Toggle themes by setting  data-theme="light|dark"  on <html>.
   ============================================================ */

/* ----- Self-hosted webfonts (woff2 in fonts/) -------------------
   Brand fonts bundled locally so they never fall back to substitutes.
   ------------------------------------------------------------ */
@font-face{font-family:'Schibsted Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/schibsted-grotesk-400.woff2') format('woff2');}
@font-face{font-family:'Schibsted Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/schibsted-grotesk-500.woff2') format('woff2');}
@font-face{font-family:'Schibsted Grotesk';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/schibsted-grotesk-600.woff2') format('woff2');}
@font-face{font-family:'Schibsted Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/schibsted-grotesk-700.woff2') format('woff2');}
@font-face{font-family:'Schibsted Grotesk';font-style:normal;font-weight:800;font-display:swap;src:url('/fonts/schibsted-grotesk-800.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/hanken-grotesk-400.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/hanken-grotesk-500.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/hanken-grotesk-600.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/hanken-grotesk-700.woff2') format('woff2');}
@font-face{font-family:'Hanken Grotesk';font-style:normal;font-weight:800;font-display:swap;src:url('/fonts/hanken-grotesk-800.woff2') format('woff2');}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/jetbrains-mono-400.woff2') format('woff2');}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('/fonts/jetbrains-mono-500.woff2') format('woff2');}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/jetbrains-mono-600.woff2') format('woff2');}

/* ============================================================
   1. PRIMITIVE TOKENS  (raw values - theme-agnostic)
   ============================================================ */
:root {
  /* - Brand & accent - */
  /* NOTE: --indigo-* are the source primitives for the accent ramp. */
  --indigo-50:  #EEEDFB;
  --indigo-100: #E0DEFA;
  --indigo-300: #A5A0F4;
  --indigo-500: #4F46E5;   /* hero accent (light) */
  --indigo-600: #4138C8;
  --indigo-700: #352CA6;
  --indigo-400-on-dark: #908AF7;  /* accent (dark mode) */

  /* - Accent ramp (indigo; --brass aliases this for the keyline) - */
  --brass-500: #B5853A;
  --brass-600: #976E2E;
  --brass-300-on-dark: #D9B36A;

  /* - Finance semantics - */
  --gain-500: #0E9F6E;     /* calm emerald - gains/income */
  --gain-400-on-dark: #34D6A0;
  --loss-500: #D64545;     /* measured red - losses/expense */
  --loss-400-on-dark: #F47272;
  --warn-500: #C2872B;     /* amber - caution */
  --warn-400-on-dark: #E0A84E;

  /* - Warm neutral ramp (the workhorse) - */
  --ivory:      #F7F5F0;   /* light page (warm paper) */
  --ivory-2:    #F1EEE6;
  --white:      #FFFFFF;
  --ink-900:    #181612;   /* darkest text (warm near-black) */
  --ink-700:    #3A372F;
  --ink-500:    #6B665C;   /* secondary text */
  --ink-400:    #948E81;
  --ink-300:    #B9B3A6;
  --line-light: #E7E3DA;   /* warm hairline */
  --line-light-2:#D9D4C8;

  --char-950:   #0E0D0C;   /* dark page (warm near-black, not #000) */
  --char-900:   #161512;
  --char-850:   #1C1B17;   /* card */
  --char-800:   #232118;   /* elevated */
  --char-700:   #2C2A23;   /* hairline */
  --char-600:   #3A382F;
  --paper-50:   #F2EFE8;   /* lightest text on dark */
  --paper-300:  #A8A296;
  --paper-500:  #726D63;

  /* - Radius - */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-pill: 999px;

  /* - Spacing (4px base) - */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 20px;  --s-6: 24px;  --s-8: 32px;  --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;

  /* - Type families - */
  --font-display: 'Schibsted Grotesk', 'Hanken Grotesk', system-ui, sans-serif;
  --font-text: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --deva-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%221003%22%20height%3D%22967%22%20viewBox%3D%220%200%201003.00%20967.00%22%20data-glyph%3D%22dha-ii%22%20data-source%3D%22Kohinoor%20Devanagari%20Bold%22%3E%20%3Cg%20transform%3D%22translate%2830.000%2C967.000%29%20scale%281%2C-1%29%22%3E%20%3Cpath%20d%3D%22M437%200H577V562H682V671H370V562H437V356C437%20281%20374%20211%20284%20211C215%20211%20195%20243%20195%20273C195%20311%20222%20335%20281%20335H344V443H269C218%20443%20191%20466%20191%20500C191%20537%20226%20561%20245%20569L226%20671H-30V562H80V558C61%20545%2046%20522%2046%20490C46%20430%2091%20396%20151%20391V387C106%20377%2051%20341%2051%20261C51%20168%20130%20101%20255%20101C342%20101%20403%20133%20433%20161H437Z%20M868%20562H973V671H863C844%20826%20751%20967%20570%20967C455%20967%20383%20896%20383%20810C383%20772%20396%20735%20425%20708L556%20734C530%20757%20522%20782%20522%20804C522%20835%20542%20859%20579%20859C664%20859%20721%20755%20727%20671H622V562H727V0H868Z%22%20fill%3D%22%23000%22/%3E%20%3C/g%3E%20%3C/svg%3E");  /* outlined Kohinoor धी - matches the app; used as a CSS mask (see .deva) */

  /* - Motion (from BRAND.md, retuned) - */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-enter:    cubic-bezier(0, 0, 0, 1);
  --ease-exit:     cubic-bezier(0.3, 0, 1, 1);
  --dur-fast: 140ms;
  --dur-med: 280ms;
  --dur-slow: 460ms;
  --dur-number: 800ms; /* count-up for financial figures */

  /* Tabular figures helper - apply to ALL financial numbers */
  --tnum: "tnum" 1, "lnum" 1;
}

/* ============================================================
   2. SEMANTIC TOKENS - LIGHT (default)
   ============================================================ */
:root,
[data-theme="light"] {
  color-scheme: light;

  --bg:            var(--ivory);
  --bg-sunken:     var(--ivory-2);
  --surface:       var(--white);
  --surface-2:     #FBFAF6;     /* subtle elevation */
  --surface-inset: var(--ivory-2);

  --text:          var(--ink-900);
  --text-2:        var(--ink-500);
  --text-3:        var(--ink-400);
  --text-on-accent:#FFFFFF;

  --border:        var(--line-light);
  --border-strong: var(--line-light-2);

  /* Brand accent - INDIGO. The single hero/action colour. */
  --accent:        #4F46E5;
  --accent-strong: #4138C8;   /* small text / links (better contrast) */
  --accent-press:  #4138C8;
  --accent-soft:   rgba(79, 70, 229, 0.10);
  --accent-line:   rgba(79, 70, 229, 0.26);

  /* Single-accent system: --brass is now an alias of the indigo accent,
     so the keyline / eyebrows / badges all read indigo. */
  --brass:         #4F46E5;
  --brass-soft:    rgba(79, 70, 229, 0.10);

  --gain:          var(--gain-500);
  --gain-soft:     rgba(14, 159, 110, 0.10);
  --loss:          var(--loss-500);
  --loss-soft:     rgba(214, 69, 69, 0.10);
  --warn:          var(--warn-500);
  --warn-soft:     rgba(194, 135, 43, 0.12);

  /* Soft, premium shadows - used for overlays, not flat cards */
  --shadow-sm: 0 1px 2px rgba(24,22,18,0.04), 0 1px 3px rgba(24,22,18,0.05);
  --shadow-md: 0 6px 16px rgba(24,22,18,0.07), 0 2px 6px rgba(24,22,18,0.04);
  --shadow-lg: 0 18px 48px rgba(24,22,18,0.12), 0 6px 16px rgba(24,22,18,0.06);

  /* Skeleton / shimmer */
  --skeleton-base: #ECE8DF;
  --skeleton-hi:   #F7F5F0;
}

/* ============================================================
   3. SEMANTIC TOKENS - DARK
   ============================================================ */
[data-theme="dark"] {
  color-scheme: dark;

  --bg:            var(--char-950);
  --bg-sunken:     #0A0908;
  --surface:       var(--char-850);
  --surface-2:     var(--char-800);
  --surface-inset: var(--char-900);

  --text:          var(--paper-50);
  --text-2:        var(--paper-300);
  --text-3:        var(--paper-500);
  --text-on-accent:#0E0D0C;

  --border:        #34312A;
  --border-strong: #47443B;

  --accent:        #908AF7;   /* indigo - bright on dark */
  --accent-strong: #A5A0F4;
  --accent-press:  #A5A0F4;
  --accent-soft:   rgba(144, 138, 247, 0.16);
  --accent-line:   rgba(144, 138, 247, 0.34);

  --brass:         #908AF7;
  --brass-soft:    rgba(144, 138, 247, 0.14);

  --gain:          var(--gain-400-on-dark);
  --gain-soft:     rgba(52, 214, 160, 0.14);
  --loss:          var(--loss-400-on-dark);
  --loss-soft:     rgba(244, 114, 114, 0.14);
  --warn:          var(--warn-400-on-dark);
  --warn-soft:     rgba(224, 168, 78, 0.16);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.40);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.50);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.62);

  --skeleton-base: #232118;
  --skeleton-hi:   #2C2A23;

  /* Brighter chart + category colours for dark surfaces */
  --chart-1: #908AF7; /* periwinkle indigo (lead) */
  --chart-2: #34D6A0;
  --chart-3: #B59BD8;
  --chart-4: #84A6D6;
  --chart-5: #E0906E;
  --chart-6: #4FC4B4;
  --chart-7: #A5A0F4;
  --chart-8: #C4BCF0;
  --cat-equity:  #B59BD8;
  --cat-debt:    #34D6A0;
  --cat-gold:    #D9B36A;
  --cat-realest: #E0906E;
  --cat-cash:    #84A6D6;
  --cat-crypto:  #4FC4B4;
}

/* ============================================================
   4. CHART + CATEGORY PALETTES  (exposed as vars)
   Ordered, harmonised, premium. Always supplement with a
   second encoding (arrow, +/- , shape, pattern).
   ============================================================ */
:root {
  /* 2026 app rebrand: gold retired from the chart lead - the indigo accent
     now leads (matches app_colors.dart chartColors). */
  --chart-1: #4F46E5; /* indigo accent (lead) */
  --chart-2: #0E9F6E; /* emerald */
  --chart-3: #6D4D8E; /* plum    */
  --chart-4: #5B7DB1; /* slate-blue */
  --chart-5: #C06A4B; /* clay    */
  --chart-6: #2A9D8F; /* teal    */
  --chart-7: #4138C8; /* accent-strong indigo */
  --chart-8: #8B7BD8; /* soft indigo-violet */

  /* Asset categories */
  --cat-equity:  #6D4D8E; /* stocks / MFs (plum) */
  --cat-debt:    #0E9F6E; /* FDs / bonds        */
  --cat-gold:    #B5853A; /* gold               */
  --cat-realest: #C06A4B; /* real estate (clay) */
  --cat-cash:    #5B7DB1; /* cash / savings     */
  --cat-crypto:  #2A9D8F; /* crypto (teal)      */
}

/* ============================================================
   5. BASE ELEMENTS
   ============================================================ */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent-soft); }

/* ============================================================
   6. TYPE SCALE  (semantic classes)
   ------------------------------------------------------------
   Display → Schibsted Grotesk. Body/UI → Hanken Grotesk.
   ============================================================ */
.display-xl, .display-l, .h1, .h2, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

.display-xl { font-size: clamp(48px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.display-l  { font-size: clamp(38px, 5vw, 56px); line-height: 1.06; letter-spacing: -0.03em;  font-weight: 700; }
.h1         { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.022em; }
.h2         { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.18; letter-spacing: -0.018em; }
.h3         { font-size: 21px; line-height: 1.28; letter-spacing: -0.012em; }

.title {
  font-family: var(--font-text);
  font-size: 17px; line-height: 1.35; font-weight: 600;
  letter-spacing: -0.006em; margin: 0; color: var(--text);
}

.body-l { font-family: var(--font-text); font-size: 17px; line-height: 1.6;  font-weight: 400; }
.body   { font-family: var(--font-text); font-size: 15px; line-height: 1.55; font-weight: 400; }
.body-s { font-family: var(--font-text); font-size: 13px; line-height: 1.5;  font-weight: 400; color: var(--text-2); }

.label {
  font-family: var(--font-text); font-size: 13px; line-height: 1.3;
  font-weight: 500; letter-spacing: 0.004em;
}

.overline {
  font-family: var(--font-text); font-size: 11.5px; line-height: 1.3;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--text-3);
}

/* Indigo keyline - the recurring brand motif. Precedes eyebrows / group labels.
   Single-accent system: this matches the indigo --accent (via --brass alias). */
.keyline {
  display: inline-block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--brass); vertical-align: middle; flex-shrink: 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-text); font-size: 11.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--brass);
  white-space: nowrap;
}

/* ============================================================
   THE DHI LOGO - single canonical lockup, used everywhere.
   ------------------------------------------------------------
   Markup:
     <span class="dhi-logo">
       <span class="deva">धी</span>
       <span class="rule"></span>
       <span class="word"><b class="name">Dhi</b><i class="sub">money</i></span>
     </span>
   Scale by setting font-size on .dhi-logo (= the "Dhi" cap size).
   Colour adapts: ink/paper via currentColor; rule + descriptor = accent.
   On dark surfaces add data-theme="dark" on an ancestor (or set
   .dhi-logo{color:var(--text)} - it already inherits --text by default).
   ============================================================ */
/* ============================================================
   THE DHI LOGO - single canonical lockup, used everywhere.
   ------------------------------------------------------------
   The logo is the धी mark (reads "Dhi") + "money" beside it.
   Markup:
     <span class="dhi-logo">
       <span class="deva">धी</span>
       <span class="money">money</span>
     </span>
   Scale by setting font-size on .dhi-logo. Colour adapts:
   धी = ink/paper via currentColor; "money" = indigo accent.
   Add .mark-only to show just the धी (favicon / tight spaces).
   ============================================================ */
.dhi-logo {
  display: inline-flex;
  align-items: flex-end;      /* bottom-align the "money" wordmark to the धी mark */
  gap: 0.26em;
  color: var(--text);
  font-size: 34px;            /* default knob */
  line-height: 1;
  white-space: nowrap;
}
/* The धी mark. Rendered from the OUTLINED Kohinoor vector (assets/logo/
   dhi-mark-kohinoor.svg) via a CSS mask - NOT a live font - so the web mark
   matches the app exactly (the app ships the same outlined Kohinoor glyph).
   The mask reveals `background: currentColor`, so tinting still works: ink/paper
   in the logo, accent on avatars/chips. The text node stays for accessibility
   (screen readers still read "धी") but is not painted. See .deva base rule. */
.deva {
  display: inline-block;
  width: 1.037em;            /* Kohinoor धी aspect = 1003/967 */
  height: 1em;
  background-color: currentColor;
  -webkit-mask: var(--deva-mask) center / contain no-repeat;
          mask: var(--deva-mask) center / contain no-repeat;
  color: transparent;        /* hide the underlying text glyph */
  vertical-align: middle;    /* optically center the mask box in its line/container
                                (the tight-viewBox glyph centers cleanly; the old
                                baseline offset made it ride high in pills/avatars) */
  line-height: 1;
}
.dhi-logo .deva {
  font-size: 1.18em;
  color: currentColor;       /* mask reveals this via background-color */
  background-color: currentColor;
}
.dhi-logo .money {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.78em;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--accent);
  /* Sized 0.78em to read as a balanced second element beside the heavy Kohinoor
     धी (at the old 0.66 "money" looked too small against the bolder mark).
     Baseline-align to the धी: the Kohinoor mask box is 1em tall and the glyph
     fills it while Latin "money" has descender space, so with align-items:flex-end
     the wordmark floats HIGH - nudge down ~0.16em (em-relative, holds at every
     size) so money's baseline sits on the धी's. Font is Hanken (--font-text) per
     the design system's wordmark spec, matching the app. */
  transform: translateY(0.16em);
}
/* compact form: just the धी mark */
.dhi-logo.mark-only .money { display: none; }

.caption { font-family: var(--font-text); font-size: 12px; line-height: 1.4; color: var(--text-3); }

.mono { font-family: var(--font-mono); font-feature-settings: var(--tnum); font-size: 13px; }

/* ============================================================
   7. FINANCIAL NUMBERS
   ------------------------------------------------------------
   .num                 → tabular figures, aligned in columns
   .num-hero            → big balance display (Schibsted)
   .gain / .loss        → colour + REQUIRES sign/arrow in markup
   ============================================================ */
.num {
  font-family: var(--font-text);
  font-feature-settings: var(--tnum);
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text);
}

.num-hero {
  font-family: var(--font-display);
  font-feature-settings: var(--tnum);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.0;
  color: var(--text);
}

.gain { color: var(--gain); }
.loss { color: var(--loss); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ============================================================
   SKELETON / SHIMMER  (loading states)
   1200ms left-to-right sweep, base ↔ highlight (BRAND spec).
   ============================================================ */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
  border-radius: var(--r-sm);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skeleton-hi), transparent);
  animation: dhi-shimmer 1200ms var(--ease-standard) infinite;
}
@keyframes dhi-shimmer { 100% { transform: translateX(100%); } }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: dhi-spin 720ms linear infinite;
}
@keyframes dhi-spin { 100% { transform: rotate(360deg); } }

/* Pair colour with a non-colour cue. Use in markup:
   <span class="delta gain">▲ +₹12,500</span>            */
.delta {
  font-family: var(--font-text);
  font-feature-settings: var(--tnum);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   8. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ site.css (component + layout layer) ============ */
/* ============================================================
   Dhi Money - Website layout & component layer
   Built on colors_and_type.css (Ink & Indigo foundations).
   Utility + component classes for the multi-page marketing site.
   ============================================================ */

/* ---- Layout ------------------------------------------------ */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-xs { padding: 40px 0; }
.sunken { background: var(--bg-sunken); }

.center { text-align: center; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* ---- Eyebrow / section heads ------------------------------- */
.sec-head { max-width: 600px; }
.sec-head.is-center { margin-left: auto; margin-right: auto; }
.sec-head .eyebrow { margin-bottom: 16px; }
.sec-head .sub { color: var(--text-2); margin-top: 14px; }

/* ---- Buttons ----------------------------------------------- */
.btn {
  font-family: var(--font-text); font-weight: 600; cursor: pointer;
  border-radius: var(--r-md); border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; padding: 13px 22px; text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-standard), background var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.btn:active { transform: scale(0.98); }
.btn-lg { font-size: 16px; padding: 16px 28px; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-press); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-strong); }
.btn-dark { background: var(--ivory); color: var(--ink-900); }
.btn-dark:hover { background: var(--white); }

/* ---- Store badges ------------------------------------------ */
.store-badge { display: inline-flex; }
.store-badge img { height: 46px; width: auto; display: block; transition: transform var(--dur-fast); }
.store-badge:hover img { transform: translateY(-2px); }
.hero-landing .store-badge img { height: 60px; }

/* ---- Cards ------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 24px;
}
.card-hover { transition: border-color var(--dur-med), transform var(--dur-med), box-shadow var(--dur-med); }
.card-hover:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.icon-tile {
  width: 44px; height: 44px; border-radius: var(--r-md); background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.icon-tile.lg { width: 52px; height: 52px; }

/* ---- Tags / chips ------------------------------------------ */
.tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); white-space: nowrap;
  font-family: var(--font-text); font-size: 13px; font-weight: 500;
}
.tag-accent { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent-line); }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface);
}
.pill-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gain); }

/* ---- Grids ------------------------------------------------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.split-wide { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }

/* ---- Header: floating liquid-glass capsules ---------------- */
.glx-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px clamp(16px, 4vw, 40px);
  pointer-events: none;
}
.glx-header > * { pointer-events: auto; }

/* the glass recipe - frosted capsule that hovers over scrolling content */
.glx {
  position: relative; overflow: hidden;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--border-strong) 70%, transparent);
  /* Opaque-enough base so the capsule stays legible even where backdrop-filter
     is dropped (iOS Safari on scroll) or where the .scrolled solidify class is
     never added (non-home pages load common.js, not home.js). The blur is a
     progressive enhancement layered on top, never the thing that makes it readable. */
  background:
    linear-gradient(180deg, var(--surface), var(--surface-2));
  backdrop-filter: blur(28px) saturate(2); -webkit-backdrop-filter: blur(28px) saturate(2);
  box-shadow: 0 10px 30px rgba(24,22,18,0.12), 0 2px 8px rgba(24,22,18,0.07);
  transition: background var(--dur-med) var(--ease-standard), box-shadow var(--dur-med) var(--ease-standard);
}
/* top sheen highlight */
.glx::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0) 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
[data-theme="dark"] .glx {
  border: 1px solid rgba(255,255,255,0.12);
  /* Opaque dark surface (not a near-transparent white film) so scrolled content
     never shows through the capsule on iOS where the blur doesn't composite. */
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 12px 36px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4);
}
[data-theme="dark"] .glx::before {
  background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0) 55%);
}
/* solidify on scroll so content behind stays legible */
.glx-header.scrolled .glx {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--surface) 80%, transparent));
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .glx-header.scrolled .glx {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface) 80%, transparent));
}

/* 7s diagonal light-sweep (light theme only) */
.glx-sweep::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-18deg); left: -60%;
  animation: glx-sweep 7s var(--ease-standard) infinite; pointer-events: none;
}
[data-theme="dark"] .glx-sweep::after { display: none; }
@keyframes glx-sweep { 0% { left: -60%; } 22%, 100% { left: 140%; } }
@media (prefers-reduced-motion: reduce) { .glx-sweep::after { display: none; } }

/* logo capsule + condensing lockup */
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), border-color var(--dur-fast); flex-shrink: 0;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--text-3); }

.glx-logo { display: inline-flex; align-items: center; height: 50px; box-sizing: border-box; padding: 0 18px; text-decoration: none; }
.glx-logo .dhi-logo { gap: 0.22em; transition: gap var(--dur-med) var(--ease-standard); }
.glx-logo .dhi-logo .money {
  display: inline-block; overflow: hidden; max-width: 7em;
  opacity: 1; transition: max-width var(--dur-med) var(--ease-standard), opacity var(--dur-fast) var(--ease-standard);
}
.glx-header.scrolled .glx-logo .dhi-logo { gap: 0; }
.glx-header.scrolled .glx-logo .dhi-logo .money { max-width: 0; opacity: 0; }

/* actions capsule */
.glx-actions { display: inline-flex; align-items: center; height: 50px; box-sizing: border-box; gap: 6px; padding: 0 8px 0 6px; }
.glx-icon {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast);
}
.glx-icon:hover { background: var(--accent-soft); }
.glx-divider { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.glx-cta {
  display: inline-flex; align-items: center; font-family: var(--font-text); font-size: 14px; font-weight: 600;
  color: var(--text-on-accent); background: var(--accent); text-decoration: none;
  padding: 9px 18px; border-radius: var(--r-pill); white-space: nowrap;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.glx-cta:hover { background: var(--accent-press); }
.glx-cta:active { transform: scale(0.97); }
@media (max-width: 480px) {
  .glx-cta { padding: 9px 15px; }
  .glx-header { padding: 12px 14px; }
}

/* ---- Footer ------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-sunken); padding: 72px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 48px; }
.footer-col a { color: var(--text-2); text-decoration: none; font-size: 13px; transition: color var(--dur-fast); cursor: pointer; }
.footer-col a:hover { color: var(--accent-strong); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }

/* ---- Reveal-on-scroll -------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 640ms var(--ease-standard), transform 640ms var(--ease-standard); }
[data-reveal].is-in { opacity: 1; transform: none; }
/* Safety net: once a route has settled, guarantee final visibility even if the
   CSS transition engine froze (unfocused/background tab). Transitions are the
   highest cascade origin, so we must drop the transition to let the value settle. */
html.reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
[data-reveal-delay="1"] { transition-delay: 70ms; }
[data-reveal-delay="2"] { transition-delay: 140ms; }
[data-reveal-delay="3"] { transition-delay: 210ms; }
[data-reveal-delay="4"] { transition-delay: 280ms; }
[data-reveal-delay="5"] { transition-delay: 350ms; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* page transition */
.page-enter { animation: page-in 420ms var(--ease-standard) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---- Phone mock -------------------------------------------- */
.phone {
  width: 288px; background: #1A1815; border-radius: 48px; padding: 11px;
  box-shadow: 0 40px 90px rgba(24,22,18,0.30), 0 12px 30px rgba(24,22,18,0.18);
}
.phone-screen { position: relative; height: 580px; border-radius: 38px; overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.phone-island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 90px; height: 26px; border-radius: 999px; background: #000; z-index: 5; }
.phone-home { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 110px; height: 5px; border-radius: 999px; background: var(--text); opacity: 0.28; }

/* floating metric cards near hero phone */
.float-card { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-lg); }

/* ---- Stat / number blocks ---------------------------------- */
.stat-num { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }

/* ---- Calculator -------------------------------------------- */
.calc-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); }
.calc-controls { padding: 36px; border-right: 1px solid var(--border); }
.calc-result { padding: 36px; background: var(--bg-sunken); display: flex; flex-direction: column; }
.field { margin-bottom: 26px; }
.field-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.field-label { font-family: var(--font-text); font-size: 14px; font-weight: 500; color: var(--text-2); }
.field-value { font-family: var(--font-display); font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; color: var(--text); }
input[type="range"].slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px;
  background: var(--surface-inset); outline: none; margin: 0; cursor: pointer;
}
input[type="range"].slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--surface); box-shadow: var(--shadow-sm); cursor: pointer;
}
input[type="range"].slider::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: pointer;
}
.seg { display: inline-flex; background: var(--surface-inset); border-radius: var(--r-pill); padding: 4px; gap: 2px; }
.seg button {
  font-family: var(--font-text); font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  padding: 8px 16px; border-radius: var(--r-pill); background: transparent; color: var(--text-2);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.seg button.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* tools tabs */
.tool-tabs { display: inline-flex; gap: 6px; padding: 6px; background: var(--surface-inset); border-radius: var(--r-pill); }
.tool-tab {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-text); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: var(--r-pill); border: none; cursor: pointer; background: transparent; color: var(--text-2);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.tool-tab.is-active { background: var(--surface); color: var(--accent-strong); box-shadow: var(--shadow-sm); }

/* ---- Prose (articles) -------------------------------------- */
.prose { max-width: 700px; }
.prose p { color: var(--text-2); font-size: 17px; line-height: 1.7; margin: 0 0 22px; }
.prose h2 { margin: 44px 0 16px; }
.prose h3 { margin: 32px 0 12px; }
.prose ul { color: var(--text-2); font-size: 17px; line-height: 1.7; padding-left: 22px; margin: 0 0 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .callout {
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-lg);
  padding: 20px 24px; margin: 28px 0; color: var(--text);
}

/* ---- FAQ accordion ----------------------------------------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-family: var(--font-text); }
.faq-a { overflow: hidden; transition: max-height var(--dur-med) var(--ease-standard); }

/* ---- Misc -------------------------------------------------- */
.divider { height: 1px; background: var(--border); border: none; margin: 0; }
.link-accent { color: var(--accent-strong); text-decoration: none; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link-accent:hover { gap: 9px; }
.avatar-ring { border-radius: 50%; border: 2px solid var(--surface); }

/* logo lockup on dark CTA */
.on-dark { color: var(--ivory); }
.on-dark .dhi-logo { color: var(--ivory); }

/* ---- Hero (live-chat layout) ------------------------------- */
.hero-section { position: relative; border-bottom: 1px solid var(--border); overflow: hidden; }

/* ---- Unified store download buttons ------------------------ */
.store-btn {
  display: inline-flex; align-items: center; gap: 11px; box-sizing: border-box;
  height: 52px; min-width: 176px; padding: 0 20px;
  background: var(--ink-900); color: var(--ivory);
  border-radius: var(--r-md); text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-standard);
}
.store-btn:hover { transform: translateY(-2px); }
.store-btn-text { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.store-btn-sm { font-family: var(--font-text); font-size: 10px; font-weight: 500; opacity: 0.82; letter-spacing: 0.01em; }
.store-btn-lg { font-family: var(--font-text); font-size: 16px; font-weight: 600; margin-top: 3px; }
.store-btn--light { background: var(--ivory); color: var(--ink-900); }

/* ---- Landing hero: sharp typographic, rotating Q→A ---------- */
.hero-landing { position: relative; overflow: hidden; }
.hero-landing-aura {
  position: absolute; top: -10%; left: 50%; transform: translateX(-50%); width: 820px; height: 620px; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 10%, transparent), transparent 72%);
  opacity: 0.55; filter: blur(12px);
}
.hero-landing-inner {
  position: relative; z-index: 2; max-width: 960px; margin: 0 auto; padding: clamp(128px, 19vh, 208px) 28px clamp(48px, 7vh, 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
}
.hero-landing-h1 { max-width: 920px; font-size: clamp(40px, 5.6vw, 62px); line-height: 1.1; }
.hero-landing-sub {
  max-width: 620px; margin: 40px auto 0; color: var(--text-2);
  text-align: center; box-sizing: border-box;
}
.hero-sep { width: 56px; height: 1px; background: var(--border-strong); margin: 64px auto 0; flex-shrink: 0; }
.hero-qa {
  margin-top: 44px; width: 100%; max-width: 660px; min-height: 60px; overflow: visible;
  display: flex; align-items: flex-start; justify-content: center;
}
/* the chat is a self-contained block sized to hold the LONGEST pair on one line,
   so its width never changes as the pairs rotate (was width:fit-content, which
   re-sized + re-centered on every rotation - the "jumping" the card did). Its
   rows stay left-aligned internally so it still reads as a conversation. */
.hero-qa-card { width: 640px; max-width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; animation: qaScroll 700ms cubic-bezier(0.16, 1, 0.3, 1) both; will-change: transform, opacity; }
@keyframes qaScroll { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.hero-qa-q, .hero-qa-a {
  display: flex; align-items: center; justify-content: flex-start; gap: 12px; text-align: left;
  white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.012em;
  font-size: clamp(13px, 1.5vw, 15.5px); line-height: 1.3;
}
.hero-qa-q { color: var(--text-2); }
.hero-qa-a { color: var(--accent); }
.hero-qa-tag {
  flex-shrink: 0; box-sizing: border-box; width: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-text); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3);
  background: var(--surface-inset); border-radius: 999px; padding: 5px 0; line-height: 1;
}
/* Dhi chat-tag pill: keep the accent-soft pill, but render धी from the outlined
   Kohinoor mask (matches the app) via ::before, hiding the text node. */
.hero-qa-tag-dhi { color: transparent; background: var(--accent-soft); font-size: 0; text-transform: none; padding: 4px 0; }
.hero-qa-tag-dhi::before {
  content: ""; display: inline-block; width: 1.037em; height: 1em; font-size: 15px;
  background-color: var(--accent);
  -webkit-mask: var(--deva-mask) center / contain no-repeat;
          mask: var(--deva-mask) center / contain no-repeat;
}
@media (max-width: 880px) {
  .hero-qa-q, .hero-qa-a { white-space: normal; }
}
@media (max-width: 560px) {
  .hero-qa-q, .hero-qa-a { font-size: 14px; gap: 10px; }
  .hero-qa { min-height: 150px; }
}

/* ---- "Inside the app" widget rail (depth + marquee) -------- */
.wrail-stage { position: relative; }
.wrail-mask {
  /* vertical breathing room so a hover-lifted card (translateY(-6px)) + its
     shadow are NOT clipped by overflow:hidden; negative margin keeps the row
     laid out as if the padding weren't there. */
  overflow: hidden; padding: 18px 0; margin: -18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.wrail-track {
  display: flex; gap: 18px; width: max-content; align-items: stretch;
  animation: wrail-scroll 64s linear infinite;
}
.wrail-rows { display: flex; flex-direction: column; gap: 18px; }
.wrail-rows .wrail-mask { padding: 18px 0; margin: -18px 0; }
.wrail-track.wrail-rev { animation-duration: 78s; animation-direction: reverse; }
.wrail-stage:hover .wrail-track { animation-play-state: paused; }
@keyframes wrail-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 9px)); } }
.wrail-card {
  width: 296px; min-height: 204px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease-standard), box-shadow 0.3s var(--ease-standard);
}
.wrail-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.wrail-card.is-accent { background: var(--accent-soft); border-color: var(--accent-line); }
@media (prefers-reduced-motion: reduce) {
  .wrail-track { animation: none; }
  .wrail-mask { overflow-x: auto; padding-bottom: 14px; }
}

/* ---- Dark product showcase --------------------------------- */
.showcase-dark { background: var(--ink-900); position: relative; overflow: hidden; }
.showcase-dark::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(78% 60% at 50% -8%, rgba(144,138,247,0.16), transparent 60%);
}
.showcase-grid { gap: 20px; align-items: start; }
.showcase-card { background: var(--surface); box-shadow: var(--shadow-lg); }
.showcase-grid > :nth-child(2) { transform: translateY(26px); }
@media (max-width: 760px) { .showcase-grid > :nth-child(2) { transform: none; } }
.breadth-grid { gap: 16px; }
.breadth-card { background: var(--surface); }

.hero-grid { grid-template-columns: 1fr 384px; gap: 52px; align-items: center; }
.hero-chat-col { display: flex; justify-content: center; position: relative; }
/* faint technical dot-grid that fades - structural depth, not a colour glow */
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(var(--border-strong) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(58% 60% at 72% 42%, #000 0%, transparent 72%);
  mask-image: radial-gradient(58% 60% at 72% 42%, #000 0%, transparent 72%);
  opacity: 0.6;
}
/* warm paper grain - the "expensive" texture great UI sites use */
.grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
[data-theme="dark"] .grain { mix-blend-mode: screen; opacity: 0.045; }
/* one tasteful floating chip behind the device */
.hero-float {
  position: absolute; z-index: 3; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 11px 13px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
}
.hero-try {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 26px;
  font-family: var(--font-text); font-size: 13.5px; font-weight: 500; color: var(--text-2);
}
.accent-word { color: var(--accent); }
.hero-try svg { animation: hero-nudge 1.8s var(--ease-standard) infinite; }
@keyframes hero-nudge { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }

/* ============================================================
   LIVE CHAT DEMO (hero centrepiece)
   ============================================================ */
.chat-phone {
  width: 348px; max-width: 100%;
  background: linear-gradient(158deg, #2B2823 0%, #181612 52%, #100F0D 100%);
  border-radius: 46px; padding: 11px; position: relative; z-index: 4;
  box-shadow:
    0 48px 90px -24px rgba(24,22,18,0.50),
    0 18px 44px -16px rgba(24,22,18,0.30),
    inset 0 1.5px 1px rgba(255,255,255,0.10),
    inset 0 -2px 3px rgba(0,0,0,0.40);
}
.chat-phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 24px; border-radius: 999px; background: #000; z-index: 6;
}
.chat-screen {
  height: 580px; border-radius: 36px; overflow: hidden; background: var(--bg);
  display: flex; flex-direction: column; position: relative;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px 18px 12px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0; z-index: 4;
}
.chat-deva-av {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gain); box-shadow: 0 0 0 0 var(--gain); animation: chat-pulse 2.4s var(--ease-standard) infinite; }
@keyframes chat-pulse { 0% { box-shadow: 0 0 0 0 rgba(14,159,110,0.45); } 70%,100% { box-shadow: 0 0 0 6px rgba(14,159,110,0); } }

.chat-stream {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 14px 6px;
  display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chat-stream::-webkit-scrollbar { width: 0; height: 0; display: none; }
.chat-row { display: flex; gap: 8px; align-items: flex-start; animation: chat-in 320ms var(--ease-standard) both; }
.chat-row-you { justify-content: flex-end; }
.chat-row-dhi { justify-content: flex-start; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.chat-bubble-you {
  background: var(--accent); color: var(--text-on-accent);
  border-radius: 17px; border-bottom-right-radius: 5px;
  padding: 9px 13px; font-size: 13.5px; line-height: 1.45; max-width: 80%;
  font-family: var(--font-text);
}
.chat-bubble-dhi {
  background: var(--surface-inset); color: var(--text);
  border-radius: 17px; border-bottom-left-radius: 5px;
  padding: 9px 13px; font-size: 13.5px; line-height: 1.5; max-width: 100%;
  font-family: var(--font-text); align-self: flex-start;
}

.chat-typing { display: inline-flex; gap: 4px; align-items: center; height: 8px; }
.chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: chat-bounce 1.1s var(--ease-standard) infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-bounce { 0%,60%,100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* widget card inside a Dhi message */
.chat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 13px; width: 100%;
  box-shadow: var(--shadow-sm);
  animation: card-pop 480ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes card-pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
.chat-verdict {
  font-family: var(--font-text); font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  background: var(--gain-soft); color: var(--gain);
}
.bar-grow { animation: bar-grow 720ms var(--ease-standard) both; transform-origin: left; }
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* suggested-prompt chips */
.chat-chips {
  display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 14px 4px;
  flex-shrink: 0;
}
.chat-chip {
  font-family: var(--font-text); font-size: 12.5px; font-weight: 500;
  white-space: nowrap; padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-strong);
  cursor: pointer; transition: background var(--dur-fast), transform var(--dur-fast); flex-shrink: 0;
}
.chat-chip:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.chat-chip:active { transform: scale(0.97); }
.chat-chip:disabled { opacity: 0.45; cursor: default; }

/* input bar */
.chat-input-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px 16px;
  flex-shrink: 0; background: var(--bg);
}
.chat-input {
  flex: 1; min-width: 0; font-family: var(--font-text); font-size: 13.5px; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 999px;
  padding: 11px 16px; outline: none; transition: border-color var(--dur-fast);
}
.chat-input:focus { border-color: var(--accent); }
.chat-input::placeholder { color: var(--text-3); }
.chat-send {
  width: 38px; height: 38px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--accent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), transform var(--dur-fast);
}
.chat-send:hover:not(:disabled) { background: var(--accent-press); }
.chat-send:active:not(:disabled) { transform: scale(0.94); }
.chat-send:disabled { opacity: 0.4; cursor: default; }

/* ============================================================
   3D HERO SCENE - perspective stage, floating widgets, parallax
   ============================================================ */
.hero3d { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero3d-amb { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero3d-aura {
  position: absolute; top: -16%; right: -10%; width: 760px; height: 760px; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent 72%);
  opacity: 0.5; filter: blur(8px);
}
.hero3d-inner {
  position: relative; z-index: 3; max-width: 1180px; margin: 0 auto; padding: 0 28px;
  min-height: 90vh; display: grid; grid-template-columns: 1fr 580px; align-items: center; gap: 16px;
}
.hero3d-copy { position: relative; z-index: 4; padding: 56px 0; }

/* the perspective viewport + rotating stage */
.stage-wrap { position: relative; height: 660px; perspective: 1600px; perspective-origin: 58% 42%; }
.stage {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.45s cubic-bezier(0.2,0,0,1);
}
.hero3d.is-in .stage { animation: stageIn 1.2s cubic-bezier(0.2,0,0,1) both; }
@keyframes stageIn {
  from { opacity: 0; transform: translateY(46px) rotateX(15deg) rotateY(-10deg) scale(0.93); }
  to   { opacity: 1; transform: rotateX(0deg) rotateY(0deg) scale(1); }
}

/* a placed layer in 3D space (placement only) */
.layer { position: absolute; transform-style: preserve-3d; }
.layer-phone { left: 50%; top: 50%; transform: translate(-50%, -50%) translateZ(0px); }
/* inner wrapper carries the looping ambient float so it never fights placement */
.lf { will-change: transform; }
.lf-a { animation: floatA 8s ease-in-out infinite alternate; }
.lf-b { animation: floatB 9.5s ease-in-out infinite alternate; }
.lf-c { animation: floatC 7s ease-in-out infinite alternate; }
.lf-d { animation: floatA 10s ease-in-out infinite alternate; }
@keyframes floatA { from { transform: translateY(-10px) rotate(-0.6deg); } to { transform: translateY(12px) rotate(0.6deg); } }
@keyframes floatB { from { transform: translateY(10px) rotate(0.8deg); } to { transform: translateY(-12px) rotate(-0.5deg); } }
@keyframes floatC { from { transform: translateY(-7px); } to { transform: translateY(9px); } }

/* glass widget cards */
.gcard {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--border-strong) 80%, transparent);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
  padding: 14px;
}
[data-theme="dark"] .gcard { box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.06); }
.gchip {
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--border-strong) 80%, transparent);
  border-radius: var(--r-pill); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* scroll cue */
.hero-scrollcue {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--text-3); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}
.hero-scrollcue .mouse { width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 999px; position: relative; }
.hero-scrollcue .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 6px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); animation: scroll-dot 1.8s var(--ease-standard) infinite; }
@keyframes scroll-dot { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 11px); } }

@media (prefers-reduced-motion: reduce) {
  .hero3d.is-in .stage { animation: none; }
  .lf-a, .lf-b, .lf-c, .lf-d { animation: none; }
  .stage { transition: none; }
}

/* ---- Responsive -------------------------------------------- */
@media (max-width: 920px) {
  .hero3d-inner { grid-template-columns: 1fr; min-height: 0; gap: 0; padding-top: 8px; }
  .hero3d-copy { padding: 40px 0 8px; text-align: left; }
  .stage-wrap { height: 600px; perspective: 1400px; perspective-origin: 50% 42%; margin: 0 auto; max-width: 420px; width: 100%; }
  .gcard-hide-sm { display: none !important; }
  .hero-scrollcue { display: none; }
  .section { padding: 72px 0; }
  .split, .split-wide { grid-template-columns: 1fr; gap: 40px; }
  .legal-toc { display: none !important; }
  .wrap > div[style*="220px 1fr"] { grid-template-columns: 1fr !important; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .calc-shell { grid-template-columns: 1fr; }
  .calc-controls { border-right: none; border-bottom: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .drawer.open {
    display: block; position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); z-index: 60;
    background: var(--bg); border-left: 1px solid var(--border); padding: 24px; box-shadow: var(--shadow-lg);
    animation: drawer-in var(--dur-med) var(--ease-standard) both;
  }
  .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,0.3); }
  @keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
}
@media (max-width: 600px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { justify-content: flex-start; }
  .section { padding: 56px 0; }
  .calc-controls, .calc-result { padding: 24px; }
  /* hero subtitle: drop the desktop indent that aligns it under the Q&A tags */
  .hero-landing-sub { padding-left: 0; text-align: center; }
  /* tool tabs: fit the four calculators across a phone width */
  .tool-tabs { display: flex; width: 100%; box-sizing: border-box; }
  .tool-tab { flex: 1; min-width: 0; padding: 10px 6px; font-size: 13.5px; justify-content: center; }
  .tool-tab > span { display: none !important; }
}

/* ---- Compass + four layers ("how Compass thinks") ---------- */
.compass-row {
  display: grid; grid-template-columns: 0.86fr 1.5fr 1.18fr; gap: 0; align-items: stretch;
  background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-xl);
  padding: 8px; box-shadow: var(--shadow-lg); position: relative; z-index: 2; overflow: hidden;
}
.compass-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; pointer-events: none;
  background: linear-gradient(180deg, var(--accent), var(--gain));
}
.compass-row > * { position: relative; z-index: 1; padding: 18px 24px; display: flex; flex-direction: column; justify-content: center; }
.compass-row > * + * { border-left: 1px solid var(--border); }
.compass-live { width: 6px; height: 6px; border-radius: 50%; background: var(--gain); box-shadow: 0 0 0 0 var(--gain-soft); animation: compass-pulse 2.4s ease-out infinite; }
@keyframes compass-pulse { 0% { box-shadow: 0 0 0 0 rgba(14,159,110,0.35); } 70%,100% { box-shadow: 0 0 0 7px rgba(14,159,110,0); } }
.fi-meter { height: 9px; border-radius: 99px; background: var(--surface-inset); overflow: hidden; }
.fi-meter > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--gain)); }

.compass-connect { height: 54px; }
.compass-connect svg { display: block; width: 100%; height: 100%; }
.compass-connect path { fill: none; stroke: var(--accent-line); stroke-width: 2; }
.compass-connect path.flow { stroke: var(--accent); stroke-dasharray: 3 9; animation: compass-flow 1.4s linear infinite; }
@keyframes compass-flow { to { stroke-dashoffset: -24; } }
@media (prefers-reduced-motion: reduce) { .compass-connect path.flow { animation: none; } }

.layer-card { display: flex; flex-direction: column; min-width: 0; }
.layer-top { display: flex; align-items: center; gap: 10px; }
.layer-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.layer-ovl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }

@media (max-width: 920px) {
  .compass-row { grid-template-columns: 1fr; text-align: left; }
  .compass-row > * + * { border-left: none; border-top: 1px solid var(--border); }
  .compass-connect { display: none; }
}

/* Reasons section - the real app snapshot widget at native size, clean */
.reasons-stack { width: 296px; max-width: 100%; margin-left: auto; }
.reasons-split { display: grid; grid-template-columns: 1fr 360px; gap: 56px; align-items: center; }
@media (max-width: 920px) {
  .reasons-stack { margin: 0 auto; }
}
/* keep the 2-column split on tablets; only collapse to the phone-backdrop
   treatment (home.css) at true phone widths. Was 920px, which left tablets
   (601-920) with a broken 1-col fallback + a small floating phone. */
@media (max-width: 600px) {
  .reasons-split { grid-template-columns: 1fr; gap: 44px; }
}
