/* =========================================================
   WIDE OPEN TECH — Brand Book CSS (ported from brand-book.html)
   Source of truth: wot-marketing/docs/grid-design-system/brand-book.html
   Adapted for Next.js + next/font: --sans / --mono resolve through
   --font-inter-tight / --font-jetbrains-mono CSS vars set by next/font.
   ========================================================= */

:root {
  /* Brand palette (named per kit) */
  --c-blueprint:      #1F4FCF;
  --c-cotta:          #B04725;
  --c-alley:          #142036;
  --c-grass:          #2F7A3E;
  --c-ice:            #5EE3FF;
  --c-paper:          #F2F1EC;
  --c-amber:          #C99A2E;

  --c-ink:            #0B1220;
  --c-paper-2:        #E7E5DD;
  --c-paper-3:        #D6D3C7;
  --c-bone:           #FAF8F2;
  --c-fog:            #9BA3AF;
  --c-alley-2:        #1B2A45;
  --c-alley-3:        #243757;
  --c-cotta-deep:     #8C3819;
  --c-blueprint-deep: #173FA8;

  --fg:        var(--c-ink);
  --fg-2:      #2A3550;
  --fg-3:      #5A6478;
}

/* --sans / --mono live on body (not :root) because the next/font CSS variables
   they reference (--font-inter-tight / --font-jetbrains-mono) are only set on
   body. Defining --sans on :root with an unresolvable var() makes it invalid
   at computed-value time, which empties the value for every descendant. */
body {
  --sans: var(--font-inter-tight, 'Inter Tight'), 'Helvetica Neue', system-ui, sans-serif;
  --mono: var(--font-jetbrains-mono, 'JetBrains Mono'), ui-monospace, Menlo, monospace;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    linear-gradient(rgba(31,79,207,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,79,207,0.045) 1px, transparent 1px);
  background-size: 32px 32px;
}

::selection { background: var(--c-blueprint); color: #fff; }

/* =========================================================
   SECTION CHROME — drafting ticks, title block, eyebrow
   ========================================================= */
.bb-section {
  padding: 88px 64px;
  border-bottom: 2px solid var(--c-alley);
  position: relative;
  background: var(--c-paper);
}
.bb-section.bb-bone { background: var(--c-bone); }
@media (max-width: 1080px) {
  .bb-section { padding: 56px 24px; }
}

/* Drafting border + corner ticks */
.tickbox {
  position: absolute; inset: 14px; border: 1px solid var(--c-alley);
  pointer-events: none; z-index: 0;
}
.tickbox::before, .tickbox::after,
.tickbox > span::before, .tickbox > span::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1.5px solid var(--c-alley); background: var(--c-paper);
}
.tickbox::before { top: -8px; left: -8px; }
.tickbox::after  { top: -8px; right: -8px; }
.tickbox > span::before { bottom: -8px; left: -8px; }
.tickbox > span::after  { bottom: -8px; right: -8px; }
.bb-section > *:not(.tickbox):not(.title-block) { position: relative; z-index: 1; }

/* Title block — engineering drawing convention, top-right */
.title-block {
  position: absolute; top: 24px; right: 34px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .08em;
  color: var(--c-ink); background: var(--c-paper); border: 1.5px solid var(--c-alley);
  padding: 0; display: grid; grid-template-columns: auto auto;
  z-index: 2; text-transform: uppercase; max-width: 170px;
}
.title-block > div {
  padding: 5px 10px; border-right: 1px solid var(--c-alley);
  border-bottom: 1px solid var(--c-alley); white-space: nowrap;
}
.title-block > div:nth-child(2n) { border-right: 0; }
.title-block > div:nth-last-child(-n+2) { border-bottom: 0; }
.title-block strong { color: var(--c-blueprint); font-weight: 700; letter-spacing: .18em; }
@media (max-width: 1080px) { .title-block { display: none; } }

.section-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--fg-3); margin-bottom: 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  min-height: 28px; font-weight: 500;
}
.section-tag .dwg {
  background: var(--c-alley); color: var(--c-paper);
  padding: 3px 8px; letter-spacing: .18em; font-weight: 600;
}
.section-tag .blu { color: var(--c-blueprint); font-weight: 600; }

