/* ==========================================================================
   ASMI.AI — asmi.live design system
   Built to docs/cowork-runs/asmi-live-content-spec-2026-08-27.md §10.
   Dark only. No framework. No third-party requests (CSP stays 'self').

   HOW TO USE THIS FILE
   Every component below carries a MARKUP CONTRACT comment. Copy the markup
   exactly; do not invent classes. Nine components exist and nine only:
     1 nav · 2 hero · 3 stat · 4 card · 5 render · 6 rail · 7 loop · 8 pill
     9 form + footer
   Plus page scaffolding (.wrap .section .eyebrow .lede .measure .btn .mono).

   THE THREE RULES THAT DO NOT BEND (§10)
     i.   Every number is mono, dated, and carries a claims reference.
          Write the reference as an HTML COMMENT beside the number —
          <p class="stat__value">Before 7 AM</p><!-- [C-2] -->
          so the build gate can grep it and no reader ever sees it.
     ii.  Display face (Marcellus) for h1/h2 only. Inter for everything else.
          No bold serif anywhere. No serif below 20px.
     iii. One accent per screen. If cyan appears more than five times above
          the fold, delete until it does not. The five it is allowed above
          the fold on Home: lockup period + flag pole, nav button, eyebrow
          pill, one word in the h1, the primary button. That is the budget —
          which is why section eyebrows and stat numerals are NOT cyan.

   COLOUR RATIO TARGET: 90% navy/slate · 9% cyan · 1% vermilion.
     --cyan  = links, one h1 word, the Act node, chips, the primary button.
     --verm  = the flag pennant, plus at most ONE focal accent per page.
     --bg-2  = a card surface and nothing else.
     status colours are never decoration.

   MOTION BUDGET — four items, total, sitewide:
     nav background/blur on scroll · card border-colour on hover ·
     the pulse dot (gated) · 120ms button press.
     No scroll-triggered fades. No translateY on hover.
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. FONTS — self-hosted, subset, woff2. Google is not a processor here.
      marcellus-400        9.4 KB   display: h1, h2, the wordmark
      inter-var           21.7 KB   body, variable wght 400-600
      jetbrains-mono-var  22.9 KB   every number, date, chip and command
      Preload Inter only (spec §12); the other two are discovered from here.
      NOTE: Marcellus carries no glyph for the rupee sign or the rightwards
      arrow — per-glyph fallback covers both, and neither belongs in a
      headline. JetBrains Mono has no rupee sign either; set that in Inter.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Marcellus';
  src: url('fonts/marcellus-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-var.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}


/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */

