/* =========================================================================
   Cristiano Rodrigues - personal site
   Palette: crew navy + hull white, with one life-ring orange accent.
   Type: Archivo (variable width + weight), self-hosted.
   Shape rules: cards/images 20px radius, buttons + chips are pills,
   photos of Cris are round "portholes".
   ========================================================================= */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* the surface (light by default) */
  --bg: #F3F6F8;
  --bg-2: #E4ECF1;
  --card: #FBFCFD;
  --ink: #0B1B2B;
  --ink-2: #46586B;
  --line: rgb(11 27 43 / 0.12);
  --shadow: 0 1px 2px rgb(11 38 64 / 0.06), 0 18px 40px -18px rgb(11 38 64 / 0.28);
  --ticket: #0F2740;
  --descent: linear-gradient(to bottom, #F3F6F8 0%, #D3E6EE 16%, #7FB4CC 40%, #2F6F95 64%, #133A5C 84%, #0A1B2E 100%);

  /* the deep (always dark) */
  --deep: #0A1B2E;
  --deepest: #06121F;
  --on-deep: #EAF1F6;
  --on-deep-2: #A2B5C6;
  --line-deep: rgb(234 241 246 / 0.14);

  /* accent: life-ring orange */
  --accent: #CC4719;          /* buttons, white text on it = 4.7:1 */
  --accent-hover: #B23C12;
  --accent-text: #B23C12;     /* orange text on the light surface */
  --accent-bright: #FF8A5C;   /* orange text on dark */
  --accent-tint: #FBE6DC;

  --radius: 20px;
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 68px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1A28;
    --bg-2: #13283B;
    --card: #11222F;
    --ink: #E9EFF4;
    --ink-2: #A6B6C4;
    --line: rgb(233 239 244 / 0.13);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 40px -18px rgb(0 0 0 / 0.7);
    --ticket: #17324D;
    --descent: linear-gradient(to bottom, #0C1A28 0%, #0E2436 35%, #0B1D2E 70%, #081522 100%);
    --deep: #081522;
    --deepest: #040C16;
    --accent-text: #FF8A5C;
    --accent-tint: #3B2117;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection { background: var(--accent); color: #fff; }

/* ---------- Type ---------- */
.section { padding-block: clamp(84px, 11vw, 152px); }

.section-title {
  font-stretch: 70%;
  font-weight: 820;
  text-transform: uppercase;
  font-size: clamp(2.625rem, 1.55rem + 4vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.005em;
  word-spacing: 0.05em;
  text-wrap: balance;
}

.section-lede {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 52px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn .icon { width: 1.2em; height: 1.2em; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }

.btn--ghost { border-color: color-mix(in srgb, var(--ink) 24%, transparent); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }

.btn--light { background: var(--on-deep); color: var(--deepest); }
.btn--light:hover { background: #D5E3EC; }

.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }
.btn--lg { min-height: 58px; padding: 0 30px; font-size: 1.0625rem; }

/* ---------- Navigation ---------- */
.nav-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 24px; pointer-events: none; }

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  color: var(--ink);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease), color 0.35s var(--ease);
}
.nav.is-solid,
.nav.menu-open {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
/* over the dark sections the bar flips to navy */
.nav.is-dark {
  --bg: var(--deepest);
  --ink: var(--on-deep);
  --ink-2: var(--on-deep-2);
  --line: var(--line-deep);
}

.nav__inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  font-weight: 700;
  text-decoration: none;
}
.nav__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.nav__name { font-size: 1rem; letter-spacing: 0.01em; }

.nav__links { display: flex; gap: 26px; }
.nav__links a {
  position: relative;
  padding-block: 6px;
  font-size: 0.9375rem;
  font-weight: 560;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

.nav__toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav__toggle .icon { width: 26px; height: 26px; }
.nav__toggle .icon--close { display: none; }
.nav__toggle[aria-expanded="true"] .icon--open { display: none; }
.nav__toggle[aria-expanded="true"] .icon--close { display: block; }

.menu {
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  display: grid;
  padding: 8px var(--gutter) 28px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line), 0 24px 40px -24px rgb(6 18 31 / 0.35);
}
.menu[hidden] { display: none; }
.menu a {
  padding: 12px 0;
  font-stretch: 75%;
  font-weight: 800;
  font-size: 1.625rem;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle { display: grid; }
  .nav__inner { gap: 14px; }
}
@media (max-width: 900px) {
  .nav:not(.is-solid):not(.menu-open) .nav__cta { display: none; }
}
@media (max-width: 440px) {
  .nav__name { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: min(100svh, 940px);
  padding-top: calc(var(--nav-h) + 32px);
  padding-bottom: 72px;
  overflow: clip;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
}

.hero__eyebrow {
  margin-bottom: 22px;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.hero__title {
  font-stretch: 66%;
  font-weight: 860;
  text-transform: uppercase;
  font-size: clamp(3.75rem, 1.4rem + 8.6vw, 9rem);
  line-height: 0.85;
  letter-spacing: -0.012em;
}
.hero__title span { display: block; }

.hero__lede {
  margin-top: 30px;
  max-width: 31ch;
  font-size: clamp(1.125rem, 0.98rem + 0.55vw, 1.375rem);
  line-height: 1.5;
  color: var(--ink-2);
}
.hero__lede em { color: var(--ink); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* porthole composition (echoes the circles on Cris's CV) */
.hero__media {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1 / 1.02;
}

.porthole {
  overflow: hidden;
  border-radius: 50%;
  background: var(--bg-2);
}
.porthole img { width: 100%; height: 100%; object-fit: cover; }

.porthole--lg {
  position: absolute;
  top: 0;
  right: 0;
  width: 86%;
  aspect-ratio: 1;
  box-shadow: 0 0 0 12px var(--card), 0 0 0 13px var(--line), var(--shadow);
}
.porthole--sm {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42%;
  aspect-ratio: 1;
  box-shadow: 0 0 0 9px var(--bg), var(--shadow);
}

@media (max-width: 860px) {
  .hero {
    min-height: 0;
    padding-top: calc(var(--nav-h) + 16px);
    padding-bottom: 56px;
  }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero__media { order: -1; justify-self: center; width: 76%; max-width: 360px; }
  .hero__lede { margin-top: 22px; }
  .hero__actions { margin-top: 28px; }
}
@media (max-width: 480px) {
  .hero__actions { gap: 10px; }
  .hero__actions .btn { min-height: 50px; padding: 0 18px; font-size: 0.9375rem; }
}

/* ---------- About ---------- */
.about__lead {
  margin-top: 36px;
  max-width: 31ch;
  font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.about__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 56px;
  max-width: 1000px;
  margin-top: 36px;
  color: var(--ink-2);
}

.facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px 28px;
  margin-top: clamp(56px, 7vw, 96px);
}
.fact { padding-top: 16px; border-top: 2px solid var(--ink); }
.fact--key { border-top-color: var(--accent); }
.fact dt {
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.fact dd {
  margin-top: 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 1040px) {
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .about__body { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
}

/* ---------- Skills (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(270px, auto);
  grid-template-areas:
    "dive   dive   water deck"
    "safety guests water mech";
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.tile--dive   { grid-area: dive; }
.tile--water  { grid-area: water; }
.tile--deck   { grid-area: deck; }
.tile--safety { grid-area: safety; }
.tile--guests { grid-area: guests; }
.tile--mech   { grid-area: mech; }

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}
.tile h3 {
  font-stretch: 82%;
  font-weight: 780;
  font-size: 1.375rem;
  line-height: 1.15;
}
.tile p {
  margin-top: 10px;
  font-size: 0.96875rem;
  line-height: 1.55;
  color: var(--ink-2);
}
.tile__icon {
  width: 36px;
  height: 36px;
  margin-bottom: auto;
  padding-bottom: 24px;
  box-sizing: content-box;
  fill: currentColor;
}

.tile--photo {
  justify-content: flex-end;
  padding: 0;
  border: 0;
  background: var(--deep);
  color: #fff;
}
.tile--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.tile--photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(6 18 31 / 0.9) 0%, rgb(6 18 31 / 0.45) 42%, rgb(6 18 31 / 0) 72%);
}
.tile--photo .tile__body { position: relative; z-index: 1; padding: 28px; }
.tile--photo p { color: rgb(234 241 246 / 0.9); max-width: 46ch; }
.tile--photo:hover img { transform: scale(1.04); }

.tile--safety { border-color: transparent; background: var(--accent-tint); }
.tile--safety .tile__icon { color: var(--accent-text); }
.tile--guests { border-color: transparent; background: var(--bg-2); }
.tile--mech { border-color: var(--line-deep); background: var(--ticket); color: var(--on-deep); }
.tile--mech p { color: var(--on-deep-2); }
.tile--mech .tile__icon { color: var(--accent-bright); }

@media (max-width: 1040px) {
  .bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(250px, auto);
    grid-template-areas:
      "dive   dive"
      "water  deck"
      "water  safety"
      "guests mech";
  }
}
@media (max-width: 640px) {
  .bento {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: auto;
    grid-template-areas: "dive" "water" "deck" "safety" "guests" "mech";
  }
  .tile:not(.tile--photo) { padding: 24px; }
  .tile--dive { min-height: 300px; }
  .tile--water { min-height: 440px; }
  .tile--photo .tile__body { padding: 24px; }
}

/* ---------- Experience (logbook) ---------- */
.logbook__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
@media (min-height: 820px) {
  .logbook__intro { position: sticky; top: calc(var(--nav-h) + 36px); }
}
.logbook__intro > p {
  margin-top: 20px;
  max-width: 34ch;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.logbook__photo {
  max-width: 380px;
  margin-top: 36px;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
}
.logbook__photo img { width: 100%; height: 100%; object-fit: cover; }

.log__entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 32px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
}
.log__entry:first-child { padding-top: 6px; border-top: 0; }

.log__date {
  padding-top: 7px;
  font-size: 0.875rem;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.log__role {
  font-stretch: 78%;
  font-weight: 800;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.1;
}
.log__place { margin-top: 4px; font-weight: 620; color: var(--accent-text); }
.log__points { display: grid; gap: 8px; margin-top: 18px; color: var(--ink-2); }
.log__points li { position: relative; padding-left: 24px; }
.log__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 11px;
  height: 1.5px;
  background: currentColor;
  opacity: 0.55;
}
.log__ref { margin-top: 18px; font-size: 0.9rem; font-style: italic; color: var(--ink-2); }

@media (max-width: 900px) {
  .logbook__grid { grid-template-columns: minmax(0, 1fr); }
  .logbook__intro { position: static; }
  .logbook__photo { max-width: none; aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .log__entry { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-block: 32px; }
  .log__date { padding-top: 0; }
}

/* ---------- Certificates (tickets) ---------- */
.tickets__featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}

/* a ticket stub: perforation line + half-moon notches cut with a mask */
.ticket {
  --notch: 11px;
  --stub: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  min-height: 148px;
  border-radius: var(--radius);
  background: var(--ticket);
  color: var(--on-deep);
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
}
.ticket__main { padding: 26px 28px; align-self: center; }
.ticket__main h3 {
  font-stretch: 78%;
  font-weight: 800;
  font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.75rem);
  line-height: 1.08;
  text-transform: uppercase;
}
.ticket__main p { margin-top: 8px; font-size: 0.9375rem; color: var(--on-deep-2); }
.ticket__stub {
  display: grid;
  place-items: center;
  border-left: 2px dashed rgb(234 241 246 / 0.22);
  font-stretch: 70%;
  font-weight: 850;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  color: var(--accent-bright);
}

.tickets__groups {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px 56px;
  margin-top: 56px;
}
.cert-group h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips li {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.9375rem;
  font-weight: 560;
  line-height: 1.3;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  padding-bottom: 3px;
  border-bottom: 1.5px solid currentColor;
  font-weight: 650;
  color: var(--accent-text);
  text-decoration: none;
}
.link-arrow .icon { transition: transform 0.3s var(--ease); }
.link-arrow:hover .icon { transform: translate(2px, -2px); }

@media (max-width: 900px) {
  .tickets__featured, .tickets__groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .ticket { --stub: 84px; }
  .ticket__main { padding: 22px 20px; }
  .ticket__stub { font-size: 1.25rem; }
}

/* ---------- The deep: gallery and contact ---------- */
.section--deep,
.section--deepest,
.footer {
  --ink: var(--on-deep);
  --ink-2: var(--on-deep-2);
  --line: var(--line-deep);
  --accent-text: var(--accent-bright);
  color: var(--on-deep);
}
.section--deep { background: var(--deep); }
.section--deepest { background: var(--deepest); }

/* the descent from the surface into the deep */
.gallery { position: relative; padding-top: 0; }
.descent {
  position: relative;
  height: clamp(170px, 22vw, 300px);
  margin-bottom: clamp(24px, 4vw, 48px);
  overflow: hidden;
  background: var(--descent);
}
.descent span {
  position: absolute;
  bottom: -24px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border: 1px solid rgb(234 241 246 / 0.45);
  border-radius: 50%;
  opacity: 0;
}
.descent span:nth-child(1) { --x: 8%;  --s: 9px;  --t: 9s;  --wait: 0s; }
.descent span:nth-child(2) { --x: 21%; --s: 5px;  --t: 7s;  --wait: 3s; }
.descent span:nth-child(3) { --x: 47%; --s: 12px; --t: 11s; --wait: 1.5s; }
.descent span:nth-child(4) { --x: 64%; --s: 6px;  --t: 8s;  --wait: 5s; }
.descent span:nth-child(5) { --x: 82%; --s: 10px; --t: 10s; --wait: 2.5s; }
.descent span:nth-child(6) { --x: 93%; --s: 5px;  --t: 7.5s; --wait: 6s; }

@media (prefers-reduced-motion: no-preference) {
  .descent span { animation: bubble var(--t) linear var(--wait) infinite; }
}
@keyframes bubble {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: 0.9; }
  70%  { opacity: 0.35; }
  100% { transform: translate(14px, -300px); opacity: 0; }
}

/* gallery: masonry via CSS columns, works with any mix of photo shapes */
.shots {
  columns: 3 260px;
  column-gap: 16px;
  margin-top: clamp(36px, 4.5vw, 56px);
}
.shot {
  position: relative;
  display: block;
  margin-bottom: 16px;
  overflow: hidden;
  break-inside: avoid;
  border-radius: var(--radius);
  background: var(--deepest);
  cursor: zoom-in;
}
.shot img { width: 100%; transition: transform 0.9s var(--ease), filter 0.4s var(--ease); }
.shot:hover img { transform: scale(1.035); }
.shot:focus-visible { outline-offset: 4px; }

@media (max-width: 560px) {
  .shots { columns: 2; column-gap: 10px; }
  .shot { margin-bottom: 10px; border-radius: 14px; }
}

/* contact */
.contact { position: relative; overflow: hidden; text-align: center; }
.contact::before {
  /* a little light from the surface far above */
  content: "";
  position: absolute;
  inset: 0 -20% auto;
  height: 75%;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, rgb(56 126 178 / 0.26), rgb(56 126 178 / 0) 70%);
  pointer-events: none;
}
.contact__inner { position: relative; display: grid; justify-items: center; }

.porthole--contact {
  width: 112px;
  height: 112px;
  box-shadow: 0 0 0 6px var(--deepest), 0 0 0 7px var(--line-deep);
}

.contact__title {
  margin-top: 30px;
  font-stretch: 66%;
  font-weight: 860;
  text-transform: uppercase;
  font-size: clamp(3.5rem, 1.4rem + 8vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.01em;
  word-spacing: 0.1em;
}
.contact__lede {
  max-width: 34ch;
  margin-top: 22px;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  color: var(--on-deep-2);
  text-wrap: balance;
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 38px;
}
@media (max-width: 480px) {
  .contact__actions { display: grid; grid-template-columns: minmax(0, 264px); }
}
.contact__details {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 30px;
  margin-top: 44px;
  color: var(--on-deep-2);
  font-size: 0.975rem;
}
.contact__details li { display: inline-flex; align-items: center; gap: 10px; }
.contact__details a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s;
}
.contact__details a:hover { color: var(--on-deep); text-decoration: underline; text-underline-offset: 4px; }
.contact__email { color: var(--on-deep); font-weight: 560; }

.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-deep);
  border-radius: 999px;
  background: transparent;
  color: var(--on-deep-2);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.copy:hover { border-color: var(--on-deep-2); color: var(--on-deep); }
.copy .icon { width: 15px; height: 15px; }
.copy .icon--done { display: none; }
.copy.is-done { border-color: var(--accent-bright); color: var(--accent-bright); }
.copy.is-done .icon--copy { display: none; }
.copy.is-done .icon--done { display: block; }

/* footer */
.footer { background: var(--deepest); border-top: 1px solid var(--line-deep); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  min-height: 80px;
  padding-block: 20px;
  font-size: 0.875rem;
  color: var(--on-deep-2);
}
.footer a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s;
}
.footer a:hover { color: var(--on-deep); }

/* ---------- Depth gauge (desktop only; main.js sets --progress from 0 to 1) ---------- */
.depth { display: none; }

@media (min-width: 1380px) {
  .js .depth {
    position: fixed;
    top: 50%;
    right: 26px;
    z-index: 40;
    display: grid;
    justify-items: center;
    gap: 12px;
    color: #fff;
    mix-blend-mode: difference;   /* reads dark on the surface, light in the deep */
    translate: 0 -50%;
    pointer-events: none;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    -webkit-user-select: none;
    user-select: none;
  }
  /* the track is also a drag handle: a generous grab area around the 1px line */
  .depth__track {
    position: relative;
    width: 32px;
    height: 34vh;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
  }
  .depth.is-dragging .depth__track { cursor: grabbing; }
  .depth__track::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    margin-left: -0.5px;
    background: currentColor;
    opacity: 0.4;
    transition: opacity 0.25s var(--ease);
  }
  .depth__marker {
    position: absolute;
    top: -4.5px;
    left: 50%;
    width: 9px;
    height: 9px;
    margin-left: -4.5px;
    border-radius: 50%;
    background: currentColor;
    transform: translateY(calc(var(--progress, 0) * 34vh));
    transition: scale 0.25s var(--ease);
    will-change: transform;
  }
  .depth__track:hover::before,
  .depth.is-dragging .depth__track::before { opacity: 0.75; }
  .depth__track:hover .depth__marker,
  .depth.is-dragging .depth__marker { scale: 1.6; }
  .depth__readout { letter-spacing: 0.04em; font-size: 0.8125rem; text-transform: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgb(4 12 22 / 0.95);
  color: var(--on-deep);
}
.lightbox::backdrop { background: rgb(4 12 22 / 0.6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__figure {
  display: grid;
  justify-items: center;
  gap: 16px;
  max-width: 100%;
  padding: 76px 88px 44px;
}
.lightbox__img {
  width: auto;
  height: auto;
  max-width: min(1200px, 100%);
  max-height: calc(100dvh - 170px);
  border-radius: 12px;
  object-fit: contain;
}
.lightbox__caption { font-size: 0.9375rem; color: var(--on-deep-2); text-align: center; }
.lightbox__btn {
  position: fixed;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgb(234 241 246 / 0.2);
  border-radius: 50%;
  background: rgb(234 241 246 / 0.07);
  color: var(--on-deep);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}
.lightbox__btn:hover { background: rgb(234 241 246 / 0.16); border-color: rgb(234 241 246 / 0.4); }
.lightbox__btn .icon { width: 22px; height: 22px; }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { top: 50%; left: 20px; translate: 0 -50%; }
.lightbox__next { top: 50%; right: 20px; translate: 0 -50%; }

@media (max-width: 640px) {
  .lightbox__figure { padding: 72px 12px 104px; }
  .lightbox__img { max-height: calc(100dvh - 210px); border-radius: 8px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 28px; translate: none; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
}

/* ---------- Motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* hero entrance order */
.hero__copy .reveal:nth-child(2) { --d: 80ms; }
.hero__copy .reveal:nth-child(3) { --d: 180ms; }
.hero__copy .reveal:nth-child(4) { --d: 260ms; }
.porthole--lg.reveal { --d: 140ms; }
.porthole--sm.reveal { --d: 420ms; }

@media (prefers-reduced-motion: no-preference) {
  /* the little portrait bobs like it's floating */
  .js .porthole--sm.is-in { animation: bob 7s ease-in-out 1.4s infinite; }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .tile--photo img, .shot img { transition: none; }
}
