/* ==========================================================================
   Cadence — landing
   ink / brass / verified-mint. Three type roles: heavy sans display,
   mono for anything the system generated, serif italic for reflection only.
   ========================================================================== */

:root {
  --ink:      #0b0d1a;
  --ink-deep: #07080f;
  --surface:  #151a2e;
  --raised:   #1c2238;
  --rule:     #232a44;
  --paper:    #eceae3;
  --muted:    #8b93ad;
  --brass:    #e8b14c;
  --verified: #6fe3c4;
  --alarm:    #e8735a;

  --display: ui-sans-serif, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Roboto Mono", monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --gut: clamp(20px, 5vw, 72px);
  --beat: 620ms;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip {
  position: absolute; left: -9999px;
  background: var(--brass); color: var(--ink);
  padding: 12px 18px; border-radius: 0 0 10px 0; z-index: 99;
}
.skip:focus { left: 0; top: 0; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

/* ── the tick: a metronome mark, used as the mark of the brand ───────────── */

.tick {
  display: inline-block;
  width: 3px; height: 15px;
  background: var(--brass);
  transform-origin: 50% 100%;
  transform: rotate(-16deg);
}

/* ── nav ─────────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gut);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono);
  font-size: 15px; letter-spacing: 0.14em; text-transform: lowercase;
  color: var(--paper); text-decoration: none;
}
.wordmark.small { font-size: 13px; }

.nav-cta {
  font-size: 14px; font-weight: 600;
  color: var(--ink); background: var(--brass);
  padding: 9px 16px; border-radius: 999px; text-decoration: none;
  transition: transform .16s ease, background .16s ease;
}
.nav-cta:hover { background: #f2c163; transform: translateY(-1px); }

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vw, 104px) var(--gut) clamp(56px, 8vw, 112px);
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before {
  content: ""; display: inline-block;
  width: 26px; height: 1px; background: var(--brass);
  vertical-align: middle; margin-right: 11px;
}

h1 {
  margin: 0 0 26px;
  font-size: clamp(44px, 7.6vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 800;
}
h1 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--brass);
}

.lede {
  margin: 0 0 34px;
  max-width: 46ch;
  font-size: clamp(16px, 1.6vw, 19px);
  color: #c3c8d6;
}

.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.button {
  display: inline-block;
  background: var(--brass); color: var(--ink);
  font-weight: 700; font-size: 16px;
  padding: 15px 30px; border-radius: 999px; text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.button:hover {
  background: #f2c163;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -12px rgba(232,177,76,.7);
}

.button-note {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}

/* ── signature: transcript compiling into a routine ──────────────────────── */

.compile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 18px;
  overflow: hidden;
  min-height: 420px;
}

.pane { background: var(--surface); padding: 22px 20px; }
.pane-build { background: var(--raised); }

.pane-label {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}

/* the beat marker keeps time with the build */
.beat {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rule);
  margin-left: auto;
}
.beat.on { background: var(--brass); box-shadow: 0 0 0 4px rgba(232,177,76,.16); }

.transcript, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.line {
  font-size: 14.5px; line-height: 1.5;
  opacity: 0; transform: translateY(6px);
  animation: land .5s ease forwards;
}
.line .who {
  display: block;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 5px;
}
.line-you .who { color: var(--muted); }
.line-llm .who { color: var(--brass); }
.line-you { color: #cfd4e2; }
.line-llm {
  color: var(--paper);
  border-left: 2px solid rgba(232,177,76,.45);
  padding-left: 13px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  background: rgba(11,13,26,.55);
  border: 1px solid var(--rule);
  border-radius: 11px;
  opacity: 0; transform: translateY(6px);
  animation: land .5s ease forwards;
}
.step-kind {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--brass);
  text-transform: uppercase;
}
.step-title { font-size: 14.5px; }
.step-gate {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 4px;
}
.step-gate::before { content: "⟵ "; color: var(--rule); }