:root {
  /* --- surfaces --------------------------------------------------------- */
  --bg:            #0A1628;   /* the page */
  --bg-tint:       #0C1A2E;   /* alternating section tint. Never two in a row,
                                 and never adjacent to a render. */
  --bg-2:          #0F1F38;   /* a CARD. Nothing else. */
  --border:        #1F2D49;   /* card + hairline edges (decorative) */
  --border-hover:  rgba(0, 212, 255, 0.34);
  --border-input:  #526C96;   /* form controls — 3.41:1 on --bg, WCAG 1.4.11 */

  /* --- ink -------------------------------------------------------------- */
  --text:          #E2E8F0;   /* 14.7:1 on --bg */
  --text-strong:   #FFFFFF;   /* 17.6:1 on --bg */
  --muted:         #94A3B8;   /* 7.1:1 on --bg — all secondary text */
  --dim:           #6F819A;   /* 4.6:1 on --bg — fine print, claim meta */

  /* --- accent ----------------------------------------------------------- */
  --cyan:          #00D4FF;   /* 10.2:1 on --bg */
  --cyan-ink:      #0A1628;   /* text ON cyan — 10.2:1 */
  --cyan-soft:     rgba(0, 212, 255, 0.07);
  --cyan-line:     rgba(0, 212, 255, 0.28);
  --verm:          #F97316;   /* 6.5:1 on --bg — the pennant, one accent/page */

  /* --- status (never decorative) ---------------------------------------- */
  --live:          #34D399;

  /* --- type ------------------------------------------------------------- */
  --font-display:  'Marcellus', Georgia, 'Times New Roman', serif;
  --font-body:     'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* FIVE SIZES. There is no sixth. Do not add one.
     1  h1                                          38 -> 60px
     2  h2, stat value                              27 -> 38px
     3  lede, h3, card + rail title                      19px
     4  body                                             16px
     5  eyebrow, caption, chip, mono meta, footer,
        form label                                       13px                */
  --fs-1: clamp(2.375rem, 1.55rem + 3.4vw, 3.75rem);
  --fs-2: clamp(1.6875rem, 1.28rem + 1.7vw, 2.375rem);
  --fs-3: 1.1875rem;
  --fs-4: 1rem;
  --fs-5: 0.8125rem;

  --lh-display: 1.06;          /* h1 + h2, fixed by §10 */
  --lh-title:   1.3;
  --lh-body:    1.6;
  --ls-display: -0.01em;       /* h1 + h2, fixed by §10 */
  --ls-eyebrow: 0.1em;
  --ls-tagline: 0.22em;

  /* --- space (8px base) -------------------------------------------------- */
  --s1: 8px;  --s2: 16px; --s3: 24px; --s4: 32px;
  --s5: 40px; --s6: 56px; --s7: 72px; --s8: 96px;

  --pad-card:  28px;           /* card padding, fixed by §10 */
  --wrap:      1100px;         /* page max width, fixed by §10 */
  --measure:   640px;          /* text measure ceiling, fixed by §10 */
  --nav-h:     72px;
  --radius:    10px;
  --radius-sm: 6px;

  --dur: 120ms;                /* the single duration used sitewide */

  color-scheme: dark;
}


/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-4);
  font-weight: 400;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Anchored sections land clear of the sticky nav (72px + breathing room). */
[id] { scroll-margin-top: 88px; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;                 /* Marcellus has one weight. Never bold. */
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--text-strong);
  margin: 0 0 var(--s3);
  text-wrap: balance;
}
h1 { font-size: var(--fs-1); max-width: 920px; }
h2 { font-size: var(--fs-2); max-width: 740px; }

/* The single cyan word in an h1 or h2. Never twice in one heading. */
h1 em, h2 em { color: var(--cyan); font-style: normal; }

h3 {
  font-family: var(--font-body);
  font-size: var(--fs-3);
  font-weight: 600;
  line-height: var(--lh-title);
  letter-spacing: -0.005em;
  color: var(--text-strong);
  margin: 0 0 var(--s1);
}

p { margin: 0 0 var(--s2); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

strong { font-weight: 600; color: var(--text-strong); }
em { font-style: italic; }
ul, ol { margin: 0 0 var(--s2); padding-left: 1.25em; }
li { margin-bottom: var(--s1); max-width: var(--measure); }
img, svg, picture, video { max-width: 100%; }
img { height: auto; border: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }

::selection { background: var(--cyan); color: var(--cyan-ink); }

/* Keyboard focus — visible on every interactive element, on every surface. */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* Visually hidden, still announced. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}


/* --------------------------------------------------------------------------
   3. SCAFFOLDING
      <div class="wrap">                        page gutter, 1100 max
      <section class="section" id="loop">        96 / 56 vertical rhythm
      <section class="section section--tint">    the faint alternate ground
      <header class="section__head">             eyebrow + h2 + optional lede
      <p class="eyebrow">                        13px uppercase, MUTED not cyan
      <p class="lede">                           19px, 640px measure
      <p class="measure">                        force any block to 640px
      <span class="mono">                        any number, date, id, command
      <span class="chip">REAL &#183; ECI</span>  a provenance chip
      <a class="link-more" href="/trust">        "What we won't build &#8594;"
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s3);
}

.section { padding-block: var(--s8); }
.section--tight { padding-block: var(--s7); }
.section--tint {
  background: var(--bg-tint);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
/* A render inside a tinted section must be told what to fade into. */
.section--tint .render { --render-bg: var(--bg-tint); }

