/*
 * Deep Water landing — "Dive 07", implemented from the Claude Design project
 * `DeepWater landing page`, file `v3/DeepWater v3.dc.html`.
 *
 * The design is a canvas component: one React tree with every style inline and
 * a `{{ binding }}` for anything the scroll drives. Here it is a plain
 * document. Fixed values live in this stylesheet; the scroll-driven ones
 * arrive as custom properties set by landing.js (`--frac`, `--darkness`,
 * `--tick`, `--flare`, …).
 *
 * The page's spine is one journey: forty source chips drift in the hero, are
 * judged in the sweep, and the survivors travel on into the report. That is
 * landing-chips.js; this file only gives them their look.
 *
 * Landing page only. The research archive keeps styles.css.
 */

:root {
  --ground: #0a0e10;
  --ground-deep: #05080a;
  --panel: #111719;
  --ink: #f2f6f8;
  --ink-2: #eef2f4;
  --ink-3: #dfe6e9;
  --body: #b9c4c9;
  --body-2: #cfd8dc;
  --muted: #98a6ac;
  --muted-2: #8b989e;
  --faint: #7d8b91;
  --faint-2: #5b6a70;
  --accent: #d9524a;
  --accent-rgb: 217 82 74;
  --accent-lift: #ea8b84;
  --line: rgb(160 180 190 / 16%);
  --line-soft: rgb(160 180 190 / 12%);
  --line-mid: rgb(160 180 190 / 18%);
  --line-strong: rgb(160 180 190 / 30%);
  --rail: 76px;
  --gutter: 92px;
  --edge: 32px;
  --serif: "Instrument Serif", "Georgia", serif;
  --sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  background: var(--ground);
  color: #c6ced2;
  font-family: var(--mono);
  margin: 0;
  overflow-x: clip;
  padding: 0;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-lift);
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: rgb(var(--accent-rgb) / 30%);
  color: var(--ink);
}

/* ========================= shared type ========================= */

.dw-label {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.26em;
  margin: 0 0 38px;
  text-transform: uppercase;
}

.dw-h1 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(57px, 9.1vw, 161px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.94;
  margin: 0;
  max-width: 15em;
}

.dw-h2 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 5.6vw, 96px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 0.96;
  margin: 0;
}

.dw-em {
  color: var(--accent);
  font-style: italic;
}

.dw-p {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.85;
  margin: 0;
  max-width: 34em;
}

.dw-p-bright {
  color: var(--body);
}

.dw-p-gap {
  margin-top: 32px;
}

.dw-p-lead {
  margin: 0 0 44px;
  max-width: 32em;
}

.dw-p-foot {
  margin: 30px 0 0;
  max-width: 32em;
}

.dw-h2-gap {
  margin-bottom: 40px;
}

.dw-num {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 46px;
  line-height: 1;
}

