/* Jackson Yowe — personal site */

/* Self-hosted fonts (Google Fonts, OFL). swap keeps text visible while they load;
   the two used in the first view are preloaded in index.html. */
@font-face {
  font-family: "Big Shoulders Display"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/big-shoulders-display-800-latin.44241ec636.woff2") format("woff2");
}
@font-face {
  font-family: "Host Grotesk"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("fonts/host-grotesk-var-latin.5662dcd15d.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Host Grotesk"; font-style: normal; font-weight: 300 600; font-display: swap;
  src: url("fonts/host-grotesk-var-latin-ext.ad1af424e0.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Yellowtail is only used for single swapped letters, so it's cut down to A B E O U W
   (upper and lower case): 2 KB instead of 18 KB. The build fails if a page uses another one. */
@font-face {
  font-family: "Yellowtail"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/yellowtail-400-swash.709e22a866.woff2") format("woff2");
}

:root {
  --bone: #e3e4de;
  --bone-2: #d6d8d0;
  --sea: #12303a;              /* deep-sea ink on bone */
  --sea-2: rgba(18, 48, 58, 0.78);
  --sea-line: rgba(18, 48, 58, 0.28);
  --black: #0c0f10;
  --glass: #a9c2bd;            /* sea-glass type on black */
  --glass-2: rgba(222, 234, 231, 0.74);
  --glass-line: rgba(169, 194, 189, 0.3);
  --glass-bg: #8ea8a2;         /* sea-glass field, black type */
  --black-2: rgba(12, 15, 16, 0.8);
  --black-line: rgba(12, 15, 16, 0.3);

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --script: "Yellowtail", cursive;
  --sans: "Host Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(18px, 3.4vw, 48px);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--black); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--sea);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
::selection { background: var(--sea); color: var(--bone); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
strong { font-weight: 600; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 999px; }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 60;
  padding: 10px 16px; border-radius: 999px;
  background: var(--sea); color: var(--bone); font-size: 14px; font-weight: 500;
  transform: translateY(-200%); transition: transform 0.3s var(--ease);
}
.skip:focus-visible { transform: none; }

.wrap { padding: 0 var(--gutter); }

/* Swapped letters: a 50s surf-script glyph dropped into the condensed caps.
   Yellowtail is slanted and lighter than the caps, so each glyph gets a little
   stroke for weight, room on its right for the slant, and per-letter seating. */
.sw {
  font-family: var(--script);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.98em;
  line-height: 0; /* never grows the line box */
  -webkit-text-stroke: 0.018em currentColor;
  position: relative;
  margin: 0 0.07em 0 0.01em;
}
/* lowercase script glyphs scaled up to stand at cap height */
.sw-lc { font-size: 1.5em; margin: 0 0.05em 0 0.02em; }
.sw-e { margin-left: 0.005em; top: -0.045em; }
.sw-u { margin: 0 0.07em 0 0.03em; }
.sw-o { margin: 0 0.07em 0 0.02em; }
.sw-B { margin-left: 0.02em; }

.arrow {
  width: 0.8em; height: 0.8em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.35s var(--ease);
}

/* ─── pill navigation ─────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-left { display: flex; gap: 6px; }

.pill {
  --pill-ink: var(--bone);
  --pill-fill: rgba(12, 15, 16, 0.86);
  --pill-line: transparent;
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 15px;
  border-radius: 999px;
  font-size: 14.5px; font-weight: 500; letter-spacing: 0.005em;
  color: var(--pill-ink);
  background: var(--pill-fill);
  border: 1px solid var(--pill-line);
  transition: color 0.35s ease, background-color 0.35s ease, border-color 0.35s ease, transform 0.25s var(--ease);
  white-space: nowrap;
}
.pill:active { transform: scale(0.96); }
.pill-menu { display: none; }

body[data-nav="light"] .pill { --pill-ink: var(--sea); --pill-fill: transparent; --pill-line: var(--sea); }
body[data-nav="dark"] .pill { --pill-ink: var(--glass); --pill-fill: transparent; --pill-line: var(--glass); }
body[data-nav="glass"] .pill { --pill-ink: var(--black); --pill-fill: transparent; --pill-line: var(--black); }

body[data-nav="light"] .pill.is-active, body[data-nav="light"] .pill:hover { --pill-ink: var(--bone); --pill-fill: var(--sea); }
body[data-nav="dark"] .pill.is-active, body[data-nav="dark"] .pill:hover { --pill-ink: var(--black); --pill-fill: var(--glass); }
body[data-nav="glass"] .pill.is-active, body[data-nav="glass"] .pill:hover { --pill-ink: var(--glass-bg); --pill-fill: var(--black); }
body[data-nav="photo"] .pill:hover { --pill-fill: var(--bone); --pill-ink: var(--black); }

@media (max-width: 760px) {
  :root { --nav-h: 76px; }
  /* phones: Menu and Contact sit at the bottom of the screen, where thumbs reach */
  .nav { inset: auto 0 0 0; height: auto; padding: 0 var(--gutter) calc(14px + env(safe-area-inset-bottom)); }
  .pill-sec { display: none; }
  .pill-menu { display: inline-flex; }
  .pill { height: 48px; padding: 0 20px; font-size: 16px; }
  .slide { padding-top: clamp(60px, 9vh, 120px); }
  .countries .tag, .map-reset { min-height: 48px; }
  .foot-links a { padding: 13px 0; min-width: 44px; text-align: center; }
}

/* mobile menu: a bottom sheet over part of the screen, within thumb reach */
.menu {
  position: fixed; inset: auto 0 0 0;
  width: 100%; max-width: 100%; max-height: 85svh; margin: 0;
  padding: 14px var(--gutter) calc(22px + env(safe-area-inset-bottom));
  border: 0; border-radius: 24px 24px 0 0;
  background: var(--black); color: var(--glass);
  overflow-y: auto; overscroll-behavior: contain;
}
.menu::backdrop { background: rgba(12, 15, 16, 0.55); }
.menu[open] { animation: sheet-up 0.4s var(--ease); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.menu-top { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.menu .menu-close { --pill-ink: var(--glass); --pill-fill: transparent; --pill-line: var(--glass); }
.menu ul { display: grid; }
.menu a {
  display: flex; align-items: center; min-height: 56px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1;
  border-bottom: 1px solid var(--glass-line);
}
.menu a:hover, .menu a:focus-visible { color: #eef3f2; }

/* ─── hero ────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100svh; min-height: 320px;
  overflow: hidden;
  background: var(--black);
  color: var(--bone);
}
.hero-photo, .hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.hero-photo img { object-fit: cover; object-position: 50% 30%; will-change: transform; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 15, 16, 0.32) 0%, rgba(12, 15, 16, 0) 22%),
    linear-gradient(0deg, rgba(12, 15, 16, 0.55) 0%, rgba(12, 15, 16, 0.12) 42%, rgba(12, 15, 16, 0) 60%);
}

.hero-content {
  position: absolute; inset: auto 0 0 0;
  padding: 0 var(--gutter) clamp(18px, 2.4vw, 34px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "l1 role" "l2 l2" "cap cap";
}
.hero-name { display: contents; }
.hero-line {
  display: block; overflow: hidden; padding: 0.06em 0.04em 0.08em 0;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(5.5rem, min(17vw, 20.5svh), 19rem);
  line-height: 0.8;
  letter-spacing: -0.008em;
}
.hero-word { display: inline-block; }
.hero-line-1 { grid-area: l1; }
.hero-line-2 { grid-area: l2; justify-self: end; margin-top: -0.06em; }
.hero-role {
  grid-area: role; align-self: end;
  padding-bottom: 2.4vw;
  font-size: clamp(1.05rem, 1.7vw, 1.6rem); font-weight: 400; line-height: 1.25;
  text-shadow: 0 1px 2px rgba(12, 15, 16, 0.35), 0 2px 24px rgba(12, 15, 16, 0.55);
}
.hero-caption {
  grid-area: cap;
  margin-top: 10px;
  font-size: 13.5px; font-weight: 500;
  text-shadow: 0 1px 2px rgba(12, 15, 16, 0.5), 0 2px 18px rgba(12, 15, 16, 0.6);
}

@media (max-width: 699px) {
  .hero-content {
    grid-template-columns: 1fr;
    grid-template-areas: "l1" "l2" "role" "cap";
  }
  .hero-line { font-size: 25vw; }
  .hero-line-2 { justify-self: start; }
  .hero-role { padding: 14px 0 0; font-size: 1.2rem; }
  .hero-photo img { object-position: 52% 32%; }
}

/* ─── sections ────────────────────────────────────────── */

.sec { position: relative; padding: clamp(110px, 14vw, 200px) 0 clamp(80px, 10vw, 150px); }
.sec-tight { padding-top: 0; }
.sec-bone { background: var(--bone); color: var(--sea); }
.sec-black { background: var(--black); color: var(--glass); }

.h-big {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3.4rem, 9.6vw, 9.5rem);
  line-height: 0.86;
  letter-spacing: -0.004em;
}

.cols-2 {
  display: grid; gap: 28px 8vw;
  margin-top: clamp(40px, 5vw, 72px);
}
@media (min-width: 760px) { .cols-2 { grid-template-columns: 1fr 1fr; } }
.cols-2 p { max-width: 44ch; color: var(--sea-2); }
.cols-2 strong { color: var(--sea); }

/* home / away */
.ha-titles { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.ha-wave { margin-top: clamp(26px, 3vw, 44px); }
.wave { display: block; width: 100%; height: clamp(60px, 7vw, 110px); overflow: visible; }
.wave path { fill: none; stroke: var(--sea); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.ha-tags {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: -18px;
}
.tag {
  display: inline-flex; align-items: center;
  min-height: 34px; padding: 0 15px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: var(--bone);
  font-size: 14.5px; font-weight: 500;
  white-space: nowrap;
}
.ha-text p:last-child { justify-self: end; }
@media (max-width: 759px) {
  .ha-tags { justify-content: flex-start; margin-top: 18px; }
  .ha-text p:last-child { justify-self: start; }
}

/* ─── what I do: stacked slides ───────────────────────── */

.slides { position: relative; }
.slide {
  position: sticky; top: 0;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: calc(var(--nav-h) + clamp(60px, 9vh, 120px));
  overflow: hidden;
}
.slide-black { background: var(--black); color: var(--glass); --line: var(--glass-line); --body: var(--glass-2); }
.slide-glass { background: var(--glass-bg); color: var(--black); --line: var(--black-line); --body: var(--black-2); }
/* repeat the field colour on the content so contrast checkers see the real background under stacked panels */
.slide-black .slide-body { background: var(--black); }
.slide-glass .slide-body { background: var(--glass-bg); }

.slide-body { display: grid; gap: 40px 6vw; align-items: start; }
/* short screens (phones on their side): panels taller than the screen would be covered by the
   next one, so they simply scroll instead of stacking */
@media (max-height: 560px) {
  .slide { position: relative; min-height: 0; padding-top: 64px; }
}
.slide-body > * { min-width: 0; }
/* narrow phones: size the slide titles to the screen so long words like LIFESAVING never clip */
@media (max-width: 480px) { .h-slide { font-size: 15vw; } }
@media (min-width: 900px) { .slide-body { grid-template-columns: 1.1fr 1fr; } }

.h-slide {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(4rem, 10.5vw, 10.5rem);
  line-height: 0.84;
  letter-spacing: -0.004em;
}
.slide-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 7vh, 96px); padding-top: 0.6vw; }
.slide-points {
  border-left: 1px solid currentColor;
  padding: 2px 0 2px 18px;
  display: grid; gap: 4px;
  color: var(--body);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
}
.slide-black .slide-points strong { color: #eef3f2; }
.slide-glass .slide-points strong { color: var(--black); }
.slide-points li::before { content: "·"; margin-right: 8px; }
.slide-art { display: block; width: min(100%, 440px); height: auto; overflow: visible; }
.slide-art path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* the only red and yellow on the site: the real colours of a surf patrol flag */
.slide-art .fill { stroke: none; }
.slide-art .flag-r { fill: #d8432f; }
.slide-art .flag-y { fill: #f0b92b; }
.slide-art .led { fill: currentColor; }

.slide-mark {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(1.6rem, 2.8vw, 2.6rem); font-weight: 300; letter-spacing: -0.02em;
  justify-self: start;
  max-width: 100%;
  overflow-wrap: anywhere; /* a long address may break rather than push the panel wider */
}
.slide-mark:hover .arrow { transform: translate(3px, -3px); }

.timeline {
  margin-top: 60px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 22px var(--gutter);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-transform: uppercase; font-size: 13px; font-weight: 500; letter-spacing: 0.08em;
}
.tl-line { position: relative; height: 10px; display: flex; align-items: center; }
.tl-fill { display: block; width: 100%; height: 1px; background: currentColor; transform-origin: left center; }
.tl-line svg { position: absolute; right: -2px; width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; }
@media (max-width: 640px) {
  .timeline { grid-template-columns: 1fr auto; gap: 12px 16px; }
  .timeline .tl-line { grid-column: 1 / -1; grid-row: 2; }
  .timeline p:last-child { grid-row: 1; grid-column: 2; }
}

/* ─── mountains: altitude log ─────────────────────────── */

.mtn-head { display: grid; gap: 28px 6vw; align-items: end; }
@media (min-width: 900px) { .mtn-head { grid-template-columns: auto 1fr; } }
.mtn-intro { max-width: 44ch; color: var(--sea-2); padding-bottom: 0.6vw; }
.mtn-intro strong { color: var(--sea); }

.ridge { margin-top: clamp(56px, 7vw, 110px); }
.ridge-plot { position: relative; aspect-ratio: 1000 / 400; }
.ridge-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ridge-grid path { stroke: var(--sea-line); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
.ridge-fill { fill: rgba(18, 48, 58, 0.08); }
.ridge-line { fill: none; stroke: var(--sea); stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ridge-axis li {
  position: absolute; left: 0; transform: translateY(-120%);
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em; font-variant-numeric: tabular-nums;
  color: var(--sea-2);
}

.peak {
  position: absolute; left: var(--x); top: var(--y);
  display: grid; justify-items: center; gap: 1px;
  transform: translate(-50%, calc(-100% - 16px));
  text-align: center; white-space: nowrap;
}
.peak::after {
  content: ""; position: absolute; left: 50%; bottom: -16px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bone); border: 2px solid var(--sea);
  transform: translate(-50%, 50%);
}
.peak-name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.2rem, 2vw, 1.9rem); line-height: 0.95;
}
.peak-alt { font-size: clamp(0.95rem, 1.2vw, 1.1rem); font-weight: 600; font-variant-numeric: tabular-nums; }
.peak-where { font-size: 12.5px; color: var(--sea-2); }
.peak-top .peak-name { font-size: clamp(1.5rem, 2.8vw, 2.7rem); }
.peak-top::after { width: 13px; height: 13px; background: var(--sea); }

/* phones: the ridge stays as a picture, the peaks become a list under it */
@media (max-width: 759px) {
  .ridge-axis { display: none; }
  .peaks { position: static; display: grid; margin-top: 28px; border-top: 1px solid var(--sea-line); }
  .ridge-plot { aspect-ratio: auto; }
  .ridge-svg { position: relative; display: block; height: auto; aspect-ratio: 1000 / 400; }
  .peak {
    position: static; transform: none;
    display: grid; grid-template-columns: 1fr auto; justify-items: start; align-items: baseline;
    column-gap: 16px; text-align: left; white-space: normal;
    padding: 14px 0; border-bottom: 1px solid var(--sea-line);
  }
  .peak::after { display: none; }
  .peak-alt { grid-column: 2; grid-row: 1; }
  .peak-where { grid-column: 1 / -1; }
  .peak-name, .peak-top .peak-name { font-size: 1.6rem; }
}

/* ─── projects ────────────────────────────────────────── */

.projects { margin-top: clamp(48px, 6vw, 88px); display: grid; }
@media (min-width: 900px) { .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.project { border-top: 1px solid var(--glass-line); }
@media (min-width: 900px) {
  /* the newest project gets a full-width row; the rest sit below in rows of three */
  .project { border-top: 0; border-left: 1px solid var(--glass-line); }
  .project:first-child { grid-column: 1 / -1; border-left: 0; border-bottom: 1px solid var(--glass-line); }
  .project:first-child a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 2.4vw; padding: 4px 0 32px; }
  .project:first-child .project-desc { grid-column: 2; grid-row: 1 / span 2; max-width: 60ch; }
  .project:first-child .project-tags { grid-column: 1; grid-row: 2; align-self: end; }
  .project:nth-child(3n + 2) { border-left: 0; }
  .project:nth-child(3n + 2) a { padding-left: 0; }
  .project:nth-child(n + 2) a { padding-top: 32px; }
  .project:nth-child(n + 5) { border-top: 1px solid var(--glass-line); }
  .project:nth-child(n + 2):nth-child(-n + 4) a { padding-bottom: 32px; }
}
.project a {
  display: grid; gap: 14px; align-content: start;
  height: 100%;
  padding: 26px 0 30px;
  transition: color 0.3s ease;
}
@media (min-width: 900px) { .project a { padding: 4px 2.4vw 8px; } }
.project-name {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: clamp(1.35rem, 1.9vw, 1.75rem); font-weight: 300; line-height: 1.15; letter-spacing: -0.015em;
}
.project-name .arrow { align-self: center; opacity: 0.7; }
.project-desc { color: var(--glass-2); font-size: 16px; max-width: 36ch; }
.project-tags { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.75; }
.project a:hover .project-name { color: #eef3f2; }
.project a:hover .arrow { transform: translate(3px, -3px); opacity: 1; }

.projects-note { margin-top: clamp(48px, 6vw, 80px); color: var(--glass-2); max-width: 44ch; }
.projects-note a { color: var(--glass); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.projects-note a:hover { color: #eef3f2; }

.marquee { margin-top: clamp(80px, 10vw, 150px); overflow: hidden; white-space: nowrap; }
.marquee-track { display: inline-flex; will-change: transform; }
.marquee span {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3rem, 6.4vw, 6.5rem); line-height: 1;
  padding-right: 0.55em;
}

/* ─── AI stack ─────────────────────────────────────────── */

.sec-glass { background: var(--glass-bg); color: var(--black); }
.ai-head { display: grid; gap: 28px 6vw; align-items: end; }
@media (min-width: 900px) { .ai-head { grid-template-columns: auto 1fr; } }
.ai-intro { max-width: 46ch; color: var(--black-2); padding-bottom: 0.6vw; }

/* the stack: one hairline-ruled row per layer, from me at the top down to the models */
.stack { margin-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--black-line); }
.layer {
  display: grid; gap: 6px 4vw;
  padding: 22px 0;
  border-bottom: 1px solid var(--black-line);
}
@media (min-width: 900px) {
  .layer { grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) minmax(0, 1.25fr); align-items: baseline; padding: 26px 0; }
}
.layer-name {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 0.95;
}
.layer-tools { font-weight: 500; color: var(--black); }
.layer-role { color: var(--black-2); max-width: 52ch; }
.stack-note { margin-top: 22px; color: var(--black-2); max-width: 70ch; font-size: 15.5px; }

/* how a build goes: five steps on one line on wide screens, a list on phones */
.flow { margin-top: clamp(64px, 8vw, 112px); }
.flow-h {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 0.95;
}
.flow-steps { margin-top: 28px; display: grid; gap: 0; }
@media (min-width: 900px) { .flow-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.flow-step { position: relative; padding: 22px 0 24px; border-top: 1px solid var(--black); }
@media (min-width: 900px) {
  .flow-step { padding: 22px 2vw 8px 0; }
  /* a small chevron where each step hands over to the next */
  .flow-step:not(:last-child)::after {
    content: ""; position: absolute; top: -5px; right: 0;
    width: 8px; height: 8px;
    border-top: 1px solid var(--black); border-right: 1px solid var(--black);
    transform: rotate(45deg);
  }
}
.flow-n { font-size: 13px; font-weight: 500; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; color: var(--black-2); }
.flow-title {
  margin: 6px 0 8px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 1.7rem; line-height: 1;
}
.flow-step p { color: var(--black-2); font-size: 15.5px; max-width: 30ch; }

/* ─── places ──────────────────────────────────────────── */

.lede { margin-top: 28px; color: var(--sea-2); max-width: 46ch; }
.map {
  position: relative;
  margin-top: clamp(36px, 4vw, 56px);
  padding: clamp(10px, 2vw, 28px);
  border-radius: 28px;
  background: var(--bone-2);
}
.map-svg { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 439; touch-action: manipulation; }
.map-svg .land { stroke: rgba(18, 48, 58, 0.17); }
.map-svg .c { stroke: #557a73; /* 3.3:1 on the map card (WCAG 1.4.11) */ cursor: pointer; transition: stroke 0.35s ease; }
.map-svg .c:hover, .map-svg .c.is-hover, .map-svg .c.is-on { stroke: var(--sea); }
.map-svg .cities { transition: opacity 0.4s ease; }
.map-svg .city { fill: var(--bone); stroke: var(--sea); stroke-width: 2px; }
.map-svg .city-ring { fill: none; stroke: var(--sea); stroke-width: 1px; opacity: 0.4; }
.tag-btn { cursor: pointer; transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s var(--ease); }
.tag-btn:hover { background: var(--sea); color: var(--bone); border-color: var(--sea); }
.tag-btn:active { transform: scale(0.96); }
.map-reset { position: absolute; right: 16px; bottom: 16px; min-height: 44px; }

.countries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.countries .tag { min-height: 48px; gap: 9px; }
.countries .tag[aria-pressed="true"] { background: var(--sea); color: var(--bone); border-color: var(--sea); }
.countries .n { font-size: 12.5px; font-variant-numeric: tabular-nums; opacity: 0.65; }

.place-list { margin-top: 34px; max-width: 900px; }
.place-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--sea-line);
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: 2rem; line-height: 1;
}
.place-count { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: 0.08em; color: var(--sea-2); }
.place-items { columns: 2; column-gap: 28px; padding-top: 14px; color: var(--sea-2); font-size: 16px; }
@media (min-width: 700px) { .place-items { columns: 4; } }
.place-items li { padding: 3px 0; break-inside: avoid; }
/* every place list is in the HTML; with JS only the chosen country shows (set before first paint),
   without JS all of them show and the buttons, which would do nothing, are hidden */
.js .place-list:not(.is-on) { display: none; }
html:not(.js) .countries { display: none; }

/* ─── contact ─────────────────────────────────────────── */

.sec-contact { padding-top: 40px; padding-bottom: 28px; }
.contact-row { display: grid; align-items: center; gap: 28px; }
@media (min-width: 900px) { .contact-row { grid-template-columns: auto 1fr; gap: 3vw; } }
.contact-pills { display: grid; gap: 10px; justify-items: start; }
.contact-email, .contact-socials { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pill-xl {
  display: inline-flex; align-items: center;
  min-height: clamp(48px, 4.4vw, 60px); padding: 0 clamp(16px, 1.6vw, 24px);
  border-radius: 999px; border: 1px solid var(--sea);
  font-size: clamp(1.25rem, 2.2vw, 2rem); font-weight: 400; letter-spacing: -0.015em;
  transition: background-color 0.3s ease, color 0.3s ease;
}
a.pill-xl:hover { background: var(--sea); color: var(--bone); }
.pill-round {
  display: inline-grid; place-items: center;
  width: clamp(48px, 4.4vw, 60px); height: clamp(48px, 4.4vw, 60px);
  border-radius: 50%;
  background: var(--sea); color: var(--bone);
  transition: transform 0.3s var(--ease), background-color 0.3s ease;
}
.pill-round:hover { transform: rotate(-8deg) scale(1.05); }
.pill-round svg { width: 42%; height: 42%; }
.copy { background: transparent; color: var(--sea); border: 1px solid var(--sea); }
.copy svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy .i-check { display: none; }
.copy.is-done { background: var(--sea); color: var(--bone); }
.copy.is-done .i-copy { display: none; }
.copy.is-done .i-check { display: block; }

.wave-arrow { width: 100%; height: auto; max-height: 120px; }
.wave-arrow path { fill: none; stroke: var(--sea); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@media (max-width: 899px) { .wave-arrow { display: none; } }

.sign {
  margin-top: clamp(70px, 10vw, 150px);
  display: flex; align-items: center; justify-content: space-between; gap: 2vw;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(4rem, 13.5vw, 15rem); line-height: 0.8;
  letter-spacing: -0.008em;
  white-space: nowrap;
}
.sign-photo {
  width: 0.62em; height: 0.8em;
  object-fit: cover; object-position: 50% 45%;
  border-radius: 6px;
  flex: none;
}
@media (max-width: 699px) {
  .sign { flex-wrap: wrap; justify-content: flex-start; font-size: 26vw; gap: 0.08em 3vw; }
  .sign-photo { width: 0.62em; height: 0.8em; }
}

.foot {
  margin-top: clamp(28px, 3vw, 44px);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 20px;
  font-size: 14px; color: var(--sea-2);
}

/* ─── policy pages (privacy, terms, accessibility) ─────── */

body.legal { background: var(--bone); }
.legal-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px var(--gutter);
}
.legal-nav nav { display: flex; flex-wrap: wrap; gap: 6px; }
.legal-nav nav a, .legal-back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 48px; padding: 0 18px;
  border: 1px solid var(--sea); border-radius: 999px;
  font-size: 15px; font-weight: 500;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.legal-nav nav a:hover, .legal-back:hover, .legal-nav nav a[aria-current="page"] { background: var(--sea); color: var(--bone); }
.legal-back { background: var(--sea); color: var(--bone); padding-left: 10px; }
.legal-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.legal-main { max-width: 760px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--gutter) 40px; }
.legal-h1 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3.2rem, 11vw, 7rem); line-height: 0.86; letter-spacing: -0.004em;
}
.legal-updated { margin-top: 18px; font-size: 14px; color: var(--sea-2); }
.legal-summary {
  margin-top: 36px; padding: 22px 24px;
  border-radius: 18px; background: var(--bone-2);
}
.legal-summary h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 6px; }
.legal-main section { margin-top: 44px; }
.legal-main section h2 {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1; margin-bottom: 12px;
}
.legal-main p + p { margin-top: 12px; }
.legal-main p, .legal-list { max-width: 66ch; color: var(--sea-2); }
.legal-main strong { color: var(--sea); }
.legal-main a { color: var(--sea); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-main a:hover { text-decoration-thickness: 2px; }
.legal-list { list-style: disc; padding-left: 1.2em; display: grid; gap: 8px; }
.legal-foot {
  max-width: 760px; margin: 0 auto; padding: 32px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px;
  border-top: 1px solid var(--sea-line);
  font-size: 14px; color: var(--sea-2);
}
.legal-foot a, .foot a { color: var(--sea); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.foot-links a { display: inline-block; padding: 12px 0; }
.to-top { white-space: nowrap; }
.to-top svg { width: 15px; height: 15px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── opening (CSS, runs on first paint; .motion is set in <head> unless motion is reduced) ─── */
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes settle { from { transform: scale(1.14); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
/* the role line is the page's main element for load timing, so it moves but never starts invisible */
@keyframes slide-up { from { transform: translateY(16px); } to { transform: none; } }
/* "backwards" so nothing is held after the animation ends and scroll effects can take over */
.motion .hero-photo { animation: settle 2.2s var(--ease) backwards; }
.motion .hero-line-1 .hero-word { animation: rise 1.4s var(--ease) 0.12s backwards; }
.motion .hero-line-2 .hero-word { animation: rise 1.4s var(--ease) 0.26s backwards; }
.motion .hero-role { animation: slide-up 1.1s var(--ease) 0.1s backwards; }
.motion .hero-caption { animation: slide-up 1.1s var(--ease) 0.2s backwards; }
.motion .nav { animation: fade-down 1s var(--ease) 0.5s backwards; }

/* ─── touch and phone overrides: kept last so nothing above can override them ─── */
@media (max-width: 760px) {
  /* the bottom pills float over text, so they get a solid fill in the colour of the field */
  body[data-nav="light"] .pill:not(.is-active):not(:hover) { --pill-fill: var(--bone); }
  body[data-nav="dark"] .pill:not(.is-active):not(:hover) { --pill-fill: var(--black); }
  body[data-nav="glass"] .pill:not(.is-active):not(:hover) { --pill-fill: var(--glass-bg); }
  /* clear the bottom Menu/Contact bar */
  .hero-content { padding-bottom: calc(var(--nav-h) + 6px + env(safe-area-inset-bottom)); }
  .sec-contact { padding-bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom)); }
}
@media (pointer: coarse) {
  /* fingers need bigger targets than mouse pointers: everything pressable is at least 48px */
  .pill { height: 48px; padding: 0 18px; font-size: 16px; }
  .countries .tag, .map-reset, .legal-nav nav a, .legal-back { min-height: 48px; }
  .slide-mark { min-height: 48px; }
  .project-name { min-height: 48px; align-items: center; }
  .foot-links a { padding: 13px 0; min-width: 44px; text-align: center; }
}
.slide-mark { min-height: 48px; }

/* ─── print: just the words, black on white, with link addresses written out ─── */
@media print {
  @page { margin: 16mm; }
  html, body, .sec, .slide, .hero, .legal { background: #fff !important; color: #000 !important; }
  * { animation: none !important; transition: none !important; text-shadow: none !important; box-shadow: none !important; }
  .nav, .menu, .skip, .hero-photo, .hero-shade, .marquee, .map, .countries, .wave, .wave-arrow, .slide-art,
  .copy, .copy-status, .pill-round, .sign-photo, .timeline, .ha-wave, .to-top, .legal-nav nav { display: none !important; }
  .hero { height: auto; min-height: 0; overflow: visible; }
  .hero-content { position: static; padding: 0 0 12pt; display: block; color: #000; }
  .hero-line { overflow: visible; font-size: 48pt !important; }
  .hero-line-2 { justify-self: start; }
  .slide { position: static; min-height: 0; padding-top: 18pt; }
  .sec { padding: 18pt 0; }
  .h-big, .h-slide, .sign { font-size: 28pt !important; break-after: avoid; }
  .slide-body { background: none !important; }
  [data-fade], [data-words], [data-words] * , .peak, .peak > * { opacity: 1 !important; transform: none !important; }
  .js .place-list:not(.is-on) { display: block; }
  .place-list { break-inside: avoid; }
  .ridge-plot { aspect-ratio: auto; }
  .ridge-svg, .ridge-axis { display: none; }
  .peaks { position: static; display: block; }
  .peak { position: static; transform: none; display: block; text-align: left; white-space: normal; margin: 4pt 0; }
  .peak::after { display: none; }
  .projects, .slide-body, .cols-2, .layer, .flow-steps, .ai-head { display: block; }
  .flow-step::after { display: none; }
  *, *::before, *::after { color: #000 !important; -webkit-text-stroke-color: #000 !important; }
  a { text-decoration: underline; }
  .project a, .project a * { text-decoration: none; }
  .project-name { text-decoration: underline; }
  .ha-titles { margin-bottom: 4pt; }
  .ha-tags { margin-top: 4pt; justify-content: flex-start; gap: 6pt; }
  .ha-tags .tag { border: 0; padding: 0; min-height: 0; background: none; }
  .ha-tags .tag + .tag::before { content: "· "; }
  .ha-text p:last-child { justify-self: start; }
  .peak > * { display: inline !important; margin-right: 6pt; }
  .contact-socials { display: none !important; }
  .slide-points { border-left-color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .pill-xl { border: 0; padding: 0; min-height: 0; font-size: 12pt; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
