/* Pale: liquid glass in daylight. Layout and type. The glass itself (bottle, drops, buttons,
   cards, light on the ground) is drawn by the WebGL canvas that sits above this page; the DOM
   carries the type, the hairlines and every control. Without WebGL the page is white, legible
   and complete: html.no-gl gives the controls a drawn outline instead. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}

:root {
  --ink: #0a1318;
  --ink-2: rgb(10 19 24 / .72);
  --ink-3: rgb(10 19 24 / .6);
  --rule: rgb(10 19 24 / .16);
  --paper: #fff;
  --pad: clamp(20px, 3.4vw, 68px);
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --bottle: min(84vh, 60vw);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul, dl, dd, fieldset, table { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
sub, sup { font-size: .62em; line-height: 0; }
::selection { background: rgb(120 190 220 / .35); }

.mono { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: .01em; line-height: 1.3; color: var(--ink-2); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.rule-top { border-top: 1px solid var(--rule); }
.rule-bottom { border-bottom: 1px solid var(--rule); }

:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 5px; border-radius: 999px; }
/* sections take focus when a link jumps to them; they need no ring */
[tabindex="-1"]:focus { outline: none; }
.skip { position: fixed; z-index: 7; left: 12px; top: 12px; translate: 0 -300%; padding: 8px 14px; border-radius: 999px; background: var(--paper); font-size: 14px; }
.skip:focus { translate: none; }

/* ---------- canvas ---------- */

#gl {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 5; pointer-events: none;
  /* the loader's sheet covers its arrival, so it only has to be there before the sheet clears */
  opacity: 0; transition: opacity .2s linear;
}
html.gl-ready #gl { opacity: 1; }

/* ---------- loader: a white sheet from first paint; loader.mjs draws on it and clears it ---------- */

#pre {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 8;
  background: #fff;
  /* if the script never runs, the sheet lifts by itself */
  animation: pre-failsafe .6s 8s forwards;
}
@keyframes pre-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- fixed navigation: its type sits above the canvas, its glass is drawn under it ---------- */

.nav {
  position: fixed; z-index: 6; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--pad);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__brand { display: flex; align-items: baseline; gap: 14px; justify-self: start; padding: 12px 22px; margin-left: -22px; border-radius: 999px; }
.nav__mark { font-size: 25px; font-weight: 500; letter-spacing: -.035em; line-height: 1; }
.nav__links { display: flex; gap: 4px; padding: 5px; border-radius: 999px; }
.nav__links a { padding: 9px 17px; border-radius: 999px; font-size: 14.5px; font-weight: 450; letter-spacing: -.005em; color: var(--ink); transition: color .3s; }
.nav__links a:hover { color: var(--ink-2); }
.nav__cta { justify-self: end; padding: 14px 26px; border-radius: 999px; font-size: 14.5px; font-weight: 500; }

.rail { position: fixed; z-index: 6; right: calc(var(--pad) * .5 - 1px); top: 50%; height: 34vh; translate: 0 -50%; pointer-events: none; }
.rail__line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.rail__label { position: absolute; right: 9px; top: 0; white-space: nowrap; writing-mode: vertical-rl; rotate: 180deg; translate: 0 calc(var(--rail, 0) * 34vh - 50%); font-size: 11px; color: var(--ink-3); }

/* ---------- shared pieces ---------- */

section, .foot { position: relative; padding-inline: var(--pad); }

.eyebrow { display: flex; gap: 22px; }
.eyebrow span:first-child { color: var(--ink-3); }
.eyebrow__hint { margin-left: auto; color: var(--ink-3); }

.statement {
  font-size: clamp(38px, 5.6vw, 112px);
  font-weight: 300;
  line-height: .99;
  letter-spacing: -.042em;
  text-wrap: balance;
  max-width: 13.5em;
}
.statement--short { max-width: 9em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  font-size: 15.5px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap;
}
.btn--large { min-height: 64px; padding: 0 38px; font-size: 17px; }
.link { font-size: 15.5px; font-weight: 450; padding-block: 6px; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease); }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

html.no-gl [data-glass] { box-shadow: inset 0 0 0 1px var(--rule); background: rgb(255 255 255 / .6); }

