/* ==========================================================================
   Creek — creekdata.io
   Fonts are self-hosted (no third-party requests, no cookies).
   ========================================================================== */

@font-face { font-family: "Sora"; src: url("/assets/fonts/sora-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/assets/fonts/sora-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/assets/fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* Brand */
  --blue: #2F3BFF;
  --blue-deep: #1E27D9;
  --yellow: #FFD447;
  --navy: #0E1240;

  /* Neutrals, all tinted toward the brand blue */
  --ink: #0E1240;
  --ink-soft: #484E7E;
  --mist: #EEF0FF;
  --line: #D9DCF6;
  --white: #FFFFFF;

  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 5.4rem); line-height: 1.02; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.25; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--yellow); color: var(--navy); padding: 10px 16px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }
.on-white :focus-visible, main :focus-visible { outline-color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font: 500 1rem/1 var(--font-body);
  padding: 15px 22px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-yellow { background: var(--yellow); color: var(--navy); }
.btn-yellow:hover { background: #FFE07A; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--blue-deep); }
.btn .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.btn-yellow .dot { background: var(--blue); }

/* ---------- Header (always sits on blue) ---------- */
.band { background: var(--blue); color: var(--white); position: relative; overflow: hidden; }

.site-header { position: relative; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; }
.brand { display: block; color: var(--white); width: 116px; }
.brand svg { width: 100%; height: auto; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 500; position: relative; padding: 6px 0; }
.nav ul a::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--yellow); transform: scale(0); transition: transform .2s;
}
.nav ul a:hover::after, .nav ul a[aria-current="page"]::after { transform: scale(1); }
.lang {
  font-size: .9rem; font-weight: 500; text-decoration: none;
  border: 1.5px solid rgba(255,255,255,.5); border-radius: 999px; padding: 5px 11px !important;
}
.lang:hover { border-color: var(--white); }

.menu-btn {
  display: none; background: none; border: 0; color: var(--white); padding: 8px; margin-right: -8px; cursor: pointer;
}
.menu-btn svg { width: 28px; height: 28px; }

@media (max-width: 820px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 84px; left: 0; right: 0; z-index: 10;
    flex-direction: column; align-items: flex-start; gap: 18px;
    background: var(--blue); padding: 8px var(--gutter) 28px;
    border-bottom: 1px solid rgba(255,255,255,.2);
    display: none;
  }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; gap: 4px; width: 100%; }
  .nav ul a { display: block; font-family: var(--font-head); font-size: 1.6rem; letter-spacing: -.02em; padding: 8px 0; }
  .nav ul a::after { left: auto; right: 0; top: 50%; bottom: auto; margin-top: -3px; }
}

/* ---------- Home hero: the logo, rebuilt from dots ---------- */
.hero { min-height: min(100vh, 980px); display: flex; flex-direction: column; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-body { position: relative; z-index: 2; flex: 1; display: flex; pointer-events: none; }
.hero-body .wrap { display: flex; flex-direction: column; justify-content: center; padding-top: clamp(16px, 4vh, 56px); padding-bottom: clamp(48px, 8vh, 96px); }
.hero-body a { pointer-events: auto; }
.hero-mark { width: min(100%, 940px); aspect-ratio: 271 / 112; color: var(--white); }
.hero-mark svg { width: 100%; height: 100%; }
.hero.mark-live .hero-mark svg { visibility: hidden; }
.hero-text {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px);
  align-items: end; margin-top: clamp(36px, 7vh, 80px);
}
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.8rem); max-width: 12ch; }
.hero .lede { max-width: 44ch; font-size: clamp(1.05rem, 1.4vw, 1.2rem); margin: 0; color: rgba(255,255,255,.88); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 860px) {
  .hero-text { grid-template-columns: 1fr; gap: 20px; }
}

/* the dots that change shape next to "What we build" */
.morph { margin-top: 40px; aspect-ratio: 4 / 3; background: var(--mist); border-radius: 18px; max-width: 460px; }
.morph canvas { width: 100%; height: 100%; }
.rows li.is-active h3 { color: var(--blue); }
.rows li.is-active .go { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* ---------- Inner page header ---------- */
.page-head .wrap { padding-top: clamp(36px, 7vh, 80px); padding-bottom: 36px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); max-width: 16ch; }
.page-head .lede { max-width: 52ch; font-size: clamp(1.08rem, 1.5vw, 1.25rem); margin-top: 22px; color: rgba(255,255,255,.88); }
.page-head .flow { width: 100%; height: auto; margin-top: 30px; color: var(--white); }

/* ---------- Sections ---------- */
section { padding: clamp(72px, 10vw, 128px) 0; }
.tint { background: var(--mist); }
.section-intro { max-width: 40ch; color: var(--ink-soft); font-size: 1.125rem; margin-top: 18px; }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split > :first-child { position: sticky; top: 40px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split > :first-child { position: static; }
}