.section__head { margin-bottom: var(--s6); }
.section__head > :last-child { margin-bottom: 0; }

.eyebrow {
  font-size: var(--fs-5);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--s2);
  max-width: none;
}

.lede {
  font-size: var(--fs-3);
  line-height: 1.55;
  color: var(--muted);
  max-width: var(--measure);
}
.lede strong { color: var(--text); }

.measure { max-width: var(--measure); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.95em;              /* JetBrains Mono runs optically large */
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* A provenance chip. Mono, small, one of the sanctioned cyan appearances. */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid var(--cyan-line);
  white-space: nowrap;
}
.chip--modelled { color: var(--muted); background: transparent; border-color: var(--border); }

.link-more {
  display: inline-block;
  margin-top: var(--s3);
  font-size: var(--fs-4);
  font-weight: 500;
}


/* --------------------------------------------------------------------------
   4. BUTTONS
      <a class="btn btn--primary" href="#contact">Request a briefing</a>
      <a class="btn btn--ghost"   href="#loop">See the Loop &#8595;</a>
      <button class="btn btn--primary" type="submit">Request a briefing</button>
      Two variants. There is no third. No channel-coloured button: no
      delivery channel is named or branded in marketing copy (§7.1).
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  /* MOTION 4 of 4 — a 120ms press. Nothing moves on hover. */
  transition: transform var(--dur) ease, background-color var(--dur) ease,
              border-color var(--dur) ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--cyan); color: var(--cyan-ink); }
.btn--primary:hover { background: #22DDFF; }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-input); }
.btn--ghost:hover { border-color: var(--cyan-line); background: var(--cyan-soft); }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

/* Keep the two hero buttons on one line on a 360-390px handset. */
@media (max-width: 420px) { .btn { padding-inline: 17px; font-size: 14.5px; } }


/* ==========================================================================
   COMPONENT 1 — NAV
   Sticky, blurred, with a real hamburger. ONE <nav> serves both breakpoints:
   a row on desktop, a panel on mobile. Do not duplicate the links.

   MARKUP CONTRACT (exactly what src/partials/nav.html emits)
     <a class="skip-link" href="#main">Skip to content</a>
     <header class="nav" id="site-nav" data-open="false">
       <div class="wrap nav__inner">
         <a class="lockup lockup--sm" href="/" aria-label="ASMI.AI home"> ... </a>
         <nav class="nav__menu" id="nav-menu" aria-label="Primary">
           <a class="nav__link" href="/platform">Platform</a>
           ... Product, Trust, Company ...
           <a class="nav__link nav__link--cta" href="/#contact">Request a briefing</a>
           <a class="nav__link nav__link--quiet" href="https://app.asmi.live">Login &#8594;</a>
         </nav>
         <button class="nav__toggle" type="button"
                 aria-expanded="false" aria-controls="nav-menu"> ... </button>
       </div>
     </header>
     <main id="main">
   Mark the current page with aria-current="page" on its .nav__link.
   ========================================================================== */

.skip-link {
  position: absolute;
  left: var(--s3);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--cyan-ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--s2); text-decoration: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 22, 40, 0.72);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) ease, border-color var(--dur) ease;
}
@supports (backdrop-filter: blur(1px)) {
  .nav { backdrop-filter: blur(14px) saturate(1.2); }
}
/* MOTION 1 of 4 — the nav settles once the page moves. Set by nav.html. */
.nav[data-scrolled="true"] {
  background: rgba(10, 22, 40, 0.94);
  border-bottom-color: var(--border);
}
.nav[data-open="true"] { background: var(--bg); border-bottom-color: var(--border); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  min-height: var(--nav-h);
}

