/* ==========================================================================
   Ignix — site system
   Section references (§) point into STYLE.md, which is the authority. Any
   value marked [ours] is a decision made here, not measured from reference.
   ========================================================================== */

:root {
  /* ---- §2 colour. Flat values only. No gradients, no accent colour. ---- */
  --black: #010101;
  --white: #ffffff;
  --sage:  #b0b0a9;   /* reserved: secondary surfaces (see note below) */
  --olive: #565f49;   /* reserved: large panels only                   */
  --dim:   rgba(255,255,255,.56);   /* 6.5:1 on --black — passes AA at 12px */
  --rule:  rgba(176,176,169,.22);   /* [ours] hairline. Decorative only.      */

  /* --sage and --olive are declared but deliberately unused. They are for
     imagery and large panels, and §6 forbids imagery until there is real
     hardware to photograph. White text on --olive is 6.7:1 (safe); white on
     --sage is ~2:1 (NOT safe — sage panels need black text). Noted so the
     first person to reach for them doesn't have to re-derive it. */

  /* ---- §3 type ---- */
  --font: 'Inter Tight', 'Helvetica Now Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  /* Sizes below are MEASURED off the reference at 1440px wide with computed
     styles, not estimated. The earlier scale ran one tier small at every
     level — body at 15px was their *secondary* size, not their body — and had
     nothing at all between 34px and the hero, which is the band that actually
     carries the "reads big" feeling. */
  --t-micro:   12px;    /* measured: 12 / w500 / +0.48px, uppercase        */
  --t-nav:     15px;    /* measured: 15.01 / w400 / -0.144px               */
  --t-body:    18px;    /* measured: 18 / w400 / -0.176px                  */
  --t-small:   15px;    /* measured: their secondary tier (lists, meta)    */
  --t-lead:    24px;    /* measured: 24 / w700 — product & section names   */
  /* The measured figures are taken at 1440px. Held exactly at desktop and
     scaled down below it — 56px on a 390px screen pushes a short page title
     onto three lines and swamps everything under it. */
  --t-head:    clamp(1.75rem, 3.4vw, 2.5rem);   /* 28 -> 40 (measured 40) */
  --t-display: clamp(2rem,    5.4vw, 3.5rem);   /* 32 -> 56 (measured 56) */
  --t-hero:  clamp(2.05rem, 8vw, 5.25rem);

  /* ---- §4 geometry ---- */
  --gutter: clamp(18px, 3vw, 34px);
  --radius: 0;
  --tile-gap: 6px;                      /* the black gutter IS the divider */
  --band: clamp(56px, 10vh, 120px);     /* vertical rhythm between sections */

  /* Stage size. Must stay SQUARE: the 3D fit uses min(W,H), so a non-square
     box letterboxes. Reduced from 72vmin/660px when the hero started leading
     with the oversized lockup — the brand takes the top of the screen now and
     the figure shares it rather than owning it. */
  --plate: min(54vmin, 470px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;              /* svh, not vh: vh is clipped by mobile
                                      browser chrome. Not dvh: that reflows
                                      mid-scroll as the chrome retracts. */
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  letter-spacing: -0.01em;   /* measured -0.176px on their 18px body */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; }

/* There is no accent colour (§2), so a link cannot be distinguished by hue.
   Underline is therefore the DEFAULT for every link, and the exceptions have
   to opt out explicitly — the other way round, any link added outside .prose
   later would silently become invisible as a link. */
a { color: inherit; text-decoration: underline; text-underline-offset: .22em; }

/* Opted out: these carry their own affordance (position, scale, or a hover
   underline) and would be noise with a permanent rule under them. */
.lockup,
.nav a,
.block-link,
.post-row { text-decoration: none; }

/* §4: radius 0 everywhere, no shadows. Separation is black gutter or hairline. */
:focus-visible { outline: 1px solid var(--white); outline-offset: 3px; }

/* ---- §7 the mark, and the lockup ------------------------------------- */

.lockup {
  display: flex;
  align-items: center;
  gap: clamp(.26em, .9vw, .34em);
  font-size: clamp(.95rem, 1.7vw, 1.2rem);
  flex: none;
}
@media (max-width: 420px) { .lockup { gap: .24em; } }

/* The oversized hero lockup. Everything in .lockup is sized in em — the mark
   is .78em, the gap is an em clamp, and the X's stroke-width is tuned to the
   700-weight stem (§7) — so scaling it is purely a font-size change and the
   proportions carry over intact. Do NOT change the wordmark weight here: the
   stroke is matched to 700 and the lockup falls apart at any other weight. */
.lockup--xl { font-size: var(--t-hero); }

.glyph { display: block; width: .78em; height: .78em; flex: none; overflow: visible; }
.glyph line { stroke: var(--white); stroke-width: 17; stroke-linecap: butt; }

.word {
  margin: 0;
  font-size: 1em;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

/* ---- header + primary nav -------------------------------------------- */

.site-head {
  flex: none;
  padding: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;                 /* wraps on narrow screens. No hamburger,
                                      no JS — five short labels fit. */
  gap: .35rem 1.35rem;
  font-size: var(--t-nav);
  font-weight: 400;
  letter-spacing: -0.01em;         /* §3: negative on everything but micro */
}
.nav a { padding: .15em 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: .3em; }

/* Current page is marked by a rule, not a colour change — there is no
   second colour to change to. */
.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: .3em;
  text-decoration-thickness: 1px;
}

/* ---- home: the first screen ------------------------------------------ */

/* .screen is >= one viewport, so the hero reads as a full screen while
   anything after it sits genuinely below the fold. The header keeps its
   natural height and the hero takes the remainder — no magic numbers. */
.screen {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hero {
  flex: 1;
  min-height: 0;
  display: grid;
  /* brand, then the stage taking whatever is left, then the caption row
     pinned to the bottom-left (§4). */
  grid-template-rows: auto 1fr auto;
  padding: 0 var(--gutter) var(--gutter);
}

/* No max-width here. `ch` on this container resolves against the inherited
   15px body size, not the 84px lockup inside it, so any ch cap here is far
   narrower than it looks and squeezes the subtitle into a broken column.
   Constrain the subtitle itself instead. */
.hero-brand { padding-top: clamp(.5rem, 2.5vh, 1.6rem); }
.hero-sub {
  margin: .5em 0 0;
  font-size: var(--t-lead);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--dim);
  max-width: 44ch;          /* measured at 22px, not at the lockup's size */
}

/* Home only. The hero states the brand at full scale, so repeating the
   wordmark in the header directly above it reads as a duplicate rather than
   as chrome. The other five pages keep their header lockup — they have no
   hero to carry the brand. To put it back, delete these two rules. */
.home .site-head { justify-content: flex-end; }
.home .site-head .lockup { display: none; }

.stage { display: grid; place-items: center; min-height: 0; }

/* The plate takes the height the hero has LEFT, capped at --plate, rather
   than demanding --plate outright. With a fixed size it could not give ground
   when the brand block grew (the StoryBrand one-liner and the CTA button
   added ~90px), so the whole screen overflowed and the caption row was
   pushed off the bottom edge.

   aspect-ratio keeps it square, which the 3D fit requires — it uses
   min(W,H) and letterboxes otherwise. */
.plate {
  display: block;
  height: 100%;
  width: auto;
  aspect-ratio: 1 / 1;
  max-height: var(--plate);
  max-width: 100%;
}

/* Two micro-labels, held at opposite ends of one row. Both stay <=11px, the
   only size at which §3 permits uppercase outside the logotype. */
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .4rem 2rem;
}
.hero-foot .micro { display: inline-block; }