[data-reveal] { opacity: 0; translate: 0 18px; transition: opacity 1.1s var(--ease), translate 1.3s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].is-in { opacity: 1; translate: 0 0; }
html.measuring [data-reveal] { translate: 0 0; transition: none; }

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr auto;
  column-gap: 24px;
  padding-top: 120px; padding-bottom: clamp(28px, 5.4vh, 60px);
}
.hero__word {
  position: absolute; left: 50%; top: 47%; translate: -50% -50%;
  font-size: min(33vw, 68vh); font-weight: 190; line-height: .8; letter-spacing: -.058em;
  white-space: nowrap; padding-right: .06em;
  color: var(--ink);
  user-select: none; pointer-events: none;
}
/* the bottle stands where the l would: the slot keeps its place in the word */
.hero__slot { display: inline-block; width: calc(var(--bottle) * .335); height: .1em; }
/* the canvas shows the word under water first, and is opaque there; the DOM word shows through
   as that water thins away */
.hero__meta { grid-column: 1 / -1; grid-row: 1; align-self: start; display: flex; gap: 22px; }
.hero__lede { grid-column: 1 / span 4; grid-row: 2; align-self: end; max-width: 26em; }
.hero__lede h1 { font-size: clamp(24px, 1.95vw, 36px); font-weight: 400; line-height: 1.12; letter-spacing: -.028em; text-wrap: balance; }
.hero__lede p { margin-top: 16px; max-width: 21em; color: var(--ink-2); }
.hero__actions { display: flex; align-items: center; gap: 26px; margin-top: 30px; }
.hero__spec { grid-column: 10 / -1; grid-row: 2; align-self: end; }
.hero__spec div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; }
.hero__spec dd { color: var(--ink); }

/* ---------- source ---------- */

.source { padding-top: clamp(120px, 24vh, 260px); padding-bottom: clamp(100px, 18vh, 200px); }
/* the bottle stands in the left half here, so the whole section is set in the right half */
.source .eyebrow, .source .statement { margin-left: auto; width: min(100%, 50vw + 12px); }
.source .statement { margin-top: 30px; max-width: none; font-size: clamp(38px, 4.5vw, 92px); line-height: 1.02; }
.strata {
  margin-top: clamp(80px, 15vh, 170px);
  margin-left: auto; width: min(100%, 50vw + 12px);
}
.stratum { display: grid; grid-template-columns: 9.5em 1fr; column-gap: 24px; align-items: baseline; padding: 30px 0 46px; }
.stratum__depth { grid-row: 1 / span 2; }
.stratum h3 { font-size: clamp(30px, 2.9vw, 54px); font-weight: 300; letter-spacing: -.035em; line-height: 1; }
.stratum p { grid-column: 2; margin-top: 14px; max-width: 27em; color: var(--ink-2); }

/* ---------- analysis ---------- */

.analysis { padding-top: clamp(110px, 20vh, 220px); padding-bottom: clamp(110px, 20vh, 220px); }
.analysis .statement { margin-top: 30px; }
.analysis__grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-top: clamp(60px, 11vh, 120px); align-items: start; }
.minerals { grid-column: 1 / span 7; width: 100%; border-collapse: collapse; text-align: left; }
.minerals th, .minerals td { padding: 0; height: 74px; border-top: 1px solid var(--rule); vertical-align: middle; }
.minerals thead th { height: 40px; border-top: 0; font-weight: 400; color: var(--ink-3); }
.minerals tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }
.minerals tbody th { font-size: clamp(22px, 1.75vw, 31px); font-weight: 350; letter-spacing: -.028em; }
.minerals td.mono { font-size: 14px; color: var(--ink-2); }
.minerals .num { text-align: right; font-variant-numeric: tabular-nums; }
.minerals td.num { font-size: clamp(22px, 1.75vw, 31px); font-weight: 300; letter-spacing: -.03em; }
.minerals__bead { width: 110px; }
.minerals__bead i { display: block; width: 1px; height: 1px; margin-left: 46px; }