/* What we build: rows, not cards */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--navy); }
.rows li { border-bottom: 1px solid var(--line); }
.rows a {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: center;
  padding: 28px 0; text-decoration: none;
}
.rows h3 { transition: color .2s; }
.rows p { grid-column: 1; margin: 0; color: var(--ink-soft); max-width: 52ch; }
.rows .go {
  grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--blue);
  transition: background-color .2s, border-color .2s, color .2s;
}
.rows .go svg { width: 18px; height: 18px; }
.rows a:hover h3 { color: var(--blue); }
.rows a:hover .go { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* Problems: a typographic run of outcomes */
.outcomes {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -0.03em;
  font-size: clamp(1.8rem, 4.4vw, 3.6rem); line-height: 1.18;
  margin: 28px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; column-gap: .45em; row-gap: .05em;
}
.outcomes li { display: inline-flex; align-items: center; gap: .45em; }
.outcomes li:not(:last-child)::after {
  content: ""; width: .2em; height: .2em; border-radius: 50%; background: var(--blue); flex: none;
}
.outcomes li:nth-child(even) { color: var(--blue); }
.after-outcomes { max-width: 56ch; margin-top: 36px; color: var(--ink-soft); font-size: 1.125rem; }

/* Process: a real sequence, joined by the creek line */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; position: relative; counter-reset: step; }
.steps::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: 21px; height: 2px;
  background: radial-gradient(circle, var(--blue) 2px, transparent 2.5px) 0 50% / 14px 6px repeat-x;
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: var(--white);
  font: 600 1rem/1 var(--font-head); margin-bottom: 22px; position: relative;
}
.steps li:last-child::before { background: var(--yellow); color: var(--navy); }
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; row-gap: 44px; }
  .steps::before { display: none; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* Closing call to action */
.cta { padding: clamp(64px, 9vw, 112px) 0; }
.cta .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.cta h2 { max-width: 18ch; }
.cta p { color: rgba(255,255,255,.85); margin: 16px 0 0; max-width: 44ch; }

/* ---------- Services page ---------- */
.service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 6vw, 96px); padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.service:first-child { border-top: 0; padding-top: 0; }
.service .kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--blue); }
.service .kicker svg { width: 54px; height: auto; }
.service h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.service .body > p { font-size: 1.125rem; }
.service .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 30px; }
.service h3 { font-size: 1.05rem; margin-bottom: 12px; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 22px; margin-bottom: 9px; color: var(--ink-soft); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
@media (max-width: 860px) {
  .service { grid-template-columns: 1fr; padding: 48px 0; }
}
@media (max-width: 560px) { .service .cols { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- About page ---------- */
.story { max-width: 62ch; font-size: 1.2rem; line-height: 1.65; }
.story p:first-child { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.3; letter-spacing: -.02em; color: var(--navy); }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 48px; }
.principles li { border-top: 3px solid var(--blue); padding-top: 22px; }
.principles li:nth-child(2) { border-color: var(--yellow); }
.principles li:nth-child(3) { border-color: var(--navy); }
.principles h3 { margin-bottom: 12px; }
.principles p { color: var(--ink-soft); margin: 0; }
@media (max-width: 820px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Contact page ---------- */
.mail-big {
  display: inline-block; font-family: var(--font-head); font-weight: 600; letter-spacing: -.03em;
  font-size: clamp(1.7rem, 5.6vw, 4.4rem); color: var(--blue); text-decoration: none; line-height: 1.1;
  background: linear-gradient(var(--yellow), var(--yellow)) 0 92% / 0 .14em no-repeat;
  transition: background-size .35s; overflow-wrap: anywhere;
}
.mail-big:hover { background-size: 100% .14em; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); margin-top: 56px; }
.contact-grid h2 { font-size: 1.35rem; margin-bottom: 16px; }
.contact-grid .facts p { color: var(--ink-soft); }
.contact-grid .facts strong { display: block; color: var(--ink); font-weight: 500; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Legal page ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.todo { background: #FFF4C7; padding: 0 .25em; border-radius: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-weight: 500; color: var(--ink); border-bottom-color: var(--navy); }
.prose td { color: var(--ink-soft); }
.prose code { font-size: .9em; background: var(--mist); padding: .1em .35em; border-radius: 4px; color: var(--ink); }
@media (max-width: 560px) { .prose table { display: block; overflow-x: auto; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 64px 0 40px; font-size: .95rem; }
.site-footer .top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.site-footer .brand { width: 104px; }
.site-footer .tag { margin: 18px 0 0; max-width: 30ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .cols { display: flex; gap: clamp(32px, 6vw, 80px); flex-wrap: wrap; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; color: rgba(255,255,255,.6); font-size: .875rem; }
.site-footer .bottom a { color: rgba(255,255,255,.75); }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.privacy-note { color: var(--ink-soft); font-size: .95rem; margin-top: 14px; }
.privacy-note a { color: var(--blue); }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: flex; flex-direction: column; }
.lost .wrap.body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 80px; }
.lost h1 { max-width: 14ch; }
.lost p { color: rgba(255,255,255,.85); max-width: 44ch; margin-top: 20px; }
