/* ==========================================================================
   DataPipeline landing page
   Layout: a sand frame holding a white sheet, serif display type, mono labels
   and an electric-yellow call to action. Illustrations: isometric hairline
   drawings with exploded views and lettered callouts, generated by
   tools/draw.mjs (run `node tools/draw.mjs` after editing a scene).
   ========================================================================== */

:root {
  /* Frame & surfaces */
  --sand: #CFCBC5;
  --paper: #FFFFFF;
  --panel: #F2F0EB;
  --line: #E6E3DD;
  --line-strong: #D5D1CA;

  /* Ink */
  --ink: #121212;
  --ink-line: #262326;
  --text: #1E1D1C;
  --grey: #6E6A66;

  /* Accents */
  --volt: #E6F02A;
  --volt-deep: #D5DF1A;
  --lime: #CBE25B;
  --lilac: #C9AEF4;
  --tangerine: #FF9F67;
  --sun: #FFD84A;
  --mist: #E1EBF7;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --frame: clamp(8px, 1.6vw, 24px);
  --pad: clamp(20px, 5vw, 72px);
  --wrap: 1240px;
  --radius: 14px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--volt); color: var(--ink); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 12px; border-radius: 8px; background: var(--ink); color: #fff;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--pad), var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--serif); font-weight: 550; font-optical-sizing: auto; color: var(--ink); }