/* The platform caption is swapped by script while the plate is dark. */
.label { transition: opacity 260ms ease; }
.label.fade { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .label { transition: none; } }

/* ---- platform schematics (§7a) --------------------------------------- */

/* Animated figures. Shapes are hidden until script measures them with
   getTotalLength() and sets --L, so this class REQUIRES the script. */
.fig { opacity: 0; transition: opacity 420ms ease; }
.fig.on { opacity: 1; }

.fig > *,
.schematic > * {
  fill: none;
  stroke: var(--white);
  /* User units, deliberately. Do NOT add vector-effect: non-scaling-stroke —
     Chrome then computes stroke-dasharray in screen pixels while
     getTotalLength() returns user units, so every shape silently draws only
     ~1/scale of itself. pathLength="1" is equally unreliable on <circle>,
     <rect> and <line>. Keep one coordinate system and measure in script. */
  stroke-width: 0.7;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}
.fig > * { stroke-dashoffset: var(--L, 0); }

/* Static figures. Always fully drawn, never measured, no script. Use these
   anywhere outside the hero — do not reuse .fig, it renders blank without JS. */
.schematic > * { stroke-dashoffset: 0; }

@media (prefers-reduced-motion: no-preference) {
  .fig.on > * { animation: draw 820ms cubic-bezier(.3,.7,.3,1) forwards; }
  /* `from` must be declared explicitly. With fill-mode: forwards and only a
     `to` keyframe, the second cycle starts at 0 and nothing redraws. */
  @keyframes draw {
    from { stroke-dashoffset: var(--L); }
    to   { stroke-dashoffset: 0; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .fig > * { stroke-dashoffset: 0; }
  .fig { transition: none; }
}

/* ---- type scale ------------------------------------------------------- */

/* §3: sentence case, negative tracking, weight 300–500. Never all-caps
   above 12px. */
/* The reference splits weight by KIND, not by size: product and section names
   are 700 ("Roadrunner" at 24, "ArsenalOS" at 56), while editorial headlines
   stay 400 at 32 and 40. Ignix follows that split rather than §3's old flat
   "weight 300-500", which the measurement contradicts. */
/* A clean 56 / 40 / 24 hierarchy, every step a measured value:
     h1  page title        56 / w400   (their biggest non-hero)
     h2  section heading   40 / w400   (their "News & Insights")
     h3  item / product    24 / w700   (their "Roadrunner")
   Section headings must NOT share a size with the items beneath them —
   that was the flat spot in the previous scale. */
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.01em; line-height: 1.1; }
h1 { font-size: var(--t-display); letter-spacing: -0.02em; }
h2 { font-size: var(--t-head); letter-spacing: -0.02em; }   /* measured -0.8px on 40px */
h3 { font-size: var(--t-lead); font-weight: 700; }

/* Section and product names. */
.lead { font-size: var(--t-lead); font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }

/* The one big statement per page. Fills the 40px-to-hero gap. */
.display {
  font-size: var(--t-display);
  font-weight: 400;
  letter-spacing: -0.02em;   /* measured -1.12px on 56px */
  line-height: 1.1;
}

/* The only permitted uppercase besides the logotype, and only at <=11px. */
.micro {
  display: block;
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .04em;           /* positive — the inversion is the system */
  text-transform: uppercase;
  color: var(--dim);
}

.prose { max-width: 72ch; }        /* §3 body measure */
.prose p { margin: 0 0 1.1em; }
/* Headings are margin: 0 globally so they can be positioned by their
   container. Inside prose they need to breathe away from the copy below. */
.prose h1, .prose h2, .prose h3 { margin-bottom: .75em; }
.prose p:last-child { margin-bottom: 0; }
.prose > * + h2, .prose > * + h3 { margin-top: 2em; }

/* ---- bands, pages, footer -------------------------------------------- */

.band { padding: var(--band) var(--gutter); }
.band + .band { padding-top: 0; }

.page { flex: 1; padding: var(--band) var(--gutter) 0; }
.page > * + * { margin-top: var(--band); }

.site-foot {
  flex: none;
  margin-top: auto;                /* holds the footer down on short pages */
  padding: var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem 2rem;
  border-top: 1px solid var(--rule);
}
/* §3: legal is uppercase 12px weight 400 */
.legal {
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dim);
}

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---- blocks ----------------------------------------------------------- */

