/*
 * Self-hosted webfonts.
 *
 * These files are the same WOFF2 payloads Google Fonts serves for Inter,
 * Instrument Serif and JetBrains Mono, copied into this repository so the
 * pages make no third-party font request. All three are licensed under the
 * SIL Open Font License 1.1; the licences are in /fonts.
 *
 * Inter and JetBrains Mono are variable fonts, so one file covers every
 * weight the pages use. The unicode ranges match the subsets Google Fonts
 * serves, so a page that needs a character outside Latin still finds it.
 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/instrument-serif-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-var-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-var-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #17211b;
  --muted: #5f6f65;
  --paper: #f7f4ec;
  --wash: #ebe5d8;
  --panel: #fffdf7;
  --moss: #3b684c;
  --mint: #cae7c5;
  --amber: #d7973f;
  --rust: #9b4a34;
  --line: rgba(23, 33, 27, 0.14);
  --shadow: 0 24px 70px rgba(31, 45, 36, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

a {
  color: inherit;
}

main {
  overflow: hidden;
}

.hero {
  min-height: 94vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 6rem) 0 3rem;
}

.hero__copy {
  max-width: 700px;
}

.kicker {
  margin: 0 0 0.9rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--moss);
}

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

h1 {
  margin-bottom: 1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(4.8rem, 16vw, 12rem);
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.1rem;
  line-height: 1.2;
}

.lede {
  max-width: 620px;
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 7px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
}

.button:focus-visible,
footer a:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.button--primary {
  background: var(--ink);
  color: var(--paper);
}

.button--ghost {
  background: transparent;
}

.evidence-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(202, 231, 197, 0.72), rgba(255, 253, 247, 0.92) 46%, rgba(215, 151, 63, 0.22)),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.evidence-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(23, 33, 27, 0.06), rgba(23, 33, 27, 0.06) 1px, transparent 1px, transparent 12px);
  mix-blend-mode: multiply;
}

.browser-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-bottom: 1px solid var(--line);
  padding: 0.9rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--rust);
}

.browser-bar span:nth-child(2) {
  background: var(--amber);
}

.browser-bar span:nth-child(3) {
  background: var(--moss);
}

.browser-bar > strong {
  margin-left: auto;
  font-weight: 700;
}

.browser-bar .casey-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.2rem;
  color: var(--ink);
  white-space: nowrap;
}

.casey-mark img {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.scan-lines {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  padding: clamp(1rem, 4vw, 2rem);
}

.scan-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1rem;
  align-items: start;
  border: 1px solid rgba(23, 33, 27, 0.12);
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.76);
  padding: 1rem;
}

.scan-row span,
.phase-list span,
.score-card small {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.scan-row strong {
  font-size: clamp(0.94rem, 2vw, 1.08rem);
}

.scan-row--good {
  border-left: 5px solid var(--moss);
}

.scan-row--warn {
  border-left: 5px solid var(--amber);
}

.score-card {
  margin-top: 0.8rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.score-card strong {
  display: block;
  margin: 0.2rem 0 0.45rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 0.9;
}

.score-card p {
  margin: 0;
  color: rgba(247, 244, 236, 0.76);
}

.workflow,
.roadmap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.workflow {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.workflow article {
  border-top: 5px solid var(--moss);
  background: var(--panel);
  padding: 1.25rem;
  box-shadow: 0 10px 40px rgba(31, 45, 36, 0.08);
}

.tag {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--moss);
}

.workflow p,
.roadmap p {
  color: var(--muted);
}

.roadmap {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.roadmap__intro {
  position: sticky;
  top: 2rem;
}

.phase-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.phase-list li {
  position: relative;
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 1.35rem 3.8rem;
}

.phase-list li > span {
  position: absolute;
  left: 0;
  top: 1.25rem;
  display: grid;
  width: 3rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: none;
}

.phase-list strong {
  display: block;
  margin: 0.2rem 0;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  line-height: 1.1;
}

.phase-list p {
  margin-bottom: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a {
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

@media (max-width: 860px) {
  .hero,
  .roadmap {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .workflow__grid {
    grid-template-columns: 1fr;
  }

  .roadmap__intro {
    position: static;
  }
}

@media (max-width: 520px) {
  .hero,
  .workflow,
  .roadmap,
  footer {
    width: min(100% - 28px, 1180px);
  }

  h1 {
    font-size: clamp(4.1rem, 28vw, 6rem);
  }

  .scan-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .browser-bar {
    gap: 0.35rem;
    padding: 0.65rem;
    font-size: 0.61rem;
  }

  .browser-bar > span {
    width: 8px;
    height: 8px;
  }

  .casey-mark img {
    width: 23px;
    height: 23px;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .evidence-panel {
    animation: settle 700ms ease-out both;
  }

  @keyframes settle {
    from {
      transform: translateY(16px);
    }
    to {
      transform: translateY(0);
    }
  }
}

/* Public legal pages share the homepage palette and typography. */
footer {
  flex-wrap: wrap;
}

