:root {
  --paper: #06101f;
  --paper-2: #09162a;
  --ink: #f3f6fb;
  --ink-2: #c7cdd9;
  --ink-3: #7f8793;
  --rule: rgba(243, 246, 251, 0.18);
  --rule-soft: rgba(243, 246, 251, 0.09);
  --rule-hard: rgba(243, 246, 251, 0.35);
  --blue: #7ec8ff;
  --wood: #e5c6a6;
  --amber: #f3c466;
  --cyan: #64d8ff;
  --shadow: 0 26px 76px rgba(0, 0, 0, 0.45);
  --glow: 0 0 50px rgba(100, 216, 255, 0.22);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
}
body {
  margin: 0;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, canvas, video { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 12px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  transform: translateY(-160%);
  background: var(--blue);
  color: var(--paper);
  padding: 0.75rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(243, 246, 251, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243, 246, 251, 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 52% 42%, black 22rem, transparent 92%);
  -webkit-mask-image: radial-gradient(circle at 52% 42%, black 22rem, transparent 92%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--rule);
  background: rgba(6, 16, 31, 0.75);
  backdrop-filter: blur(18px);
}
.site-header.compact { background: rgba(6, 16, 31, 0.82); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-height: 44px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(100, 216, 255, 0.38);
  border-radius: 14px;
  background: rgba(100, 216, 255, 0.12);
  color: var(--ink);
  font-weight: 900;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  transform: rotate(-4deg);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.95rem; }
.brand small { color: var(--ink-3); font-size: 0.72rem; margin-top: 0.12rem; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 1.1rem);
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}
.nav a:hover { color: var(--ink); background: rgba(243, 246, 251, 0.08); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.62fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(4.4rem, 10vw, 8.1rem) clamp(1.25rem, 5vw, 6rem) clamp(5rem, 9vw, 7rem);
  overflow: hidden;
}
.hero-copy, .spec-panel { position: relative; z-index: 2; }

.eyebrow, .section-kicker {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-block-start: 0; }
h1 {
  max-width: 14ch;
  margin-block-end: 1.3rem;
  font-size: clamp(3.1rem, 7.8vw, 7.6rem);
  line-height: 0.91;
  letter-spacing: -0.052em;
}
h2 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
}
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.06; margin-block-end: 0.7rem; }

.lede {
  max-width: 68ch;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 1.55vw, 1.3rem);
  line-height: 1.56;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }

.button, .ghost-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0.85rem 1.05rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}
.button:hover, .ghost-button:hover { transform: translateY(-2px); }
.button.primary { background: var(--blue); color: #04111d; }
.button.secondary, .ghost-button { border: 1px solid var(--rule); color: var(--ink); background: rgba(243, 246, 251, 0.05); }
.ghost-button { cursor: pointer; font: inherit; font-size: 0.87rem; }
.ghost-button.full { width: 100%; justify-content: center; }

.artifact-rail {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0;
  margin: 1.25rem 0 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.artifact-rail li {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--rule-soft);
  border-radius: 999px;
  background: rgba(243, 246, 251, 0.045);
}

.spec-panel {
  width: min(100%, 430px);
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: rgba(9, 22, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.95rem 1rem;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 0.75rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 14px rgba(100, 216, 255, 0.7); }
.dot.amber { background: var(--amber); }
.panel-bar strong { margin-left: auto; color: var(--ink-2); font-weight: 700; }

.spec-list { padding: 1rem; display: grid; gap: 0.9rem; }
.spec { display: grid; gap: 0.4rem; }
.spec label {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.spec input {
  width: 100%;
  accent-color: var(--cyan);
  background: rgba(243, 246, 251, 0.07);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font: inherit;
}

.section { padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 6rem); }

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.54fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  margin-top: 0.85rem;
  margin-bottom: 2.2rem;
}
.split-heading p { max-width: 68ch; color: var(--ink-2); line-height: 1.65; font-size: 1.02rem; }

.tier-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.4rem;
}
.tier-chip {
  border: 1px solid var(--rule);
  border-radius: 22px;
  background: rgba(243, 246, 251, 0.04);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}
.tier-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.4rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor;
}
.real .tier-dot { background: var(--wood); color: var(--wood); }
.concept .tier-dot { background: var(--amber); color: var(--amber); }
.built .tier-dot { background: var(--cyan); color: var(--cyan); }
.tier-chip strong { display: block; font-size: 1rem; }
.tier-chip small { color: var(--ink-2); font-size: 0.82rem; line-height: 1.45; }

