/* ============================================================ DEPTH PANELS
   Every section of this page is one. The photograph is absolutely
   positioned and overscanned by 8% so app.js can drift it against
   the scroll without ever revealing an edge. */
.td-depth {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--td-pad);
}
/* Panels overlap so their dissolves cross (see below). That overlap has to be
   spent on padding, never on copy — the first attempt pulled the next panel
   straight over the hero's trust row. Any panel with another panel after it
   carries the overlap again as extra bottom padding, so the join happens in
   empty space and the content underneath it is never reached. */
.td-depth:has(+ .td-depth) {
  padding-bottom: calc(var(--td-pad) + var(--td-overlap));
}
/* object-fit: COVER.

   This was `fill` while the panels were generated gradients: stretching
   pinned each panel's first row to the top of its section and its last row
   to the bottom, so the flat seam bands lined up exactly and the joints
   vanished. The comment that used to live here argued a vertical stretch
   "reads as depth of field, not as distortion" — true of a graded
   atmospheric field, and false the moment a real photograph goes in it.
   Kelp stretches. Water does not.

   With photography the panels have no flat seam bands to protect, so cover
   is correct: the image keeps its own proportions and the section crops it.
   The continuity job moves off the geometry and onto the scrims and the
   grading of the plates themselves.

   The 5% overscan that lets the panel drift against the scroll still
   applies; app.js caps the travel at 4%. */
.td-depth__img {
  position: absolute; left: 0; top: -5%;
  width: 100%; height: 110%;
  max-width: none;
  object-fit: cover;
  z-index: 0;
}
.td-depth__scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* ---- SEAMS.

   While the panels were generated they carried flat bands at top and bottom
   and met exactly. Photographs do not: two real plates butted together show
   the join, however well graded. So the join is drawn instead of matched.

   Every boundary owns ONE colour off the depth ladder, and both panels either
   side of it fade to that colour. Neither photograph has to end on anything
   in particular — the seam is the ladder, and the water stays continuous
   from the beach to the floor.

   Sits at z-index 1, under .td-wrap (z-index 2), so no copy is ever veiled. */
/* The mechanism: the LADDER is the page, and the photographs dissolve in and
   out of it.

   Two earlier attempts failed and are worth recording so nobody repeats them.
   Butting the plates together showed the cut, because two photographs never
   end on the same pixel. Overlaying a colour fade at each end failed for a
   subtler reason: ::before paints UNDER an element's children and ::after
   paints OVER them, so with the scrim sitting between them at the same
   z-index, every panel's top fade composited under its scrim while its bottom
   fade composited over it. Two different results met at every boundary, and
   the eye read the difference as a hard line.

   So the fade moves off the overlay and into the image's own alpha. Each
   section carries the ladder as its background — a straight run from its top
   seam colour to its bottom one — and the photograph is masked so it arrives
   out of that colour and leaves back into it. At every boundary both panels
   are showing pure ladder, and the ladder is continuous by construction.
   One mechanism, symmetric at both ends, immune to what the scrim does. */
/* No background of its own. body already carries the whole ladder as one
   continuous gradient from 0 m to the floor, so a per-section background only
   ever restated it — and where the plates dissolved, that restatement read as
   a flat band of colour laid between two photographs. Dropping it leaves the
   page's own gradient showing through, and lets the sections overlap. */
.td-depth + .td-depth {
  /* Each panel rides up into the one above so the two photographs are both
     present through the join and mix directly, rather than fading to a shared
     colour and meeting there.

     The overlap must be DEEPER than the two fades put together. If it is
     shallower there is a band in the middle where both panels are partly
     transparent and the body gradient shows through as a pale haze — which
     is what "why does it have a background colour" was. The mask ramps are
     linear rather than smoothstep for the same reason: two linear fades sum
     to one where they meet, so the pair covers. Smoothstep dips below one in
     the middle and lets the page through. */
  margin-top: calc(var(--td-overlap) * -1);
}
/* Two jobs, both done here rather than in the pixels.

   DEPTH. The plate sits over the ladder at less than full opacity, so the
   ladder shows through it — which IS the grade. A first pass baked the tint
   into the JPEGs with Python; that was wrong. It threw the original away,
   made every adjustment a re-export, and left files nobody could reason
   about. The photographs on disk are now untouched resizes of what came off
   Unsplash, and how deep each one reads is one number in this stylesheet.

   SEAM. Every layer is masked at top and bottom so it arrives out of the
   ladder and leaves back into it. All three of them — plate, scrim and snow.
   The scrim and the snow are their own full-bleed overlays at inset:0, so
   each one ends on a hard edge at the section boundary with a different
   strength on either side; a perfectly dissolved photograph still showed a
   line because the scrim was drawing one over the top of it.

   AND THE EDGE IS NOT STRAIGHT. A vertical gradient still ends on a straight
   horizontal line, and a straight line is the one thing that never happens in
   water — so the eye finds it however soft the fade is. The mask is a PNG
   whose falloff height wanders across the width (sum of sines at
   incommensurate frequencies, so it never repeats), which makes the boundary
   read as a waterline instead of a rule. Top and bottom wander on different
   curves, so a panel's lower edge never mirrors the next one's upper edge. */