.eyebrow { font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 8px;
  font: 500 15.5px/1 var(--sans); white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn-volt { background: var(--volt); color: var(--ink); }
.btn-volt:hover { background: var(--volt-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #2B2A28; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--panel); }
.text-link { display: inline-flex; gap: 6px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Header (sits on the sand frame) ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 36px;
  height: 68px; padding: 0 calc(var(--frame) + 12px);
  background: var(--sand);
}
/* Rounded top corners pinned under the header, so the sheet never looks
   square-cornered while it scrolls beneath it */
.top::after {
  content: ""; position: absolute; top: 100%; left: var(--frame); right: var(--frame);
  height: var(--radius); pointer-events: none;
  background:
    radial-gradient(circle at 100% 100%, transparent var(--radius), var(--sand) calc(var(--radius) + .5px)) left top / var(--radius) var(--radius) no-repeat,
    radial-gradient(circle at 0 100%, transparent var(--radius), var(--sand) calc(var(--radius) + .5px)) right top / var(--radius) var(--radius) no-repeat;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.mark { width: auto; height: 36px; }
.top-nav { display: flex; gap: 28px; font-size: 16px; color: #000; }
.top-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.top-cta { margin-left: auto; padding: 0 24px; }
@media (max-width: 760px) {
  .top-nav { display: none; }
}

/* ---------- The sheet ---------- */
.sheet { margin: 0 var(--frame); background: var(--paper); border-radius: var(--radius); overflow: hidden; }

/* ---------- Tags (boxed chips) ---------- */
.tags { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tag {
  display: inline-flex; align-items: stretch; height: 28px;
  border: 1px solid var(--ink-line);
  font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}
.tag-k { display: grid; place-items: center; width: 28px; background: var(--lilac); border-right: 1px solid var(--ink-line); }
.tag-t { display: flex; align-items: center; padding: 0 10px; background: var(--lime); }
.tag--line { align-items: center; padding: 0 10px; background: var(--paper); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 124px) 0 clamp(24px, 4vw, 48px); }
.hero-head { text-align: center; }
.hero h1 {
  margin: 28px auto 0;
  font-size: clamp(44px, 6.6vw, 96px); line-height: 1; letter-spacing: -.01em;
}
.lede { max-width: 650px; margin: 28px auto 0; font-size: clamp(17px, 1.45vw, 20px); color: var(--grey); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 34px; }
.hero-note {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px;
  font: 500 11.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--grey);
}
.hero-note svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* Blocks behind the headline; main.js swaps curated layouts on a beat */
.hero-title { position: relative; z-index: 0; }
.title-blocks { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.title-blocks i { position: absolute; opacity: .7; }

/* ---------- Stages (drawing panels with a dot grid) ---------- */
.stage {
  position: relative; display: grid; place-items: center; overflow: hidden;
  padding: clamp(20px, 4vw, 56px);
  border-radius: var(--radius);
  background-color: var(--panel);
  background-image: radial-gradient(circle at 1px 1px, rgba(38, 35, 38, .14) 1px, transparent 0);
  background-size: 20px 20px;
}
.stage--hero { margin-top: clamp(48px, 6vw, 80px); padding: clamp(24px, 4.5vw, 72px) clamp(12px, 3vw, 48px); }
.stage--hero .art { width: 100%; max-width: 1040px; height: auto; }

/* ---------- What we find ---------- */
.finds { padding: clamp(48px, 6vw, 72px) 0 0; text-align: center; }
.find-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; margin: 18px auto 0; }
.find-list li {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 12px;
  border: 1px solid var(--line-strong); border-radius: 6px; font-size: 14.5px;
}
.find-list li::before { content: ""; width: 8px; height: 8px; background: var(--tangerine); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }

/* ---------- Product rows ---------- */
.rows { padding-top: clamp(88px, 10vw, 150px); }
.rows-wrap { display: grid; gap: clamp(88px, 10vw, 150px); }
.row { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 96px); }
.row--flip .stage { order: 2; }
.row .stage { aspect-ratio: 1.1 / 1; }
/* drawings scale by one shared factor (--w = natural width) so line weights match */
.row .stage .art { width: min(100%, calc(var(--w) * 1.3)); height: auto; }
.row-copy h2 { margin: 0 0 18px; font-size: clamp(36px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -.01em; }
.row-copy > p { max-width: 520px; font-size: 17.5px; color: var(--grey); }
.ticks { display: grid; gap: 12px; margin: 26px 0 32px; }
.ticks li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 7px; background: var(--panel); }
.ico svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-line); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 880px) {
  .row { grid-template-columns: 1fr; }
  .row--flip .stage { order: 0; }
  .row .stage { aspect-ratio: auto; }
}

/* ---------- Section heads ---------- */
.sec-head { max-width: 780px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.sec-head h2 { margin-top: 14px; font-size: clamp(38px, 4.8vw, 66px); line-height: 1.02; letter-spacing: -.01em; }
.sec-head p { margin-top: 16px; font-size: 18px; color: var(--grey); }

/* ---------- How it works ---------- */
.steps { padding-top: clamp(104px, 12vw, 170px); }
.step-frame {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  padding: 18px; border-radius: 18px; background: var(--panel);
}
.step-frame::before { /* dashed connector running behind the cards */
  content: ""; position: absolute; left: 18px; right: 18px; top: 50%;
  border-top: 1px dashed #A8A39B;
}
.step {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 30px 26px 26px; border-radius: 12px; background: var(--paper); text-align: center;
}
.step-n {
  position: absolute; top: 14px; left: 14px; display: grid; place-items: center;
  width: 26px; height: 26px; border: 1px solid var(--ink-line); border-radius: 50%;
  font: 500 12px/1 var(--mono);
}
.step h3 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.1; letter-spacing: -.01em; }
.step > p { max-width: 300px; margin-top: 10px; font-size: 15.5px; color: var(--grey); }
.step-art { display: grid; place-items: center; height: 230px; margin: 18px 0; }
.step-art .art { width: min(100%, calc(var(--w) * .9)); height: auto; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: auto; }
.chip { padding: 6px 9px; border-radius: 6px; background: var(--panel); font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 880px) {
  .step-frame { grid-template-columns: 1fr; }
  .step-frame::before { left: 50%; right: auto; top: 18px; bottom: 18px; border-top: 0; border-left: 1px dashed #A8A39B; }
}

/* ---------- Security ---------- */
.security { padding-top: clamp(104px, 12vw, 170px); }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.sec-copy h2 { margin: 16px 0 18px; font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -.01em; }
.sec-copy > p { max-width: 460px; margin-bottom: 28px; font-size: 17.5px; color: var(--grey); }
.stage--vault { margin-top: 40px; padding: clamp(24px, 4vw, 48px); }
.stage--vault .art { width: min(100%, calc(var(--w) * 1.1)); height: auto; }
/* Accordion: one item open at a time. The answer wrapper animates its grid row
   from 0fr to 1fr, so opening and closing are one continuous motion. */
.acc-item { border-top: 1px solid var(--line-strong); }
.acc-item:last-child { border-bottom: 1px solid var(--line-strong); }
.acc h3 { margin: 0; font: inherit; }
.acc-q {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; padding: 24px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: 550 clamp(22px, 2.1vw, 28px)/1.15 var(--serif); letter-spacing: -.01em; color: var(--ink);
}
.acc-i { position: relative; flex: none; width: 16px; height: 16px; }
.acc-i::before, .acc-i::after {
  content: ""; position: absolute; left: 0; top: 7.5px; width: 16px; height: 1.5px; background: var(--ink);
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.acc-i::after { transform: rotate(90deg); }
.acc-item.is-open .acc-i::after { transform: rotate(0deg); }
.acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s cubic-bezier(.2, .7, .2, 1); }
.acc-item.is-open .acc-a { grid-template-rows: 1fr; }
.acc-a > div { min-height: 0; overflow: hidden; }
.acc-a p {
  max-width: 520px; margin: -6px 0 0; padding-bottom: 26px; font-size: 16.5px; color: var(--grey);
  opacity: 0; transition: opacity .25s ease;
}
.acc-item.is-open .acc-a p { opacity: 1; transition: opacity .35s ease .1s; }
@media (max-width: 880px) {
  .sec-grid { grid-template-columns: 1fr; }
}

/* ---------- Who we serve ---------- */
.who { padding-top: clamp(104px, 12vw, 170px); }
.who-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.who-card { display: flex; flex-direction: column; padding: clamp(24px, 3vw, 40px); border-radius: 18px; background: var(--panel); }
.who-art { display: grid; place-items: center; height: 300px; margin-bottom: 28px; border-radius: 12px; background: var(--paper); }
.who-art .art { width: min(88%, calc(var(--w) * .75)); height: auto; }
.who-card h3 { margin: 12px 0 12px; font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -.01em; }
.who-card > p:not(.eyebrow) { color: var(--grey); }
.who-card .text-link { margin-top: 24px; }
@media (max-width: 880px) {
  .who-grid { grid-template-columns: 1fr; }
}

/* ---------- Inquire (yellow block with an iridescent wash) ---------- */
.cta-wrap { padding: clamp(104px, 12vw, 170px) var(--frame) var(--frame); }
.cta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(32px, 5vw, 80px);
  padding: clamp(28px, 6vw, 88px);
  border-radius: var(--radius); background: var(--volt);
}
.cta::before {
  content: ""; position: absolute; inset: -30% -20% -40% 30%; z-index: 0; filter: blur(40px);
  background:
    radial-gradient(closest-side at 30% 45%, rgba(201, 174, 244, .95), transparent),
    radial-gradient(closest-side at 62% 70%, rgba(225, 235, 247, .95), transparent),
    radial-gradient(closest-side at 48% 92%, rgba(255, 159, 103, .7), transparent),
    radial-gradient(closest-side at 82% 26%, rgba(203, 226, 91, .9), transparent);
}
.cta > * { position: relative; z-index: 1; }
.cta .eyebrow { color: rgba(0, 0, 0, .6); }
.cta h2 { margin-top: 16px; font-size: clamp(44px, 6.4vw, 96px); line-height: .98; letter-spacing: -.01em; }
.cta-copy > p:not(.eyebrow) { max-width: 440px; margin-top: 20px; font-size: 19px; }
.form {
  display: grid; gap: 10px; padding: clamp(20px, 2.5vw, 30px);
  border-radius: var(--radius); background: var(--paper);
  box-shadow: 0 30px 60px -32px rgba(0, 0, 0, .4);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper);
  font-size: 15.5px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field::placeholder { color: #8E8A85; }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18, 18, 18, .08); }
select.field {
  appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
select.field:invalid { color: #8E8A85; }
textarea.field { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.form .btn { width: 100%; height: 50px; margin-top: 4px; }
.form-status { font-size: 14px; color: var(--grey); }
.form-status:empty { display: none; }
@media (max-width: 880px) {
  .cta { grid-template-columns: 1fr; }
}
@media (max-width: 460px) {
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Footer (on the sand frame) ---------- */
.foot { padding: clamp(56px, 7vw, 96px) calc(var(--frame) + var(--pad) * .6) 48px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 40px; max-width: 1400px; margin: 0 auto; }
.foot-brand .art { width: 120px; height: auto; margin-bottom: 18px; }
.foot-meta { font-size: 14px; }
.foot-legal { display: flex; gap: 16px; margin-top: 6px; font-size: 14px; color: rgba(0, 0, 0, .6); }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.3; }
.foot-h { margin-bottom: 4px; font-weight: 600; color: #1a1a1a; }
.foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   Isometric drawings
   .s  = outlined shapes that "draw on" (pathLength=1 + dashoffset) when the
         drawing scrolls into view; fills fade in just behind the strokes
   .p  = plain shapes inside moving packets
   .g  = dashed projection lines
   .pk = packets that travel along a belt on a loop
   .co = lettered callouts
   ========================================================================== */
.art { display: block; height: auto; overflow: visible; }
.art .s, .art .p {
  stroke: var(--ink-line); stroke-width: var(--sw, 1.2);
  stroke-linejoin: round; stroke-linecap: round;
}
.art .s {
  stroke-dasharray: 1 1;
  transition:
    stroke-dashoffset 1s cubic-bezier(.65, 0, .35, 1) var(--d, 0s),
    fill-opacity .6s ease calc(var(--d, 0s) + .3s);
}
.art .g {
  fill: none; stroke: var(--ink-line); stroke-width: 1; stroke-dasharray: 3 3; opacity: .75;
  transition: opacity .6s ease var(--d, 0s);
}
.art .co .ld { fill: none; stroke: var(--ink-line); stroke-width: 1; stroke-dasharray: 3 3; }
.art .co .dot { fill: #fff; stroke: var(--ink-line); stroke-width: 1.4; }
.art .co .pill { fill: var(--ink-line); }
.art .co .key { fill: #fff; }
.art .co .key-t { font: 600 10px var(--mono); fill: var(--ink-line); text-anchor: middle; dominant-baseline: central; }
.art .co .pill-t { font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; fill: #fff; dominant-baseline: central; }
.art .co { transition: opacity .4s ease calc(var(--d, 0s) + .2s); }
.art .co .co-tag {
  transform-box: fill-box; transform-origin: center;
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1) calc(var(--d, 0s) + .2s);
}

/* Hidden until the drawing is in view (only when JavaScript is running) */
.js .art:not(.is-drawn) .s { stroke-dashoffset: 1; fill-opacity: 0; }
.js .art:not(.is-drawn) .g { opacity: 0; }
.js .art:not(.is-drawn) .co { opacity: 0; }
.js .art:not(.is-drawn) .co .co-tag { transform: scale(.4); }
.js .art:not(.is-drawn) .pk { visibility: hidden; }

/* Packets riding the belts */
.art .pk { animation: travel var(--t, 6s) linear var(--o, 0s) infinite; }
.art .pk-top { animation: recolor var(--t, 6s) linear var(--o, 0s) infinite; }
@keyframes travel {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
@keyframes recolor {
  0%, 52% { fill: #FF9F67; }
  58%, 100% { fill: #CBE25B; }
}

/* Callout labels are too small to read on phones */
@media (max-width: 640px) {
  .art .co { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