h1.section-title, h2.section-title {
  font-family: var(--sans); font-weight: 900; letter-spacing: -0.035em;
  line-height: .92; margin: 0 0 20px; color: var(--c-ink);
  max-width: 22ch; text-transform: uppercase;
}
h1.section-title { font-size: clamp(48px, 7vw, 108px); }
h2.section-title { font-size: clamp(38px, 5.4vw, 72px); }
.section-title em { font-style: normal; color: var(--c-blueprint); position: relative; }
.section-title em.cotta { color: var(--c-cotta); }

.section-lede {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(17px, 1.45vw, 21px); line-height: 1.55;
  color: var(--fg-2); max-width: 62ch; margin: 0 0 48px;
}
.section-lede em {
  font-style: normal; color: var(--c-blueprint); font-weight: 500;
  border-bottom: 1px solid var(--c-blueprint);
}
.section-lede em.cotta { color: var(--c-cotta); border-bottom-color: var(--c-cotta); }

/* =========================================================
   COVER / HERO
   ========================================================= */
.bb-hero {
  padding: 0; border-bottom: 2px solid var(--c-alley);
  background: var(--c-bone); position: relative; overflow: hidden;
}
.bb-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(31,79,207,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31,79,207,0.08) 1px, transparent 1px),
    linear-gradient(rgba(11,18,32,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,18,32,0.05) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px, 128px 128px, 128px 128px;
}
.hero-inner { padding: 80px 64px 80px; position: relative; z-index: 1; }
@media (max-width: 1080px) { .hero-inner { padding: 48px 24px 56px; } }

.hero-stamp { display: flex; align-items: center; gap: 18px; margin-bottom: 48px; }
.hero-stamp .seal {
  width: 72px; height: 72px; flex-shrink: 0;
  border: 2px solid var(--c-alley); background: var(--c-paper);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.hero-stamp .seal::after {
  content: ""; position: absolute; inset: -7px;
  border: 1px solid var(--c-alley);
}
.hero-stamp .info {
  font-family: var(--mono); font-size: 11px; color: var(--c-ink);
  letter-spacing: .16em; text-transform: uppercase; line-height: 1.5;
}
.hero-stamp .info strong {
  display: block; font-size: 14px; letter-spacing: .04em;
  color: var(--c-ink); font-weight: 700; text-transform: none;
  font-family: var(--sans);
}

h1.bb-hero-title {
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(56px, 9vw, 148px);
  line-height: .88; letter-spacing: -0.045em;
  margin: 0 0 32px; text-transform: uppercase; color: var(--c-ink);
}
h1.bb-hero-title .sub {
  display: block; color: var(--c-blueprint); position: relative;
}
h1.bb-hero-title .sub::before {
  content: ""; position: absolute; left: 0; top: -14px;
  width: 80px; height: 3px; background: var(--c-blueprint);
}

.bb-hero-lede {
  font-family: var(--sans); font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 400; line-height: 1.5; color: var(--fg-2);
  max-width: 62ch; margin: 0 0 56px;
}
.bb-hero-lede strong { color: var(--c-ink); font-weight: 600; }

.hero-spec {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 2px solid var(--c-alley); border-bottom: 2px solid var(--c-alley);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fg-3); background: var(--c-paper);
}
.hero-spec > div { padding: 18px 18px; border-right: 1px solid var(--c-paper-3); }
.hero-spec > div:last-child { border-right: 0; }
.hero-spec strong {
  display: block; font-family: var(--sans); font-weight: 800;
  font-size: 22px; letter-spacing: -0.02em; color: var(--c-ink);
  text-transform: none; margin-top: 8px; line-height: 1.1;
}
.hero-spec strong em { font-style: normal; color: var(--c-blueprint); }
.hero-spec strong em.cotta { color: var(--c-cotta); }
@media (max-width: 1080px) {
  .hero-spec { grid-template-columns: repeat(2, 1fr); }
  .hero-spec > div { border-bottom: 1px solid var(--c-paper-3); }
  .hero-spec > div:nth-child(2n) { border-right: 0; }
}

/* =========================================================
   NORTHSTAR — bordered field with corner labels
   ========================================================= */
