/* ============================================================
   PHOSPHORWORKS — phosphorworks.com
   System: industrial workbench + phosphor signal
   (Direction 02 "Workbench / Steel" + live signal from 01 & 03)
   Recommended in the brand exploration handoff.
   ============================================================ */

:root {
  /* base / surfaces */
  --black:      #0A0B0A;
  --ink:        #0E100E;
  --charcoal:   #151814;
  --graphite:   #1D211D;
  --steel:      #2A2F2B;
  --steel-2:    #3A413B;
  --hairline:   #2C322D;

  /* signal (status language) */
  --phosphor:      #74F24A;            /* live */
  --phosphor-d:    #3BC468;
  --phosphor-glow: rgba(116,242,74,0.55);

  /* secondary accents */
  --amber:     #F2A93B;                /* action / warmth */
  --rust:      #C65B3A;                /* warnings only */
  --steelblue: #7C97A8;                /* notes / on-the-bench */

  /* paper / type */
  --bone:      #ECE7D9;
  --bone-dim:  #B6B3A6;
  --mute:      #8B9088;                /* nudged up slightly from the doc for AA contrast on black */

  /* type families */
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --mono:    "JetBrains Mono", "SFMono-Regular", ui-monospace, monospace;

  --maxw: 1180px;
  --gut:  clamp(20px, 5vw, 64px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--bone);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* honor smooth-scroll & motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

img, svg { display: block; max-width: 100%; }

/* ---- accessibility helpers ------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: 200;
  background: var(--phosphor); color: #07140a;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 10px 16px; text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

a { color: var(--phosphor); }

/* visible keyboard focus everywhere */
:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
}

/* ---- global texture: scanline + vignette ----------------- */
.veil { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.veil::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.016) 0px,
    rgba(255,255,255,0.016) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay; opacity: 0.5;
}
.veil::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% -10%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* blueprint grid */
.grid-bg {
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* ---- layout ---------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
section { position: relative; }
.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ---- mono labels / kickers ------------------------------- */
.kick {
  font-family: var(--mono); font-size: 12px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--phosphor);
  display: inline-flex; align-items: center; gap: 9px; margin: 0;
}
.kick::before {
  content: ""; width: 7px; height: 7px; flex: none;
  background: var(--phosphor);
}
.kick.amber { color: var(--amber); }
.kick.amber::before { background: var(--amber); }

.mono { font-family: var(--mono); }
.tiny {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mute);
}

/* ---- type scale ------------------------------------------ */
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 0.98; letter-spacing: -0.02em; }
.h-sec {
  font-size: clamp(30px, 5vw, 56px); font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.03em; line-height: 0.92;
}
.lede {
  font-size: clamp(18px, 2.2vw, 23px); color: var(--bone-dim);
  line-height: 1.5; max-width: 62ch; font-weight: 500;
}
p { text-wrap: pretty; }
.green { color: var(--phosphor); }
.amber { color: var(--amber); }
.dim   { color: var(--bone-dim); }

/* ---- top nav --------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gut);
  background: rgba(10,11,10,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.brand-mark { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.glyph {
  width: 26px; height: 26px; flex: none;
  border: 1.5px solid var(--phosphor); position: relative;
  display: grid; place-items: center;
}
.glyph::after {
  content: ""; width: 8px; height: 8px;
  background: var(--phosphor);
}
.brand-name { font-family: var(--mono); font-weight: 700; letter-spacing: .18em; font-size: 13px; color: var(--bone); }

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mute); text-decoration: none; transition: color .18s;
}
.nav-links a:hover { color: var(--phosphor); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* hamburger — hidden on desktop */
.nav-toggle {
  display: none; width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--steel-2);
  cursor: pointer; padding: 0; place-items: center; gap: 5px;
  flex-direction: column;
}
.nav-toggle-bar { display: block; width: 18px; height: 2px; background: var(--bone); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child  { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(10,11,10,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hairline);
    padding: 8px var(--gut) 16px;
    /* collapsed by default on mobile */
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 13px 0; font-size: 14px; border-bottom: 1px solid var(--hairline); }
  .nav-links a:last-child { border-bottom: 0; }
}

/* on phones, compact the nav CTA to "ACCESS →" so it stays on one line */
@media (max-width: 480px) {
  .cta-word { display: none; }
}

