/* ==========================================================================
   Telchar Defense — site styles
   Brand Standards v1.4. Values come from assets/brand/telchar-tokens.css,
   which is the client-supplied source of truth. Nothing here invents a colour.

   Governing rule: one flat colour on one flat ground.
   No gradients, bevels, glows or shadows. Nothing rounded except the badge tile.
   ========================================================================== */

/* --- self-hosted Barlow: only the four cuts the type scale uses ----------- */
@font-face{
  font-family:'Barlow'; font-style:normal; font-weight:400; font-display:swap;
  src:url('fonts/barlow-latin-400-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Barlow'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/barlow-latin-500-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Barlow'; font-style:normal; font-weight:600; font-display:swap;
  src:url('fonts/barlow-latin-600-normal.woff2') format('woff2');
}
@font-face{
  font-family:'Barlow Condensed'; font-style:normal; font-weight:500; font-display:swap;
  src:url('fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
}

/* --- brand tokens (mirrors assets/brand/telchar-tokens.css) --------------- */
:root{
  --tc-stone:#0B0B0D;
  --tc-ithildin:#DCE2EB;
  --tc-paper:#F4F3F0;
  --tc-forge:#C2703D;
  --tc-forge-deep:#9A5730;
  --tc-grey-900:#0B0B0D;
  --tc-grey-800:#15161A;
  --tc-grey-700:#212429;
  --tc-grey-600:#31353C;
  --tc-grey-500:#474C55;
  --tc-grey-400:#646A75;
  --tc-grey-300:#878E99;
  --tc-grey-200:#AEB4BE;
  --tc-grey-100:#C8CDD6;
  --tc-grey-050:#DCE2EB;
  --tc-font:'Barlow',system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif;
  --tc-font-data:'Barlow Condensed','Barlow',sans-serif;

  /* roles on Stone — body 050, secondary 200, never below 300 at body size */
  --ground:var(--tc-stone);
  --ink:var(--tc-grey-050);
  --ink-2:var(--tc-grey-200);
  --ink-3:var(--tc-grey-300);
  --rule:var(--tc-grey-700);
  --rule-strong:var(--tc-grey-600);
  --accent:var(--tc-forge);

  --measure:64ch;
  --gutter:clamp(20px,5vw,64px);
  --band:clamp(64px,9vw,132px);
}

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

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

body{
  margin:0;
  background:var(--ground);
  color:var(--ink);
  font-family:var(--tc-font);
  font-size:17px;
  line-height:1.62;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* --- type scale — brand standards p.16, ratios held ---------------------- */
/* Display and H1 may scale up for hero use on wide viewports — ratios held.
   Brand standards p.16. Previously capped far too low for a page this sparse. */
.display{
  font-weight:600;
  font-size:clamp(34px,min(6.6vw,7.4vh),84px);
  line-height:1.04;
  letter-spacing:-.02em;
  margin:0;
  text-wrap:balance;
}
.display-2{
  font-weight:600;
  font-size:clamp(28px,3.9vw,50px);
  line-height:1.08;
  letter-spacing:-.015em;
  margin:0;
  text-wrap:balance;
}
h1,.h1{font-weight:600;font-size:clamp(26px,3.2vw,32px);line-height:1.15;letter-spacing:-.01em;margin:0;text-wrap:balance}
h2,.h2{font-weight:600;font-size:22px;line-height:1.25;letter-spacing:-.005em;margin:0;text-wrap:balance}
h3,.h3{font-weight:500;font-size:17px;line-height:1.35;letter-spacing:0;margin:0}
p{margin:0}
.small{font-size:13px;line-height:1.55;letter-spacing:.005em}
.label{
  font-weight:500;font-size:11px;line-height:1.2;letter-spacing:.14em;
  text-transform:uppercase;
}
.data{font-family:var(--tc-font-data);font-weight:500;font-variant-numeric:tabular-nums}

a{color:var(--accent);text-decoration:none;border-bottom:1px solid transparent}
a:hover{border-bottom-color:var(--accent)}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{
  outline:2px solid var(--accent);outline-offset:3px;
}

/* skip link — keyboard navigable per brief §9 */
.skip{
  position:absolute;left:-9999px;top:0;z-index:99;
  background:var(--tc-grey-800);color:var(--ink);
  padding:12px 18px;border:1px solid var(--rule-strong);
}
.skip:focus{left:var(--gutter);top:12px}

.wrap{max-width:1180px;margin:0 auto;padding-inline:var(--gutter)}

/* --- header -------------------------------------------------------------- */
.masthead{border-bottom:1px solid var(--rule)}
.masthead .wrap{
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding-block:22px;
}
.lockup{display:block;height:30px;width:auto}
.lockup img{display:block;height:100%;width:auto}
.nav{display:flex;align-items:center;gap:clamp(18px,3vw,34px)}
.nav a{
  color:var(--ink-2);border-bottom:0;
  font-weight:500;font-size:11px;letter-spacing:.14em;text-transform:uppercase;
}
.nav a:hover{color:var(--ink)}
.nav a[aria-current="page"]{color:var(--accent)}   /* Forge on the active item only */

/* --- hero ---------------------------------------------------------------- */
/* One idea per screen: the hero owns the first viewport. */
.hero{
  min-height:calc(100svh - 75px);
  display:flex;flex-direction:column;justify-content:center;
  padding-block:clamp(44px,6vw,92px);
}
/* Short Forge rule above the eyebrow — the device from the brand book cover,
   where a Forge hairline sits under the wordmark. Forge stays rare: this and
   the scroll cue are its only appearances in the hero. */
.hero-rule{
  display:block;width:clamp(52px,6vw,88px);height:2px;
  background:var(--accent);transform-origin:left;
  margin-bottom:clamp(14px,1.8vw,22px);
}
.hero .eyebrow{color:var(--ink-3);display:block;margin-bottom:clamp(18px,2.6vw,34px)}

/* headline arrives a line at a time */
.hero-h1 .ln{display:block}

/* scroll cue anchors the lower half of the hero */
/* Decorative only. It was a labelled link to the section below; the label is
   gone, and a link with no accessible name would be an empty link, so this is
   now a plain graphic: the second of the hero's two Forge accents. */
.hero-cue{
  margin-top:clamp(24px,4vh,56px);
  display:block;
}
.hero-cue .cue-line{
  display:block;width:1px;height:clamp(26px,4vh,44px);
  background:var(--accent);transform-origin:top;
}
.hero .display{max-width:16em}
.hero .sub{
  margin-top:clamp(20px,2.6vw,34px);
  max-width:46ch;color:var(--ink-2);
  font-size:clamp(17px,1.5vw,20px);
}

/* --- section furniture --------------------------------------------------- */
/* Rules run edge to edge — architectural, not boxed in. */
.band{padding-block:var(--band);border-top:1px solid var(--rule)}
.band-head{
  position:relative;
  display:flex;align-items:baseline;gap:clamp(16px,2.4vw,30px);
  margin-bottom:clamp(44px,6vw,84px);
  padding-bottom:18px;
}
.band-head::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:var(--rule);transform-origin:left;
}
.band-head .label{color:var(--ink-3)}
.rule-n{
  font-family:var(--tc-font-data);font-weight:500;
  font-size:clamp(28px,3.4vw,44px);line-height:.9;
  letter-spacing:.02em;color:var(--accent);font-variant-numeric:tabular-nums;
}

/* --- the bridge -----------------------------------------------------------
   The brief: "Telchar sits on the bridge between the two. That is the whole
   story the site needs to tell." So the divider IS the story, and the mark —
   whose haft is a vertical stroke — stands on it. This is the one generous
   use of the mark the brand book invites: Ithildin on Stone, never repeated. */
.bridge{display:grid;gap:clamp(40px,5vw,56px)}
.bridge .divider{position:relative;display:grid;place-items:center;align-self:stretch}
/* the rule the mark stands on */
.bridge .divider::before{
  content:"";position:absolute;background:var(--rule);
  left:0;right:0;height:1px;top:50%;
}
/* Generous size, as the brand book invites. Height is set on the SVG itself —
   putting it on the padded container left almost nothing for the drawing. */
/* No background mask: the mark is solid and hides the rule behind it on its
   own. Painting a ground-coloured box here made the compositing layer's edge
   visible as a faint rectangle while the mark was being transformed. */
.bridge .divider .mark{
  position:relative;
  padding:clamp(18px,2.4vw,26px) clamp(22px,3vw,30px);
  display:block;color:var(--tc-ithildin);
}
.bridge .divider .mark svg{
  display:block;width:auto;
  height:clamp(76px,11vw,164px);
  /* The rule runs continuously behind the mark, so the eye follows it in and
     expects it out at the same x. That makes the haft — not the bounding box
     and not the optical centroid — the thing that must sit on the line. The
     haft centre is 9.25 units left of the 62-unit box centre, so nudge right
     by 14.9%. (Brand standards p.06 optical centring is for placing the mark
     in a tile, where there is no line to align to.) */
  transform:translateX(14.9%);
}
@media (min-width:860px){
  /* Top-aligned so both audience headings share a baseline. */
  .bridge{grid-template-columns:1fr auto 1fr;gap:clamp(36px,4.6vw,68px);align-items:start}
  .bridge .divider::before{
    left:50%;right:auto;width:1px;
    top:0;bottom:0;height:auto;transform:translateX(-50%);
  }
  .bridge .divider .mark{
    padding:clamp(24px,3vw,34px) clamp(16px,2vw,24px);
  }
}
/* Separation is the grid gap plus the divider itself — no extra rule needed. */
.side .label{display:block;color:var(--accent);margin-bottom:clamp(16px,2vw,22px)}
.side h2{margin-bottom:clamp(18px,2.2vw,26px)}
.side p{color:var(--ink-2);max-width:44ch;font-size:clamp(16px,1.35vw,18px)}

/* --- how we work --------------------------------------------------------- */
.stack{list-style:none;margin:0;padding:0}
.stack li{
  padding-block:0 clamp(18px,2.2vw,32px);
  margin-top:clamp(14px,1.8vw,26px);
}
.stack li:first-child{margin-top:0}
/* the number is a header; its rule sits under it, the statement below that */
.stack .row-head{position:relative;padding-bottom:clamp(9px,1vw,13px)}
.stack .row-head::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:var(--rule);transform-origin:left;
}
.stack .n{
  display:block;
  font-family:var(--tc-font-data);font-weight:500;
  font-size:clamp(22px,2.6vw,34px);line-height:1;
  color:var(--ink-3);font-variant-numeric:tabular-nums;letter-spacing:.02em;
}
.stack .t{
  margin-top:clamp(13px,1.5vw,20px);
  font-weight:600;font-size:clamp(24px,3.4vw,42px);
  line-height:1.12;letter-spacing:-.012em;color:var(--ink);text-wrap:balance;
  max-width:34ch;
}

/* --- contact ------------------------------------------------------------- */
.contact-grid{display:grid;gap:clamp(36px,5vw,64px)}
@media (min-width:900px){.contact-grid{grid-template-columns:1fr 1.15fr;gap:clamp(48px,6vw,96px)}}
.contact-intro p{color:var(--ink-2);max-width:40ch}
.contact-intro .direct{margin-top:26px}
.contact-intro .direct .label{display:block;color:var(--ink-3);margin-bottom:7px}

.field{display:block;margin-bottom:20px}
.field .label{display:block;color:var(--ink-3);margin-bottom:8px}
.field input,.field textarea{
  width:100%;
  background:var(--tc-grey-800);
  color:var(--ink);
  border:1px solid var(--rule-strong);
  border-radius:0;                       /* nothing rounded except the badge tile */
  padding:12px 14px;
  font-family:var(--tc-font);
  font-size:17px;line-height:1.5;
}
.field textarea{min-height:132px;resize:vertical}
.field input::placeholder,.field textarea::placeholder{color:var(--tc-grey-400)}
.field input:hover,.field textarea:hover{border-color:var(--tc-grey-500)}

/* honeypot — off-screen, never shown, catches naive bots before Turnstile */
.trap{display:none}

.btn{
  appearance:none;cursor:pointer;
  background:var(--accent);color:var(--tc-stone);
  border:1px solid var(--accent);border-radius:0;
  font-family:var(--tc-font);font-weight:600;
  font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  padding:14px 26px;
}
.btn:hover{background:transparent;color:var(--accent)}
.btn[disabled]{opacity:.5;cursor:default}
.btn[disabled]:hover{background:var(--accent);color:var(--tc-stone)}

.form-note{margin-top:16px;color:var(--ink-3)}
.form-status{margin-top:18px;padding:14px 16px;border:1px solid var(--rule-strong);display:none}
.form-status[data-state]{display:block}
.form-status[data-state="ok"]{border-color:var(--tc-grey-500);color:var(--ink)}
.form-status[data-state="error"]{border-color:var(--accent);color:var(--ink)}

/* --- footer -------------------------------------------------------------- */
.foot{border-top:1px solid var(--rule);padding-block:clamp(40px,5vw,64px)}
.foot .wrap{display:flex;flex-wrap:wrap;align-items:center;gap:18px 32px;justify-content:space-between}
.foot .badge{display:block;width:34px;height:34px}
.foot .badge img{display:block;width:100%;height:100%}
.foot .meta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 26px;color:var(--ink-3)}
.foot .meta a{color:var(--ink-2);border-bottom:0}
.foot .meta a:hover{color:var(--accent)}

