/* ==========================================================================
   NIKSHA OS — nikshaos.in product website

   Palette and typography are taken from brand/BRAND_GUIDELINES.md §2/§5, which
   is the authority. Those values are MEASURED from the approved reference board
   by brand/trace_from_reference.js — they are not a designer's choice and must
   not be "adjusted" here. If a colour looks wrong, fix the board and re-trace.

   PERFORMANCE RULES THIS FILE OBEYS (proposal §8.2) — read before editing:
     1. Only `transform` and `opacity` are ever animated. Never top/left/width/
        height, never filter, never box-shadow. A shadow "change" is a cross-fade
        between two pre-rendered layers.
     2. `backdrop-filter` appears in EXACTLY ONE place — the sticky header. It is
        the single most expensive property on Safari and low-end Android.
     3. `content-visibility: auto` on below-fold acts so they cost nothing to lay
        out until they are near the viewport.
     4. `will-change` is never set here; site.js adds it on enter and REMOVES it
        on leave. Leaving it on dozens of layers exhausts GPU memory and causes
        exactly the jank this design risks.
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts
   Vendored, self-hosted, subset. Claim 7 ("no third-party trackers") forbids a
   CDN font — a webfont request is a third-party request. The unicode-range
   gating means latin-ext is fetched only if the page actually uses those
   glyphs; the rupee sign (U+20B9) lives there. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* NIKSHA OS palette — BRAND_GUIDELINES.md §2 */
  --navy:    #0B1F4B;  /* app canvas / icon background */
  --deep:    #022997;
  --primary: #0234B8;
  --light:   #0496F3;  /* accent only, never a fill (§2 rule 2) */

  --ink:      #0F172A;
  --body:     #334155;
  --muted:    #5A6B82;   /* 4.6:1 on white — nudged from #64748B to clear AA */
  --line:     #E2E8F0;
  --bg:       #FFFFFF;
  --bg-soft:  #F7F9FC;

  /* On the navy ground */
  --on-navy-muted: #A9B9D4;   /* 6.0:1 on --navy */

  --radius: 14px;
  --container: 1120px;

  /* §5: Inter, now actually vendored. Falls back to the platform UI font —
     never to a display serif. */
  --font: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;

  /* Motion tokens mirrored from lib/theme/motion.dart so the site feels like
     the app (proposal §3.2). */
  --t-fast:    120ms;
  --t-std:     180ms;
  --t-slow:    240ms;
  --ease-enter: cubic-bezier(.215, .61, .355, 1);   /* easeOutCubic */ /* easeInCubic  */

  /* Elevation: a tight contact shadow + a wide soft ambient, matching the app's
     card treatment. Two families, never animated. */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top:84px;scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;   /* the hero scene translates; the page must never scroll sideways */
}

/* §5: numerals are tabular anywhere they align or change. A product rule that
   holds on the site too. */
table, .tabular, .stage, .truth-card { font-variant-numeric: tabular-nums; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; font-weight: 600; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* Must stay visible on the navy ground as well as on white (§9.8). */
:focus-visible { outline: 3px solid var(--light); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------- Brand mark
   The horizontal lockup master still does not exist in brand/niksha-os/svg/,
   and it must NOT be hand-drawn: every master is a traced build-output of
   brand/_reference/niksha-brand-board.png, and hand-authored geometry is
   explicitly barred (BRAND_GUIDELINES.md preamble — an earlier hand-drawn
   revision drifted from the reference and was replaced wholesale).

   So the name is typeset to the §5 wordmark specification — Inter 700, tracking
   +0.14em, "OS" in Inter 600 in the brand primary — beside the approved symbol.
   Now that Inter is actually vendored this renders as specified rather than in
   whatever UI font the visitor happened to have.

   TO SWAP IN A REAL LOCKUP: add it to the reference board, re-trace, then
   replace the <img> + .brand-name markup in build_site.mjs (NAV / FOOTER).
   ---------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-symbol { flex: none; width: 34px; height: 34px; }
.brand-name { display: inline-flex; align-items: baseline; gap: 7px; }

.wordmark {
  font-weight: 700;
  letter-spacing: .14em;   /* §5 — the tracking is what makes it read as a mark */
  color: var(--ink);
  font-size: 1.0625rem;
}
.suffix {
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--primary);
  font-size: .9375rem;
}

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .9375rem;
  padding: 11px 20px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-enter),
              border-color var(--t-fast) var(--ease-enter),
              transform var(--t-fast) var(--ease-enter);
  text-decoration: none; white-space: nowrap;
  min-height: 44px;   /* touch target (§9.9) */
}
.btn:hover { text-decoration: none; }
/* 44px even at the small size: the header "Sign in" is the most-tapped control
   on the page and §9.9 sets 44px as the floor, with no exemption for "small". */
