/* DataSake site styles: Column variant (see DESIGN.md). Light cool canvas, indigo-navy type
   and primary action, white cards with hairline shadows, seafoam for code and data, Signal
   Orange on one surface per page, a halftone dot field behind the hero. Bump ?v= on change. */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrainsmono-var.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light;
  --navy: #111a4a;
  --ink: #011821;
  --slate: #3b3e47;
  --steel: #5c606a;
  --fog: #a9acb6;
  --mute: #6b6f79;
  --hair: #e3e4e8;
  --canvas: #f6f6f8;
  --white: #ffffff;
  --charcoal: #232730;
  --orange: #ec652b;
  --sea6: #44b48b;
  --sea7: #167e6c;
  --sea4: #94efb7;
  --sans: "Inter", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --shadow-card: rgba(18, 22, 30, .024) 0 1px 4px, rgba(18, 22, 30, .05) 0 1px 0, rgba(18, 22, 30, .06) 0 0 0 1px;
  --shadow-float: rgba(30, 30, 44, .15) 24px 48px 64px, rgb(255, 255, 255) 0 0 0 1px inset;
  --shadow-btn: rgba(17, 26, 74, .1) 0 1px 3px, rgba(17, 26, 74, .05) 0 1px 0, rgba(255, 255, 255, .25) 0 1px 0 inset;
  --max: 75rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--canvas); color: var(--slate);
  font-family: var(--sans); font-size: 1rem; line-height: 1.5; font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
svg { display: block; max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: var(--navy); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); font-weight: 600; line-height: 1.02; letter-spacing: -.03em; }
h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.2; letter-spacing: -.01em; }
a { color: var(--navy); text-underline-offset: .2em; text-decoration-color: var(--fog); }
a:hover { text-decoration-color: var(--navy); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .85em; color: var(--sea7); }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 1rem; z-index: 10; padding: .5rem 1rem; background: var(--white); }
.skip:focus { left: 1rem; }

/* Tag with dot: uppercase label, no rounding */
.label { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sea6); }
.label.plain::before { display: none; }
.lead { font-size: 1.125rem; line-height: 1.45; color: var(--steel); max-width: 34rem; }
.note { font-size: .875rem; color: var(--steel); }
.mono { font-family: var(--mono); font-size: .75rem; }

/* Status markers */
.tag, .st { display: inline-flex; align-items: center; gap: .45rem; }
.tag { padding: .2rem .6rem; border-radius: 9999px; font-size: .75rem; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.tag::before, .st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; }
.today::before { background: var(--sea7); }
.next::before { border: 1.5px solid var(--fog); }
.tag.today { background: rgba(68, 180, 139, .12); color: var(--sea7); }
.tag.next { background: var(--canvas); color: var(--steel); box-shadow: 0 0 0 1px var(--hair) inset; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }

/* Header: white bar, ghost nav pills */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--hair); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; min-height: 3.875rem; padding-block: .5rem; }
.mark { display: inline-flex; align-items: center; gap: .55rem; color: var(--navy); text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -.02em; }
.mark svg { width: 1.6rem; height: 1.6rem; }
.mark rect { fill: var(--navy); }
.mark path { fill: none; stroke: var(--white); }
.nav { display: flex; gap: .25rem; margin-left: auto; }
.nav a { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .375rem .75rem; border-radius: 8px; color: #000; text-decoration: none; font-size: .875rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--canvas); box-shadow: 0 0 0 1px var(--hair) inset; }
@media (max-width: 40rem) { .site-header .btn { margin-left: auto; } .nav { order: 3; width: 100%; margin-left: -.75rem; } }

/* Buttons: navy filled + navy outline, 8px */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border: 0; border-radius: 8px;
  background: var(--navy); color: var(--white); box-shadow: var(--shadow-btn);
  font-family: var(--sans); font-size: .875rem; font-weight: 500; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #1b2766; }
.btn-small { padding: .55rem 1rem; }
.ghost { display: inline-flex; align-items: center; padding: .7rem 2rem; border: 1px solid var(--navy); border-radius: 8px; color: var(--navy); font-size: .875rem; font-weight: 500; text-decoration: none; }
.ghost:hover { background: rgba(17, 26, 74, .04); }
.ghost.email { padding-inline: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }

/* Sections alternate white and canvas, 72px rhythm */
.section { padding-block: clamp(3.5rem, 8vw, 4.5rem); }
.section.white { background: var(--white); }
.section-head { display: grid; gap: 1rem; max-width: 46rem; margin-bottom: 2.5rem; }

/* Hero: 40% copy, floating cards over a halftone dot field */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.hero-copy { display: grid; gap: 1.5rem; justify-items: start; }
@media (max-width: 62rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

.stage { position: relative; min-height: 32rem; display: grid; align-content: center; }
.halftone {
  position: absolute; inset: -14% -30% -14% -22%; pointer-events: none;
  background: linear-gradient(115deg, #d65620 0%, #9f7aee 25%, #4575cd 45%, #71d2f0 62%, #44b48b 80%, #f4df69 100%);
  -webkit-mask: radial-gradient(circle, #000 1.6px, transparent 2px) 0 0 / 10px 10px, radial-gradient(ellipse 56% 50% at 52% 44%, #000 45%, transparent 76%);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(circle, #000 1.6px, transparent 2px) 0 0 / 10px 10px, radial-gradient(ellipse 56% 50% at 52% 44%, #000 45%, transparent 76%);
  mask-composite: intersect;
  opacity: .9;
}
.run { position: relative; margin: 0; display: grid; gap: 1.25rem; }
.widget { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-float); padding: .75rem 0; max-width: 30rem; }
.widget-head { display: flex; align-items: center; gap: .75rem; padding: .5rem 1.25rem .75rem; border-bottom: 1px solid var(--hair); }
.widget-title { font-weight: 500; color: var(--navy); }
.run-status { margin-left: auto; }
.run-status.tag { background: rgba(68, 180, 139, .12); color: var(--sea7); }
.run[data-phase="queued"] .run-status { background: var(--canvas); color: var(--steel); }
.run[data-phase="running"] .run-status { background: rgba(236, 101, 43, .12); color: #b8461a; }
.run-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.run-again { border: 0; background: none; color: var(--steel); font: inherit; font-size: .8125rem; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.models { list-style: none; margin: 0; padding: 0; }
.models .node { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .25rem 1rem; padding: .6rem 1.25rem; transition: background-color .2s; }
.models .node + .node { border-top: 1px solid var(--hair); }
.node-name { font-family: var(--mono); font-size: .8125rem; color: var(--navy); }
.node-kind { font-size: .75rem; color: var(--steel); }
.node-state { font-size: .75rem; font-weight: 500; color: var(--sea7); }
.node-state::after { content: "Built"; }
.node[data-state="pending"] .node-state { color: var(--mute); }
.node[data-state="pending"] .node-state::after { content: "Waiting"; }
.node[data-state="running"] { background: rgba(236, 101, 43, .05); }
.node[data-state="running"] .node-state { color: #b8461a; }
.node[data-state="running"] .node-state::after { content: "Building"; }
.node[data-state="pending"] .node-name { color: var(--steel); }
.tests { display: flex; gap: 4px; grid-column: 1; }
.tests .test { width: 8px; height: 8px; border-radius: 2px; background: var(--sea6); transition: background-color .2s; }
.tests .test[data-state="pending"] { background: var(--hair); }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding: .9rem 1.25rem .25rem; border-top: 1px solid var(--hair); }
.counter span { display: block; }
.counter .v { font-size: 1.5rem; font-weight: 500; color: var(--sea7); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.counter .k { font-size: .75rem; color: var(--steel); }

.code-card { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); padding: 1.25rem 1.5rem; max-width: 28rem; justify-self: end; margin-top: -2.5rem; position: relative; }
.term-line { font-family: var(--mono); font-size: .75rem; line-height: 1.5; color: var(--charcoal); white-space: pre-wrap; margin-bottom: .75rem; }
.term-line .prompt { color: var(--sea7); user-select: none; }
.nw { white-space: nowrap; }
.run-log { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: .75rem; line-height: 1.6; height: calc(1.6em * 5); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; color: var(--steel); }
.run-log li { flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-log .n { display: inline-block; min-width: 9ch; color: var(--mute); }
.run-log .ok { display: inline-block; min-width: 5ch; color: var(--sea7); }
.run-log .summary { color: var(--navy); }
.run figcaption { font-size: .8125rem; color: var(--steel); max-width: 28rem; }
@media (max-width: 36rem) { .stage { min-height: 0; } .code-card { margin-top: 0; justify-self: stretch; } .halftone { inset: -5% -40% -5% -40%; } }

/* Works-with strip: names on whitespace */
.strip { padding-block: 2.5rem; background: var(--white); box-shadow: 0 -1px 0 var(--hair), 0 1px 0 var(--hair); }
.strip .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 3rem; }
.strip ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .75rem 3rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em; color: var(--mute); }
.strip li.today { color: #000; }

/* Bordered content cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.card { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); padding: 1.5rem; display: grid; gap: .75rem; align-content: start; }
.card p { color: var(--steel); }
.card .tag, .items .tag { justify-self: start; }
.cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section.white .card { background: var(--canvas); box-shadow: 0 0 0 1px var(--hair) inset; }
@media (max-width: 60rem) { .cards.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .cards.two, .cards.three { grid-template-columns: minmax(0, 1fr); } }
.after-note { margin-top: 2rem; max-width: 42rem; color: var(--slate); font-size: 1.125rem; }
.after-note + .after-note { margin-top: 1rem; }

/* Split: text left, cards right */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 5vw, 4rem); align-items: start; }
.split .section-head { margin-bottom: 0; }
@media (max-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: .75rem; }
.steps > li { counter-increment: step; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); padding: 1.25rem 1.5rem; display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .25rem 1rem; }
.steps > li::before { content: counter(step); grid-row: span 2; font-family: var(--mono); font-size: .875rem; color: var(--sea7); padding-top: .15rem; }
.steps p { color: var(--steel); }

/* Stats row: seafoam numbers, no dividers */
.stats { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem 2rem; }
.stats li { display: grid; gap: .35rem; }
.stats .v { font-size: 1.75rem; font-weight: 500; letter-spacing: -.02em; color: var(--sea7); }
.stats .k { font-size: .875rem; color: var(--steel); }
@media (max-width: 52rem) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.proof { font-size: 1.125rem; color: var(--slate); max-width: 46rem; margin-bottom: 2.5rem; }

/* Status table in a white card */
.table-frame { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); overflow: hidden; }
.status-table { width: 100%; border-collapse: collapse; }
.status-table th, .status-table td { padding: .9rem 1.5rem; text-align: left; vertical-align: top; border-top: 1px solid var(--hair); font-size: .9375rem; }
.status-table thead th { border-top: 0; background: #fbfbfc; }
.status-table tbody th { width: 20%; font-weight: 500; color: var(--navy); }
.status-table td { width: 40%; color: var(--slate); }
.status-table td + td { color: var(--steel); }
@media (max-width: 40rem) {
  .status-table thead { display: none; }
  .status-table tr { display: grid; border-top: 1px solid var(--hair); padding: .5rem 0; }
  .status-table tbody tr:first-child { border-top: 0; }
  .status-table th, .status-table td { width: auto; border: 0; padding: .25rem 1.25rem; }
  .status-table td::before { content: attr(data-label) ": "; font-weight: 500; color: var(--navy); }
}

/* Roadmap */
.phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.phases > li { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); padding: 1.5rem; display: grid; gap: .75rem; align-content: start; }
.phases > li.is-now { box-shadow: var(--shadow-card), 0 0 0 1.5px var(--navy) inset; }
.phase-n { min-height: 1.75rem; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .75rem; color: var(--steel); }
.phases p { color: var(--steel); }
.section.white .phases > li { background: var(--canvas); }
@media (max-width: 62rem) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .phases { grid-template-columns: minmax(0, 1fr); } }
/* Six cards: three per row, so no orphan row */
.phases.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 62rem) { .phases.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .phases.six { grid-template-columns: minmax(0, 1fr); } }