/* --- compliance page ----------------------------------------------------- */
.doc{padding-block:clamp(56px,8vw,104px) var(--band);max-width:var(--measure)}
.doc .display{margin-bottom:28px}
.doc p{color:var(--ink-2);margin-bottom:20px}
.doc h2{margin:clamp(40px,5vw,60px) 0 18px}
.doc dl{margin:0;border-top:1px solid var(--rule)}
.doc dl > div{
  display:grid;grid-template-columns:1fr;gap:2px;
  padding-block:14px;border-bottom:1px solid var(--rule);
}
@media (min-width:640px){
  .doc dl > div{grid-template-columns:132px 1fr;gap:24px;align-items:baseline}
}
.doc dt{font-weight:500;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3)}
.doc dd{margin:0;color:var(--ink-2)}
.doc dd address{font-style:normal}

/* The DoD poster is a mandated federal document. It cannot be recoloured or
   restyled, so it is presented as a framed official inset — a document ON the
   page rather than part of it. This is the one place foreign colour appears. */
/* The poster must stay legible — DFARS/FAR require display, not decoration —
   so the figure is allowed to break the text measure on wider viewports. */
.poster{margin:32px 0 8px;border:1px solid var(--rule-strong);background:var(--tc-grey-800);padding:clamp(14px,2vw,22px);max-width:none}
@media (min-width:900px){.poster{width:min(760px,100%)}}
.poster img{display:block;width:100%;height:auto;border:1px solid var(--tc-grey-700)}
.poster figcaption{margin-top:14px;color:var(--ink-3);display:flex;flex-wrap:wrap;gap:8px 20px;justify-content:space-between;align-items:baseline}