/* Blocks sit on black, separated by a hairline — not filled panels. §1 says
   show nothing when there is nothing to show, and with no imagery (§6) a
   filled tile would be inventing decoration the system doesn't have. */
.blocks {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
/* Tightened to the same vertical rhythm as the capability rows and the
   software rows below. At band*.55 this opened ~100px between blocks, which
   read as a break in the page rather than as spacing inside one section. */
.block { padding: clamp(1.4rem, 3vh, 2.1rem) 0; border-bottom: 1px solid var(--rule); }
.block > * + * { margin-top: .7rem; }
.block p { margin: 0; max-width: 56ch; color: var(--dim); }
.block a.block-link:hover h3 { text-decoration: underline; text-underline-offset: .25em; }

@media (min-width: 760px) {
  .blocks--2 { grid-template-columns: 1fr 1fr; column-gap: var(--tile-gap); }
  .blocks--2 .block { padding-right: 2rem; }
}

/* ---- pending state ---------------------------------------------------- */

/* State is carried by an explicit "coming soon" label plus a drop to --dim,
   never by colour alone and never by a tinted panel — §8 bans tinted
   near-blacks and §2 allows flat values only. --dim is 6.5:1 on black, so
   this still passes AA at 12px. */
.pending { color: var(--dim); }
.pending h3 { color: var(--dim); }
.pending .schematic > * { stroke: var(--dim); }
.pending { cursor: default; }

.specimens {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--tile-gap);
  margin-top: 1.4rem;
}
.specimen { border: 1px solid var(--rule); padding: 1.1rem; text-align: left; }
.specimen svg { display: block; width: 100%; height: auto; margin-bottom: .9rem; }
.specimen .name { font-size: var(--t-body); font-weight: 700; letter-spacing: -0.01em; }