/* ---- buttons --------------------------------------------- */
.btn {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 700;
  padding: 13px 22px; border: 1px solid var(--phosphor);
  cursor: pointer; background: transparent; color: var(--phosphor);
  transition: background .18s, color .18s, box-shadow .18s, transform .18s, border-color .18s;
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  min-height: 44px;  /* touch target */
  white-space: nowrap;
}
.btn:hover { background: var(--phosphor); color: #07140a; box-shadow: 0 0 24px var(--phosphor-glow); }
.btn.solid { background: var(--phosphor); color: #07140a; }
.btn.solid:hover { box-shadow: 0 0 30px var(--phosphor-glow); transform: translateY(-1px); }
.btn.amber { border-color: var(--amber); color: var(--amber); }
.btn.amber:hover { background: var(--amber); color: #1a1206; box-shadow: 0 0 24px rgba(242,169,59,.4); }
.btn.ghost { border-color: var(--steel-2); color: var(--bone-dim); }
.btn.ghost:hover { border-color: var(--bone-dim); background: transparent; color: var(--bone); box-shadow: none; }
.btn-sm { padding: 10px 15px; font-size: 11.5px; min-height: 40px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- section header pattern ------------------------------ */
.sec-pad { padding: clamp(64px, 11vh, 116px) 0; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 38px; flex-wrap: wrap; }
.sec-head .num { font-family: var(--mono); color: var(--mute); font-size: 14px; font-weight: 700; }
.sec-aside { margin-left: auto; }

/* ============ 01 · HERO =================================== */
.hero { padding: clamp(70px, 13vh, 140px) 0 64px; position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }
.scan-sweep {
  position: absolute; left: 0; right: 0; height: 2px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
  opacity: .35; filter: blur(.4px);
  animation: sweep 9s linear infinite;
}
@keyframes sweep { 0% { top: 12%; } 50% { top: 82%; } 100% { top: 12%; } }
@media (prefers-reduced-motion: reduce) { .scan-sweep { display: none; } }

.eyebrow { margin-bottom: 26px; }
.hero-title {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(44px, 8.5vw, 118px); line-height: 0.86;
  letter-spacing: -0.04em; text-transform: uppercase;
}
.hero-title .stroke { color: transparent; -webkit-text-stroke: 1.5px var(--steel-2); }
.hero-sub { margin-top: 28px; max-width: 56ch; }
.hero-cta { margin-top: 32px; }

.hero-signal { margin-top: 56px; border-top: 1px solid var(--hairline); padding-top: 22px; }
.signal-trace { width: 100%; height: 70px; }
.signal-trace #trace-path { filter: drop-shadow(0 0 8px rgba(116,242,74,.6)); }

.bench-ticker {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em; color: var(--bone-dim);
}
.bench-ticker li { display: inline-flex; align-items: center; gap: 9px; }
.bench-ticker .st { color: var(--mute); text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; }

/* status dots (shared) */
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mute); flex: none; }
.is-live .dot { background: var(--phosphor); }
.is-val  .dot { background: var(--amber); }
.is-lab  .dot { background: var(--steelblue); }
/* the one earned live signal: only actual product cards pulse + glow */
.pcard.is-live .dot { box-shadow: 0 0 10px var(--phosphor-glow); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .32; } }

/* ============ 02 · WHAT WE BUILD ========================== */
.lanes {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
}
@media (max-width: 880px) { .lanes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .lanes { grid-template-columns: 1fr; } }
.lane { background: var(--ink); padding: 28px clamp(20px, 2.4vw, 28px); }
.lane-i { font-family: var(--mono); font-size: 12px; color: var(--phosphor); letter-spacing: .16em; }
.lane h3 {
  font-size: 19px; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
  margin: 14px 0 10px; line-height: 1.05;
}
.lane p { margin: 0; color: var(--bone-dim); font-size: 14.5px; line-height: 1.5; }

/* ============ 03 · PRODUCTS =============================== */
.products-lede { margin-bottom: 30px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }

.pcard {
  border: 1px solid var(--hairline); background: var(--ink);
  padding: 26px clamp(22px, 2.6vw, 30px); position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.pcard::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--steel-2); transition: background .2s, box-shadow .2s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--steel-2); }
.pcard.is-live:hover::before { background: var(--phosphor); box-shadow: 0 0 18px var(--phosphor-glow); }
.pcard.is-val:hover::before  { background: var(--amber); }

.pcard .status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mute);
}
.pcard.is-live .status { color: var(--phosphor); }
.pcard.is-val  .status { color: var(--amber); }

.pcard h3 { font-size: clamp(24px, 3vw, 30px); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; margin: 16px 0 10px; }
.pcard p { margin: 0; color: var(--bone-dim); font-size: 15px; line-height: 1.55; }

.pcard-foot {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em;
}
.meta-tag { color: var(--mute); text-transform: uppercase; }
.card-cta {
  color: var(--bone-dim); text-decoration: none; text-transform: uppercase;
  letter-spacing: .1em; transition: color .18s; display: inline-flex; gap: 7px; align-items: center;
}
.pcard.is-live .card-cta:hover { color: var(--phosphor); }
.pcard.is-val  .card-cta:hover { color: var(--amber); }
/* EulogyDraft: keep it calm — softer hover, no green push */
.pcard.is-gentle .card-cta:hover { color: var(--bone); }
.pcard.is-gentle:hover::before { background: var(--steelblue); box-shadow: none; }