.todo{
  border:1px dashed var(--accent);padding:14px 16px;margin-bottom:26px;color:var(--ink-2);
}
.todo .label{display:block;color:var(--accent);margin-bottom:6px}

/* --- motion ---------------------------------------------------------------
   Brief §6: "slow and subtle: fades on scroll, nothing that bounces or
   parallaxes." So: fades and rule draws only, long durations, decelerating
   ease with no overshoot. Content is visible by default — only a live script
   opts into the motion, so a blocked or failed script degrades to a plain,
   readable page.                                                            */
:root{
  --ease-out:cubic-bezier(.22,.61,.36,1);   /* decelerate, never overshoot */
  --t-fade:.9s;
  --t-draw:1.15s;
}

.js .reveal{
  opacity:0;transform:translateY(12px);
  transition:opacity var(--t-fade) var(--ease-out) var(--d,0ms),
             transform var(--t-fade) var(--ease-out) var(--d,0ms);
}
.js .reveal.is-in{opacity:1;transform:none}

/* rules draw rather than appear */
.js .band-head::after{
  transform:scaleX(0);
  transition:transform var(--t-draw) var(--ease-out) var(--d,0ms);
}
.js .band-head.is-in::after{transform:scaleX(1)}

/* How we work — each row plays in reading order:
   the number arrives, its rule draws left to right, then the statement.
   Rows are observed individually, so the sequence runs as each is reached. */