.nav__menu { display: flex; align-items: center; gap: var(--s4); }

.nav__link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.nav__link:hover { color: var(--text); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--text); }

.nav__link--cta {
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  background: var(--cyan);
  color: var(--cyan-ink);
  font-weight: 600;
  transition: background-color var(--dur) ease, transform var(--dur) ease;
}
.nav__link--cta:hover { background: #22DDFF; color: var(--cyan-ink); }
.nav__link--cta:active { transform: translateY(1px); }

.nav__link--quiet { color: var(--dim); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
}
.nav__toggle svg { display: block; width: 20px; height: 20px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute;
    left: 0; right: 0; top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s2) var(--s3) var(--s4);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .nav[data-open="true"] .nav__menu { display: flex; }
  .nav__link { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--border); }
  .nav__link--cta {
    margin-top: var(--s3);
    padding: 14px 18px;
    justify-content: center;
    text-align: center;
    border-bottom: 0;
  }
  .nav__link--quiet { border-bottom: 0; }
}


/* --------------------------------------------------------------------------
   THE LOCKUP — the flag-"I" wordmark. Geometry is fixed by marketing/brand/
   BRAND_KIT.md: pole width 7 in the 56x100 glyph, flag height .74em, gap
   .04em, "ASMI" and "A" in the surface colour, only the period and the flag
   carry colour. Do not redraw it.

   EXACTLY TWICE PER PAGE: nav + footer. Never a bullet, divider or card icon.
   .lockup--lg exists for /company and og-image.html only — NOT for the Home
   hero, because §12 requires the h1 inside the first 300px of the page.

     <a class="lockup lockup--sm" href="/" aria-label="ASMI.AI home">
       <span class="lockup__word" aria-hidden="true">ASMI<span
         class="lockup__dot">.</span>A<svg class="lockup__flag" viewBox="0 0 56 100"
         aria-hidden="true"><rect x="3" y="0" width="7" height="100" rx="3.5"
         fill="#00D4FF"/><path d="M10 5 L53 24 L10 43 Z" fill="#F97316"/></svg></span>
     </a>
   -------------------------------------------------------------------------- */

.lockup {
  display: inline-block;
  line-height: 1;
  color: var(--text-strong);
}
.lockup:hover { text-decoration: none; }
.lockup--sm { font-size: 22px; }
.lockup--md { font-size: 26px; }
.lockup--lg { font-size: clamp(48px, 7vw, 84px); }

.lockup__word {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: inherit;
}
.lockup__dot { color: var(--cyan); }
.lockup__flag {
  height: 0.74em;
  width: auto;
  vertical-align: baseline;
  margin-left: 0.04em;
}

/* The tagline. Sits under the footer lockup, and under .lockup--lg only.
   Never under the nav lockup — 29 characters will not sit inside a 22px
   wordmark's measure at any tracking. */
.lockup-tagline {
  margin: 10px 0 0;
  font-size: clamp(10px, 1vw, 12px);
  font-weight: 500;
  letter-spacing: var(--ls-tagline);
  text-transform: uppercase;
  color: var(--muted);
  max-width: none;
}
@media (max-width: 400px) { .lockup-tagline { letter-spacing: 0.16em; } }


/* ==========================================================================
   COMPONENT 2 — HERO
   No lockup here. The h1 and one line of proof must sit inside the first
   300px of the page (§12: the distribution surface is a chat preview card).

   MARKUP CONTRACT
     <section class="hero">
       <div class="wrap">
         <p class="pill pill--live"><span class="pill__dot" aria-hidden="true"></span>
            An agentic AI company &#183; Hyderabad, India</p>
         <h1>You don't lose because you're wrong. You lose because you're <em>late</em>.</h1>
         <p class="hero__sub">Thirty-two words. One idea per sentence.</p>
         <div class="cta-row"> ...two .btn... </div>
       </div>
     </section>
   Follow the hero with <section class="section"> holding .stats.
   ========================================================================== */