.readings { grid-column: 9 / -1; }
.reading { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; padding: 20px 0 30px; }
.reading__value { font-size: clamp(64px, 6.4vw, 124px); font-weight: 250; letter-spacing: -.055em; line-height: .9; font-variant-numeric: tabular-nums; }
.reading__name { grid-column: 1 / -1; margin-top: 12px; color: var(--ink-2); }
.readings__note { margin-top: 28px; max-width: 24em; font-size: 15px; color: var(--ink-2); }

/* ---------- glass ---------- */

.glass {
  min-height: 150svh;
  padding-top: clamp(110px, 20vh, 220px); padding-bottom: clamp(80px, 12vh, 140px);
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px;
  grid-template-rows: auto auto 1fr auto; align-content: start;
}
.glass .eyebrow, .glass .statement { grid-column: 1 / -1; }
.glass .statement { margin-top: 30px; }
.parts { grid-row: 3; display: flex; flex-direction: column; justify-content: space-around; margin-top: 8vh; min-height: 150svh; }
.parts--right { padding-top: 22svh; }
.parts--left { grid-column: 1 / span 4; }
.parts--right { grid-column: 9 / -1; }
.part { display: grid; grid-template-columns: 2.2em minmax(0, 19em); column-gap: 8px; align-items: baseline; }
.parts--right .part { justify-content: end; }
.part h3 { justify-self: start; }
.part h3 { font-size: clamp(22px, 1.75vw, 31px); font-weight: 350; letter-spacing: -.028em; line-height: 1.1; }
.part p { grid-column: 2; margin-top: 8px; max-width: 19em; color: var(--ink-2); }
/* the lines from each part to the bottle: drawn above the glass, moved by main.mjs */
.leaders { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; overflow: visible; }
.leaders path { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.leaders circle { fill: var(--ink); }

/* ---------- standing order ---------- */

.order { padding-top: clamp(110px, 20vh, 220px); padding-bottom: clamp(120px, 20vh, 230px); }
.order .statement { margin-top: 30px; }
.order__lede { margin-top: 28px; max-width: 30em; font-size: 19px; color: var(--ink-2); }
.plan { margin-top: clamp(50px, 9vh, 100px); }
.plan legend { margin-bottom: 18px; color: var(--ink-3); }
.plan__cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; align-content: end; row-gap: 4px;
  min-height: clamp(300px, 40vh, 440px); padding: 26px 28px 26px;
  border-radius: 30px; cursor: pointer;
}
.case input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.case__count {
  position: absolute; left: 14px; top: .04em;
  font-size: clamp(190px, 20vw, 390px); font-weight: 200; letter-spacing: -.07em; line-height: .86;
  color: var(--ink); opacity: .9; transition: opacity .6s var(--ease), translate .9s var(--ease);
  pointer-events: none;
}
.case:has(input:not(:checked)) .case__count { opacity: .17; }
.case:hover:has(input:not(:checked)) .case__count { opacity: .34; }
.case__price { grid-column: 2; grid-row: 1; align-self: end; color: var(--ink); font-size: 13px; }
.case__each { grid-column: 1; grid-row: 1; }
.case:has(input:focus-visible) { outline: 1.5px solid var(--ink); outline-offset: 5px; }

.plan__foot { display: grid; grid-template-columns: auto 1fr auto; align-items: end; column-gap: 40px; margin-top: 44px; }
.rhythm__track { display: inline-flex; padding: 5px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--rule); }
html.no-gl .rhythm input:checked + span { box-shadow: inset 0 0 0 1px var(--ink); }
.rhythm label { position: relative; cursor: pointer; }
.rhythm input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rhythm span { display: block; padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 450; color: var(--ink-3); transition: color .4s; }
.rhythm input:checked + span { color: var(--ink); }
.rhythm label:has(input:focus-visible) span { outline: 1.5px solid var(--ink); outline-offset: 4px; }
.plan__sum { justify-self: end; text-align: right; color: var(--ink-2); padding-bottom: 6px; }
.plan__total { display: block; font-size: clamp(26px, 2.3vw, 42px); font-weight: 300; letter-spacing: -.035em; line-height: 1.1; color: var(--ink); }
.plan__note { margin-top: 22px; text-align: right; color: var(--ink-2); }
.plan__note[role="status"] { color: var(--ink); }
.plan__note:empty { margin: 0; }

/* ---------- footer ---------- */