.td-depth__img,
.td-depth__scrim,
.td-depth .td-snow {
  -webkit-mask-image: url("/img/seam-mask.png");
          mask-image: url("/img/seam-mask.png");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
}
/* The scrim and the snow are inset:0, so their box IS the section and the
   mask lands on the visible edges. The plate is not: it is 110% tall at
   top:-5% so app.js can drift it, which puts a mask sized to the plate 5%
   above and 5% below the section — precisely the part overflow:hidden throws
   away. The plate then never faded at all, which is why the seam survived
   three attempts at removing it. Size the mask to the section instead
   (100/1.1 = 90.909%) and centre it, so the falloff lands where the panel
   actually ends. */
.td-depth__img {
  -webkit-mask-size: 100% 90.909%;
          mask-size: 100% 90.909%;
  -webkit-mask-position: 0 50%;
          mask-position: 0 50%;
}
.td-depth__img { opacity: var(--td-plate, 1); }

/* One boundary colour per seam, and how far each plate has sunk into it. */
.td-depth--surface  { --td-seam-top: var(--td-d0); --td-seam-bot: var(--td-d1); --td-plate: .92; }
.td-depth--shallows { --td-seam-top: var(--td-d1); --td-seam-bot: var(--td-d2); --td-plate: .88; }
.td-depth--canopy   { --td-seam-top: var(--td-d2); --td-seam-bot: var(--td-d3); --td-plate: .84; }
.td-depth--column   { --td-seam-top: var(--td-d3); --td-seam-bot: var(--td-d4); --td-plate: .78; }
.td-depth--midnight { --td-seam-top: var(--td-d4); --td-seam-bot: var(--td-d5); --td-plate: .60; }
.td-depth--floor    { --td-seam-top: var(--td-d5); --td-seam-bot: var(--td-d6); --td-plate: .70; }

/* ---- 0 m. The veil is side-weighted: full strength across the copy
   column, gone by the time it reaches the bottle, so the water behind
   the product is the real photograph and not a wash. ---- */
.td-depth--surface {
  padding-top: calc(var(--td-nav-h) + clamp(40px, 7vw, 96px));
  padding-bottom: var(--td-pad-tight);
}
/* the wave photograph, zoomed so its breaking wave sits behind the bottle
   rather than along the bottom edge, with a little more contrast so the
   water reads as water, not cloud (Amber, Nov 3). Phones set their own
   framing in 05-responsive-daylight.css. */
.td-depth--surface .td-depth__img {
  top: -42%; height: 150%;
  object-position: 50% 100%;
  filter: contrast(1.12) saturate(1.15);
}
.td-depth__scrim--surface {
  background:
    linear-gradient(100deg,
      rgba(var(--td-veil), .80) 0%, rgba(var(--td-veil), .72) 30%,
      rgba(var(--td-veil), .62) 47%, rgba(var(--td-veil), .22) 63%,
      rgba(var(--td-veil), 0) 80%),
    linear-gradient(180deg,
      rgba(var(--td-veil), .42) 0%, rgba(var(--td-veil), .34) 40%,
      rgba(var(--td-veil), .40) 100%);
}

/* ---- 12 m. Top-weighted: the copy lives in the light, and the last
   fifth of the panel is left alone so the water genuinely darkens into
   the seam below. No text is set below the .58 stop. ---- */
.td-depth__scrim--shallows {
  background: linear-gradient(180deg,
    rgba(var(--td-veil), .40) 0%, rgba(var(--td-veil), .52) 45%,
    rgba(var(--td-veil), .48) 80%, rgba(var(--td-veil), .38) 100%);
}

/* ---- 60 m. The light runs out. The ramp starts at zero so the seam
   with the shallows stays continuous, then holds deep. ---- */
