/* High Turtle: Graphite brand kit.
   True neutral greys, one steel-blue accent (harbor).
   Type: Literata (headlines) + Figtree (text and interface). */

@font-face {
  font-family: "Literata";
  src: url("/assets/fonts/Literata-Variable.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/Figtree-Variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f6f5;
  --surface: #ececea;
  --mist: #ececea;
  --line: #d6d6d3;
  --border-control: #85878a;
  --ink: #17181a;
  --graphite: #2e3033;
  --ink-soft: #66686b;
  --accent: #2f5c8f;
  --on-accent: #ffffff;
  --on-ink: #f6f6f5;
  --danger: #a33a2b;

  --s1: #e8e8e6; --t1: #17181a;
  --s2: #d7d7d5; --t2: #17181a;
  --s3: #c4c4c2; --t3: #17181a;
  --s4: #acacaa; --t4: #17181a;
  --s5: #707072; --t5: #ffffff;
  --s6: #4b4c4e; --t6: #ffffff;
  --shell-body: #e8e8e6;
  --shell-ring: #d6d6d3;
  --shell-active: #17181a; --shell-active-text: #f6f6f5;
  --shell-hover: #2f5c8f; --shell-hover-text: #ffffff;

  --font-head: "Literata", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131415;
    --surface: #1c1d1f;
    --mist: #1c1d1f;
    --line: #303236;
    --border-control: #7a7d82;
    --ink: #f0f1f2;
    --graphite: #d3d5d8;
    --ink-soft: #a4a7ab;
    --accent: #8db4e2;
    --on-accent: #0f1a28;
    --on-ink: #131415;
    --danger: #e58e80;

    --s1: #262729; --t1: #f0f1f2;
    --s2: #303133; --t2: #f0f1f2;
    --s3: #3c3d40; --t3: #f0f1f2;
    --s4: #56585b; --t4: #f4f5f6;
    --s5: #909295; --t5: #131415;
    --s6: #b5b7ba; --t6: #131415;
    --shell-body: #232426;
    --shell-ring: #303236;
    --shell-active: #f0f1f2; --shell-active-text: #131415;
    --shell-hover: #8db4e2; --shell-hover-text: #0f1a28;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 450;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.012em;
}

p { margin: 0; }
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

.wrap { width: min(100% - 2rem, 1120px); margin-inline: auto; }

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--on-ink);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}
.brand { display: inline-flex; color: var(--ink); }
.logo-h { height: 2.15rem; width: auto; display: block; }
.bar nav { display: flex; align-items: center; gap: 1.75rem; }
.bar nav a:not(.btn) {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
}
.bar nav a:not(.btn):hover { color: var(--ink); text-decoration: underline; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 0.98rem/1 var(--font-body);
  letter-spacing: 0.005em;
  padding: 0.95rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-small { padding: 0.65rem 1rem; font-size: 0.93rem; }
.link { font-weight: 600; }

/* Hero */
.hero { padding-block: clamp(2.75rem, 7vw, 5.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.2rem);
  font-weight: 420;
  letter-spacing: -0.022em;
  line-height: 1.04;
  max-width: 13.5em;
  text-wrap: balance;
}
.lede {
  margin-top: 1.5rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 31em;
}
.cta-row {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

/* Phase readout */
.readout {
  margin-top: 3rem;
  padding-top: 1.4rem;
  border-top: 2px solid var(--ink);
  max-width: 34rem;
}
.readout-hint { display: none; color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1.1rem; }
.js .readout-hint { display: block; }

.phase + .phase { margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.js .phase { display: none; }
.js .phase + .phase { margin-top: 0; padding-top: 0; border-top: 0; }
.js .phase.is-active { display: block; }

.phase h2 { font-size: 1.85rem; }
.tagline { margin-top: 0.35rem; font-size: 1.05rem; }
.count { margin-top: 0.15rem; color: var(--ink-soft); font-size: 0.93rem; }
.phase ul { list-style: none; margin: 1rem 0 0; padding: 0; }
.phase li { padding: 0.55rem 0; border-top: 1px solid var(--line); }
.phase li:last-child { border-bottom: 1px solid var(--line); }
.across { margin-top: 1.3rem; font-size: 0.92rem; color: var(--ink-soft); }

/* Shell */
.shell-wrap { position: sticky; top: 5.5rem; }
.shell { width: 100%; height: auto; display: block; overflow: visible; }

.body circle:not(.ring):not(.eye), .body ellipse, .body .head { fill: var(--shell-body); }
.body .ring { fill: none; stroke: var(--shell-ring); stroke-width: 1.5; }
.body .eye { fill: var(--ink-soft); }

.scute polygon, .center polygon {
  stroke-width: 8;
  stroke-linejoin: round;
  transition: fill 0.15s, stroke 0.15s;
}
.scute { cursor: pointer; }
.scute text, .center text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  transition: fill 0.15s;
}

.s1 polygon { fill: var(--s1); stroke: var(--s1); } .s1 text { fill: var(--t1); }
.s2 polygon { fill: var(--s2); stroke: var(--s2); } .s2 text { fill: var(--t2); }
.s3 polygon { fill: var(--s3); stroke: var(--s3); } .s3 text { fill: var(--t3); }
.s4 polygon { fill: var(--s4); stroke: var(--s4); } .s4 text { fill: var(--t4); }
.s5 polygon { fill: var(--s5); stroke: var(--s5); } .s5 text { fill: var(--t5); }
.s6 polygon { fill: var(--s6); stroke: var(--s6); } .s6 text { fill: var(--t6); }

.center polygon { fill: var(--paper); stroke: var(--paper); }
.center text { fill: var(--ink-soft); font-family: var(--font-head); font-weight: 450; font-size: 20px; }

.scute:hover polygon { fill: var(--shell-hover); stroke: var(--shell-hover); }
.scute:hover text { fill: var(--shell-hover-text); }
.scute.is-active polygon { fill: var(--shell-active); stroke: var(--shell-active); }
.scute.is-active text { fill: var(--shell-active-text); }
.scute:focus-visible { outline: none; }
.scute:focus-visible polygon { stroke: var(--ink); }

/* The one orchestrated moment: scutes settle into place on load */
@media (prefers-reduced-motion: no-preference) {
  .js .pop {
    transform-box: fill-box;
    transform-origin: center;
    animation: settle 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both;
    animation-delay: calc(var(--i, 6) * 90ms + 150ms);
  }
  @keyframes settle {
    from { opacity: 0; transform: scale(0.72); }
    to { opacity: 1; transform: scale(1); }
  }
}

/* What we make */
.make {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}
.make h2, .signup h2 { font-size: clamp(2rem, 3.8vw, 2.75rem); }
.formats { list-style: none; margin: 2.25rem 0 0; padding: 0; }
.formats li {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 1.25rem 3rem;
  padding-block: 2rem;
  border-top: 1px solid var(--line);
}
.formats li:last-child { border-bottom: 1px solid var(--line); }
.format-name h3 { font-size: 1.6rem; }
.status {
  margin-top: 0.6rem;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.status::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  border: 1.5px solid var(--border-control);
}
.status-testing::before { background: var(--accent); border-color: var(--accent); }
.formats p { max-width: 38em; }

/* Signup */
.signup {
  background: var(--mist);
  border-top: 1px solid var(--line);
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
}
.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.signup-grid p { margin-top: 1rem; max-width: 30em; color: var(--ink-soft); }
.form label { display: block; font-weight: 600; margin-bottom: 0.45rem; }
.field-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.field-row input {
  flex: 1 1 14rem;
  min-width: 0;
  font: inherit;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-control);
  border-radius: 3px;
  background: var(--surface);
  color: var(--ink);
}
.field-row input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.field-row input:focus-visible { outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form .fine { margin-top: 0.85rem; font-size: 0.9rem; color: var(--ink-soft); }
.form-status { margin-top: 0.8rem; font-weight: 600; min-height: 1.6em; }
.form-status.is-error { color: var(--danger); }
.form-status.is-ok { color: var(--ink); }

/* Footer */
.site-footer { padding-block: 2.5rem; border-top: 1px solid var(--line); font-size: 0.95rem; color: var(--ink-soft); }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.logo-s { height: 3.2rem; width: auto; color: var(--ink); }

/* Simple pages (404, thanks) */
.simple { padding-block: clamp(4rem, 12vw, 8rem); }
.simple h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
.simple p { margin-top: 1rem; max-width: 32em; color: var(--ink-soft); }
.simple .btn { margin-top: 1.75rem; }

/* Skills map page */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bar nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.map-hero { padding-block: clamp(2.75rem, 7vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.75rem; }
.map-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); max-width: 18em; text-wrap: balance; }
.map-hero .lede { margin-top: 1.1rem; max-width: 38em; }
.stats { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 2rem 0 0; padding: 1.25rem 0; border-block: 1px solid var(--line); }
.stats div { min-width: 5.5rem; }
.stats dt { color: var(--ink-soft); font-size: 0.9rem; }
.stats dd { margin: 0.1rem 0 0; font-family: var(--font-head); font-weight: 500; font-size: 2rem; line-height: 1.1; color: var(--ink); }
.map-hero .fine { margin-top: 1rem; max-width: 40em; color: var(--ink-soft); font-size: 0.95rem; }
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1.25rem; font-weight: 600; font-size: 0.95rem; }
.tag { display: inline-block; padding: 0.05rem 0.5rem; border: 1px solid var(--accent); border-radius: 999px; color: var(--accent); font-size: 0.78rem; font-weight: 600; line-height: 1.5; vertical-align: 0.1em; }
.map-body { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.map-phase { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 1rem 3rem; padding-block: 2.25rem; border-top: 1px solid var(--line); }
.map-phase h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.map-phase .tagline { margin-top: 0.35rem; }
.acts { list-style: none; margin: 0; padding: 0; }
.acts li { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); }
.acts li:first-child { border-top: 0; padding-top: 0; }
.chips { display: inline-flex; flex-wrap: wrap; gap: 0.35rem; }
.chip, .matrix code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; color: var(--graphite); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.1rem 0.4rem; }
.chip.is-tested { border-color: var(--accent); }
.table-scroll { position: relative; grid-column: 1 / -1; min-width: 0; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.matrix { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 46rem; }
.matrix th, .matrix td { padding: 0.6rem 0.75rem; border-top: 1px solid var(--line); text-align: center; }
.matrix thead th { border-top: 0; background: var(--surface); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.matrix th:first-child { text-align: left; }
.matrix tbody th { font-weight: 600; color: var(--ink); }
.matrix tbody th code { display: block; width: fit-content; margin-top: 0.2rem; font-weight: 400; }
.yes { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--accent); }
.map-body .map-phase:last-child .map-phase-head { grid-column: 1 / -1; }

/* Small screens */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .shell-wrap { position: static; order: -1; max-width: 24rem; margin-inline: auto; }
  .signup-grid { grid-template-columns: 1fr; }
  .formats li { grid-template-columns: 1fr; gap: 0.75rem; }
  .map-phase { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .bar nav a:not(.btn) { display: none; }
  .logo-h { height: 1.9rem; }
  .logo-s { height: 2.8rem; }
}