.blueprint-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.sheet {
  border-radius: 22px;
  border: 1px solid var(--rule);
  background: rgba(6, 16, 31, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateZ(0);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease);
}
.sheet:hover { transform: translateY(-3px); border-color: var(--rule-hard); }

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--ink-2);
}
.label {
  display: inline-block;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  font-weight: 800;
  font-family: var(--mono);
  font-size: 0.7rem;
  background: rgba(243, 246, 251, 0.12);
  color: var(--ink);
}
.real-label { background: rgba(229, 198, 166, 0.18); color: #f3ddb8; }
.concept-label { background: rgba(243, 196, 102, 0.18); color: #fbe3a4; }
.built-label { background: rgba(100, 216, 255, 0.15); color: var(--cyan); }

.drawing {
  position: relative;
  min-height: 240px;
  isolation: isolate;
}
.stroke-layer {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--rule-hard) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-hard) 1px, transparent 1px);
  background-size: 18px 18px;
}
.annotation-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 320ms var(--ease);
}
.drawing:not(.render-view) .render-layer,
.drawing.render-view .annotation-layer { display: none; }

.render-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 320ms var(--ease);
}
.render-layer:not(.drawing.render-view) { display: none; }
.dimension {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink);
  background: rgba(4, 12, 26, 0.78);
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--rule);
}
.render-mock {
  width: min(90%, 180px);
  aspect-ratio: 4/3;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(100, 216, 255, 0.18), rgba(126, 200, 255, 0.06)),
    linear-gradient(135deg, rgba(243, 246, 251, 0.1), transparent 38%);
  border: 1px solid var(--rule);
  box-shadow: inset 0 0 40px rgba(100, 216, 255, 0.08);
}

.sheet-body {
  padding: 1rem;
  border-top: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(6, 16, 31, 0.86), rgba(4, 10, 20, 0.92));
}
.sheet-body h3 { margin-block-end: 0.6rem; }
.sheet-body p { color: var(--ink-2); line-height: 1.6; margin: 0; }
.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}
.meta dt { color: var(--ink-3); margin-bottom: 0.15rem; letter-spacing: 0.08em; text-transform: uppercase; }
.meta dd { margin: 0; }

.process {
  background:
    linear-gradient(180deg, rgba(9, 22, 42, 0.72), rgba(6, 16, 31, 0.88));
}
.process-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.process-list li {
  border: 1px dashed var(--rule);
  border-radius: 22px;
  background: rgba(243, 246, 251, 0.04);
  padding: 1rem;
  min-height: 180px;
}
.process-list strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.55rem;
  color: var(--wood);
}
.process-list p { color: var(--ink-2); line-height: 1.55; margin-top: 0; }

.closing {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(280px, 0.54fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  background:
    linear-gradient(180deg, rgba(9, 22, 42, 0.82), rgba(4, 10, 20, 0.92));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.closing p { max-width: 72ch; margin-top: 1rem; color: var(--ink-2); line-height: 1.65; font-size: 1.05rem; }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding: 1.4rem clamp(1.25rem, 5vw, 6rem);
  color: var(--ink-3);
}
.footer p { margin: 0; }
.footer a { color: var(--cyan); text-decoration: none; font-weight: 700; }

.guide-body { background: var(--paper); }
.guide-main { padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 5vw, 6rem); }
.guide-article { width: min(920px, 100%); margin: 0 auto; }
.guide-article h1 { max-width: 12ch; font-size: clamp(3rem, 8vw, 7rem); }
.guide-article section { border-top: 1px dashed var(--rule); padding-top: 2rem; margin-top: 2rem; }
.guide-article code { background: rgba(243, 246, 251, 0.09); color: var(--amber); padding: 0.1rem 0.28rem; border-radius: 6px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
.pass-list { color: var(--ink-2); line-height: 1.65; }

@media (max-width: 980px) {
  .hero, .split-heading, .closing, .process-list, .tier-legend { grid-template-columns: 1fr; }
  .spec-panel { width: 100%; justify-self: stretch; }
  .blueprint-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .hero { padding-top: 3.2rem; }
  h1 { font-size: clamp(2.9rem, 17vw, 4.4rem); }
  .blueprint-grid, .process-list { grid-template-columns: 1fr; }
  .drawing { min-height: unset; }
  .hero-actions .button { width: 100%; }
}

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