.hero { padding-block: var(--s7) var(--s6); }

.hero__sub {
  font-size: var(--fs-3);
  line-height: 1.55;
  color: var(--muted);
  max-width: var(--measure);
  margin: 0;
}
.hero__sub strong { color: var(--text); font-weight: 500; }

@media (max-width: 720px) { .hero { padding-block: var(--s5); } }

/* The stats strip belongs to the hero; do not double the gap between them. */
.hero + .section, .hero + .section--tight { padding-top: 0; }


/* ==========================================================================
   COMPONENT 3 — STAT (3-up, mono numerals)
   Three, one unit each. The value is mono; it is NOT cyan (cyan budget).
   A phrase-value ("Usually under a minute") may wrap to two lines — the
   reserved min-height keeps all three labels on one baseline.

   MARKUP CONTRACT
     <ul class="stats">
       <li class="stat">
         <p class="stat__value">Before 7 AM</p><!-- [C-2] -->
         <p class="stat__label">the day's threats, judged, on the phone</p>
       </li>
       ... exactly three ...
     </ul>
   ========================================================================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);   /* explicit. never auto-fit. */
  gap: var(--s5);
  margin: 0;
  padding: var(--s5) 0;
  list-style: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat { margin: 0; max-width: none; }

.stat__value {
  font-family: var(--font-mono);
  font-size: var(--fs-2);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-strong);
  margin: 0 0 var(--s2);
  min-height: 2.24em;                      /* two lines, so labels align */
  max-width: none;
}
.stat__label {
  font-size: var(--fs-5);
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
  max-width: 30ch;
}

@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr; gap: var(--s4); }
  .stat__value { min-height: 0; }
}


/* ==========================================================================
   COMPONENT 4 — CARD (no icon, ever)
   If a card needs a mark, it gets a mono index 01-06. Not an icon square,
   not an emoji, not a glyph. Column counts are EXPLICIT so a third card is
   never orphaned at 1100px.

   MARKUP CONTRACT
     <div class="cards cards--3">              <!-- or cards--2 -->
       <article class="card">
         <p class="card__index">01</p>          <!-- optional -->
         <h3>The answer</h3>
         <p>Forward a claim ... </p>
         <p class="card__meta">verdict &#183; two-line counter &#183; the proof behind it</p>
       </article>
     </div>
   Five items? Use cards--3 and let the last row hold two; do not build an
   equal five-column grid (an equal grid says none of them matters).
   ========================================================================== */

.cards { display: grid; gap: var(--s3); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad-card);
  /* MOTION 2 of 4 — border colour only. No lift, no shadow, no scale. */
  transition: border-color var(--dur) ease;
}
.card:hover { border-color: var(--border-hover); }
.card > :last-child { margin-bottom: 0; }
.card p { max-width: none; color: var(--muted); }
.card p.card__meta, .card p.card__index { color: var(--dim); }

.card__index {
  font-family: var(--font-mono);
  font-size: var(--fs-5);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  margin: 0 0 var(--s2);
}

.card__meta {
  margin: var(--s2) 0 0;
  padding-top: var(--s2);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--fs-5);
  line-height: 1.6;
}

/* A card that holds nothing but a full-bleed DESKTOP render. A phone render
   is only 340px wide, so it belongs in a plain .card with its padding. */
.card--flush { padding: 0; overflow: hidden; }
.card--flush .render__caption { padding: 0 var(--pad-card) var(--pad-card); }

@media (max-width: 980px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .cards--2, .cards--3 { grid-template-columns: 1fr; } }