.js .stack li .n{
  opacity:0;transform:translateY(8px);
  transition:opacity .55s var(--ease-out) var(--dn,0ms),
             transform .55s var(--ease-out) var(--dn,0ms);
}
.js .stack li.is-in .n{opacity:1;transform:none}

.js .stack li .row-head::after{
  transform:scaleX(0);
  transition:transform var(--t-draw) var(--ease-out) var(--dr,0ms);
}
.js .stack li.is-in .row-head::after{transform:scaleX(1)}

.js .stack li .t{
  opacity:0;transform:translateY(14px);
  transition:opacity var(--t-fade) var(--ease-out) var(--dt,0ms),
             transform var(--t-fade) var(--ease-out) var(--dt,0ms);
}
.js .stack li.is-in .t{opacity:1;transform:none}

/* within-row beats, plus a small nudge per row so they still cascade
   when the whole section lands in view at once */
.js .stack li:nth-child(1){--dn:0ms;   --dr:120ms; --dt:340ms}
.js .stack li:nth-child(2){--dn:90ms;  --dr:210ms; --dt:430ms}
.js .stack li:nth-child(3){--dn:180ms; --dr:300ms; --dt:520ms}

/* The bridge builds itself, and the hammer comes down.
   The rule draws downward first — it is the path — then the mark descends it
   and settles. Decelerating, no rebound, no shake: the brief forbids bounce,
   so this is a controlled fall, not a strike. The two sides follow once it
   has landed. */
