:root {
  --bone: #F4EBD8;
  --paper: #EDE1C9;
  --ink: #0D1B2A;
  --ink-soft: #2A3A4D;
  --terracotta: #C85A2E;
  --terracotta-deep: #9F3F1A;
  --sage: #7A8471;
  --pool: #7FB8B4;
  --rule: #C9BCA1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

section, header { scroll-margin-top: 90px; }

body {
  background: var(--bone);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  animation: pageFade 0.45s ease;
}

@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

::selection { background: var(--terracotta); color: var(--bone); }

h1, h2, h3, h4 {
  font-family: 'Fraunces', 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Lane line motif */
.lane-line {
  position: fixed;
  right: 32px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(to bottom,
    var(--rule) 0,
    var(--rule) 20px,
    transparent 20px,
    transparent 32px);
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 900px) {
  .lane-line { right: 16px; }
}

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 24px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(244, 235, 216, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

nav.scrolled { border-bottom-color: var(--rule); }

.logo {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.logo-num { color: var(--terracotta); font-style: italic; }

.nav-cta {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-cta:hover { background: var(--ink); color: var(--bone); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.nav-link:hover { color: var(--terracotta); }

.nav-link.active { color: var(--terracotta); }

.nav-cta { margin-left: 12px; }

.caret {
  font-size: 10px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-item { position: relative; }

.nav-item.open .caret { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 230px;
  background: var(--bone);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 6px 6px 0 rgba(13, 27, 42, 0.08);
  padding: 8px 0;
  display: none;
  z-index: 200;
}

.nav-item.open .dropdown { display: block; }

@media (hover: hover) and (min-width: 901px) {
  .nav-item:hover .dropdown { display: block; }
}

.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.dropdown a:hover { color: var(--terracotta); background: var(--paper); }

.dropdown .drop-head {
  display: block;
  padding: 10px 20px 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--terracotta);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 300;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(320px, 85vw);
    background: var(--bone);
    border-left: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    padding: 96px 32px 32px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -12px 0 40px rgba(13, 27, 42, 0.12);
  }

  body.menu-open .nav-menu { transform: translateX(0); }

  .nav-item { width: 100%; }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--rule);
  }

  .dropdown {
    position: static;
    min-width: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 0 8px 16px;
  }

  .dropdown a { padding: 10px 0; }

  .nav-cta { margin: 24px 0 0; text-align: center; }
}

@media (max-width: 700px) {
  nav { padding: 18px 24px; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

@media (max-width: 700px) {
  .container { padding: 0 24px; }
}

/* HERO (home) */
.hero {
  padding: 180px 0 120px;
  position: relative;
}

/* Page hero (sub-pages) */
.page-hero {
  padding: 170px 0 60px;
}

.hero-super {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--terracotta);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-super::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--terracotta);
}

.hero h1, .page-hero h1 {
  font-size: clamp(48px, 8vw, 128px);
  line-height: 0.92;
  margin-bottom: 40px;
  max-width: 14ch;
  letter-spacing: -0.03em;
}

.page-hero h1 {
  font-size: clamp(40px, 6vw, 92px);
  margin-bottom: 32px;
}

.hero h1 em, .page-hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--terracotta);
}

.hero-body {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.5;
  max-width: 58ch;
  color: var(--ink-soft);
  margin-bottom: 56px;
}

.page-hero .hero-body { margin-bottom: 0; }

.hero-form {
  display: flex;
  max-width: 520px;
  gap: 0;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0;
  position: relative;
}

.hero-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 16px 4px;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  color: var(--ink);
  outline: none;
}

.hero-form input::placeholder { color: var(--ink-soft); opacity: 0.55; }

.hero-form button {
  border: none;
  background: transparent;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
  cursor: pointer;
  padding: 16px 8px 16px 24px;
  transition: color 0.2s ease;
}

.hero-form button:hover { color: var(--terracotta); }

.form-msg {
  margin-top: 16px;
  font-size: 14px;
  color: var(--sage);
  min-height: 20px;
  font-family: 'JetBrains Mono', monospace;
}

.form-msg.success { color: var(--terracotta-deep); }

/* Section scaffolding */
section {
  padding: 110px 0;
  position: relative;
}

.section-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: var(--terracotta);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.section-num::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--terracotta);
}

.section-title {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1;
  margin-bottom: 56px;
  max-width: 18ch;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--terracotta);
}

.divider {
  height: 1px;
  background: var(--rule);
  margin: 0 48px;
}

@media (max-width: 700px) {
  section { padding: 80px 0; }
  .divider { margin: 0 24px; }
}

/* Problem / lede layout */
.problem-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.problem-lede {
  font-family: 'Fraunces', serif;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.3;
  color: var(--ink);
  font-weight: 300;
}

.problem-lede strong { font-weight: 500; color: var(--terracotta-deep); }

