/* GeekScience · one-page site
   World: navy-black ground, bone ink, navy-tinted secondary, one cobalt accent.
   One family throughout: Bricolage Grotesque, ranged by optical size. */

:root {
  --bg-0: #070b14;
  --bg-1: #0b1426;
  --line: rgba(163, 176, 203, 0.16);
  --line-strong: rgba(163, 176, 203, 0.34);
  --ink: #eef2fa;
  --ink-2: #a3b0cb;
  --ink-3: #7d8baa;
  --accent: #2468db;
  --accent-text: #6fa3ff;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --head-h: 4.5rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 900ms;

  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-variation-settings: "opsz" 14;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg-1);
  background-image: radial-gradient(1200px 800px at 85% -10%, rgba(44, 79, 143, 0.35), transparent 60%);
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--accent-text); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 2px; }

html { scrollbar-color: var(--line-strong) var(--bg-0); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid var(--bg-0); }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: 0.6rem 0.9rem; background: var(--ink); color: var(--bg-0);
  border-radius: 999px; z-index: 100; text-decoration: none;
}
.skip:focus { top: 1rem; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  position: relative;
}

/* ---------- Type ---------- */
.meta {
  font-variation-settings: "opsz" 12;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}
.display {
  font-variation-settings: "opsz" 96;
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display--sm { font-size: clamp(2.4rem, 5.6vw, 4.5rem); }
.headline {
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 22ch;
}
.deck {
  font-variation-settings: "opsz" 20;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
}
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 52ch; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 20;
  height: var(--head-h);
  transition: background-color 400ms var(--ease-out), border-color 400ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.site-head.is-scrolled {
  background: rgba(11, 20, 38, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.site-head__inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; font-weight: 600; letter-spacing: -0.01em;
}
.brand__name { white-space: nowrap; }
.brand__mark { color: var(--ink); }
.brand__accent { fill: var(--accent-text); }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a {
  text-decoration: none; color: var(--ink-2); font-size: 0.95rem;
  padding: 0.35rem 0; position: relative;
  transition: color 300ms var(--ease-out);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--ink); transition: right 400ms var(--ease-out);
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--ink); }
.site-nav a:hover::after { right: 0; }

.pill {
  display: inline-flex; align-items: center;
  padding: 0.55rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.95rem; text-decoration: none; white-space: nowrap;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.pill:hover, .pill:focus-visible { background: var(--ink); color: var(--bg-0); border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 7fr 5fr;
  column-gap: clamp(2rem, 5vw, 5rem);
  min-height: calc(100vh - var(--head-h));
  min-height: calc(100svh - var(--head-h));
  padding-block: 2rem 3rem;
  align-items: center;
}
.hero__copy { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
.hero h1 .word { display: block; transition: color 700ms var(--ease-out); }
.word--bold { font-weight: 700; }
.js [data-words] .word.is-dim { color: var(--ink-2); }
.dot { color: var(--accent-text); }

.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.95rem 1.4rem 0.95rem 1.6rem;
  background: var(--ink); color: var(--bg-0);
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 1rem;
  transition: transform 500ms var(--ease-out), background-color 300ms var(--ease-out);
}
.btn:hover, .btn:focus-visible { background: #fff; transform: translateY(-1px); }
.btn__arrow { transition: transform 500ms var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Plates: the hero illustration and the swappable portrait */
.plate { position: relative; }
.plate__img {
  grid-row: 1; grid-column: 1;
  width: 100%; height: 100%; min-height: 0; object-fit: cover;
}
.hero__plate {
  align-self: stretch;
  min-height: 24rem;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 0.9rem;
}
.hero__plate .plate__img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 42%), linear-gradient(to top, transparent, #000 38%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 42%), linear-gradient(to top, transparent, #000 38%);
  mask-composite: intersect;
}
.plate__field { grid-row: 1; grid-column: 1; width: 100%; height: 100%; }
.plate__caption {
  grid-row: 2; display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 0.75rem; border-top: 1px solid var(--line);
}
.plate__phase { color: var(--ink); transition: color 500ms var(--ease-out); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem) 0; scroll-margin-top: var(--head-h); }
.section__rail {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
}
.section__head {
  display: grid; grid-template-columns: 7fr 5fr; gap: 2rem;
  align-items: end;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem);
}
.section__head .lede { justify-self: end; }

/* Rows: what we build */
.row {
  display: grid;
  grid-template-columns: 9rem 5fr 6fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}
.row:last-child { border-bottom: 1px solid var(--line); }
.row__index { padding-top: 0.5rem; white-space: nowrap; }
.row__title { display: grid; gap: 0.6rem; align-content: start; }
.row__title h3 {
  font-variation-settings: "opsz" 48;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.2; letter-spacing: -0.02em;
  transition: transform 600ms var(--ease-out);
}
.row:hover .row__title h3 { transform: translateX(6px); }
.row__body { display: grid; gap: 1.1rem; color: var(--ink-2); max-width: 58ch; }
.row__examples { display: grid; gap: 0.5rem; padding-left: 1.1rem; }
.row__examples li { position: relative; font-size: 0.98rem; }
.row__examples li::before {
  content: ""; position: absolute; left: -1.1rem; top: 0.68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-text);
}