.js .bridge .divider::before{
  transform:scaleX(0);transform-origin:left;
  transition:transform .95s var(--ease-out);
}
.js .bridge .divider.is-in::before{transform:scaleX(1)}

.js .bridge .divider .mark{
  opacity:0;
  transform:translateY(calc(-1 * clamp(64px,8vw,124px)));
  transition:opacity .5s var(--ease-out) 200ms,
             transform .8s var(--ease-out) 200ms;
}
.js .bridge .divider.is-in .mark{opacity:1;transform:none}

@media (min-width:860px){
  .js .bridge .divider::before{transform:scaleY(0);transform-origin:top}
  .js .bridge .divider.is-in::before{transform:scaleY(1)}
}

/* hero: Forge rule draws, eyebrow, headline line by line, sub-line, cue */
.js .hero-rule{transform:scaleX(0);transition:transform var(--t-draw) var(--ease-out)}
.js .hero-rule.is-in{transform:scaleX(1)}

.js .hero-h1.split .ln > span{
  display:block;opacity:0;transform:translateY(.3em);
  transition:opacity .85s var(--ease-out) var(--d,0ms),
             transform .85s var(--ease-out) var(--d,0ms);
}
.js .hero-h1.split.is-in .ln > span{opacity:1;transform:none}
/* one beat per line — nth-child rather than inline styles, so the CSP stays strict */
.js .hero-h1.split .ln:nth-child(1) > span{--d:240ms}
.js .hero-h1.split .ln:nth-child(2) > span{--d:330ms}
.js .hero-h1.split .ln:nth-child(3) > span{--d:420ms}
.js .hero-h1.split .ln:nth-child(4) > span{--d:510ms}
.js .hero-h1.split .ln:nth-child(5) > span{--d:600ms}
.js .hero-h1.split .ln:nth-child(6) > span{--d:690ms}
.js .hero-h1.split .ln:nth-child(7) > span{--d:780ms}
.js .hero-h1.split .ln:nth-child(8) > span{--d:870ms}

.js .hero-cue .cue-line{transform:scaleY(0);transition:transform var(--t-draw) var(--ease-out) 260ms}
.js .hero-cue.is-in .cue-line{transform:scaleY(1)}

/* stagger — order of arrival, not decoration */
.js .hero .eyebrow{--d:120ms}
.js .hero .sub{--d:900ms}
.js .hero-cue{--d:1050ms}
.js .bridge .side:first-child{--d:1000ms}
.js .bridge .side:last-child{--d:1140ms}
.js .contact-grid > *:first-child{--d:0ms}
.js .contact-grid > *:last-child{--d:160ms}
@media (prefers-reduced-motion:reduce){
  .js .reveal{opacity:1;transform:none}
  .js .band-head::after,.js .stack .row-head::after,.js .bridge .divider::before{transform:none!important}
  .js .stack li .n,.js .stack li .t{opacity:1;transform:none}
  .js .hero-rule,.js .hero-cue .cue-line{transform:none!important}
  .js .hero-h1.split .ln > span{opacity:1;transform:none}
  .js .bridge .divider .mark{opacity:1;transform:none!important}
  *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
html{scroll-behavior:smooth}

/* --- print --------------------------------------------------------------- */
@media print{
  body{background:#fff;color:#000}
  .masthead,.foot,.nav,form{display:none}
  .poster{border:0;padding:0;background:none}
}

/* --- small utilities (so no inline style is needed and the CSP stays strict) */
.mt{margin-top:26px}
.muted{color:var(--ink-3)}