.northstar {
  padding: 32px 36px; border: 2px solid var(--c-alley);
  background: var(--c-bone); margin: 0 0 48px; position: relative;
  max-width: 980px;
}
.northstar::before {
  content: attr(data-dwg); position: absolute; top: -10px; left: 18px;
  background: var(--c-paper); padding: 0 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--c-blueprint); font-weight: 600;
}
.northstar::after {
  content: attr(data-rev); position: absolute; top: -10px; right: 18px;
  background: var(--c-paper); padding: 0 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  color: var(--fg-3);
}
.northstar blockquote {
  margin: 0; font-family: var(--sans); font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px); line-height: 1.32;
  color: var(--c-ink); letter-spacing: -0.015em;
}
.northstar blockquote em {
  font-style: normal; color: var(--c-blueprint);
  border-bottom: 2px solid var(--c-blueprint);
}
.northstar blockquote em.cotta {
  color: var(--c-cotta); border-bottom-color: var(--c-cotta);
}
.northstar cite {
  display: block; margin-top: 18px; font-family: var(--mono);
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--fg-3); font-style: normal;
}

/* =========================================================
   PILLARS — 3-up bordered grid
   ========================================================= */
.pillars {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 2px solid var(--c-alley); background: var(--c-bone);
}
@media (max-width: 1080px) { .pillars { grid-template-columns: 1fr; } }
.pillar {
  padding: 32px 28px; border-right: 1px solid var(--c-alley);
  position: relative; background: var(--c-bone);
}
.pillar:last-child { border-right: 0; }
@media (max-width: 1080px) {
  .pillar { border-right: 0; border-bottom: 1px solid var(--c-alley); }
  .pillar:last-child { border-bottom: 0; }
}
.pillar .num {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em;
  color: var(--c-blueprint); margin-bottom: 14px; display: block;
  font-weight: 600; text-transform: uppercase;
  border-bottom: 1px solid var(--c-alley); padding-bottom: 10px;
}
.pillar h3 {
  font-family: var(--sans); font-weight: 800; font-size: 22px;
  line-height: 1.2; letter-spacing: -0.018em; margin: 0 0 12px;
  color: var(--c-ink); text-transform: uppercase;
}
.pillar p {
  font-size: 14.5px; line-height: 1.6; color: var(--fg-2);
  margin: 0; max-width: 34ch;
}

/* =========================================================
   VOICE GRID (do / don't)
   ========================================================= */
.voice-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 2px solid var(--c-alley); margin-top: 36px; background: var(--c-bone);
}
@media (max-width: 1080px) { .voice-grid { grid-template-columns: 1fr; } }
.voice-col { padding: 24px 28px; }
.voice-col.do { border-right: 1px solid var(--c-alley); }
@media (max-width: 1080px) {
  .voice-col.do { border-right: 0; border-bottom: 1px solid var(--c-alley); }
}
.voice-col h4 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; margin: 0 0 18px;
  display: flex; align-items: center; gap: 10px; font-weight: 600;
  padding-bottom: 12px; border-bottom: 1px solid var(--c-alley);
}
.voice-col.do h4 { color: var(--c-grass); }
.voice-col.dont h4 { color: var(--c-cotta); }
.voice-row {
  padding: 14px 0; border-top: 1px dashed var(--c-paper-3);
  font-size: 14.5px; line-height: 1.5;
}
.voice-row:first-of-type { border-top: 0; padding-top: 0; }
.voice-row .ex {
  font-family: var(--sans); color: var(--c-ink); font-size: 15px;
  line-height: 1.45; margin-bottom: 6px; display: block; font-weight: 500;
}
.voice-row .why {
  font-family: var(--mono); font-size: 10.5px;
  color: var(--fg-3); letter-spacing: .04em;
}
.voice-col.dont .ex {
  color: var(--fg-3); text-decoration: line-through;
  text-decoration-color: var(--c-cotta); text-decoration-thickness: 1.5px;
}

