:root {
  color-scheme: dark;
  --bg: #0a070d;
  --bg-raised: #110c15;
  --surface: #17101c;
  --surface-bright: #211329;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --ink: #fff9f0;
  --ink-soft: #c8bdca;
  --ink-muted: #857988;
  --plum: #41054b;
  --magenta: #f20673;
  --gold: #ffd21a;
  --gold-deep: #f5b800;
  --content: 1180px;
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 38px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 78% 4%, rgba(75, 3, 84, 0.24), transparent 28rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(calc(100% - 40px), var(--content));
  min-height: 88px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.brand img { width: 40px; height: 40px; }
.brand-dot { color: var(--gold); }

nav { display: flex; gap: 34px; }
nav a, .header-link, footer > a:last-child { color: var(--ink-soft); font-size: 14px; }
nav a:hover, .header-link:hover, footer > a:last-child:hover { color: var(--ink); }
.header-link { justify-self: end; }

.hero {
  width: min(calc(100% - 40px), var(--content));
  min-height: 750px;
  margin: 0 auto;
  padding: 104px 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 70px;
  align-items: center;
}

.eyebrow, .section-number, .card-kicker, .repo-type {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 10px; }
.eyebrow span { width: 22px; height: 1px; background: var(--gold); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 770px;
  margin-bottom: 30px;
  font-size: clamp(3.4rem, 6.1vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.065em;
  font-weight: 660;
}

h1 em {
  display: block;
  color: var(--gold);
  font-style: normal;
  overflow-wrap: anywhere;
}

.hero-copy { min-width: 0; }

.hero-reframe {
  max-width: 660px;
  margin-bottom: 18px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.hero-body {
  max-width: 650px;
  margin-bottom: 34px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 680;
}

.button-primary { background: var(--gold); border-color: var(--gold); color: #221700; }
.button-primary:hover { background: #ffdc4d; }
.button-secondary { background: rgba(255,255,255,0.03); }
.button-secondary:hover { background: rgba(255,255,255,0.07); }

.status { display: flex; align-items: center; gap: 9px; color: var(--ink-muted); font-size: 13px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 18px rgba(255,210,26,.7); }

.hero-mark {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.hero-mark::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 6, 115, 0.2), rgba(75, 3, 84, 0.08) 56%, transparent 72%);
  filter: blur(14px);
}

.hero-mark img { position: relative; width: min(85%, 440px); height: auto; filter: drop-shadow(0 28px 48px rgba(0,0,0,.4)); }
.orbit { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.orbit-one { width: 460px; height: 460px; }
.orbit-two { width: 560px; height: 560px; opacity: .55; }
.orbit-label { position: absolute; color: var(--ink-muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.label-purpose { top: 35px; left: 49%; }
.label-team { top: 48%; right: -9px; }
.label-proof { bottom: 36px; left: 48%; }
.label-loop { top: 48%; left: -6px; }

.section {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 124px 0;
  border-top: 1px solid var(--line);
}

.section-heading { max-width: 760px; margin-bottom: 62px; }
.compact-heading { max-width: 820px; }
.section-heading h2, .closing h2 {
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 640;
}
.section-heading > p:last-child, .closing > p:not(.section-number) { color: var(--ink-soft); font-size: 18px; line-height: 1.7; }

.comparison { display: grid; grid-template-columns: 1fr 72px 1fr; align-items: stretch; }
.comparison-card { min-height: 410px; padding: 38px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.muted-card { background: var(--bg-raised); }
.bright-card { background: linear-gradient(145deg, rgba(242,6,115,.13), rgba(75,3,84,.18)); border-color: rgba(242,6,115,.32); }
.comparison-card h3 { margin-bottom: 30px; font-size: 30px; letter-spacing: -.035em; }
.comparison-card ul { margin: 0; padding: 0; list-style: none; }
.comparison-card li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-soft); }
.comparison-card li::before { content: "·"; margin-right: 12px; color: var(--gold); }
.card-note { margin: 32px 0 0; color: var(--ink-muted); font-size: 14px; }
.comparison-arrow { display: grid; place-items: center; color: var(--gold); font-size: 30px; }

.project-frame {
  min-height: 670px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
}

.project-core, .project-cell { border: 1px solid var(--line); border-radius: var(--radius-md); }
.project-core {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(circle at 50% 35%, rgba(242,6,115,.12), transparent 68%), var(--surface-bright);
  border-color: rgba(255,210,26,.28);
}
.project-core img { width: 88px; height: 88px; margin-bottom: 18px; }
.project-core p { margin-bottom: 9px; color: var(--gold); font-size: 11px; font-weight: 760; letter-spacing: .16em; }
.project-core strong { font-size: 21px; line-height: 1.35; }

.project-cell { padding: 28px; background: rgba(255,255,255,.022); }
.project-cell span, .principle-mark { color: var(--gold); font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.project-cell h3 { margin: 34px 0 10px; font-size: 21px; }
.project-cell p { margin: 0; color: var(--ink-muted); font-size: 14px; }
.cell-purpose { grid-column: 1; grid-row: 1; }
.cell-team { grid-column: 2; grid-row: 1; }
.cell-routines { grid-column: 3; grid-row: 1; }
.cell-authority { grid-column: 1; grid-row: 3; }
.cell-evidence { grid-column: 2; grid-row: 3; }
.cell-learning { grid-column: 3; grid-row: 3; }

.operating-loop {
  margin-top: 34px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .03em;
}
.operating-loop i { color: var(--gold); font-style: normal; }

.stages { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); list-style: none; counter-reset: stages; }
.stages li { min-height: 270px; padding: 28px; border-top: 1px solid var(--line-strong); border-right: 1px solid var(--line); }
.stages li:last-child { border-right: 0; background: linear-gradient(180deg, rgba(255,210,26,.07), transparent); }
.stage-index { color: var(--gold); font-size: 12px; font-weight: 760; letter-spacing: .1em; }
.stages h3 { margin: 80px 0 12px; font-size: 22px; }
.stages p { margin: 0; color: var(--ink-muted); font-size: 14px; }

.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.principles article { min-height: 250px; padding: 34px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-md); }
.principles h3 { margin: 70px 0 12px; font-size: 25px; letter-spacing: -.035em; }
.principles p { margin: 0; color: var(--ink-muted); }

.repo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.repo-card { min-height: 260px; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(255,255,255,.02); }
.featured-repo { background: linear-gradient(135deg, rgba(242,6,115,.13), rgba(255,210,26,.04)); border-color: rgba(242,6,115,.28); }
.repo-card h3 { margin: 54px 0 10px; font-size: 28px; letter-spacing: -.04em; }
.repo-card > p:not(.repo-type) { max-width: 500px; color: var(--ink-muted); }
.repo-card a, .repo-card > span { display: inline-block; margin-top: 12px; color: var(--gold); font-size: 13px; font-weight: 680; }

.closing {
  width: min(calc(100% - 40px), var(--content));
  margin: 0 auto;
  padding: 140px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 20%, rgba(242,6,115,.13), transparent 42%), var(--bg-raised);
}
.closing img { margin-bottom: 32px; }
.closing h2 { max-width: 850px; }
.closing > p:not(.section-number) { max-width: 620px; margin-bottom: 32px; }

footer {
  width: min(calc(100% - 40px), var(--content));
  min-height: 150px;
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--ink-muted);
  font-size: 13px;
}
.footer-brand { color: var(--ink); font-size: 15px; }
.footer-brand img { width: 32px; height: 32px; }
footer p { margin: 0; }
footer > a:last-child { justify-self: end; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 80px; }
  .hero-mark { min-height: 460px; }
  .hero-mark img { width: min(70vw, 360px); }
  .orbit-one { width: 390px; height: 390px; }
  .orbit-two { width: 470px; height: 470px; }
  .comparison { grid-template-columns: 1fr; gap: 12px; }
  .comparison-arrow { min-height: 48px; transform: rotate(90deg); }
  .stages { grid-template-columns: 1fr 1fr; }
  .stages li:nth-child(2) { border-right: 0; }
  .project-frame { min-height: auto; grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .project-core { grid-column: 1 / -1; grid-row: auto; min-height: 260px; }
  .project-cell { grid-column: auto; grid-row: auto; min-height: 210px; }
  .operating-loop { flex-wrap: wrap; justify-content: center; border-radius: var(--radius-md); }
  footer { grid-template-columns: 1fr 1fr; }
  footer p { display: none; }
}

@media (max-width: 620px) {
  .site-header, .hero, .section, .closing, footer { width: calc(100vw - 28px); max-width: none; }
  .site-header { min-height: 72px; }
  .brand { font-size: 15px; }
  .brand img { width: 34px; height: 34px; }
  .header-link { font-size: 13px; }
  .hero { min-width: 0; padding: 50px 0 74px; display: flex; flex-direction: column; gap: 40px; }
  .hero > * { width: 100%; min-width: 0; max-width: 100%; }
  .hero-mark { min-height: 330px; }
  .orbit-one { width: 290px; height: 290px; }
  .orbit-two { width: 340px; height: 340px; }
  .orbit-label { display: none; }
  h1 { font-size: clamp(2.9rem, 13vw, 4.6rem); }
  .hero-body { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .section { padding: 88px 0; }
  .section-heading { margin-bottom: 42px; }
  .comparison-card { min-height: 0; padding: 28px; }
  .project-frame, .principles, .repo-grid, .stages { grid-template-columns: 1fr; }
  .project-core { grid-column: auto; }
  .project-cell { min-height: 190px; }
  .stages li { min-height: 220px; border-right: 0; }
  .stages h3, .principles h3 { margin-top: 54px; }
  .closing { padding: 86px 24px; border-radius: var(--radius-md); }
  footer { min-height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