/* ==========================================================================
   COMPONENT 5 — RENDER (image frame + two-line mono caption + callout)
   Phones are a 1px outline, 28px radius. No notch, no gloss, no tilt, no
   second phone behind. Desktop renders get a plain bar with three dots and
   the host in mono. The bottom 40px fades into the surface so the crop
   reads deliberate, not truncated.

   MARKUP CONTRACT
     <figure class="render render--phone">        <!-- or render--desktop -->
       <div class="render__frame">
         <div class="render__bar" aria-hidden="true">   <!-- desktop only -->
           <i></i><i></i><i></i><span>app.asmi.live</span>
         </div>
         <picture>
           <source srcset="/assets/img/brief.avif" type="image/avif">
           <img src="/assets/img/brief.webp" width="880" height="1173"
                alt="A morning brief: three dated priorities, each with a source tag."
                loading="lazy" decoding="async">
         </picture>
       </div>
       <figcaption class="render__caption">
         <span>Real output &#183; 25 Aug 2026</span>
         <span>names and handles replaced</span>
       </figcaption>
     </figure>
   The hero render on Home is loading="eager" fetchpriority="high"; every
   other render is lazy. One render per section. AVIF + WebP, max 1400px.

   At most ONE callout per render, on the honest bit only. Position it with
   an inline --callout-top; the 1px cyan leader line is drawn for you. Add
   render--annotated to the <figure> so the callout sits beside the frame.
     <p class="render__callout" style="--callout-top: 38%">
       The source tag on every priority.</p>
   Never a red circle. Never a blur or a black bar — anonymise by
   substitution, and keep every date and number.
   ========================================================================== */

.render {
  --render-bg: var(--bg-2);
  position: relative;
  margin: 0;
}
/* A render standing on the page rather than on a card fades into the page. */
.render--bare { --render-bg: var(--bg); }

.render__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-input);
  background: var(--render-bg);
}
.render--phone .render__frame { border-radius: 28px; max-width: 340px; }
.render--desktop .render__frame { border-radius: var(--radius); }

.render__frame img { display: block; width: 100%; }

/* the deliberate crop */
.render__frame::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--render-bg));
  pointer-events: none;
}

.render__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.render__bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-input); }
.render__bar span {
  margin-left: var(--s1);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
}

.render__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--s2);
  font-family: var(--font-mono);
  font-size: var(--fs-5);
  line-height: 1.5;
  color: var(--dim);
}
.render__caption span:first-child { color: var(--muted); }

.render__callout {
  position: relative;
  margin: var(--s2) 0 0;
  padding-left: var(--s4);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 26ch;
}
.render__callout::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 24px;
  height: 1px;
  background: var(--cyan);
}
@media (min-width: 981px) {
  .render--annotated { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--s4); }
  .render--annotated .render__frame { grid-column: 1; grid-row: 1; }
  .render--annotated .render__caption { grid-column: 1; grid-row: 2; }
  .render--annotated .render__callout {
    grid-column: 2; grid-row: 1;
    align-self: start;
    margin-top: var(--callout-top, 32%);
  }
}


/* ==========================================================================
   COMPONENT 6 — RAIL (numbered row, no card chrome)
   For the seven rails on Home and the law map on Trust. A hairline per row
   and a mono index. No background, no radius, no hover.

   MARKUP CONTRACT
     <ol class="rail">
       <li class="rail__row">
         <span class="rail__num" aria-hidden="true">01</span>
         <div class="rail__body">
           <h3>The doctrine engine.</h3>
           <p>It never advises defending a rival ... </p>
         </div>
       </li>
     </ol>
   ========================================================================== */

.rail { list-style: none; margin: 0; padding: 0; }

.rail__row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--s3);
  margin: 0;
  padding: var(--s4) 0;
  border-top: 1px solid var(--border);
  max-width: none;
}
.rail__row:last-child { border-bottom: 1px solid var(--border); }

.rail__num {
  font-family: var(--font-mono);
  font-size: var(--fs-5);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  line-height: 1.9;
  color: var(--dim);
}
.rail__body > :last-child { margin-bottom: 0; }
.rail__body p { color: var(--muted); }

@media (max-width: 620px) {
  .rail__row { grid-template-columns: 1fr; gap: var(--s1); padding: var(--s3) 0; }
  .rail__num { line-height: 1.4; }
}