/* ---- 60 m. Daylight, and it stays daylight.

   This rule was briefly a dark wash, to give the kelp behind the products band
   more presence. Two things were wrong with that, and both were only visible on
   the built pages rather than in the stylesheet.

   It broke the descent. The section after the products band is the
   ninety-three, which is light, so a dark band at 30-57% made the page read
   light, BLACK, light, dark instead of one continuous sink. The direction is a
   single column of water; an island of night in the middle of the daylight half
   is not a darker version of that, it is a different idea.

   And this rule is SHARED. It paints #range on the homepage and #ritual on the
   product page, and #ritual had already been converted to daylight with ink
   type. Turning the scrim dark underneath it left dark ink on a dark wash — a
   whole band of unreadable text on the shop page, caused by an edit aimed at a
   different page. A scrim keyed to a depth name belongs to every section at
   that depth, on every page.

   Presence for the photograph has to come from --td-plate, which is per
   section, not from the wash, which is not. ---- */
.td-depth__scrim--canopy {
  background: linear-gradient(180deg,
    rgba(var(--td-veil), .38) 0%, rgba(var(--td-veil), .56) 30%,
    rgba(var(--td-veil), .52) 74%, rgba(var(--td-veil), .34) 100%);
}

.td-depth__scrim--column {
  /* still daylight, just less of it. The veil thins as you go down and a
     little wash starts underneath, so the section itself gets darker without
     ever crossing into the deep. */
  background:
    linear-gradient(180deg,
      rgba(var(--td-veil), .34) 0%, rgba(var(--td-veil), .44) 34%,
      rgba(var(--td-veil), .30) 78%, rgba(var(--td-veil), .10) 100%),
    linear-gradient(180deg,
      rgba(var(--td-dark), 0) 0%, rgba(var(--td-dark), .10) 55%,
      rgba(var(--td-dark), .26) 100%);
}
.td-depth__scrim--midnight {
  /* where the light actually goes */
  background: linear-gradient(180deg,
    rgba(var(--td-dark), .26) 0%, rgba(var(--td-dark), .62) 38%,
    rgba(var(--td-dark), .82) 100%);
}
.td-depth__scrim--floor {
  background: linear-gradient(180deg,
    rgba(var(--td-dark), .82) 0%, rgba(var(--td-dark), .90) 100%);
}

.td-deep { color: var(--st-on-dark); }

/* WHITE, NOT THE BODY TINT, AT 700 M. --st-on-dark-body is calibrated for the
   near-black this panel used to open on. It does not open there any more: the
   ladder was relightened and the wash ramps in from almost nothing so the seam
   stays invisible, which leaves the first paragraphs of this section sitting
   on the brightest water any light type on this site has to survive.
   Measured: 3.25:1 desktop and 2.72:1 on a phone for the lede, 4.22 / 3.62 for
   the descent steps. White clears both. Everything lower down the panel was
   already fine — this is a rule about the top of the band, not the band. */
.td-depth--midnight .td-body--dark,
.td-depth--midnight .td-descent__p,
.td-depth--midnight .td-uncounted__h { color: var(--st-on-dark); }

/* ---- marine snow: particulate drifting UP, because you are going
   down. Two fields at different scales and speeds. One effect, one
   idea, bounded to the deep panels. ---- */
.td-snow {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
}
.td-snow::before,
.td-snow::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0;
  height: 200%;
  background-repeat: repeat;
  animation: td-rise 46s linear infinite;
  will-change: transform;
}
.td-snow::before {
  background-image:
    radial-gradient(circle at 14% 8%,  rgba(199,242,234,.42) 0 1.1px, transparent 1.6px),
    radial-gradient(circle at 62% 26%, rgba(199,242,234,.30) 0 1.4px, transparent 2px),
    radial-gradient(circle at 38% 61%, rgba(199,242,234,.36) 0 1px,   transparent 1.5px),
    radial-gradient(circle at 86% 78%, rgba(199,242,234,.26) 0 1.3px, transparent 1.9px);
  background-size: 340px 340px, 470px 470px, 290px 290px, 550px 550px;
  opacity: .55;
}
.td-snow::after {
  background-image:
    radial-gradient(circle at 30% 18%, rgba(199,242,234,.22) 0 2.2px, transparent 3.4px),
    radial-gradient(circle at 74% 66%, rgba(199,242,234,.16) 0 2.8px, transparent 4.2px);
  background-size: 720px 720px, 900px 900px;
  animation-duration: 78s;
  filter: blur(1.2px);
  opacity: .5;
}
@keyframes td-rise {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -50%, 0); }
}

