/* ==========================================================================
   Burle Systems — burlesystems.co.uk
   Charcoal + cobalt, IBM Plex Sans + JetBrains Mono.
   Deliberately editorial and asymmetric: hard rules, numbered sections,
   monospace metadata. No gradient text, no glass cards, no floating blobs.
   ========================================================================== */

:root {
  --ink:        #0B0C0E;
  --ink-2:      #16181C;
  --ink-3:      #22252B;
  --charcoal:   #26282B;
  --slate:      #5A616D;
  --slate-2:    #6E7683;  /* 4.6:1 on white — small mono labels must clear AA */
  --muted-dark: #7B8492;  /* 5.2:1 on --ink */
  --line:       #E1E4E9;
  --line-dark:  #2C3037;
  --paper:      #FFFFFF;
  --paper-2:    #F6F7F9;
  --paper-3:    #EEF0F4;
  --cobalt:     #2563EB;
  --cobalt-dk:  #1D4FD7;
  --cobalt-lt:  #7DA5F5;
  --amber:      #F59E0B;

  --wrap: 1240px;
  --gut: 32px;

  --f-sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--cobalt); color: #fff;
  padding: 12px 20px; font-weight: 600;
}
.skip:focus { left: 0; }

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================ header ============================ */

.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.site-head.is-stuck { border-bottom-color: var(--line); }

.head-inner {
  display: flex; align-items: center; gap: 32px;
  height: 74px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  margin-right: auto;
}
.brand-mark {
  width: 11px; height: 11px; background: var(--cobalt);
  display: block; flex: none;
}
.brand-text {
  font-size: 19px; letter-spacing: -0.015em; font-weight: 300; color: var(--slate);
}
.brand-text b { font-weight: 700; color: var(--ink); }
.brand-text.small { font-size: 17px; }

.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--slate); text-decoration: none;
  font-size: 15px; font-weight: 500;
  padding: 6px 0; position: relative;
  transition: color 160ms var(--ease);
}
.nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: var(--cobalt);
  transition: right 220ms var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

/* ============================ buttons ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  background: var(--cobalt); color: #fff;
  font-family: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--cobalt); border-radius: 3px;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}
.btn:hover { background: var(--cobalt-dk); border-color: var(--cobalt-dk); }
.btn:active { transform: translateY(1px); }

.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg {
  min-height: 60px; padding: 0 34px; font-size: 19px;
  font-family: var(--f-mono); font-weight: 500; letter-spacing: -0.02em;
}

.btn-ghost {
  background: transparent; color: var(--charcoal); border-color: var(--line);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--slate-2); color: var(--ink); }

/* ============================ hero ============================ */

.hero { position: relative; background: var(--paper); overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: 48px; align-items: center;
  padding-block: 84px 92px;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--slate-2);
  margin: 0 0 26px;
}

.hero h1 {
  margin: 0;
  /* Capped so the hand-set line breaks never collide with natural wrapping. */
  font-size: clamp(38px, 4.1vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 em {
  font-style: normal;
  color: var(--cobalt);
  /* A drawn underline rather than a gradient — reads as annotation, not decoration. */
  box-shadow: inset 0 -0.09em 0 rgba(37, 99, 235, 0.22);
}

.lede {
  margin: 28px 0 0;
  font-size: 19px; line-height: 1.62;
  color: var(--slate);
  max-width: 46ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 46px 0 0; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-facts > div { padding-right: 20px; border-right: 1px solid var(--line); }
.hero-facts > div + div { padding-left: 24px; }
.hero-facts > div:last-child { border-right: 0; padding-right: 0; }
.hero-facts dt {
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--slate-2);
  margin-bottom: 5px;
}
.hero-facts dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }

/* --- the 3D panel --- */
.hero-viz { position: relative; }
#rack {
  display: block; width: 100%;
  aspect-ratio: 1 / 0.92;
  background:
    radial-gradient(115% 95% at 62% 32%, #1B1E24 0%, #101216 52%, #0B0C0E 100%);
  border-radius: 4px;
  /* Horizontal drags rotate the rack; vertical stays with the page so a
     scrolling thumb is never trapped by the canvas. */
  touch-action: pan-y;
  cursor: grab;
}
#rack:active { cursor: grabbing; }
.viz-caption {
  position: absolute; left: 18px; bottom: 14px;
  margin: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--muted-dark);
}
.viz-caption span { color: var(--cobalt-lt); margin-right: 8px; }

.hero-rule { height: 1px; background: var(--line); }

/* ============================ bands ============================ */

.band { padding-block: 96px; }
.band-tint { background: var(--paper-2); }

.band-dark {
  background: var(--ink);
  color: #C9CFD8;
  /* Faint drafting grid — technical, not decorative. */
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 68px 68px;
}

.section-no {
  font-family: var(--f-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cobalt);
  margin: 0 0 18px;
}
.section-no.light { color: var(--cobalt-lt); }