/* ==========================================================================
   COMPONENT 7 — LOOP (two SVG orientations, swapped by display)
   loop-h.svg is the horizontal spine; loop-v.svg is the same spine turned
   for narrow screens. Never horizontal-scroll the diagram.

   MARKUP CONTRACT — as <img> (simplest; the SVG then uses generic
   serif/monospace, which is legible but not the brand faces):
     <div class="loop">
       <img class="loop__h" src="/assets/loop-h.svg" width="1040" height="206"
            alt="The ASMI Loop: Sense, Judge, Act, Learn. Act is where the
                 client sits; Learn feeds back into Sense.">
       <img class="loop__v" src="/assets/loop-v.svg" width="340" height="470"
            alt="The ASMI Loop: Sense, Judge, Act, Learn. Act is where the
                 client sits; Learn feeds back into Sense.">
     </div>
   A display:none image is dropped from the accessibility tree, so giving
   both the same alt is correct: only the visible one is announced.

   PREFERRED on Home and /platform: paste the two SVG files inline instead
   of using <img>. Inline SVG inherits the page's self-hosted Marcellus and
   JetBrains Mono; an <img> cannot. Keep the same class names on the <svg>,
   and add role="img" plus a <title> child.
   ========================================================================== */

.loop { margin: 0; }
.loop__h, .loop__v { display: block; width: 100%; height: auto; }
.loop__h { max-width: 1040px; }
.loop__v { display: none; max-width: 340px; margin-inline: auto; }

@media (max-width: 720px) {
  .loop__h { display: none; }
  .loop__v { display: block; }
}


/* ==========================================================================
   COMPONENT 8 — PILL (eyebrow and audience only)
   Two uses. Not a tag, not a badge, not a label on a card. Anything else
   that wants a pill wants plain text instead.

   MARKUP CONTRACT
     hero eyebrow (one per page, may carry the pulse dot):
       <p class="pill pill--live"><span class="pill__dot" aria-hidden="true"></span>
          An agentic AI company &#183; Hyderabad, India</p>
     audience row:
       <ul class="pills">
         <li class="pill">Leaders' offices</li>
         <li class="pill">Party organisations</li>
       </ul>
   ========================================================================== */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  margin: 0 0 var(--s3);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  font-size: var(--fs-5);
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
  max-width: none;
}
.pills .pill { margin-bottom: 0; color: var(--text); }

.pill--live {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: var(--cyan-line);
}
.pill__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--live);
  flex: 0 0 auto;
}
/* MOTION 3 of 4 — and it only runs when motion is welcome. */
@media (prefers-reduced-motion: no-preference) {
  .pill__dot { animation: pill-pulse 2.4s ease-in-out infinite; }
}
@keyframes pill-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}


/* ==========================================================================
   COMPONENT 9 — FORM + FOOTER

   FORM MARKUP CONTRACT — posts to the Pages Function at /api/lead (§7.3).
   Wrap it in <div class="card"> so it sits on the one sanctioned surface.
     <form class="form" method="post" action="/api/lead" novalidate>
       <div class="form__grid">
         <p class="field">
           <label class="field__label" for="f-name">Name</label>
           <input class="field__input" id="f-name" name="name" type="text"
                  required autocomplete="name">
         </p>
         ... Role (select) &#183; Organisation &#183; Arena ...
         <p class="field field--full">
           <label class="field__label" for="f-contact">Email or phone</label>
           <input class="field__input" id="f-contact" name="contact" type="text" required>
         </p>
       </div>
       <p class="field--hp" aria-hidden="true">
         <label for="f-company-url">Company URL</label>
         <input id="f-company-url" name="company_url" type="text"
                tabindex="-1" autocomplete="off">
       </p>
       <input type="hidden" name="ts" value="">
       <p class="field__consent">
         <input type="checkbox" id="f-consent" name="consent" required>
         <label for="f-consent">I agree that ... </label>
       </p>
       <button class="btn btn--primary" type="submit">Request a briefing</button>
       <p class="form__note" role="status" aria-live="polite"></p>
     </form>
   field--hp is the honeypot: it stays in the DOM and it stays empty.
   ========================================================================== */

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s3);
  margin-bottom: var(--s3);
}
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; max-width: none; }
.field--full { grid-column: 1 / -1; }
.field--hp {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%);
  margin: -1px; white-space: nowrap;
}