/* ============ 04 · PRINCIPLES ============================= */
.principles {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--hairline);
}
.principles li {
  display: grid; grid-template-columns: 88px 1fr; gap: clamp(14px, 3vw, 40px);
  align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--hairline);
}
@media (max-width: 560px) { .principles li { grid-template-columns: 54px 1fr; gap: 16px; padding: 22px 0; } }
.p-num {
  font-family: var(--mono); font-weight: 700; color: var(--phosphor);
  font-size: clamp(22px, 4vw, 40px); letter-spacing: -.02em;
}
.p-body h3 { font-size: clamp(20px, 3vw, 30px); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; }
.p-body p { margin: 9px 0 0; color: var(--bone-dim); font-size: 15.5px; max-width: 60ch; }

/* ============ 05 · LAB / BENCH ============================ */
.lab-lede { margin-bottom: 28px; }
.bench { border: 1px dashed var(--steel-2); background: var(--ink); }
.bench-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 17px clamp(18px, 2.5vw, 26px); border-bottom: 1px dashed var(--steel-2);
}
.bench-row:last-child { border-bottom: 0; }
.bench-mark { color: var(--steelblue); font-family: var(--mono); flex: none; }
.bench-name { color: var(--bone-dim); font-size: 15px; flex: 1 1 auto; min-width: 0; }
.bench-state {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--steelblue); border: 1px solid var(--hairline); padding: 4px 10px; flex: none;
}

/* ============ 06 · ABOUT ================================== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-lead {
  font-size: clamp(26px, 4vw, 44px); font-weight: 800; line-height: 1.08;
  letter-spacing: -.02em; margin: 0; color: var(--bone);
}
.link-amber { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(242,169,59,.35); transition: border-color .18s; }
.link-amber:hover { border-color: var(--amber); }
.about-body p { margin: 0 0 16px; color: var(--bone-dim); font-size: 16.5px; }
.about-body p:last-child { margin-bottom: 0; }
.link-arrow { color: var(--phosphor); text-decoration: none; font-family: var(--mono); font-size: 14px; letter-spacing: .04em; }
.link-arrow:hover { text-shadow: 0 0 16px var(--phosphor-glow); }
.about-link { margin-top: 22px; }

/* ============ 07 · CONTACT ================================ */
.contact-card {
  border: 1px solid var(--steel-2);
  background: radial-gradient(120% 120% at 0% 0%, rgba(242,169,59,.06), transparent 55%), var(--ink);
  padding: clamp(30px, 5vw, 64px);
}
.console-kick { margin-bottom: 22px; }
.contact-title {
  font-size: clamp(32px, 5.5vw, 62px); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.03em; line-height: .9;
}
.amber-line { color: var(--amber); }
.contact-sub { margin: 22px 0 0; color: var(--bone-dim); font-size: clamp(16px, 2vw, 19px); max-width: 60ch; }

.console {
  margin: 30px 0 26px; display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--black); border: 1px solid var(--steel-2);
  padding: 14px 18px; font-family: var(--mono); font-size: clamp(15px, 2.4vw, 19px);
}
.console-label { color: var(--mute); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.console-value { color: var(--bone); display: inline-flex; align-items: center; }
.console-cursor {
  display: inline-block; width: 9px; height: 1.1em; margin-left: 4px;
  background: var(--phosphor); box-shadow: 0 0 10px var(--phosphor-glow);
  animation: blink 1.1s steps(1) infinite; vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ 08 · FOOTER ================================= */
.site-foot { border-top: 1px solid var(--hairline); padding: clamp(48px, 8vh, 88px) 0 40px; position: relative; overflow: hidden; }
.foot-word {
  font-weight: 900; font-size: clamp(56px, 16vw, 220px); text-transform: uppercase;
  letter-spacing: -.05em; line-height: .8; color: var(--graphite);
  overflow-wrap: anywhere; margin-bottom: 36px;
}
.foot-word b { color: var(--phosphor); opacity: .28; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 40px 56px; }
.foot-col { display: flex; flex-direction: column; }
.foot-ch { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 0 0 14px; }
.foot-col a { color: var(--bone-dim); text-decoration: none; font-size: 14.5px; line-height: 1; padding: 7px 0; transition: color .18s; }
.foot-col a:hover { color: var(--phosphor); }
.legend { display: flex; align-items: center; gap: 9px; margin: 0 0 11px; color: var(--bone-dim); font-size: 14px; }

.foot-base {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 12.5px; color: var(--mute); letter-spacing: .04em;
}
.foot-base a { color: var(--bone-dim); text-decoration: none; border-bottom: 1px solid var(--hairline); }
.foot-base a:hover { color: var(--phosphor); border-color: var(--phosphor); }
.foot-base p { margin: 0; }