.section-h {
  margin: 0 0 52px;
  font-size: clamp(30px, 3.9vw, 46px);
  line-height: 1.1; letter-spacing: -0.03em; font-weight: 600;
  color: var(--ink);
}
.band-dark .section-h { color: #fff; }

.band-note {
  margin: 52px 0 0; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 19px; line-height: 1.6; color: var(--slate);
  max-width: 62ch;
}
.band-note.light { border-top-color: var(--line-dark); color: var(--slate-2); }

/* --- problem signs --- */
.signs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.sign { background: var(--paper); padding: 30px 28px 34px; }
.sign-no {
  display: block;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  color: var(--cobalt); letter-spacing: 0.1em; margin-bottom: 14px;
}
.sign p { margin: 0; font-size: 16px; line-height: 1.62; color: var(--slate); }

/* --- builds --- */
.builds {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--line-dark);
}
.build {
  display: grid; grid-template-columns: 84px 1fr; gap: 24px;
  padding: 34px 0;
  border-bottom: 1px solid var(--line-dark);
  transition: background 200ms var(--ease);
}
.build:hover { background: rgba(255,255,255,0.018); }
.build-no {
  font-family: var(--f-mono); font-size: 30px; font-weight: 400;
  color: var(--cobalt); line-height: 1;
}
.build h3 {
  margin: 0 0 10px;
  font-size: 23px; font-weight: 600; letter-spacing: -0.02em; color: #fff;
}
.build p { margin: 0; font-size: 16.5px; line-height: 1.62; color: #A7AFBB; max-width: 68ch; }
.build p + p { margin-top: 13px; }
.build-meta { margin-top: 16px !important; display: flex; flex-wrap: wrap; gap: 7px; }
.build-meta code {
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 500;
  color: var(--cobalt-lt);
  border: 1px solid var(--line-dark);
  padding: 4px 9px; border-radius: 2px;
  background: rgba(37,99,235,0.06);
}

/* --- how --- */
.how-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.how-card { background: var(--paper); padding: 38px 34px 42px; }
.how-card h3 {
  margin: 0 0 12px; font-size: 21px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--ink);
}
.how-card p { margin: 0; font-size: 16.5px; line-height: 1.64; color: var(--slate); }

/* --- proof --- */
.proof-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: 64px; align-items: start;
}
.proof-body { margin: 0 0 18px; font-size: 17.5px; line-height: 1.68; color: var(--slate); max-width: 54ch; }
.proof-list { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--line); }
.proof-list li {
  padding: 15px 0; border-bottom: 1px solid var(--line);
  font-size: 16px; color: var(--slate);
}
.proof-list span {
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink); margin-right: 12px;
}
.proof-fig { margin: 0; }
.proof-fig img { border: 1px solid var(--line); background: #fff; border-radius: 3px; }
.proof-fig figcaption {
  margin-top: 12px;
  font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--slate-2);
}

/* ============================ cta ============================ */

.cta { background: var(--ink); color: #fff; padding-block: 110px; }
.cta-inner { max-width: 780px; }
.cta h2 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.08; letter-spacing: -0.032em; font-weight: 600; color: #fff;
}
.cta-lede { margin: 0 0 40px; font-size: 19px; line-height: 1.62; color: #9AA3B0; max-width: 56ch; }
.cta-fine { margin: 26px 0 0; font-size: 14.5px; color: var(--muted-dark); }

/* ============================ footer ============================ */

.site-foot { background: var(--ink); border-top: 1px solid var(--line-dark); padding-block: 32px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; }
.foot-inner .brand-text { color: var(--muted-dark); margin-right: auto; }
.foot-inner .brand-text b { color: #C9CFD8; }
.foot-note { margin: 0; font-size: 13px; color: var(--muted-dark); }

/* ============================ reveal ============================ */

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ============================ responsive ============================ */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding-block: 60px 72px; }
  .hero-viz { order: 2; }
  #rack { aspect-ratio: 16 / 11; }
  .proof-grid { grid-template-columns: 1fr; gap: 44px; }
  .band { padding-block: 74px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .signs { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --gut: 20px; }
  body { font-size: 16px; }
  .head-inner { height: 64px; gap: 16px; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .lede { font-size: 17px; }
  /* A little taller on a phone — 16/11 left the rack looking cramped. */
  #rack { aspect-ratio: 1 / 0.86; }
  .hero-facts { grid-template-columns: 1fr; gap: 16px; }
  .hero-facts > div {
    padding: 0 0 14px; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .hero-facts > div + div { padding-left: 0; }
  .hero-facts > div:last-child { padding-bottom: 0; border-bottom: 0; }
  .hero-facts dd { font-size: 15px; }
  .build { grid-template-columns: 52px 1fr; gap: 14px; padding: 26px 0; }
  .build-no { font-size: 24px; }
  .build h3 { font-size: 20px; }
  .btn-lg { font-size: 15px; padding: 0 20px; min-height: 54px; width: 100%; }
  .cta { padding-block: 76px; }
  .how-card { padding: 30px 24px 34px; }
  .band-note { font-size: 17px; }
}