/* =========================================================
   CARDS — bordered grid with blueprint accent strip + stat
   ========================================================= */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 32px; border: 2px solid var(--c-alley);
}
@media (max-width: 1080px) { .cards { grid-template-columns: 1fr; } }
.cards.cards-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .cards.cards-4 { grid-template-columns: 1fr; } }
@media (min-width: 600px) and (max-width: 1080px) { .cards.cards-4 { grid-template-columns: repeat(2, 1fr); } }
.bb-card {
  background: var(--c-bone); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative; border-right: 1px solid var(--c-alley);
}
.bb-card:last-child { border-right: 0; }
@media (max-width: 1080px) {
  .bb-card { border-right: 0; border-bottom: 1px solid var(--c-alley); }
  .bb-card:last-child { border-bottom: 0; }
}
.bb-card::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 32px; height: 4px; background: var(--c-blueprint);
}
.bb-card.cotta::before { background: var(--c-cotta); }
.bb-card .tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--c-blueprint);
  font-weight: 600; padding-top: 6px;
}
.bb-card.cotta .tag { color: var(--c-cotta); }
.bb-card h4 {
  font-family: var(--sans); font-weight: 800; font-size: 20px;
  line-height: 1.2; letter-spacing: -0.018em; margin: 0;
  color: var(--c-ink); text-transform: uppercase;
}
.bb-card p { font-size: 14px; line-height: 1.55; color: var(--fg-2); margin: 0; }
.bb-card .stat {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  color: var(--fg-3); padding-top: 14px;
  border-top: 1.5px solid var(--c-alley); margin-top: auto;
  text-transform: uppercase;
}
.bb-card .stat strong {
  font-family: var(--sans); font-weight: 900; font-size: 30px;
  color: var(--c-ink); letter-spacing: -0.025em; display: block;
  margin-bottom: 2px; line-height: 1; text-transform: none;
}
.bb-card .stat strong em { font-style: normal; color: var(--c-blueprint); }
.bb-card.cotta .stat strong em { color: var(--c-cotta); }

/* =========================================================
   AGENT BLOCK — alley dark with cyan grid overlay
   ========================================================= */
.agent-block {
  background: var(--c-alley); color: var(--c-paper);
  padding: 56px 48px; position: relative; overflow: hidden;
  border: 2px solid var(--c-alley);
}
.agent-block::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(94,227,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,227,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.agent-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
  align-items: start; position: relative; z-index: 1;
}
@media (max-width: 1080px) { .agent-grid { grid-template-columns: 1fr; } }
.agent-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--c-ice); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.agent-tag .dot {
  width: 8px; height: 8px; background: var(--c-ice);
  box-shadow: 0 0 12px var(--c-ice);
  animation: bb-pulse 2.4s ease-in-out infinite;
}
@keyframes bb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.agent-block h2 {
  font-family: var(--sans); font-weight: 900;
  font-size: clamp(36px, 4.6vw, 56px); line-height: .95;
  letter-spacing: -0.03em; margin: 0 0 16px;
  color: var(--c-paper); text-transform: uppercase;
  position: relative; z-index: 1;
}
.agent-block h2 em { font-style: normal; color: var(--c-ice); }
.agent-block h2 em.cotta { color: var(--c-cotta); }
.agent-block p {
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  color: #A8B0C2; max-width: 56ch; margin: 0 0 28px; font-weight: 400;
  position: relative; z-index: 1;
}
.agent-block p strong { color: var(--c-paper); font-weight: 600; }

/* =========================================================
   BUTTONS
   ========================================================= */
.bb-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; font-family: var(--mono); font-weight: 600;
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  border: 2px solid var(--c-alley); background: transparent;
  color: var(--c-ink); cursor: pointer; text-decoration: none;
  transition: all .14s ease; border-radius: 0;
}
.bb-btn:hover { background: var(--c-alley); color: var(--c-paper); }
.bb-btn .arr {
  font-family: var(--mono); font-weight: 600;
  transition: transform .14s ease;
}
.bb-btn:hover .arr { transform: translateX(3px); }
.bb-btn.primary { background: var(--c-alley); color: var(--c-paper); }
.bb-btn.primary:hover {
  background: var(--c-blueprint); color: #fff; border-color: var(--c-blueprint);
}
.bb-btn.blueprint {
  background: var(--c-blueprint); color: #fff; border-color: var(--c-blueprint);
}
.bb-btn.blueprint:hover {
  background: var(--c-blueprint-deep); border-color: var(--c-blueprint-deep);
}
.bb-btn.cotta {
  background: var(--c-cotta); color: #fff; border-color: var(--c-cotta);
}
.bb-btn.cotta:hover {
  background: var(--c-cotta-deep); border-color: var(--c-cotta-deep);
}
.bb-btn.ghost {
  border-color: transparent; padding-left: 0; padding-right: 0;
}
.bb-btn.ghost:hover { background: transparent; color: var(--c-blueprint); }
.bb-btn.paper-outline {
  background: transparent; color: var(--c-paper); border-color: var(--c-paper);
}
.bb-btn.paper-outline:hover {
  background: var(--c-paper); color: var(--c-alley);
}