.build-foot {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--verified);
  opacity: 0;
  animation: land .5s ease forwards;
}

@keyframes land { to { opacity: 1; transform: none; } }

/* ── the case ────────────────────────────────────────────────────────────── */

.case { padding: clamp(56px, 8vw, 104px) var(--gut); border-bottom: 1px solid var(--rule); }

.section-head {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 50px);
  letter-spacing: -0.035em;
  line-height: 1.03;
  font-weight: 800;
  max-width: 20ch;
}
.section-sub {
  margin: 0 0 clamp(34px, 5vw, 56px);
  max-width: 54ch;
  color: #b8bece;
}

.artifacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.artifact { display: grid; gap: 14px; align-content: start; }

.artifact-face {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 18px;
  display: grid; gap: 9px;
  transition: border-color .2s ease, transform .2s ease;
}
.artifact:hover .artifact-face {
  transform: translateY(-3px);
  border-color: #333d63;
}

.badge {
  justify-self: start;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.badge-locked { color: var(--muted);    background: rgba(139,147,173,.14); }
.badge-proof  { color: var(--verified); background: rgba(111,227,196,.14); }
.badge-skip   { color: var(--alarm);    background: rgba(232,115,90,.14); }

.artifact-title { margin: 0; font-size: 17px; font-weight: 650; }
.artifact-meta {
  margin: 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}
.artifact-note { margin: 0; font-size: 14.5px; color: #b0b7c9; max-width: 34ch; }

/* ── reflection ──────────────────────────────────────────────────────────── */

.reflect {
  padding: clamp(64px, 9vw, 120px) var(--gut);
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(120% 100% at 50% 0%, rgba(232,177,76,.07), transparent 62%),
    var(--ink-deep);
  text-align: center;
}
.reflect-label {
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
}
.reflect-quote {
  margin: 0 auto 20px;
  max-width: 26ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 4.2vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.reflect-attr { margin: 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ── connect ─────────────────────────────────────────────────────────────── */

.connect {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding: clamp(56px, 8vw, 104px) var(--gut) clamp(72px, 9vw, 120px);
}
.connect .section-sub { margin-bottom: 26px; }

.endpoint {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 13px;
  padding: 14px 16px;
  margin-bottom: 30px;
}
.endpoint-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted);
}
.endpoint code {
  font-family: var(--mono); font-size: 14px; color: var(--brass);
  flex: 1; min-width: 220px; overflow-wrap: anywhere;
}
.copy {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer;
  background: transparent; color: var(--paper);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 7px 14px;
  transition: border-color .16s ease, color .16s ease;
}
.copy:hover { border-color: var(--brass); color: var(--brass); }
.copy.done { color: var(--verified); border-color: var(--verified); }

.tabs { display: flex; gap: 8px; margin-bottom: 22px; }
.tab {
  cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase;
  background: transparent; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 18px;
  transition: color .16s ease, border-color .16s ease;
}
.tab:hover { color: var(--paper); }
.tab.is-on { color: var(--ink); background: var(--paper); border-color: var(--paper); }

.setup {
  margin: 0; padding: 0 0 0 1.1em;
  max-width: 60ch;
  display: grid; gap: 12px;
  color: #c3c8d6;
}
.setup::marker { color: var(--brass); }
.setup li::marker { font-family: var(--mono); font-size: 13px; color: var(--brass); }
.setup b { color: var(--paper); font-weight: 650; }

.grant-note {
  margin: 0;
  max-width: 46ch;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
  color: var(--muted);
}

/* ── footer ──────────────────────────────────────────────────────────────── */

.foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 26px var(--gut);
  border-top: 1px solid var(--rule);
}
.foot-note { font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .connect { grid-template-columns: 1fr; }
  .grant-note { max-width: 60ch; }
  .compile { min-height: 0; }
}

@media (max-width: 560px) {
  .compile { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  h1 { font-size: clamp(38px, 12vw, 56px); }
}

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