footer nav,
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  border-radius: 50%;
}

.site-header nav a {
  padding: 0.65rem 0;
  text-underline-offset: 4px;
}

.site-header [aria-current="page"] {
  font-weight: 700;
  color: var(--moss);
}

.legal {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) 0;
  overflow-wrap: anywhere;
}

.legal h1 {
  font-size: clamp(3.3rem, 10vw, 6rem);
  line-height: 1;
}

.legal h2 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.15;
}

.legal section {
  margin-top: 2.75rem;
  scroll-margin-top: 1.5rem;
}

.legal p,
.legal li {
  line-height: 1.75;
}

.legal li + li {
  margin-top: 0.65rem;
}

.legal-date {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal-contents,
.legal-contact {
  padding: clamp(1rem, 4vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.legal-contents ul {
  columns: 2 14rem;
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.legal-contents li {
  break-inside: avoid;
}

.legal-contact {
  margin-top: 3rem;
  background: var(--mint);
}

.legal-contact p {
  margin-bottom: 0;
}

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

/* Apex positioning and named-builder pages. The shared paper/moss identity is retained. */
.home-page h1 { font-size: clamp(3.2rem, 5.8vw, 5rem); line-height: 1.02; }
.home-page h2 { font-size: clamp(2.5rem, 4.7vw, 4rem); line-height: 1.06; }
.home-page .hero { min-height: auto; padding: clamp(2.75rem, 6vw, 5rem) 0; }
.hero-detail, .access-note, .scope-note, .section-note, .example-note { color: var(--muted); }
.hero-detail { max-width: 42rem; margin-bottom: 1.75rem; font-size: 1.05rem; line-height: 1.7; }
.access-note, .scope-note { font-size: .9rem; line-height: 1.65; }
.access-note { margin: 1rem 0 .7rem; }
.scope-note a, .access-note a, .section-note a, .founder-copy a, .beta-contact a, .about-content a { text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.browser-bar > img { border-radius: 50%; }
.example-label { margin: 0; color: var(--moss); font-weight: 700; }
.example-note { margin: 0 0 .3rem; font-size: .9rem; line-height: 1.6; }
.home-page .scan-row { grid-template-columns: 6.5rem minmax(0, 1fr); gap: .75rem; }
.home-page .scan-row span { font-size: .68rem; }
.home-page .score-card strong { font-family: Inter, system-ui, sans-serif; font-size: 1.3rem; line-height: 1.4; font-weight: 600; }
.home-page .score-card small { color: var(--mint); }
.section-note { margin: 1.5rem 0 0; }
.content-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(3rem, 6vw, 5rem) 0; }
.expectations__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-top: 2rem; }
.expectations article { padding: 1.5rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.expectations p, .founder-copy p, .beta-contact p { color: var(--muted); line-height: 1.75; }
.expectations article p:last-child { margin-bottom: 0; }
.founder-section { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; border-block: 1px solid var(--line); }
.text-link { color: var(--moss); font-weight: 600; }
.beta-contact p { max-width: 46rem; }
.about-content { width: min(780px, calc(100% - 40px)); margin: auto; padding: clamp(3rem, 6vw, 5rem) 0; overflow-wrap: anywhere; }
.about-content h1 { font-size: clamp(3rem, 7vw, 5.1rem); line-height: 1.04; }
.about-content h2 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.12; }
.about-content section { margin-top: 3rem; }
.about-content p { line-height: 1.8; }
.about-contact { margin-top: 3rem; padding: clamp(1.25rem, 4vw, 2rem); background: var(--mint); border-radius: 16px; }
.about-contact p:last-child { margin-bottom: 0; }
.home-page a:focus-visible, .about-page a:focus-visible { outline-color: var(--moss); }
.home-page .score-card { overflow-wrap: anywhere; }
@media (max-width: 860px) { .founder-section { grid-template-columns: 1fr; gap: 1rem; } }
@media (max-width: 600px) {
  .expectations__grid { grid-template-columns: 1fr; gap: 1rem; }
  .site-header nav { gap: .4rem 1rem; font-size: .9rem; }
  .home-page .scan-row { grid-template-columns: 1fr; gap: .35rem; }
  .content-section, .about-content { width: calc(100% - 28px); }
}

/* Casey: original hero portrait and illustrated character scenes. */
.casey-page h1 { font-size: clamp(4rem, 9vw, 7rem); line-height: 1; }
.casey-page h2 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.08; }
.casey-page .content-section p { line-height: 1.75; }
.casey-hero { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.casey-hero > div > p:not(.kicker) { max-width: 34rem; }
.casey-portrait { grid-column: 2; grid-row: 1 / span 2; margin: 0; text-align: center; }
.casey-portrait img { display: block; width: min(100%, 470px); height: auto; margin: 0 auto; transform-origin: center 80%; }
.casey-portrait figcaption { margin-top: 1rem; color: var(--muted); font-size: .9rem; }
.casey-interaction { grid-column: 1; grid-row: 2; }
.casey-interaction [hidden] { display: none; }
.casey-thought { min-height: 5.5rem; max-width: 32rem; border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.25rem; background: var(--panel); color: var(--moss); }
.casey-interaction .scope-note { margin-top: .8rem; }
.casey-origin { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; border-top: 1px solid var(--line); }
.casey-origin p:not(.kicker), .casey-outro p { color: var(--muted); }
.casey-casefile { border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.5rem, 6vw, 4rem); background: var(--panel); box-shadow: 0 14px 45px rgba(31,45,36,.06); }
.casefile-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.casefile-number { color: var(--muted); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .75rem; }
.casefile-note { color: var(--muted); font-size: .9rem; }
.casefile-story { max-width: 44rem; font-size: 1.08rem; }
.casefile-story p { margin-bottom: 1.3rem; }
.casefile-closing { margin: 1.5rem 0 0; border-top: 1px solid var(--line); padding-top: 1.25rem; color: var(--moss); font-weight: 600; }
.casey-outro { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; align-items: center; }
.casey-scene { display: block; width: min(100%, 300px); height: auto; object-fit: contain; }
.casey-origin .casey-scene { margin: 1.5rem auto 0; }
.casefile-intro { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: center; margin-bottom: 1rem; }
.casey-outro > .casey-scene { width: 100%; }
@media (max-width: 680px) { .casefile-intro, .casey-outro { grid-template-columns: 1fr; gap: 1rem; } .casefile-intro .casey-scene, .casey-outro > .casey-scene { width: min(100%, 260px); margin: 0 auto; } }
.casey-page a { text-underline-offset: 4px; }
.casey-page a:focus-visible, .casey-page button:focus-visible { outline: 3px solid var(--moss); outline-offset: 4px; }
@media (max-width: 860px) { .casey-hero, .casey-origin { grid-template-columns: 1fr; gap: 1.5rem; } .casey-portrait, .casey-interaction { grid-column: auto; grid-row: auto; } .casey-portrait img { max-width: 340px; } }