/* =========================================================
   BADGES
   ========================================================= */
.bb-badge {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; padding: 5px 10px;
  background: var(--c-bone); color: var(--c-ink);
  border: 1.5px solid var(--c-alley); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.bb-badge.blueprint {
  background: var(--c-blueprint); color: #fff; border-color: var(--c-blueprint);
}
.bb-badge.cotta {
  background: var(--c-cotta); color: #fff; border-color: var(--c-cotta);
}
.bb-badge.alley {
  background: var(--c-alley); color: var(--c-paper); border-color: var(--c-alley);
}
.bb-badge.outline-light {
  background: transparent; color: var(--c-paper); border-color: rgba(242,241,236,0.4);
}

/* =========================================================
   NAV STAMP — top-left logo block
   ========================================================= */
.nav-stamp {
  display: flex; align-items: center; gap: 14px;
}
.nav-stamp .nav-seal {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1.5px solid var(--c-alley); background: var(--c-paper);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.nav-stamp .nav-seal::after {
  content: ""; position: absolute; inset: -4px;
  border: 1px solid var(--c-alley);
}
.nav-stamp .nav-info {
  display: flex; flex-direction: column; gap: 2px; line-height: 1;
}
.nav-stamp .nav-name {
  font-family: var(--sans); font-weight: 800; font-size: 15px;
  letter-spacing: -0.01em; color: var(--c-ink); text-transform: uppercase;
}
.nav-stamp .nav-name em { font-style: normal; color: var(--c-blueprint); }
.nav-stamp .nav-sub {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--fg-3); font-weight: 600;
}
@media (max-width: 1024px) {
  .nav-links-desktop, .nav-cta-desktop { display: none !important; }
}
@media (min-width: 1025px) {
  .nav-hamburger { display: none !important; }
}

/* =========================================================
   BOTTOM BAND — footer
   ========================================================= */
.bb-bottom {
  padding: 36px 64px; background: var(--c-bone);
  border-top: 2px solid var(--c-alley);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--fg-3);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 18px; font-weight: 600;
}
.bb-bottom strong { color: var(--c-ink); }
.bb-bottom a { color: var(--fg-3); text-decoration: none; transition: color .14s; }
.bb-bottom a:hover { color: var(--c-blueprint); }
@media (max-width: 1080px) { .bb-bottom { padding: 28px 24px; } }

/* =========================================================
   FAQ — dashed-rule list
   ========================================================= */
.bb-faq { border-top: 2px solid var(--c-alley); }
.bb-faq details {
  border-bottom: 1px dashed var(--c-paper-3);
  padding: 18px 0;
}
.bb-faq summary {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; cursor: pointer; list-style: none;
}
.bb-faq summary::-webkit-details-marker { display: none; }
.bb-faq summary .q {
  font-family: var(--sans); font-weight: 600; font-size: 17px;
  line-height: 1.35; color: var(--c-ink); letter-spacing: -0.005em;
}
.bb-faq summary .plus {
  font-family: var(--mono); font-weight: 600; font-size: 16px;
  color: var(--c-blueprint); transition: transform .14s ease;
}
.bb-faq details[open] summary .plus { transform: rotate(45deg); }
.bb-faq summary .q:hover { color: var(--c-blueprint); }
.bb-faq details > p {
  font-family: var(--sans); font-size: 15px; line-height: 1.6;
  color: var(--fg-2); margin: 14px 0 0; max-width: 64ch;
}

/* =========================================================
   UTILITY
   ========================================================= */
.bb-wrap {
  max-width: 1280px; margin-left: auto; margin-right: auto;
}
hr.bb-rule {
  border: 0; border-top: 2px solid var(--c-alley); margin: 32px 0;
}
.bb-stack-tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--fg-3); font-weight: 600;
  display: inline-block;
}