/* The one orange surface: the closing call to action */
.cta-card { background: var(--orange); border-radius: 8px; padding: clamp(2rem, 5vw, 3.5rem); display: grid; gap: 1.25rem; justify-items: start; color: var(--navy); }
.cta-card h2 { color: var(--navy); max-width: 16em; }
.cta-card p { color: var(--navy); max-width: 36rem; font-size: 1.125rem; }
.cta-card .label { color: var(--navy); }
.cta-card .label::before { background: var(--navy); }
.cta-card .ghost { border-color: var(--navy); }
.cta-card .ghost:hover { background: rgba(17, 26, 74, .08); }

/* Inner pages reuse these */
.page-hero { padding-block: clamp(3rem, 7vw, 5rem) 2.5rem; }
.page-hero .wrap { display: grid; gap: 1.25rem; justify-items: start; }
.page-hero h1 { max-width: 15em; }
.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem clamp(2rem, 5vw, 4rem); align-items: start; }
.duo.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.duo.flip > .head { order: 2; }
.head, .stack { display: grid; gap: 1rem; align-content: start; }
.stack { max-width: 46rem; margin-bottom: 2.5rem; }
@media (max-width: 56rem) { .duo, .duo.flip { grid-template-columns: minmax(0, 1fr); } .duo.flip > .head { order: 0; } }
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.items > li { background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); padding: 1.5rem; display: grid; gap: .75rem; align-content: start; }
.items p { color: var(--steel); }
.items.one { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 40rem) { .items { grid-template-columns: minmax(0, 1fr); } }
.prose { display: grid; gap: 1rem; max-width: 40rem; }
.prose p, .prose li { color: var(--steel); }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
.term-panel { margin: 0; background: var(--white); border-radius: 8px; box-shadow: var(--shadow-card); padding: 1.5rem; display: grid; gap: 1rem; }
.term { margin: 0; font-family: var(--mono); font-size: .8125rem; line-height: 1.6; white-space: pre; overflow-x: auto; color: var(--charcoal); }
.term .prompt { color: var(--sea7); user-select: none; }
.term .comment { color: var(--mute); }
.term-panel figcaption { color: var(--steel); font-size: .8125rem; }
.cta .wrap { display: grid; gap: 1.25rem; justify-items: start; }

/* Footer: compact */
.site-footer { background: var(--white); box-shadow: 0 -1px 0 var(--hair); padding-block: 3.5rem 2rem; font-size: .875rem; color: var(--steel); }
.site-footer a { color: var(--steel); text-decoration: none; }
.site-footer a:hover { color: var(--navy); }
.site-footer .mark { color: var(--navy); font-weight: 600; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; }
.footer-grid > div:first-child { display: grid; gap: 1rem; align-content: start; max-width: 24rem; }
.footer-grid h2 { margin-bottom: .75rem; font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--hair); font-size: .75rem; color: var(--fog); }
.site-footer.compact { padding-block: 1.5rem; }
.site-footer.compact .legal { margin-top: 0; border-top: 0; padding-top: 0; }
@media (max-width: 44rem) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-grid > div:first-child { grid-column: 1 / -1; } }
.not-found { display: grid; align-content: center; }
.not-found .wrap { display: grid; gap: 1.25rem; justify-items: start; }