.problem-copy {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.problem-copy p + p { margin-top: 20px; }

@media (max-width: 900px) {
  .problem-body { grid-template-columns: 1fr; gap: 48px; }
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--rule);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.step {
  background: var(--bone);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  min-height: 400px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

a.step:hover { background: var(--paper); }

a.step:hover .step-go { color: var(--terracotta); transform: translateX(4px); }

.step-num {
  font-family: 'Fraunces', serif;
  font-size: 96px;
  line-height: 0.85;
  color: var(--terracotta);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.05em;
}

.step h3 {
  font-size: 28px;
  line-height: 1.15;
  margin-top: auto;
  letter-spacing: -0.02em;
}

.step p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.step-go {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  transition: color 0.2s ease, transform 0.2s ease;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .step { min-height: auto; padding: 40px 32px; }
}

/* Score card */
.score-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.score-text p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.score-text p + p { margin-top: 20px; }

.score-card {
  background: var(--ink);
  color: var(--bone);
  padding: 40px;
  border-radius: 2px;
  position: relative;
  box-shadow: 12px 12px 0 var(--terracotta);
  overflow: hidden;
}

.score-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--pool) 0%, transparent 70%);
  opacity: 0.3;
}

.score-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(244, 235, 216, 0.15);
}

.score-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pool);
}

.score-card-tier {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(244, 235, 216, 0.7);
}

.score-big {
  font-family: 'Fraunces', serif;
  font-size: 96px;
  line-height: 1;
  font-weight: 300;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.score-big .slash {
  color: rgba(244, 235, 216, 0.3);
  font-size: 48px;
  margin: 0 12px;
}

.score-big .max {
  font-size: 48px;
  color: rgba(244, 235, 216, 0.5);
}

.score-caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--pool);
  margin-bottom: 32px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.score-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.score-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 16px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.score-bar-label {
  color: rgba(244, 235, 216, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.score-bar-track {
  height: 6px;
  background: rgba(244, 235, 216, 0.12);
  position: relative;
  overflow: hidden;
}

.score-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--terracotta);
  transform-origin: left;
}

.score-bar-value {
  text-align: right;
  color: var(--bone);
  font-weight: 500;
}

.score-next {
  padding-top: 20px;
  border-top: 1px solid rgba(244, 235, 216, 0.15);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(244, 235, 216, 0.7);
  line-height: 1.5;
}

.score-next strong { color: var(--pool); font-weight: 500; }

@keyframes fillBar {
  from { transform: scaleX(0); }
  to { transform: scaleX(var(--fill)); }
}

.score-card.animate .score-bar-fill {
  animation: fillBar 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@media (max-width: 900px) {
  .score-wrap { grid-template-columns: 1fr; gap: 48px; }
  .score-card { box-shadow: 8px 8px 0 var(--terracotta); padding: 32px; }
  .score-big { font-size: 72px; }
}

/* Card grid (built / AI) */
.built-section {
  background: var(--paper);
  margin: 0 -100vw;
  padding: 110px 100vw;
}

.built-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  margin-top: 56px;
}

.built-card {
  padding: 32px;
  border-left: 2px solid var(--terracotta);
}

.built-card h4 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.built-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .built-grid { grid-template-columns: 1fr; gap: 24px; }
  .built-card { padding: 20px 24px; }
}

/* Scout / founder */
.scout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.scout-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--sage) 0%, var(--ink) 100%);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.scout-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scout-portrait::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg,
      transparent 0, transparent 60px,
      rgba(244, 235, 216, 0.08) 60px, rgba(244, 235, 216, 0.08) 62px);
}

.scout-portrait.placeholder::after {
  content: 'CS';
  position: absolute;
  bottom: 24px;
  left: 32px;
  font-family: 'Fraunces', serif;
  font-size: 96px;
  font-weight: 300;
  color: var(--bone);
  line-height: 1;
  letter-spacing: -0.04em;
}

.scout-text h3 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.scout-text h3 em {
  font-style: italic;
  font-weight: 300;
  color: var(--terracotta);
}

.scout-text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.scout-text p + p { margin-top: 16px; }

.scout-sig {
  margin-top: 32px;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
}

@media (max-width: 900px) {
  .scout { grid-template-columns: 1fr; gap: 48px; }
  .scout-portrait { max-width: 320px; margin: 0 auto; }
}

/* Join */
.join {
  text-align: center;
  padding: 130px 0 110px;
}

.join h2 {
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.95;
  margin-bottom: 32px;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.03em;
}

.join h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--terracotta);
}

.join p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.join-form { max-width: 520px; margin: 0 auto; }

.join-note {
  margin-top: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Contact */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}

.contact-info p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 40px;
}

.contact-line {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

.contact-line span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--terracotta);
  min-width: 64px;
}

.contact-line a { color: var(--ink); text-decoration: none; }
.contact-line a:hover { color: var(--terracotta); }

.contact-form .field + .field { margin-top: 24px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--ink);
  background: transparent;
  padding: 14px 4px;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--ink-soft);
  opacity: 0.55;
}

.contact-send {
  margin-top: 32px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bone);
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.contact-send:hover { background: var(--terracotta); border-color: var(--terracotta); }

@media (max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 48px; }
}

/* Next-layer link strip */
.next-layer {
  border-top: 1px solid var(--rule);
  padding: 56px 0;
}

.next-layer a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  text-decoration: none;
  color: var(--ink);
}

.next-layer .next-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
}

.next-layer .next-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.next-layer a:hover .next-title { color: var(--terracotta); }

/* Footer */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--rule);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--terracotta); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