.foot { padding-top: clamp(60px, 10vh, 120px); overflow: hidden; }
.foot__cols { display: grid; grid-template-columns: repeat(4, 1fr); column-gap: 24px; }
.foot__col { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; font-size: 15px; }
.foot__col .mono { margin-bottom: 12px; color: var(--ink-3); }
.foot__col p { max-width: 21em; color: var(--ink-2); }
.foot__col a { width: fit-content; }
.foot__col p a { background: linear-gradient(var(--ink-3), var(--ink-3)) 0 100% / 100% 1px no-repeat; color: var(--ink); }
.foot__word {
  margin-top: clamp(30px, 7vh, 80px); margin-bottom: 0; margin-left: -.088em;
  font-size: calc((100vw - 2 * var(--pad)) * .648); font-weight: 190; line-height: .8; letter-spacing: -.058em; white-space: nowrap;
  user-select: none; pointer-events: none;
}

/* ---------- without WebGL ---------- */

html.no-gl .hero__slot { width: auto; height: auto; font-style: normal; }
html.no-gl .hero__slot::before { content: "l"; }
html.no-gl .case:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
html:not(.gl-ready) .leaders, html.no-gl .eyebrow__hint { display: none; }
html.no-gl .minerals__bead i { width: calc(var(--r, 0) * 2px); height: calc(var(--r, 0) * 2px); translate: -50% -50%; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--ink-2); }

/* ---------- narrow ---------- */

@media (max-width: 900px), (max-height: 600px) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; padding-block: 14px; }
  .nav__links, .nav__sub, .rail { display: none; }
  .nav__cta { padding: 12px 22px; }
  :root { --bottle: 46vh; }
  .hero { grid-template-rows: auto auto auto auto; padding-top: 92px; row-gap: 26px; }
  /* the word takes its own row, tall enough for the bottle that stands in it */
  .hero__word { position: static; translate: none; grid-column: 1 / -1; grid-row: 2; justify-self: center; font-size: min(29vw, 30vh); margin-block: calc(var(--bottle) * .5 - .34em); padding-right: 0; }
  .hero__meta { grid-row: 1; }
  .hero__lede { grid-column: 1 / -1; grid-row: 3; }
  .hero__spec { grid-column: 1 / -1; grid-row: 4; }
  .hero__actions { flex-wrap: wrap; gap: 16px 22px; }
  .strata, .source .eyebrow, .source .statement { width: 100%; }
  .stratum { grid-template-columns: 1fr; row-gap: 12px; }
  .stratum__depth { grid-row: auto; }
  .stratum p { grid-column: 1; margin-top: 0; }
  .analysis__grid { display: block; }
  .minerals th, .minerals td { height: 62px; }
  .minerals__bead { width: 58px; }
  .minerals__bead i { margin-left: 22px; }
  .minerals td.mono { font-size: 12px; }
  .readings { margin-top: 70px; }
  .glass { display: block; min-height: 0; padding-bottom: 20px; }
  .order { padding-bottom: 90px; }
  .parts { min-height: 0; margin-top: 0; gap: 34px; }
  .parts--left { margin-top: 96svh; }
  .parts--right { margin-top: 34px; padding-top: 0; }
  .parts--right .part { justify-content: start; }
  .leaders { display: none; }
  .eyebrow__hint { display: none; }
  .parts--right .part p { grid-column: 2; }
  .plan__cases { grid-template-columns: 1fr; gap: 16px; }
  .case { min-height: 210px; }
  .case__count { font-size: 172px; left: auto; right: 16px; }
  .plan__foot { grid-template-columns: 1fr; row-gap: 26px; }
  .rhythm span { padding: 11px 12px; font-size: 13.5px; white-space: nowrap; }
  .plan__sum { justify-self: start; text-align: left; }
  .btn--large { width: 100%; }
  .plan__note { text-align: left; }
  .foot__cols { grid-template-columns: 1fr 1fr; row-gap: 34px; }
}

@media (max-width: 900px), (max-height: 600px) {
  html.no-gl .parts--left { margin-top: 34px; }
  html.no-gl .minerals__bead i { scale: .62; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition-duration: .01s; translate: 0 0; }
  #gl { transition-duration: .01s; }
}