/* ---- the depth marker: a horizon rule across the top of each panel
   with the reading at its right end. Right-aligned and set hard against
   the panel's top edge, a long way above the heading — it belongs to
   the gauge, not to the section title. ---- */
.td-mark {
  position: absolute; z-index: 2;
  left: 0; right: 0; top: clamp(20px, 3.5vw, 44px);
  display: flex; align-items: center; gap: var(--st-4);
  padding-inline: var(--td-gutter);
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--st-glow);
  pointer-events: none;
}
.td-mark::before {
  /* A horizon, not a ruled line. It runs out at both ends rather than
     butting into the gutters, and it carries less weight than it did. */
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, var(--td-line-dark) 14%,
    var(--td-line-dark) 86%, transparent 100%);
  opacity: .5;
}
/* on the shallows the horizon is still in daylight */
.td-mark--light { color: var(--st-on-light); }              /* ≥13:1 through the .92 veil */
.td-mark--light::before {
  background: linear-gradient(90deg,
    transparent 0%, var(--td-line-light) 14%,
    var(--td-line-light) 86%, transparent 100%);
}

/* ============================================================ 0 m — HERO */
.td-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  min-height: min(78vh, 720px);
}
.td-hero__h1 {
  font-family: var(--st-font-ui);
  font-weight: var(--st-fw-med);
  font-size: clamp(2.9rem, 7.6vw, 6rem);
  line-height: 1.0;
  letter-spacing: -.036em;
  color: var(--st-on-light);
  max-width: 11ch;
  text-wrap: balance;
}
.td-hero__sub {
  margin-top: var(--st-6);
  font-size: clamp(1.1rem, 1.9vw, 1.45rem);
  line-height: 1.4;
  font-weight: var(--st-fw-light);
  color: var(--st-on-light);
  max-width: 26ch;
}
.td-hero .td-squiggle { margin-top: var(--st-8); }
/* the 2-in-1 callout, set the way the new box sets it: spaced capitals
   between two hairlines, in the squiggle's place */
.td-hero__formula {
  display: inline-block;
  margin: var(--st-8) 0 0;
  padding: 10px 2px;
  border-top: 1px solid currentColor; border-bottom: 1px solid currentColor;
  font-size: .82rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--st-deep-cyan);
}
.td-hero__lede {
  margin-top: var(--st-6);
  font-size: var(--st-size-body-lg);
  line-height: 1.6;
  color: var(--st-on-light);
  max-width: 46ch;
}
.td-hero__actions {
  display: flex; flex-wrap: wrap; gap: var(--st-3);
  margin-top: var(--st-10);
}
.td-hero__meta {
  margin-top: var(--st-8);
  font-size: .78rem; letter-spacing: .02em;
  color: var(--st-on-light);
}

/* the bottle stands in the water. No card, no panel, no glow. */
.td-hero__media img {
  margin-inline: auto;
  height: clamp(340px, 54vh, 620px);
  width: auto;
}

/* ---- the manufacturing facts, as one instrument strip ---- */
.td-facts {
  margin-top: clamp(28px, 3.4vw, 48px);
  padding-top: var(--st-6);
  border-top: 1px solid var(--td-line-light);
}
.td-facts__row {
  display: flex; flex-wrap: wrap;
  gap: var(--st-2) clamp(18px, 2.6vw, 34px);
  /* Set larger than the other instrument strips on the page. This row is the
     ninety-three itself, which is the number the whole brand argues from, so
     it reads as a statement rather than as a caption. */
  font-size: clamp(.78rem, 1.05vw, .9rem);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--st-on-light);
}
.td-facts__row li { display: flex; align-items: center; gap: var(--st-3); }
.td-facts__row li::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--st-deep-cyan); flex: none;
}

/* ============================================================ 12 m — SHALLOWS */
.td-shallows {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
  /* the copy has to finish inside the .58 stop of the veil */
  padding-bottom: clamp(24px, 4vw, 64px);
}
.td-shallows__copy .td-body { margin-top: var(--st-6); }

/* the number stack, run as it runs down the side panel of the box:
   figure, hairline, figure, hairline, figure */
.td-stack { border-top: 1px solid var(--td-line-light); }
.td-stack__row {
  display: flex; align-items: baseline; gap: var(--st-4);
  padding-block: clamp(14px, 1.8vw, 22px);
  border-bottom: 1px solid var(--td-line-light);
}
.td-stack__fig {
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  font-weight: var(--st-fw-reg);
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--st-on-light);
  min-width: 2.6ch;
}
.td-stack__lab {
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: var(--st-fw-med);
  color: var(--st-on-light);
}