/* ---- blog list -------------------------------------------------------- */

.posts { border-top: 1px solid var(--rule); }
.post-row { display: block; padding: 1.5rem 0; border-bottom: 1px solid var(--rule); }
.post-row:hover .post-title { text-decoration: underline; text-underline-offset: .25em; }
.post-title { font-size: var(--t-lead); font-weight: 500; letter-spacing: -0.01em; margin: .45rem 0 .35rem; line-height: 1.2; }
.post-row p { margin: 0; color: var(--dim); max-width: 64ch; font-size: var(--t-small); }
.empty { color: var(--dim); padding: 1.5rem 0; border-bottom: 1px solid var(--rule); margin: 0; }

/* ---- FAQ -------------------------------------------------------------- */

/* The rule lives on <dt>, not <dd>. <dd> is capped to a 72ch measure (§3), so
   a border there would stop at the text column while the list's own top rule
   ran full width — the two would not line up. Every rule is full-bleed, which
   is also how .blocks and .site-foot behave. */
.faq { margin: 0; border-bottom: 1px solid var(--rule); }
.faq dt {
  border-top: 1px solid var(--rule);
  font-size: var(--t-lead);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.25;
  padding-top: 1.6rem;
}
.faq dd { margin: .6rem 0 0; padding-bottom: 1.6rem; color: var(--dim); max-width: 72ch; }

/* Specimen schematics render far smaller than the hero plate did, so the
   0.7 user-unit stroke lands sub-pixel. Scaled up to hold its weight. */
.specimen .schematic > * { stroke-width: 1.4; }

/* Inline code. §3 permits ONE family and §8 singles out monospace as the
   thing that reads as generic "tech", so <code> is NOT monospaced here — it
   keeps the body face and is marked by tracking and weight alone. Semantics
   without the stereotype. Worth knowing this is a live constraint: a blog
   about engineering will keep reaching for monospace, and relaxing §3 for
   code spans specifically is a defensible change to make deliberately rather
   than by accident. */
code {
  font-family: inherit;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--white);
}

/* Spacing utilities. The alternative in a buildless site is inline style=
   attributes sprinkled through six files, which also become a problem the
   day a style-src CSP is added (see STYLE.md §6). */
.mt-s { margin-top: .6rem; }
.mt-m { margin-top: 1.1rem; }
.mt-l { margin-top: 1.6rem; }
.mt-xl { margin-top: 2.5rem; }

/* ---- capabilities ----------------------------------------------------- */

/* Name left, description right, hairline between. No 01/02/03 markers: §8
   allows numbered markers only when the content is genuinely a sequence, and
   these five are a set, not steps. */
.caps { border-top: 1px solid var(--rule); }

.cap {
  display: grid;
  gap: .45rem 3rem;
  padding: clamp(1.5rem, 3.4vh, 2.4rem) 0;
  border-bottom: 1px solid var(--rule);
}
.cap h3 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.cap p { margin: 0; color: var(--dim); max-width: 54ch; }

@media (min-width: 880px) {
  .cap {
    /* rem, not ch. `ch` here resolves against the inherited 15px body size,
       not the ~32px the names actually render at, so a ch column is roughly
       a third of the width it appears to ask for and shreds the longer
       names across three lines. */
    grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
    align-items: baseline;
  }
}

/* A section label, not a competing heading: at 12px uppercase it marks the
   section and lets the capability names carry the weight. §3 permits
   uppercase only for the logotype and labels <=11px, so this is the one size
   it can take. Still an <h2> — the outline is unchanged. */
.section-label {
  display: block;
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.4rem;
}