/* Steps: how we work */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.step {
  padding: 2rem 1.5rem 2.5rem 0;
  border-right: 1px solid var(--line);
  display: grid; gap: 0.75rem; align-content: start;
  color: var(--ink-2);
}
.step + .step { padding-left: 1.5rem; }
.step:last-child { border-right: 0; }
.step__glyph { color: var(--ink); margin-bottom: 1rem; }
.glyph__accent { fill: var(--accent-text); }
.step h3 {
  font-variation-settings: "opsz" 36;
  font-weight: 600; font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; color: var(--ink);
}
.step p { font-size: 0.98rem; }

.statement {
  font-variation-settings: "opsz" 72;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.4; letter-spacing: -0.02em;
  max-width: 24ch;
  padding-block: clamp(3rem, 6vw, 5rem) 0;
  color: var(--ink-2);
  text-wrap: balance;
}
.statement em { font-style: normal; color: var(--ink); }

/* Founder */
.founder {
  display: grid; grid-template-columns: 4fr 7fr;
  gap: clamp(2rem, 6vw, 6rem);
  padding-block: clamp(2rem, 5vw, 3.5rem) 0;
  align-items: start;
}
.founder__plate { aspect-ratio: 4 / 5; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 0.9rem; }
.founder__copy { display: grid; gap: 1.4rem; padding-top: 0.5rem; }
.founder__copy p { color: var(--ink-2); max-width: 56ch; font-size: 1.125rem; }
.founder__copy .headline { max-width: 18ch; }
.signature {
  font-variation-settings: "opsz" 48;
  font-size: 1.6rem; font-weight: 500; letter-spacing: -0.02em;
  color: var(--ink);
  display: grid; gap: 0.3rem; padding-top: 0.5rem;
}

/* Contact */
.section--contact { padding-bottom: clamp(4rem, 9vw, 8rem); }
.contact { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.channels { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
.channel { display: grid; gap: 0.5rem; }
.channel__row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.email {
  font-variation-settings: "opsz" 72;
  font-weight: 500;
  font-size: clamp(1.5rem, 4.2vw, 3.4rem);
  letter-spacing: -0.03em; line-height: 1.1;
  text-decoration: underline;
  text-decoration-color: var(--accent-text);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  transition: color 300ms var(--ease-out);
  word-break: break-word;
}
.email--sm { font-variation-settings: "opsz" 48; font-size: clamp(1.3rem, 2.8vw, 2.2rem); }
.email:hover, .email:focus-visible { color: var(--accent-text); }
.copy {
  display: inline-flex; align-items: center;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-variation-settings: "opsz" 12;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}
.copy:hover, .copy:focus-visible { background: var(--ink); color: var(--bg-0); border-color: var(--ink); }
.copy.is-done { border-color: var(--accent-text); color: var(--accent-text); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; position: relative; z-index: 1; }
.site-foot__inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-foot a { text-decoration: none; color: var(--ink-2); }
.site-foot a:hover { color: var(--ink); }

/* ---------- Reveal (JS only; content visible by default) ---------- */
.js [data-reveal] {
  opacity: 0.42;
  transform: translateY(14px);
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; row-gap: 1.75rem; min-height: 0; padding-block: 2.5rem 3rem; }
  .hero__copy { display: contents; }
  .hero h1 { grid-row: 1; }
  .deck { grid-row: 2; }
  .hero__actions { grid-row: 3; }
  .hero__plate { grid-row: 4; min-height: 0; aspect-ratio: 4 / 3; margin-top: 0.5rem; }
  .section__head { grid-template-columns: 1fr; }
  .section__head .lede { justify-self: start; }
  .row { grid-template-columns: 9rem 1fr; }
  .row__body { grid-column: 2; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .step:nth-child(3) { padding-left: 0; }
  .founder { grid-template-columns: 1fr; }
  .founder__plate { max-width: 22rem; }
}
@media (max-width: 640px) {
  .site-head__inner { gap: 0.75rem; }
  .site-nav { gap: 0.8rem; }
  .site-nav a { font-size: 0.9rem; }
  .brand { gap: 0.5rem; font-size: 0.92rem; }
  .brand__mark { width: 24px; height: 24px; }
  .row { grid-template-columns: 1fr; gap: 1rem; }
  .row__body { grid-column: 1; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; padding-left: 0 !important; }
  .step + .step { border-top: 1px solid var(--line); }
  .site-foot__inner { flex-direction: column; gap: 0.5rem; }
}
@media (max-width: 420px) {
  .pill { display: none; }
}
@media (max-width: 350px) {
  .brand__name { display: none; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .js [data-words] .word.is-dim { color: inherit; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

/* 404 */
.notfound {
  min-height: calc(100vh - var(--head-h) - 6rem);
  min-height: calc(100svh - var(--head-h) - 6rem);
  display: grid; align-content: center; justify-items: start;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding-block: clamp(3rem, 10vw, 7rem);
}