.field__label {
  font-size: var(--fs-5);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  width: 100%;
  padding: 12px 13px;
  background: var(--bg);
  border: 1px solid var(--border-input);   /* 3.41:1 — WCAG 1.4.11 */
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;                          /* 16px stops iOS zoom-on-focus */
  line-height: 1.4;
}
.field__input:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.field__input::placeholder { color: var(--dim); }
select.field__input {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field__consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--s2);
  align-items: start;
  margin: 0 0 var(--s3);
  max-width: var(--measure);
}
.field__consent input {
  width: 18px; height: 18px;
  margin: 3px 0 0;
  accent-color: var(--cyan);
}
.field__consent label { font-size: 14px; line-height: 1.55; color: var(--muted); }

.form__note { margin: var(--s2) 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form__note[data-state="error"] { color: var(--verm); }

@media (max-width: 620px) { .form__grid { grid-template-columns: 1fr; } }


/* --------------------------------------------------------------------------
   FOOTER
   The second and last flag-"I" on the page. No phone number, no channel
   name, no channel deep-link (§7.1). The grievance address is PLAIN TEXT,
   never a mailto: — Cloudflare Email Obfuscation rewrites a mailto into a
   JavaScript-decoded link, and a statutorily-published contact has to be
   readable without JavaScript.

   MARKUP CONTRACT — src/partials/footer.html emits this.
     </main>
     <footer class="footer"> <div class="wrap">
       <div class="footer__top">
         <div class="footer__brand">
           <span class="lockup lockup--md"> ...flag-I... </span>
           <p class="lockup-tagline">Agentic Political Intelligence</p>
           <p class="footer__boiler">ASMI.AI is a product of Ashayam Group, Hyderabad.</p>
         </div>
         <nav class="footer__links" aria-label="Footer"> ...anchors... </nav>
       </div>
       <div class="footer__legal"> ...grievance line, copyright... </div>
     </div> </footer>
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s6) var(--s5);
  color: var(--dim);
  font-size: var(--fs-5);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s5);
  padding-bottom: var(--s5);
}

.footer__brand .lockup { color: var(--text); }
.footer__boiler { margin: var(--s3) 0 0; color: var(--muted); font-size: 14px; max-width: 34ch; }

.footer__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px var(--s4);
  align-content: start;
}
.footer__links a { color: var(--muted); font-size: 14px; }
.footer__links a:hover { color: var(--text); }

.footer__legal {
  border-top: 1px solid var(--border);
  padding-top: var(--s3);
  line-height: 1.7;
}
.footer__legal p { margin: 0 0 4px; max-width: 78ch; }
.footer__legal p:last-child { margin-bottom: 0; }
.footer__legal strong { color: var(--muted); font-weight: 500; }

@media (max-width: 720px) {
  .footer__top { grid-template-columns: 1fr; gap: var(--s4); }
}


/* --------------------------------------------------------------------------
   REDUCED MOTION — the whole budget switches off, and smooth scrolling is
   only ever offered to people who have not asked for stillness.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active, .nav__link--cta:active { transform: none; }
}


/* --------------------------------------------------------------------------
   PRINT — a leader's office prints things. Make it survive.
   -------------------------------------------------------------------------- */

@media print {
  .nav, .skip-link, .cta-row, .form { display: none; }
  body { background: #fff; color: #111; }
  h1, h2, h3 { color: #000; }
  .card { border-color: #ccc; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