.dw-cap {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ========================= sections ========================= */

.dw-section {
  padding: 0 var(--edge) 150px var(--gutter);
  position: relative;
  z-index: 2;
}

.dw-section-top {
  overflow: hidden;
  padding-top: 140px;
}

.dw-two {
  align-items: start;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.dw-stack {
  display: grid;
  gap: 18px;
  padding-top: 8px;
}

.dw-accent {
  color: var(--accent);
}

@media (width <= 900px) {
  :root {
    --gutter: 22px;
    --edge: 18px;
  }

  .dw-two {
    grid-template-columns: minmax(0, 1fr);
  }

  .dw-section {
    padding-bottom: 96px;
  }
}

/* ========================= fixed instruments ========================= */

.dw-water {
  background: var(--ground-deep);
  inset: 0;
  opacity: var(--darkness, 0);
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

/* Marine snow: specks lifting past the reader the whole way down. */
.dw-motes {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 1;
}

.dw-mote {
  aspect-ratio: 1;
  background: rgb(226 240 246 / 50%);
  border-radius: 50%;
  bottom: -6vh;
  position: absolute;
}

@keyframes dw-mote {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0);
  }

  12% {
    opacity: 0.5;
  }

  88% {
    opacity: 0.35;
  }

  100% {
    opacity: 0;
    transform: translate3d(22px, -92vh, 0);
  }
}

.dw-sounding {
  bottom: 0;
  left: 0;
  pointer-events: none;
  position: fixed;
  top: 0;
  width: var(--rail);
  z-index: 6;
}

.dw-sounding-ticks {
  background-image:
    repeating-linear-gradient(to bottom, rgb(160 180 190 / 30%) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(to bottom, rgb(160 180 190 / 46%) 0 1px, transparent 1px 70px);
  background-position-y: var(--tick, 0);
  inset: 0;
  opacity: 0.45;
  position: absolute;
}

.dw-needle {
  background: var(--accent);
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  top: 50%;
}

.dw-readout {
  display: grid;
  gap: 4px;
  left: 10px;
  position: absolute;
  top: 50%;
  transform: translateY(-42px);
}

.dw-readout-line {
  align-items: baseline;
  display: flex;
  gap: 4px;
  margin: 0;
}

.dw-readout b {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.dw-readout span {
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.2em;
}

/* The same sounding in fathoms, the unit a lead line is actually marked in. */
.dw-readout-alt b {
  color: var(--faint);
  font-size: 14px;
}

.dw-readout-alt span {
  color: var(--faint-2);
}

/* Graduations along the ruler: a label every 500 m, positioned by depth
 * rather than by the tick gradient, and pulled aside where the needle is. */
.dw-graduations {
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.dw-graduation {
  color: var(--faint-2);
  font-size: 8px;
  left: 10px;
  letter-spacing: 0.08em;
  position: absolute;
  top: 50%;
  transform: translate3d(0, var(--at, 0), 0);
  white-space: nowrap;
}

.dw-graduation::before {
  background: var(--faint-2);
  content: "";
  height: 1px;
  left: -10px;
  position: absolute;
  top: 0.45em;
  width: 6px;
}

.dw-station {
  bottom: 20px;
  color: var(--faint-2);
  font-size: 8px;
  left: 10px;
  letter-spacing: 0.2em;
  position: absolute;
  writing-mode: vertical-rl;
}

/* While the researchers section holds the screen the ground is near-white, so
 * the instruments fixed over it invert too rather than going white-on-white. */
.dw-lit .dw-sounding-ticks {
  background-image:
    repeating-linear-gradient(to bottom, rgb(20 26 28 / 22%) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(to bottom, rgb(20 26 28 / 34%) 0 1px, transparent 1px 70px);
}

.dw-lit .dw-readout b {
  color: #141a1c;
}

.dw-lit .dw-station,
.dw-lit .dw-graduation {
  color: rgb(20 26 28 / 45%);
}

.dw-lit .dw-graduation::before {
  background: rgb(20 26 28 / 45%);
}

.dw-lit .dw-readout-alt b {
  color: rgb(20 26 28 / 62%);
}

.dw-lit .dw-mote {
  background: rgb(20 26 28 / 22%);
}

.dw-bubble-field {
  height: 100vh;
  left: 0;
  overflow: visible;
  pointer-events: none;
  position: fixed;
  top: 0;
  width: 46vw;
  z-index: 1;
}

/* Air, not lead: mostly transparent, one specular highlight, a thin bright
 * rim. It wanders on its own and swims away from the cursor (landing.js). */
.dw-bubble {
  animation: dw-morph 21s ease-in-out infinite;
  aspect-ratio: 1;
  backdrop-filter: blur(3px) saturate(1.3);
  background: var(--bubble-fill);
  border: 1px solid var(--bubble-rim);
  box-shadow:
    inset 0 0 30px rgb(255 255 255 / 5%),
    0 0 40px rgb(180 220 230 / 3%);
  left: var(--bubble-x, 8vw);
  position: absolute;
  top: var(--bubble-y, 40vh);
  transition: width 240ms linear;
  width: var(--bubble-size, 140px);
  will-change: transform;
}

@media (width <= 900px) {
  .dw-bubble-field,
  .dw-motes {
    display: none;
  }
}

@keyframes dw-morph {
  0% {
    border-radius: 60% 40% 48% 52% / 56% 46% 54% 44%;
  }

  25% {
    border-radius: 46% 54% 60% 40% / 44% 60% 40% 56%;
  }

  50% {
    border-radius: 52% 48% 40% 60% / 50% 40% 60% 50%;
  }

  75% {
    border-radius: 40% 60% 52% 48% / 60% 52% 48% 40%;
  }

  100% {
    border-radius: 60% 40% 48% 52% / 56% 46% 54% 44%;
  }
}

/* ========================= the travelling chips ========================= */

/* One layer over the whole document. Every chip is positioned by script, so
 * the same element can drift in the hero, land in the sweep and fly into the
 * report without ever being re-created. */
.dw-travel {
  height: 100%;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 5;
}

/* Each chip rides in its own positioner: the slot carries the journey (a
 * transform, so a scroll frame never triggers layout), the chip inside it
 * keeps its own idle drift animation. */
.dw-chip-slot {
  left: 0;
  position: absolute;
  top: 0;
  will-change: transform;
}

.dw-chip {
  align-items: center;
  background: rgb(12 17 19 / 55%);
  border: 1px solid var(--line);
  color: rgb(198 206 210 / 45%);
  display: flex;
  font-size: 8px;
  gap: 7px;
  letter-spacing: 0.1em;
  max-width: 132px;
  min-width: 104px;
  overflow: hidden;
  padding: 4px 8px;
  text-transform: uppercase;
  transition:
    border-color 300ms ease,
    background-color 300ms ease,
    color 300ms ease;
  white-space: nowrap;
}

.dw-chip i {
  color: rgb(198 206 210 / 42%);
  font-style: normal;
}

.dw-chip-doc i {
  color: rgb(var(--accent-rgb) / 75%);
}

.dw-chip.is-ok {
  background: rgb(var(--accent-rgb) / 8%);
  border-color: rgb(var(--accent-rgb) / 55%);
  color: var(--body-2);
}

.dw-chip.is-ok i {
  color: var(--accent);
}

.dw-chip.is-fake {
  background: rgb(12 17 19 / 55%);
  border-color: rgb(160 180 190 / 18%);
  color: var(--faint-2);
  text-decoration: line-through;
}

.dw-chip.is-fake i {
  color: var(--faint-2);
}

@keyframes dw-drift-a {
  0% {
    transform: translate3d(0, 3px, 0);
  }

  28% {
    transform: translate3d(4px, -1px, 0);
  }

  61% {
    transform: translate3d(-2px, -4px, 0);
  }

  100% {
    transform: translate3d(0, 3px, 0);
  }
}

@keyframes dw-drift-b {
  0% {
    transform: translate3d(0, -4px, 0);
  }

  33% {
    transform: translate3d(-4px, 1px, 0);
  }

  68% {
    transform: translate3d(3px, 4px, 0);
  }

  100% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes dw-drift-c {
  0% {
    transform: translate3d(-3px, 1px, 0);
  }

  44% {
    transform: translate3d(2px, 4px, 0);
  }

  72% {
    transform: translate3d(4px, -3px, 0);
  }

  100% {
    transform: translate3d(-3px, 1px, 0);
  }
}

@keyframes dw-drift-d {
  0% {
    transform: translate3d(3px, -2px, 0);
  }

  37% {
    transform: translate3d(-2px, -4px, 0);
  }

  70% {
    transform: translate3d(-4px, 2px, 0);
  }

  100% {
    transform: translate3d(3px, -2px, 0);
  }
}

@keyframes dw-arrive {
  from {
    opacity: 0;
    transform: translate3d(46px, 18px, 0) scale(0.94);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ========================= header ========================= */

.dw-header {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgb(10 14 16 / 76%);
  border-bottom: 1px solid rgb(160 180 190 / 14%);
  display: flex;
  gap: 24px;
  height: 60px;
  justify-content: space-between;
  padding: 0 var(--edge) 0 var(--gutter);
  position: sticky;
  top: 0;
  z-index: 8;
}

.dw-wordmark {
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.06em;
}

.dw-nav {
  align-items: center;
  display: flex;
  gap: 24px;
}

.dw-nav a {
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dw-nav a:hover {
  color: var(--body-2);
}

.dw-btn {
  background: var(--accent);
  color: var(--ground);
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  padding: 15px 22px;
  text-transform: uppercase;
  transition: background-color 200ms ease;
}

.dw-btn:hover {
  background: var(--accent-lift);
  color: var(--ground);
}

/* .dw-nav a is more specific than .dw-btn, so the call-to-action has to
 * restate its ink or it renders as an empty orange block. */
.dw-nav a.dw-btn,
.dw-nav a.dw-btn:hover {
  color: var(--ground);
}

.dw-btn-sm {
  font-size: 10px;
  padding: 9px 15px;
}

.dw-btn-lg {
  font-size: 12px;
  padding: 18px 30px;
}

.dw-btn-far {
  margin-top: 44px;
}

.dw-btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: #c6ced2;
}

.dw-btn-ghost:hover {
  background: rgb(160 180 190 / 8%);
  color: var(--ink);
}

@media (width <= 900px) {
  .dw-nav a:not(.dw-btn) {
    display: none;
  }
}

/* ========================= hero ========================= */

.dw-hero {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 94vh;
  overflow: hidden;
  padding: 56px var(--edge) 48px var(--gutter);
  position: relative;
  row-gap: 44px;
  z-index: 2;
}

/* The decorative plates only. Listing them beats a prefix selector, which
 * also caught the hero's own content blocks and tore the layout apart. */
.dw-hero-plate,
.dw-hero-wash,
.dw-hero-hatch,
.dw-hero-warm,
.dw-hero-caustic,
.dw-hero-fade {
  inset: 0;
  position: absolute;
}

/* The photograph, with the flat gradient behind it so the hero still reads
 * if the plate is missing or still loading. */
.dw-hero-plate {
  background:
    url("hero.jpg"),
    linear-gradient(172deg, #17262b 0%, #0f1a1e 44%, var(--ground) 100%);
  background-color: var(--ground);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.dw-hero-wash {
  background: linear-gradient(172deg, rgb(23 38 43 / 28%) 0%, rgb(15 26 30 / 50%) 56%, rgb(10 14 16 / 86%) 100%);
}

.dw-hero-hatch {
  background-image: repeating-linear-gradient(118deg, rgb(255 255 255 / 5%) 0 2px, transparent 2px 7px);
}

.dw-hero-warm {
  background: radial-gradient(76% 60% at 60% 10%, rgb(var(--accent-rgb) / 12%), transparent 68%);
}

.dw-hero-caustic {
  animation: dw-caustic 19s ease-in-out infinite;
  background: linear-gradient(180deg, rgb(215 235 245 / 16%), transparent);
  bottom: auto;
  height: 34%;
  mix-blend-mode: screen;
}

.dw-hero-fade {
  background: linear-gradient(180deg, transparent, rgb(10 14 16 / 90%));
  height: 46%;
  top: auto;
}

.dw-ray {
  height: 128%;
  inset: -18% auto auto;
  pointer-events: none;
  position: absolute;
}

.dw-ray-1 {
  animation: dw-ray 16s ease-in-out infinite;
  background: linear-gradient(180deg, rgb(225 242 250 / 16%), transparent 62%);
  filter: blur(24px);
  left: 6%;
  width: 190px;
}

.dw-ray-2 {
  animation: dw-ray 22s ease-in-out infinite reverse;
  background: linear-gradient(180deg, rgb(225 242 250 / 13%), transparent 56%);
  filter: blur(26px);
  height: 122%;
  left: 34%;
  width: 130px;
}

.dw-ray-3 {
  animation: dw-ray 27s ease-in-out infinite;
  background: linear-gradient(180deg, rgb(var(--accent-rgb) / 14%), transparent 58%);
  filter: blur(32px);
  height: 126%;
  left: 66%;
  width: 230px;
}

@keyframes dw-ray {
  0%,
  100% {
    opacity: 0.3;
    transform: translate3d(0, 0, 0) skewX(-11deg);
  }

  50% {
    opacity: 0.72;
    transform: translate3d(34px, 0, 0) skewX(-5deg);
  }
}

@keyframes dw-caustic {
  0%,
  100% {
    opacity: 0.42;
    transform: translate3d(-14px, 0, 0) scaleY(1);
  }

  50% {
    opacity: 0.72;
    transform: translate3d(16px, 0, 0) scaleY(1.12);
  }
}

.dw-hero-body {
  align-self: center;
  max-width: 1180px;
  position: relative;
  z-index: 3;
}

.dw-hero-eyebrow {
  color: #9db0b6;
  font-size: 10px;
  letter-spacing: 0.26em;
  margin: 0 0 30px;
  text-transform: uppercase;
}

.dw-hero-foot {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  position: relative;
  z-index: 3;
}

.dw-hero-pitch {
  display: grid;
  gap: 20px;
  margin-top: -25px;
  max-width: 420px;
}

.dw-hero-pitch p {
  color: var(--body);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.8;
  margin: 0;
}

.dw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dw-scroll-note {
  color: rgb(198 206 210 / 46%);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ========================= lamps ========================= */

.dw-lamp {
  filter: blur(32px);
  pointer-events: none;
  position: absolute;
}

.dw-lamp-warm {
  animation: dw-lamp 23s ease-in-out infinite;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / 16%), transparent 72%);
  height: 76%;
  left: -12vw;
  top: 8%;
  width: 44vw;
}

.dw-lamp-cool {
  animation: dw-lamp 29s ease-in-out infinite reverse;
  background: radial-gradient(closest-side, rgb(210 235 245 / 12%), transparent 70%);
  filter: blur(34px);
  height: 80%;
  right: -10vw;
  top: 0;
  width: 40vw;
}

@keyframes dw-lamp {
  0%,
  100% {
    opacity: 0.45;
    transform: translate3d(-7vw, 0, 0) rotate(-4deg);
  }

  50% {
    opacity: 0.85;
    transform: translate3d(9vw, -28px, 0) rotate(3deg);
  }
}

/* ========================= the sweep ========================= */

.dw-sweep-grid {
  align-items: start;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
}

/* The chips land here. It is deliberately an empty box: the chips that fill
 * it are the same elements that were drifting in the hero. */
.dw-landing {
  min-height: 320px;
}

.dw-tally {
  border-left: 1px solid var(--line-mid);
  display: grid;
  gap: 20px;
  padding-left: 24px;
  position: sticky;
  top: 120px;
}

.dw-tally span {
  display: grid;
  gap: 6px;
}

.dw-tally-kept .dw-num {
  color: var(--accent);
}

.dw-tally-dropped .dw-num {
  color: var(--faint-2);
}

@media (width <= 900px) {
  .dw-sweep-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dw-tally {
    position: static;
  }
}