/* A micro-label used as a kicker directly under a heading needs air — the
   headings are line-height 1.1 with no bottom margin by design. */
h1 + .micro, h2 + .micro, h3 + .micro { margin-top: .5rem; }

/* ---- 3D product figures ------------------------------------------------

   EVERY canvas here must be SQUARE. The renderer's fit uses min(W, H), so a
   non-square box letterboxes the model instead of filling the frame —
   `aspect-ratio: 1/1` is load-bearing, not decoration. */

.fig3d { display: block; width: 100%; aspect-ratio: 1 / 1; }

/* Hardware: four platforms, each turning in its own cell. */
.hw {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--tile-gap);
  margin-top: 1.6rem;
}
.hw-item { border: 1px solid var(--rule); padding: 1rem 1rem 1.1rem; }
.hw-item .name {
  display: block;
  margin-top: .5rem;
  font-size: var(--t-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dim);
}

/* The render itself stays at full tone even though the platform is pending.
   Dropping a 3D solid to --dim flattens its shading into mud and makes it
   read as a rendering fault rather than as a pending item; the explicit
   "Coming soon 2027" label carries the state, as §7d requires it to. */

/* Software: a scene beside the capability it demonstrates. */
.sw { border-top: 1px solid var(--rule); margin-top: 1.6rem; }
.sw-item {
  display: grid;
  gap: 1.4rem 3rem;
  padding: clamp(1.8rem, 4vh, 3rem) 0;
  border-bottom: 1px solid var(--rule);
}
.sw-item .fig3d { max-width: 320px; }
.sw-item .body > * + * { margin-top: .6rem; }
.sw-item p { margin: 0; color: var(--dim); max-width: 48ch; }

@media (min-width: 880px) {
  .sw-item { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: center; }
}

/* ---- call to action ---------------------------------------------------

   StoryBrand wants one obvious action, repeated, worded identically every
   time. The site had only inline text links, which is exactly the "no clear
   next step" failure the framework is built to fix.

   Square edges (§4 radius 0), flat values only (§2), and no trailing arrow
   (§8 bans that specifically). Hover inverts rather than lifts or scales,
   which §5 does rule out. */
.cta {
  display: inline-block;
  padding: .85em 1.7em;
  border: 1px solid var(--white);
  font-size: var(--t-nav);
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--white);
  background: none;
}
.cta:hover { background: var(--white); color: var(--black); }

/* ---- the plan ----------------------------------------------------------

   NUMBERED MARKERS ARE CORRECT HERE. §8 bans 01/02/03 "unless the content
   is genuinely a sequence" — a process plan is precisely that carve-out,
   and StoryBrand's plan step depends on the order being visible. Do not
   copy this pattern anywhere the items are a set rather than steps. */
.plan { border-top: 1px solid var(--rule); margin-top: 1.6rem; }
.step {
  display: grid;
  gap: .35rem 2.5rem;
  padding: clamp(1.4rem, 3vh, 2.1rem) 0;
  border-bottom: 1px solid var(--rule);
}
.step .num {
  font-size: var(--t-micro);
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--dim);
}
.step h3 { font-size: var(--t-lead); }
.step p { margin: 0; color: var(--dim); max-width: 52ch; }

@media (min-width: 880px) {
  .step {
    grid-template-columns: 3.5rem minmax(0, 18rem) minmax(0, 1fr);
    align-items: baseline;
  }
}

/* ---- the without / with pair ------------------------------------------

   The stakes and the success side by side. Both canvases must stay square
   (the fit uses min(W,H)), and both scenes are tuned to a similar enclosing
   volume so the two panels render their units at comparable size — if one
   were noticeably smaller the pair would read as "near vs far" rather than
   as uncoordinated vs coordinated. */
.pair { display: grid; gap: 1.6rem var(--tile-gap); margin-top: 1.6rem; }
/* Capped. Without this each panel takes half the page width and
   aspect-ratio makes it that tall too — two 680px squares on a 1440px
   viewport, which pushes everything after them off the screen. */
.pair-item .fig3d { max-width: 420px; }
@media (min-width: 760px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair-item .name {
  display: block;
  margin-top: .6rem;
  font-size: var(--t-lead);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pair-item p { margin: .3rem 0 0; color: var(--dim); max-width: 44ch; }
.pair-item.is-without .name { color: var(--dim); }