.btn-sm { padding: 8px 16px; font-size: .875rem; min-height: 44px; }


/* Mirrors Motion.hoverLift in the app. */
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--deep); transform: translateY(-1px); }


/* ------------------------------------------------------------------- Header */
.header-sentinel { position: absolute; top: 80px; height: 1px; width: 1px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0);
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-std) var(--ease-enter),
              border-color var(--t-std) var(--ease-enter);
}
/* ★ The ONLY backdrop-filter on the site (§8.2 rule 5). Do not add another. */
.site-header.is-stuck {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px;
  transition: height var(--t-std) var(--ease-enter);
}
.site-header.is-stuck .header-inner { height: 60px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--body); font-size: .9375rem; font-weight: 500; position: relative; }
.nav a:not(.btn):hover { color: var(--ink); text-decoration: none; }
/* A 2px rule that grows from the left, 120ms — transform only. */
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%;
  background: var(--primary); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-fast) var(--ease-enter);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav a.btn-primary { color: #fff; }

/* --------------------------------------------------------- Blueprint planes
   One SVG serves every ground: `mask-image` takes the drawing's shape and
   `background-color` supplies the colour, so the file is fetched and cached
   once. Decorative — every consumer carries aria-hidden (§9.4) — and animated
   only by translate3d (§3.3), never redrawn. */


/* ----------------------------------------------------------------- Sections */

/* Off-screen acts cost nothing to lay out (§8.2 rule 6). The intrinsic size
   keeps the scrollbar honest so the reservation never causes a jump. */


/* ============================================================ ACT 0 · APERTURE
   The scene is a real 3D space: `perspective` on the stage, depth by translateZ
   only. Focus order follows DOM order and depth never reorders it (§9.3). */


/* ------------------------------------------------------------------- Stage */

.layer { position: absolute; transform-style: preserve-3d; }
.layer picture, .layer img { pointer-events: none; }   /* they are images, not affordances (§5 Act 0) */

/* Layer 3 · context — the system BEHIND the phones, held back and dimmed. */

/* Layer 4 · anchor — the strongest single screen the product has. */

/* Layer 5 · forward. Placed right rather than the spec's left: layer 6 (the AI
   Copilot card) is omitted until captured, and with five layers the composition
   balances only if the two phones flank the dashboard. */


/* Device bezel. §6.1 allows a bezel around an unmodified capture; it is drawn
   here in CSS so not one pixel inside it is anything but the capture. */


/* ============================================================== ACT II · TRUTH */


/* The tablet capture is 1:1.43 and the phones are 1:2, so a width-driven grid
   leaves the tablet card short and its caption floating above the other three.
   Sizing every device to a COMMON HEIGHT and letting width follow puts all four
   captions on one baseline — and it is only scaling, which §6.1 allows. */


/* ========================================================= ACT IV · GUARDRAILS */


/* ============================================================== ACT V · CLOSE */


/* ------------------------------------------------------------------- Footer */
.site-footer { background: var(--navy); color: var(--on-navy-muted); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand img { margin-bottom: 14px; }
.footer-name { margin: 0 0 6px; display: inline-flex; align-items: baseline; gap: 7px; }
.footer-name .wordmark { color: #fff; }
.footer-name .suffix { color: var(--light); }
.footer-tagline { margin: 0; font-size: .9062rem; color: var(--on-navy-muted); }
.site-footer h2 { color: #E2E8F0; font-size: .8125rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer li a { color: var(--on-navy-muted); font-size: .9375rem; }
.site-footer li a:hover { color: #fff; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 24px; padding-bottom: 28px; }
.footer-base p { margin: 0; font-size: .875rem; color: var(--on-navy-muted); }

/* -------------------------------------------------------------- Legal pages */
.page-legal { background: var(--bg); }
.page-legal .site-header { background: rgba(255, 255, 255, .82); border-bottom-color: var(--line); }
.legal { max-width: 780px; padding-top: 56px; padding-bottom: 88px; }
.legal-back { margin: 0 0 32px; font-size: .9375rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -.015em; margin-bottom: 24px; }
.legal h2 { font-size: 1.3125rem; margin-top: 44px; padding-top: 4px; }
.legal h3 { font-size: 1.0625rem; margin-top: 30px; }
.legal p { margin: 0 0 16px; }
.legal ul, .legal ol { margin: 0 0 18px; padding-left: 24px; }
.legal li { margin-bottom: 9px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .875em; background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px;
}
.legal blockquote {
  margin: 22px 0; padding: 16px 22px;
  background: var(--bg-soft); border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0;
  color: var(--muted);
}
.legal blockquote p:last-child { margin-bottom: 0; }

.table-wrap { overflow-x: auto; margin: 0 0 24px; }
.legal table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
.legal th, .legal td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--bg-soft); font-weight: 600; color: var(--ink); white-space: nowrap; }

/* Unfilled legal fields — must never be mistaken for completed content. */
.pending {
  display: inline-block;
  font-size: .8125em; font-weight: 600;
  color: #92400E; background: #FEF3C7; border: 1px dashed #FCD34D;
  border-radius: 5px; padding: 1px 7px;
}
.notice {
  background: #FFFBEB; border: 1px solid #FDE68A; border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 36px; font-size: .9375rem; color: #78350F;
}
.notice a { color: #92400E; }

/* ==================================================================== Motion
   The reveal's RESTING state is "visible". site.js adds .reveal-armed only
   after confirming motion is allowed, which is what guarantees the page is
   complete with JS off or under reduced motion (§9.1, §9.2) — the static state
   is the designed artifact, not a degraded leftover. */
[data-reveal] { opacity: 1; transform: none; }

.motion-ok [data-reveal].reveal-armed {
  opacity: 0;
  transform: translateY(18px) scale(.98);   /* enterScale 0.98 — §3.2 */
}
.motion-ok [data-reveal].reveal-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--t-slow) var(--ease-enter),
              transform var(--t-slow) var(--ease-enter);
}

/* ------------------------------------------------------------- Responsive
   §7. Depth is preserved down to 768px; below that there is no scrubbing, no
   pinning and no 3D — each act becomes one static composition. Mobile is
   deliberately plain: the audience opens this link on a mid-range Android over
   4G, and an elegant static page beats a cinematic one at 25fps. */
@media (max-width: 1279px) {
  
  /* Depth amplitude reduced ~40% (§7). */
  
  
}

@media (max-width: 1023px) {
  
  
  
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  
  

  /* No 3D at all below 768 (§7). The stage becomes a plain stack. */
  
  .layer { position: static; transform: none !important; opacity: 1; }
  /* The tablet dashboard is dropped rather than shrunk into illegibility (§7);
     it still reaches mobile readers in Act II, at a size where it is readable. */
  
  
  

  
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .legal { padding-top: 40px; padding-bottom: 64px; }

  .nav { gap: 14px; }
  /* Keep the sign-in action reachable; drop secondary links on small screens. */
  .nav a:not(.btn) { display: none; }
}

/* ★ prefers-reduced-motion REMOVES motion — it does not reduce it (§9.1).
   Every act renders in its final composed state. site.js checks matchMedia
   before building anything, so the parallax and reveal never initialise; this
   block is the belt to that braces. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  
}

/* prefers-contrast: more drops the decorative layers and raises text contrast
   (§9.11). */
@media (prefers-contrast: more) {
  
  :root { --muted: #40506B; --on-navy-muted: #C8D6EC; }
  
}
