/* Saltwater Solutions. Palette sampled from the SWS logo (11 Oct 2026) and Connor's water photos. */

@font-face { font-family: "Big Shoulders Display"; src: url("/static/fonts/big-shoulders-display-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("/static/fonts/big-shoulders-display-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/static/fonts/hanken-grotesk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/static/fonts/hanken-grotesk-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/ibm-plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --red: #dc1c22;        /* logo letters / dive flag */
  --red-dark: #b3141a;
  --wave: #486ca8;       /* logo wave */
  --foam: #c0e4f0;       /* logo wave highlight */
  --ink: #0e2230;
  --paper: #e8eef0;
  --sky-top: #a9c8d9;
  --sky-low: #dce8ec;
  --sea-top: #4f7f9c;
  --sea-low: #2a5a78;
  --shallow: #2c7f97;
  --mid: #1d6a82;
  --deep: #0b3a4e;
  --deeper: #06202e;
  --abyss: #03121b;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --chain-w: 26px;
  --chain-right: calc(9% + 4vw + clamp(80px, 9vw, 150px) / 2);   /* chain centre, from the right edge */
}
@media (max-width: 760px) { :root { --chain-w: 20px; --chain-right: 17vw; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--deeper);
  color: var(--paper);
  font: 400 clamp(16px, 1.05vw + 12px, 19px)/1.55 var(--body);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
a[href^="tel:"] { white-space: nowrap; }   /* phone numbers never split across lines */
:focus-visible { outline: 3px solid var(--foam); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ink); }   /* foam ring with a dark inner ring: visible on sky and on water */

.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--paper); color: var(--ink); padding: 10px 14px; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: absolute; z-index: 10; inset: 0 0 auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
}
.brand img { width: clamp(132px, 13vw, 200px); height: auto; }
.nav { display: flex; gap: clamp(4px, 1.4vw, 18px); align-items: center; }
.nav a {
  font: 600 15px/1 var(--body); color: var(--ink); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 4px;
}
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav .nav-cta { background: var(--ink); color: var(--paper); padding: 0 16px; }
@media (max-width: 520px) { .nav a:not(.nav-cta) { padding: 0 6px; font-size: 14px; } .nav .nav-cta { padding: 0 12px; font-size: 14px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  font: 600 17px/1 var(--body); text-decoration: none; border-radius: 4px; border: 2px solid transparent;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-line { border-color: currentColor; }

/* ---------- hero scene ---------- */
.hero { position: relative; z-index: 1; }
.stage { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #011813; }
.world { position: absolute; inset: 0; }
.surface { background: linear-gradient(#e8ecf1, #c8d5e0); }   /* sky sampled from the photo */
.surface-photo, .surface-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 73% 50%; }
.surface-video { opacity: 0; transition: opacity .4s; }
.surface-video.on { opacity: 1; }

.descent-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }

.hero-copy {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter);
  top: clamp(96px, 15vh, 150px); color: var(--ink);
  max-width: min(920px, calc(var(--chain-x, 100vw) - var(--gutter) - 56px));   /* stop short of the flag pole */
}
.eyebrow { font: 500 13px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.hero h1 {
  font: 800 clamp(40px, min(5.4vw, 9vh), 78px)/.92 var(--display);
  letter-spacing: -.01em; text-transform: uppercase; margin: 0 0 18px; text-wrap: balance;
}
.hero h1 .line { display: block; text-wrap: balance; }
.lede { max-width: 34em; margin: 0 0 24px; font-size: clamp(17px, 1.2vw + 10px, 21px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-cue {
  position: absolute; z-index: 3; right: var(--gutter); bottom: 44px; margin: 0; padding: 9px 12px;
  font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--paper); background: rgb(14 34 48 / .82); border-radius: 3px;
}

@media (max-width: 760px) {
  /* Phone: headline on plain sky, photo fills the lower part so the flags sit below the text */
  .surface-photo, .surface-video { object-position: 76% 50%; top: 44%; height: 56%; -webkit-mask-image: linear-gradient(transparent, #000 14%); mask-image: linear-gradient(transparent, #000 14%); }
  .hero-copy { top: 92px; max-width: none; }
  .scroll-cue { display: none; }
  .lede { margin-bottom: 18px; }
}

/* ---------- underwater page ---------- */
.depths {
  --sb-h: clamp(560px, 92vh, 980px);
  position: relative;
  background: linear-gradient(#011813, #04221c 20%, #052520 45%, #031a16 min(70%, calc(100% - var(--sb-h) - 360px)), #0d211c calc(100% - var(--sb-h)), #0d211c);   /* from the under-float photo; reaches the seabed colour exactly where the seabed starts */
}
.home .depths { --sb-h: clamp(460px, 56vw, 860px); }
@media (max-width: 760px) { .home .depths { --sb-h: 78vh; } }

/* Home seabed: the photo, shifted by JS so its chain sits on the float's line. Dark water fades in
   from above; the bottom fades into the footer. */
.seabed-photo { position: relative; z-index: 2; height: var(--sb-h); overflow: hidden; }
.seabed-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 59% 50%; }
.seabed-photo::before, .seabed-photo::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.seabed-photo::before { top: 0; height: 38%; background: linear-gradient(#0d211c, rgb(13 33 28 / 0)); }
.seabed-photo::after { bottom: 0; height: 34%; background: linear-gradient(rgb(22 31 27 / 0), #161f1b); }

.seabed { position: relative; height: var(--sb-h); overflow-x: clip; overflow-y: visible; }
.seabed::before {   /* last light reaching the bottom */
  content: ""; position: absolute; inset: -20% 0 0 0;
  background: radial-gradient(55% 45% at 55% 55%, rgb(120 170 150 / .12), transparent 100%);
}
.seabed-ground { position: absolute; left: 0; bottom: 0; width: 100%; height: 55%; }
.seabed::after { content: ""; position: absolute; inset: auto 0 0 0; height: 22%; background: linear-gradient(transparent, #161f1b); }
.kelp { position: absolute; z-index: 1; bottom: calc(var(--sb-h) * .28); transform-origin: 30% 100%; animation: kelp 9s ease-in-out infinite; }
.kelp-svg { height: 100%; width: auto; }
.kelp-a { left: 3%; height: calc(var(--sb-h) * .95); }
.kelp-b { left: 15%; height: calc(var(--sb-h) * .7); bottom: calc(var(--sb-h) * .24); animation-delay: -4s; animation-duration: 11s; }
@keyframes kelp { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.8deg); } }
@media (max-width: 760px) {
  .kelp-a { left: -6%; height: calc(var(--sb-h) * .8); }
  .kelp-b { left: 14%; height: calc(var(--sb-h) * .55); }
}
/* Down the chain: pinned behind the text, scrubbed by scroll. --scrim fades in the text shade. */
.orbit { position: fixed; inset: 0; z-index: 0; overflow: hidden; visibility: hidden; }
/* With the frames loaded the dive is one fixed layer behind all of Home: the hero hands over to it
   (identical frame) and the text scrolls over it. Without them, the gradient and seabed photo stay. */
.orbit-on .orbit { visibility: visible; }
.orbit-on .home .depths { background: transparent; }
.orbit-on .home .depths-edge { display: none; }
.orbit-on.descent .stage { background: transparent; }   /* the dive layer shows through as the descent fades */
.orbit-on .stage.handed-off .descent-canvas, .orbit-on .stage.handed-off .descent-scrim { visibility: hidden; }
/* The dive ends at the very bottom: the footer sits on the sand with the last frame showing through. */
.orbit-on .home .site-footer { background: linear-gradient(rgb(13 33 28 / 0), rgb(13 33 28 / .82) 45%); padding-top: 96px; }
.orbit-still, .orbit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit-still { object-fit: cover; }
.orbit-canvas { display: none; }
.orbit-on .orbit-canvas { display: block; }
.orbit-on .orbit-still { display: none; }
/* Shade for the text. The hero's under view fades the same shade in, so the hand-off is seamless. */
.orbit::after, .descent-scrim {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(1 24 19 / .86), rgb(1 24 19 / .8) 45%, rgb(1 24 19 / .55) 64%, rgb(1 24 19 / 0) 82%);
}
.descent-scrim { opacity: 0; }
@media (max-width: 1100px) { .orbit::after, .descent-scrim { background: rgb(1 24 19 / .72); } }   /* phones and tablets: text spans the chain */
/* Home text stops short of the chain (desktop; --chain-x is set by main.js) */
@media (min-width: 1101px) {
  .home .services, .home .steps, .home .chapter-lede, .home .cta-block h2 {
    max-width: min(var(--col-max), calc(var(--chain-x, 73vw) - max(0px, (100vw - 1200px) / 2) - var(--gutter) - 120px));   /* the chain and its bubbles swing either side of the float line as the camera orbits */
  }
  .home .services { --col-max: 760px; } .home .steps { --col-max: 900px; } .home .chapter-lede { --col-max: 38em; } .home .cta-block h2 { --col-max: 14em; }
}
/* No motion (reduced motion, ?static=1, JS off): one still frame of the dive stays behind the text */
:root:not(.descent) .orbit { visibility: visible; }
:root:not(.descent) .home .depths { background: transparent; }
:root:not(.descent) .home .depths-edge { display: none; }
.seabed-end { position: relative; z-index: 1; }
.orbit-on .seabed-end .seabed-photo { visibility: hidden; }   /* the clip's last frame is the seabed */
.depths-edge { position: absolute; top: -28px; left: 0; width: 100%; height: 50px; }
.descent .depths-edge { display: none; }
.chapter { position: relative; z-index: 3; padding: clamp(64px, 12vh, 140px) var(--gutter); max-width: 1200px; margin: 0 auto; }
@media (max-width: 760px) { .depths { --anchor-h: 140px; } }
/* Home: What we do starts as soon as the water closes over the hero */
.home .depths > section.chapter:first-of-type { padding-top: clamp(28px, 7vh, 72px); }
.chapter h2 { font: 800 clamp(40px, 5.5vw, 84px)/.95 var(--display); text-transform: uppercase; margin: 0 0 28px; }

body::after {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none;
  background: url("/static/img/grain.svg"); opacity: .07;
}

/* ---------- underwater pages and chapters ---------- */
.under-page .nav a { color: var(--paper); }
.under-page .nav .nav-cta { background: var(--paper); color: var(--ink); }
.depths.page { min-height: 100vh; }
.page-top { position: relative; z-index: 3; max-width: 1200px; margin: 0 auto; padding: clamp(140px, 22vh, 220px) var(--gutter) clamp(32px, 6vh, 64px); }
.page-top h1 { font: 800 clamp(48px, 7vw, 100px)/.92 var(--display); text-transform: uppercase; letter-spacing: -.01em; margin: 0 0 20px; }
.page-lede { max-width: 34em; font-size: clamp(18px, 1.2vw + 11px, 22px); margin: 0 0 16px; }
.depth { font: 500 13px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--foam); margin: 0 0 14px; }
.chapter-lede { max-width: 38em; font-size: clamp(17px, 1vw + 11px, 20px); margin: -8px 0 32px; }
.emergency { margin: 0 0 24px; padding: 14px 16px; border-left: 4px solid var(--red); background: rgb(3 18 27 / .45); max-width: 34em; }
.emergency a { font-weight: 600; }

.services { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.services li { padding: 16px 0 18px; border-bottom: 1px solid rgb(192 228 240 / .22); }
.services h3 { font: 600 clamp(24px, 2.2vw, 34px)/1.1 var(--display); text-transform: uppercase; margin: 0 0 6px; }
.services p { margin: 0; color: rgb(232 238 240 / .94); }

.frame { margin: 0; position: relative; }
.frame .photo { width: 100%; height: auto; border-radius: 3px; box-shadow: 0 24px 40px -18px rgb(0 0 0 / .6); }
.frame::after {   /* water haze over the print, same on every photo */
  content: ""; position: absolute; inset: 0; border-radius: 3px; pointer-events: none;
  background: linear-gradient(rgb(44 127 151 / .08), rgb(3 18 27 / .22)); box-shadow: inset 0 0 0 1px rgb(192 228 240 / .14);
}
.frame figcaption { font: 500 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--foam); margin-top: 10px; }
.photo-row { display: grid; gap: clamp(14px, 2vw, 28px); grid-template-columns: repeat(3, 1fr); }
.photo-row-2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; }
@media (max-width: 760px) {
  .photo-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .photo-row .frame { scroll-snap-align: start; }
  .photo-row-2 { grid-auto-columns: 84%; }
}

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 2px; max-width: 900px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; padding: 18px 0; border-bottom: 1px solid rgb(192 228 240 / .22); }
.steps li::before { content: "0" counter(step); grid-row: span 2; font: 800 40px/1 var(--display); color: var(--foam); }
.steps h3 { font: 600 clamp(22px, 2vw, 30px)/1.1 var(--display); text-transform: uppercase; margin: 0 0 6px; }
.steps p { margin: 0; color: rgb(232 238 240 / .94); }

.cta-block h2 { max-width: 14em; }
.btn-light { color: var(--paper); }
.btn-light:hover { background: rgb(232 238 240 / .1); }

.split { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.1fr 1fr; }
  .split-flip > :first-child { order: 2; }
}
.split .frame { max-width: 460px; }
.tick-list { list-style: none; padding: 0; margin: 0; }
.tick-list li { position: relative; padding: 12px 0 12px 30px; border-bottom: 1px solid rgb(192 228 240 / .22); font-size: clamp(17px, 1vw + 11px, 20px); }
.tick-list li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 14px; height: 8px; border: solid var(--red); border-width: 0 0 3px 3px; transform: rotate(-45deg); }

.prose { max-width: 760px; }
.chapter-tight { padding-top: 0; }
.prose h2 { font: 800 clamp(26px, 2.6vw, 36px)/1 var(--display); text-transform: uppercase; margin: 36px 0 10px; }
.prose p { margin: 0 0 14px; }
.placeholder { display: inline-block; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; background: #e7b416; color: var(--ink); padding: 4px 6px; border-radius: 2px; margin-right: 6px; }

/* ---------- form ---------- */
.form-wrap { padding-top: 0; }
.book-form { display: grid; gap: 18px 24px; max-width: 860px; }
@media (min-width: 760px) { .book-form { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: rgb(232 238 240 / .7); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink);
  background: var(--paper); border: 2px solid transparent; border-radius: 4px;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--foam); outline-offset: 2px; }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--red); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.note { font-size: 15px; color: rgb(232 238 240 / .8); margin: 10px 0 0; }
.book-form .btn { border: 0; cursor: pointer; }

/* ---------- footer ---------- */
.footer-grid { display: grid; gap: 24px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1.4fr 1fr; } }
.site-footer a { text-decoration-color: rgb(232 238 240 / .4); text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
a[href^="mailto:"] { white-space: nowrap; }

/* ---------- footer base ---------- */
.site-footer { position: relative; z-index: 3; background: #161f1b; padding: 48px var(--gutter) max(48px, env(safe-area-inset-bottom)); }
.site-footer p { margin: 0 0 8px; }
.site-footer p:has(> a:only-child) { margin: 0; }
.footer-name { font: 800 28px/1 var(--display); text-transform: uppercase; }

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scroll-cue { display: none; }
}
.static .scroll-cue { display: none; }
.static *, .static *::before, .static *::after { animation: none !important; transition: none !important; }
