/* =========================================================
   TOKENS
   ========================================================= */
:root {
  /* DEEP SEA version: the page sits on top of a fixed water layer (.ocean),
     so panels are see-through and text colours are tuned for blue water */
  --bg: #000000;
  --bg-2: rgba(0, 16, 38, 0.4);
  --bg-3: rgba(0, 16, 38, 0.6);
  --line: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #c9dcea;
  --water-top: #0b6e9f;         /* sea colour right under the surface */
  --water-top-rgb: 11, 110, 159;
  --land-ink: #0b2340;          /* text on the sky / sand */
  --land-ink-rgb: 11, 35, 64;
  --land-muted: #24435f;
  --accent: #1f5fc4;            /* sea blue at the surface; main.js makes it darker the deeper you scroll */
  --accent-light: #8cc8ff;      /* light sea blue for small text and thin lines on dark water */
  --accent-ink: #f5f6ff;        /* text on ultramarine */
  --paper: #ecebe6;             /* polaroid paper */
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* sliding animations must never widen the page on phones */
html { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
main { overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* grain overlay */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   PRELOADER
   ========================================================= */
.preloader {
  position: fixed; inset: 0; z-index: 100; background: var(--accent);
  display: flex; align-items: flex-end; justify-content: flex-end; padding: var(--gutter);
}
.preloader__count {
  font-family: var(--display); font-weight: 800; color: var(--accent-ink);
  font-size: clamp(64px, 14vw, 200px); line-height: 0.9; letter-spacing: -0.04em;
}
.no-js .preloader, .reduced .preloader { display: none; }

/* =========================================================
   CURSOR
   ========================================================= */
.cursor { position: fixed; top: 0; left: 0; z-index: 95; pointer-events: none; display: none; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor__dot { width: 6px; height: 6px; background: var(--accent-light); }
.cursor__ring {
  width: 38px; height: 38px; border: 1px solid rgba(140, 200, 255, 0.6);
  transition: width .3s var(--ease), height .3s var(--ease), background-color .3s, border-color .3s;
}
.cursor.is-hover .cursor__ring { width: 70px; height: 70px; background: rgba(140, 200, 255, 0.15); border-color: transparent; }
@media (pointer: fine) { .cursor { display: block; } }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 16px; white-space: nowrap;
  transition: transform .4s var(--ease), background-color .3s, color .3s;
}
.btn:hover { background: var(--text); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: var(--text); color: var(--bg); }
.btn--small { padding: 10px 18px; font-size: 14px; }
.btn--full { width: 100%; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: transform .5s var(--ease), background-color .4s, backdrop-filter .4s;
}
.nav.is-scrolled { background: rgba(10, 11, 22, 0.75); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav.is-hidden { transform: translateY(-110%); visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.nav__logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); transition: background-color .8s, box-shadow .8s; }
/* the menu button takes the accent of the section on screen; fade between the shades */
.nav .btn { transition: transform .4s var(--ease), background-color .8s, color .3s; }
.nav__links { display: flex; gap: 32px; font-size: 15px; font-weight: 500; }
.nav__links a { position: relative; color: var(--muted); transition: color .3s; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--accent-light); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__right { display: flex; align-items: center; gap: 14px; }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { padding: clamp(90px, 14vw, 180px) var(--gutter); position: relative; }
.section__label {
  display: flex; align-items: center; gap: 14px; margin-bottom: 36px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.section__label span:first-child { color: var(--accent-light); font-family: var(--display); }
.section__label::after { content: ""; flex: 0 0 60px; height: 1px; background: var(--line); }
.section__title {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02;
  font-size: clamp(36px, 6.4vw, 92px); max-width: 14ch; margin-bottom: 56px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; z-index: 1; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: clamp(110px, 16vh, 150px) var(--gutter) clamp(28px, 5vh, 56px);
  color: var(--land-ink);
  background: #5db4ec;
}
/* ----- land scene ----- */
.land { position: absolute; inset: 0; pointer-events: none; }
.land__sky { position: absolute; inset: 0; transition: opacity 1.2s ease; }
.land__sky--day { background: linear-gradient(180deg, #5db4ec 0%, #9ed5f6 36%, #d9f1ff 58%); }
.land__sky--night { background: linear-gradient(180deg, #030716 0%, #0a1433 40%, #1c2b58 60%); opacity: 0; }
.land__stars { position: absolute; inset: 0 0 40% 0; opacity: 0; transition: opacity 1.2s ease; }
.land__stars i {
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); animation: twinkle var(--d) ease-in-out infinite; animation-delay: var(--delay);
}
@keyframes twinkle { 50% { opacity: 0.2; transform: scale(0.6); } }
html:not([data-time="night"]) .land__stars i { animation-play-state: paused; }
.land__moon {
  position: absolute; right: 13%; top: 12%; width: clamp(70px, 8vw, 120px); aspect-ratio: 1; border-radius: 50%; opacity: 0;
  background:
    radial-gradient(circle at 30% 35%, rgba(150, 150, 170, 0.35) 0 9%, transparent 10%),
    radial-gradient(circle at 62% 60%, rgba(150, 150, 170, 0.3) 0 13%, transparent 14%),
    radial-gradient(circle at 58% 25%, rgba(150, 150, 170, 0.25) 0 6%, transparent 7%),
    radial-gradient(circle at 40% 40%, #fffdf3, #e8e4d4 70%);
  box-shadow: 0 0 40px rgba(220, 225, 255, 0.45), 0 0 120px rgba(160, 180, 255, 0.25);
  transition: opacity 1.2s ease, transform 1.2s ease; transform: translateY(20px);
}
.land__sun { transition: opacity 1.2s ease; }
.land__sun {
  position: absolute; right: 12%; top: 13%; width: clamp(90px, 12vw, 180px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #fffbe6 0 42%, #ffe39a 58%, rgba(255, 227, 154, 0) 71%);
  animation: sunGlow 6s ease-in-out infinite alternate;
}
@keyframes sunGlow { to { transform: scale(1.06); } }
.land__cloud {
  position: absolute; left: var(--x); top: var(--y); width: 180px; height: 50px; border-radius: 999px;
  background: var(--cloud, #fff); transition: background-color 1.2s ease, opacity 1.2s ease; opacity: 0.92; transform: scale(var(--s)); animation: cloud var(--t) linear infinite alternate;
}
.land__cloud::before, .land__cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.land__cloud::before { width: 82px; height: 82px; left: 26px; top: -42px; }
.land__cloud::after { width: 62px; height: 62px; left: 92px; top: -28px; }
@keyframes cloud { to { translate: 10vw 0; } }
.land__sea {
  position: absolute; left: 0; right: 0; top: 62%; bottom: 0;
  background: linear-gradient(180deg, #4ab6e3 0%, #1e90c6 38%, var(--water-top) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.land__waves {
  position: absolute; inset: 0; opacity: 0.6; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 65%, transparent);
  mask-image: linear-gradient(transparent, #000 12%, #000 65%, transparent);
}
/* the wave pattern is one tile wider than the sea and slides by exactly one tile, so the loop is seamless.
   Moving it with transform is free for the browser; animating background-position repainted it every frame. */
.land__waves::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -220px; right: 0; will-change: transform;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='34'%3E%3Cpath d='M0 17 Q 27.5 7 55 17 T 110 17 T 165 17 T 220 17' fill='none' stroke='white' stroke-opacity='.55' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 220px 34px;
  animation: waves 14s linear infinite;
}
@keyframes waves { to { transform: translateX(220px); } }
.land__sea-night { position: absolute; inset: 0; background: linear-gradient(180deg, #24406f 0%, #12305a 40%, var(--water-top) 100%); opacity: 0; transition: opacity 1.2s ease; }
/* moonlight path on the water, right under the moon */
.land__reflection {
  position: absolute; top: 0; bottom: 30%; right: calc(13% + clamp(35px, 4vw, 60px) - 70px); width: 140px; opacity: 0;
  background: repeating-linear-gradient(180deg, rgba(255, 250, 230, 0.55) 0 3px, transparent 3px 14px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  transition: opacity 1.2s ease; animation: shimmer 3s ease-in-out infinite alternate;
}
@keyframes shimmer { to { transform: scaleX(1.25); } }
.sand-top, .sand-bottom { transition: stop-color 1.2s ease; }
.land__beach { position: absolute; left: 0; bottom: 0; width: min(64%, 960px); height: 45%; }
.land__beach--foam { animation: foam 4s ease-in-out infinite alternate; will-change: opacity; }
@keyframes foam { to { opacity: 0.44; } }

/* ----- hero text on land ----- */
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, var(--pill-alpha, 0.6));
  font-size: 14px; font-weight: 600; color: var(--land-ink); margin-bottom: 24px; position: relative;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); position: relative; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--accent);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }

.hero__title {
  position: relative; color: var(--land-ink);
  font-family: var(--display); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95;
  font-size: clamp(38px, min(7.6vw, 10vh), 128px);
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line__inner { display: inline-block; will-change: transform; }
.hero__title em {
  font-style: normal; color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 10%, #1e90c6 90%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/* lead + buttons sit on the sand */
.hero__bottom { position: relative; margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero__lead { max-width: 40ch; color: var(--land-muted); font-size: clamp(16px, 1.3vw, 18px); font-weight: 500; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn--ghost { color: var(--land-ink); box-shadow: inset 0 0 0 1.5px rgba(var(--land-ink-rgb), 0.35); }
.hero .btn--ghost:hover { background: var(--land-ink); color: var(--land-bg, #fff); }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255, 255, 255, 0.9);
}
.hero__scroll-line { width: 1px; height: 38px; background: rgba(255, 255, 255, 0.35); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; background: #fff;
  transform: translateY(-100%); animation: scrollLine 1.8s var(--ease) infinite;
}
@keyframes scrollLine { to { transform: translateY(275%); } }

/* =========================================================
   FISH — the service keywords swim through the background water (spawned by main.js)
   ========================================================= */
.ocean__fish { position: absolute; inset: 0; overflow: hidden; }
.fish {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
}
.fish--filled { color: rgba(255, 255, 255, 0.5); -webkit-text-stroke: 0; }
/* deep down the words glow a little, like bioluminescent fish */
.fish--glow { -webkit-text-stroke-color: rgba(140, 200, 255, 0.8); text-shadow: 0 0 18px rgba(140, 200, 255, 0.55); }

/* =========================================================
   ABOUT
   ========================================================= */
.about__text {
  font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25;
  font-size: clamp(24px, 3.6vw, 52px); max-width: 26ch;
}
.split-words .word { display: inline-block; opacity: 0.15; }
.about__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(60px, 9vw, 120px); }
.fact { padding: 32px; border-radius: var(--radius); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.fact__icon { font-size: 28px; margin-bottom: 20px; }
.fact h3 { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.fact p { color: var(--muted); font-size: 15.5px; }

/* =========================================================
   SERVICES
   ========================================================= */
.services__list { border-top: 1px solid var(--line); }
.services__note { color: var(--muted); font-size: 14.5px; max-width: 64ch; margin-top: 28px; }
.service {
  position: relative; display: grid; grid-template-columns: 80px 1fr auto; gap: 24px; align-items: center;
  padding: 36px 0; border-bottom: 1px solid var(--line); overflow: hidden;
}
.service::before {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: 0;
}
.service > * { position: relative; z-index: 1; transition: color .4s, transform .6s var(--ease); }
.service__num { font-family: var(--display); color: var(--muted); font-size: 15px; padding-left: 8px; }
.service h3 { font-family: var(--display); font-size: clamp(22px, 3vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 8px; }
.service p { color: var(--muted); max-width: 52ch; font-size: 15.5px; }
.service__price { font-family: var(--display); font-size: clamp(18px, 2vw, 26px); font-weight: 700; white-space: nowrap; padding-right: 8px; }
.service__price small { font-family: var(--body); font-size: 13px; font-weight: 500; color: var(--muted); }
@media (hover: hover) {
  .service:hover::before { transform: scaleY(1); }
  .service:hover > * { color: var(--accent-ink); }
  .service:hover p, .service:hover .service__num, .service:hover small { color: rgba(245, 246, 255, 0.8); }
  .service:hover .service__body { transform: translateX(14px); }
}

/* =========================================================
   PROCESS — polaroid photo cards that stack up while scrolling
   Without JS animation (.has-motion missing) the cards are a plain grid.
   ========================================================= */
.process { position: relative; background: var(--bg-2); }
.process__sticky {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center;
  padding: clamp(90px, 12vw, 160px) var(--gutter);
}
.process__head .section__title { margin-bottom: 40px; font-size: clamp(34px, 4.4vw, 68px); max-width: 12ch; }
.process__steps { list-style: none; display: grid; gap: 4px; }
.process__steps li { display: flex; align-items: baseline; gap: 16px; padding: 12px 0 12px 18px; border-left: 2px solid var(--line); transition: border-color .4s; }
.process__steps span { font-family: var(--display); font-size: 14px; color: var(--muted); transition: color .4s; }
.process__steps b { font-family: var(--display); font-size: clamp(18px, 1.8vw, 24px); font-weight: 500; color: var(--muted); transition: color .4s; }
.process__steps li.is-active { border-color: var(--accent-light); }
.process__steps li.is-active span { color: var(--accent-light); }
.process__steps li.is-active b { color: var(--text); }

.process__stage { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; justify-items: center; }
/* frosted-glass cards that look at home in the water; they gently bob like something floating */
.polaroid {
  --card-w: min(400px, 50vh, 80vw);
  position: relative; width: var(--card-w); padding: 12px; border-radius: 20px; color: #fff;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 30px 60px rgba(0, 12, 30, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: rotate(var(--r, 0deg));
  animation: float 6s ease-in-out infinite;
}
.polaroid:nth-child(2) { animation-delay: -1.5s; }
.polaroid:nth-child(3) { animation-delay: -3s; }
.polaroid:nth-child(4) { animation-delay: -4.5s; }
@keyframes float { 50% { translate: 0 -10px; } }
.polaroid img { width: 100%; aspect-ratio: 900 / 720; object-fit: cover; border-radius: 12px; filter: saturate(0.85) brightness(0.95); }
/* little bubbles escaping from the top of each card */
.polaroid__tape, .polaroid__tape::before, .polaroid__tape::after {
  position: absolute; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.55);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.5), transparent 50%);
}
.polaroid__tape { top: -22px; right: 26px; width: 14px; height: 14px; z-index: 1; animation: drift 3s ease-in-out infinite; }
.polaroid__tape::before { content: ""; width: 9px; height: 9px; left: -16px; top: -10px; }
.polaroid__tape::after { content: ""; width: 6px; height: 6px; left: 2px; top: -20px; }
.polaroid__caption { display: flex; gap: 16px; align-items: flex-start; padding: 16px 8px 10px; }
.polaroid__num { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 0.9; color: var(--accent-light); }
.polaroid h3 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 4px; }
.polaroid p { font-size: 15px; line-height: 1.45; color: rgba(255, 255, 255, 0.8); }
/* dark layer that fades in when the next card covers this one (main.js animates its opacity) */
.polaroid__shade { position: absolute; inset: 0; z-index: 4; border-radius: inherit; background: #020b1a; opacity: 0; pointer-events: none; will-change: opacity; }

/* scroll version: the section is 4 screens tall, the inner part sticks, cards pile up in the middle */
.has-motion .process { height: 250vh; }
.has-motion .process__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-top: 80px; padding-bottom: 40px; overflow: hidden; }
.has-motion .process__stage { position: relative; display: block; height: 100%; }
.has-motion .polaroid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--r)); will-change: transform; }

/* =========================================================
   WORK
   ========================================================= */
.work .section__title { margin-bottom: 16px; }
.work__note { color: var(--muted); margin-bottom: 56px; max-width: 58ch; }
/* 6 demo sites: 3 × 2 on desktop, 2 × 3 on tablets, one column on phones */
.work__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 28px; }
.project { display: block; }
.project__media {
  position: relative; z-index: 1; isolation: isolate; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--p-bg); display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* ---------- Glowing frames: like a diver's torch in the deep ----------
   .project__beam   the frame itself: a thin lit edge with a spot of light travelling around it
   .project__light  the same light, wide and blurred, spilling into the water around the card
   .project__media::before/::after   a torch that follows the cursor over the screenshot (mouse only)
   strength: --glow, see "LIGHT IN THE DEEP" below */

.project__frame { position: relative; border-radius: var(--radius); }
.project:nth-child(2) .project__frame { --sweep-delay: -3.1s; }
.project:nth-child(3) .project__frame { --sweep-delay: -6.4s; }
.project:nth-child(4) .project__frame { --sweep-delay: -1.7s; }
.project:nth-child(5) .project__frame { --sweep-delay: -4.8s; }
.project:nth-child(6) .project__frame { --sweep-delay: -7.9s; }

.project__beam, .project__light { position: absolute; overflow: hidden; pointer-events: none; }
.project__beam {
  inset: -2px; border-radius: calc(var(--radius) + 2px);
  background: rgba(var(--glow-rgb), calc(0.18 * var(--glow)));
  box-shadow: 0 0 24px rgba(110, 190, 255, calc(0.3 * var(--glow))), 0 0 80px rgba(70, 150, 255, calc(0.22 * var(--glow)));
  transition: box-shadow .6s, background .6s;
}
.project__light {
  inset: -46px;
  /* fades out towards the outer edge so the light dissolves in the water (square corners: the mask is already 0 there) */
  -webkit-mask: linear-gradient(90deg, transparent, #000 46px, #000 calc(100% - 46px), transparent),
                linear-gradient(transparent, #000 46px, #000 calc(100% - 46px), transparent);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent, #000 46px, #000 calc(100% - 46px), transparent),
        linear-gradient(transparent, #000 46px, #000 calc(100% - 46px), transparent);
  mask-composite: intersect;
  animation: lamp 4.5s ease-in-out infinite alternate;
}
/* the light source: a big square with two beams (one bright, one dimmer) that turns around the card centre */
.project__beam::before, .project__light::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(transparent 0deg,
    rgba(var(--glow-rgb), calc(0.95 * var(--glow))) 42deg, rgba(255, 255, 255, var(--glow)) 50deg, transparent 78deg,
    transparent 185deg, rgba(var(--glow-rgb), calc(0.5 * var(--glow))) 228deg, transparent 258deg);
  animation: sweep 9.5s linear infinite; animation-delay: var(--sweep-delay, 0s);
}
.project__light::before { filter: blur(20px); opacity: calc(0.75 * var(--glow)); }
@keyframes sweep { to { rotate: 360deg; } }
@keyframes lamp { from { opacity: 0.7; } to { opacity: 1; } }

/* torch under the cursor: lights a spot of the screenshot, the rest stays in the dark */
.project__media::before, .project__media::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s;
}
.project__media::before {
  background: radial-gradient(circle 300px at var(--mx, 50%) var(--my, 45%), transparent 35%, rgba(0, 8, 22, calc(0.55 * var(--glow))) 100%);
}
.project__media::after {
  background: radial-gradient(circle 210px at var(--mx, 50%) var(--my, 45%), rgba(235, 247, 255, calc(0.5 * var(--glow))), rgba(235, 247, 255, 0) 70%);
  mix-blend-mode: screen;
}
@media (hover: hover) {
  .project:hover .project__media::before, .project:hover .project__media::after { opacity: 1; }
  .project:hover .project__beam {
    background: rgba(var(--glow-rgb), calc(0.32 * var(--glow)));
    box-shadow: 0 0 30px rgba(130, 200, 255, calc(0.45 * var(--glow))), 0 0 110px rgba(80, 160, 255, calc(0.32 * var(--glow)));
  }
}
/* background behind each screenshot, taken from that demo's own colours */
.project[data-theme="renovations"] { --p-bg: linear-gradient(140deg, #2a2723, #9a5426); }
.project[data-theme="barber"]      { --p-bg: linear-gradient(140deg, #15130f, #5a4726); }
.project[data-theme="detailing"]   { --p-bg: linear-gradient(140deg, #071419, #0f6170); }
.project[data-theme="guesthouse"]  { --p-bg: linear-gradient(140deg, #1d2f25, #6a8466); }
.project[data-theme="cafe"]        { --p-bg: linear-gradient(140deg, #4a3226, #c8693f); }
.project[data-theme="landscaping"] { --p-bg: linear-gradient(140deg, #173a22, #6f9440); }

/* screenshot in a small browser window */
.mock {
  width: 84%; border-radius: 10px; background: #fff; overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); transition: transform .9s var(--ease);
}
.mock__bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: #ecedf1; }
.mock__bar i { width: 7px; height: 7px; border-radius: 50%; background: #c8cad2; flex-shrink: 0; }
.mock__bar span {
  margin: 0 auto; padding: 1px 12px; border-radius: 999px; background: #fff;
  font-size: 10px; line-height: 1.6; color: #6b6f7b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.project:hover .mock { transform: scale(1.05) rotate(-1.2deg); }

.project__info { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 4px 0; }
.project__info .project__kicker {
  color: var(--accent-light); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px;
}
.project__info h3 { font-family: var(--display); font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.project__info p { color: var(--muted); font-size: 14.5px; }
.project__go {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--line); font-size: 18px;
  transition: background .4s, box-shadow .4s, transform .6s var(--ease);
}
.project:hover .project__go { background: var(--accent); box-shadow: none; transform: translate(3px, -3px); }

/* =========================================================
   LIGHT IN THE DEEP — every section has its own light, the deeper it sits, the brighter it is
   main.js sets --depth-glow on each section (and the footer) from its depth: 0.3 under the surface … 1 at the bottom.
   --time-k dims everything at night. --glow = the final strength used by all the lights below.
   ========================================================= */
:root { --time-k: 1; --glow-rgb: 175, 225, 255; }
html[data-time="night"] { --time-k: 0.6; }
main > section, .footer { --glow: calc(var(--depth-glow, 0.5) * var(--time-k)); }

/* glowing frame for cards (About, How I work): a soft halo + a spot of light running around the edge.
   main.js adds the two spans; only the edge ring is painted, so see-through cards stay clear */
.fact { position: relative; }
.glow__halo, .glow__beam { position: absolute; border-radius: inherit; pointer-events: none; }
.glow__halo {
  inset: 0;
  box-shadow: 0 0 24px rgba(110, 190, 255, calc(0.34 * var(--glow))), 0 0 80px rgba(70, 150, 255, calc(0.24 * var(--glow)));
  animation: lamp 4.5s ease-in-out infinite alternate;
}
.glow__beam {
  inset: -1px; padding: 1.5px; overflow: hidden;
  background: rgba(var(--glow-rgb), calc(0.2 * var(--glow)));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}
.glow__beam::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 250%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(transparent 0deg,
    rgba(var(--glow-rgb), calc(0.95 * var(--glow))) 40deg, rgba(255, 255, 255, var(--glow)) 48deg, transparent 72deg,
    transparent 185deg, rgba(var(--glow-rgb), calc(0.5 * var(--glow))) 225deg, transparent 255deg);
  animation: sweep 9.5s linear infinite; animation-delay: var(--sweep-delay, 0s);
}

/* lines (Services rows, contact details): a streak of light glides along each line */
.contact__item { position: relative; overflow: hidden; }
.service::after, .contact__item::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 35%; height: 1.5px; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--glow-rgb), calc(0.95 * var(--glow))), transparent);
  box-shadow: 0 0 14px rgba(110, 190, 255, calc(0.7 * var(--glow)));
  animation: streak 7s linear infinite; animation-delay: var(--streak-delay, 0s);
}
.service:nth-child(2), .contact__item:nth-child(2) { --streak-delay: -2.4s; }
.service:nth-child(3), .contact__item:nth-child(3) { --streak-delay: -4.9s; }
.service:nth-child(4), .contact__item:nth-child(4) { --streak-delay: -1.3s; }
@keyframes streak { from { translate: -100% 0; } to { translate: 300% 0; } }

/* the deepest part: the big title and the footer name glow like deep-sea creatures (form fields: see CONTACT) */
.contact__title { text-shadow: 0 0 40px rgba(110, 190, 255, calc(0.5 * var(--glow))), 0 0 100px rgba(70, 150, 255, calc(0.32 * var(--glow))); }
.footer__big { text-shadow: 0 0 36px rgba(110, 190, 255, calc(0.3 * var(--glow))); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact__title {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9;
  font-size: clamp(34px, 9.4vw, 190px); margin-bottom: 30px;
}
.split-chars .char-word { display: inline-block; white-space: nowrap; }
.split-chars .char { display: inline-block; will-change: transform; }
.contact__lead { color: var(--muted); max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); margin-bottom: 64px; }
.contact__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: start; }

.form { display: grid; gap: 18px; }
.field { position: relative; display: block; }
.field input, .field textarea {
  width: 100%; padding: 26px 20px 12px; border: 0; border-radius: 16px; resize: vertical;
  background: var(--bg-2); color: var(--text); font: inherit; outline: none;
  box-shadow: inset 0 0 0 1px var(--line), 0 0 24px rgba(90, 170, 255, calc(0.2 * var(--glow))); transition: box-shadow .3s;
}
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 1.5px var(--accent-light), 0 0 30px rgba(110, 190, 255, calc(0.4 * var(--glow))); }
.field > span {
  position: absolute; left: 20px; top: 19px; color: var(--muted); pointer-events: none;
  transition: transform .3s var(--ease), font-size .3s, top .3s;
}
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { top: 8px; font-size: 12px; color: var(--accent-light); }
.field.is-invalid input, .field.is-invalid textarea { box-shadow: inset 0 0 0 1.5px #ff6b6b; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.consent.is-invalid { color: #ff8a8a; }
.form__status { min-height: 1.4em; font-size: 14.5px; color: var(--accent-light); }
.form__captcha { min-height: 78px; }   /* room for the hCaptcha box so the button doesn't jump */
.consent a, .footer__link { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; }

.contact__info { display: grid; }
.contact__item {
  display: flex; flex-direction: column; gap: 4px; padding: 22px 0; border-bottom: 1px solid var(--line);
  transition: padding .4s var(--ease);
}
.contact__item:first-child { border-top: 1px solid var(--line); }
.contact__item small { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.contact__item span { font-family: var(--display); font-size: clamp(17px, 1.7vw, 22px); font-weight: 500; word-break: break-word; }
/* the phone is a button ("Show number") until it is clicked */
button.contact__item { width: 100%; text-align: left; cursor: pointer; }
a.contact__item:hover, button.contact__item:hover { padding-left: 14px; }
a.contact__item:hover span, button.contact__item:hover span { color: var(--accent-light); }
/* email line: the address (mailto link) and a "Copy" button side by side; the button drops below on narrow phones */
.contact__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; }
.contact__row a:hover span { color: var(--accent-light); }
.copy-btn {
  flex: none; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, color .3s, box-shadow .3s;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.1); }
.copy-btn.is-done { color: var(--accent-light); box-shadow: inset 0 0 0 1px var(--accent-light); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding: 60px var(--gutter) 30px; overflow: hidden; border-top: 1px solid var(--line); }
.footer__big {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.05em; line-height: 0.85; white-space: nowrap;
  font-size: clamp(48px, 12vw, 200px); color: transparent; -webkit-text-stroke: 1px rgba(140, 200, 255, 0.3);
  margin-bottom: 40px;
}
.footer__row { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; }
.footer__top:hover { color: var(--accent-light); }

/* =========================================================
   OFF-SCREEN = PAUSED — main.js marks sections that are out of view with .is-offscreen;
   their CSS animations stop until you scroll back (the phone doesn't animate what nobody sees)
   ========================================================= */
.is-offscreen, .is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }
.ocean__rays.is-off { visibility: hidden; animation-play-state: paused; }

/* =========================================================
   ACCENT BY DEPTH — buttons and highlights get darker in deeper sections.
   Set per section here (cheap). main.js only animates the fixed menu's accent smoothly.
   ========================================================= */
.services { --accent: #1a53a9; }
.process  { --accent: #154691; }
.work     { --accent: #113979; }
.contact  { --accent: #0d2c5f; }
.footer   { --accent: #0b2550; }

/* phones and tablets: the photo stack must stay smooth — no live blur behind the moving cards,
   no extra bobbing while they fly in, and a shorter scroll through the section */
@media (hover: none), (max-width: 960px) {
  .polaroid { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(160deg, #24568c, #0c2a4e); }  /* solid: without the blur, a see-through card would show the text of the card under it */
  .has-motion .polaroid { animation: none; }
  /* the cards keep their light, but it doesn't spin or pulse while they fly in */
  .polaroid .glow__beam::before, .polaroid .glow__halo { animation: none; }
}
@media (max-width: 960px) {
  .has-motion .process { height: 210vh; }
  /* the depth meter sits in the bottom-left corner on phones: keep the last footer line above it */
  .footer { padding-bottom: 76px; }
}
/* very narrow phones (≈320 px): keep the brand on one line, the hero already has the contact buttons */
@media (max-width: 340px) {
  .nav .btn--small { display: none; }
}

/* =========================================================
   LEGAL PAGE (privacy.html)
   ========================================================= */
.legal-page { background: radial-gradient(ellipse at top, #06142b, #000 60%) fixed; }
.legal__top { padding: 28px var(--gutter); }
.legal__back { color: var(--muted); font-size: 15px; transition: color .3s; }
.legal__back:hover { color: var(--accent-light); }
.legal { max-width: 760px; margin: 0 auto; padding: 24px var(--gutter) 120px; }
.legal h1 { font-family: var(--display); font-size: clamp(34px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 10px; }
.legal__updated { color: var(--muted); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); font-weight: 700; letter-spacing: -0.01em; margin: 44px 0 12px; }
.legal p, .legal li { color: #dbe7f2; font-size: 16px; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; display: grid; gap: 8px; margin: 10px 0 12px; }
.legal a { color: var(--accent-light); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .work__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .nav__links { display: none; }
  .about__facts { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; }
  /* process: title on top, cards below; step list hidden (each card has its number) */
  .process__sticky { grid-template-columns: 1fr; gap: 24px; }
  .process__steps { display: none; }
  .process__head .section__title { margin-bottom: 0; }
  .process__stage { grid-template-columns: 1fr; }
  .has-motion .process__sticky { display: flex; flex-direction: column; padding-top: 84px; }
  .has-motion .process__stage { flex: 1; }
  .polaroid { --card-w: min(320px, 74vw, 46svh); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav { padding: 14px 16px; }
  .nav__logo { font-size: 13px; gap: 8px; white-space: nowrap; }
  .nav__logo-dot { width: 10px; height: 10px; }
  .nav__right { gap: 10px; }
  .btn--small { padding: 9px 14px; font-size: 13px; }
  .hero { padding-bottom: 90px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; }
  .service { grid-template-columns: 1fr; gap: 10px; padding: 28px 0; }
  .service__num, .service__price { padding: 0; }
  .fact { padding: 26px; }
  .work__grid { grid-template-columns: 1fr; gap: 40px; }
  .footer__row { flex-direction: column; }
}

/* =========================================================
   REDUCED MOTION — everything visible, nothing animated
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .split-words .word { opacity: 1; }
}

/* =========================================================
   DEEP SEA — water layer, depth meter, nav on land / underwater
   ========================================================= */
body { background: #000; }
/* fixed water behind the page; main.js paints it lighter or darker with depth */
.ocean { position: fixed; inset: 0; z-index: -1; background: var(--water-top); pointer-events: none; }
/* the water colour: one solid colour that main.js changes while you scroll (cheap to update on phones) */
.ocean__color { position: absolute; inset: 0; background: var(--water-top); will-change: transform; }
/* fixed shading on top of it: a little lighter near the surface of the screen, darker towards the bottom */
.ocean__shade {
  position: absolute; inset: 0; will-change: transform;
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 35%, rgba(0, 6, 18, 0.32));
}
.ocean__rays {
  position: absolute; left: -15%; right: -15%; top: -10%; height: 85%;
  background: repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.08) 0 50px, transparent 50px 150px);
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent);
  filter: blur(8px); animation: rays 10s ease-in-out infinite alternate;
}
@keyframes rays { to { transform: translateX(5%) skewX(-4deg); } }

/* sections let the water show through */
.process { background: transparent; }
.footer { background: #000; border-top-color: rgba(255, 255, 255, 0.08); }

/* nav: dark text while we are on land, light text underwater */
.nav.on-land .nav__logo { color: var(--land-ink); }
.nav.on-land .nav__links a { color: rgba(var(--land-ink-rgb), 0.72); }
.nav.on-land .nav__links a:hover { color: var(--land-ink); }
.nav.on-land .nav__links a::after { background: var(--accent); }
.nav.on-land.is-scrolled { background: rgba(255, 255, 255, 0.55); }
.nav.is-scrolled:not(.on-land) { background: rgba(0, 12, 30, 0.55); }

/* depth meter */
.depth {
  position: fixed; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; flex-direction: row-reverse; align-items: center; gap: 14px;
  color: #fff; opacity: 0; transition: opacity 0.6s; pointer-events: none;
}
.depth.is-visible { opacity: 1; }
.depth__bar { position: relative; width: 2px; height: 34vh; border-radius: 2px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.depth__bar i { position: absolute; left: 0; top: 0; width: 100%; height: var(--p, 0%); background: #fff; }
.depth__text { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.depth__value { font-family: var(--display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.depth__zone { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); white-space: nowrap; }
.footer__depth { color: rgba(255, 255, 255, 0.5); }

/* the beach slides under the water: the bottom of the hero fades into the sea colour
   (the extra bottom padding is that "shallow water" zone, so the buttons stay on the sand) */
.hero { padding-bottom: calc(clamp(28px, 5vh, 56px) + 17vh); }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26%; z-index: 1; pointer-events: none;
  background: linear-gradient(rgba(var(--water-top-rgb), 0), rgba(var(--water-top-rgb), 0.55) 45%, var(--water-top));
}
.hero > :not(.land) { z-index: 2; }

/* buttons keep an edge when the blue gets very dark */
.btn { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }

/* bubbles rising through the water (made by main.js) */
.ocean__bubbles { position: absolute; inset: 0; overflow: hidden; }
.bubble {
  position: absolute; bottom: -40px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.04) 60%);
  animation: rise var(--d) linear infinite; animation-delay: var(--delay);
}
@keyframes rise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  50% { transform: translate(var(--sway), -55vh); }
  100% { transform: translate(0, -115vh); opacity: 0; }
}

/* the "about" cards and the big contact letters float gently */
.fact { animation: float 7s ease-in-out infinite; }
.fact:nth-child(2) { animation-delay: -2.3s; }
.fact:nth-child(3) { animation-delay: -4.6s; }
.contact__title .char { animation: float 4.5s ease-in-out infinite; animation-delay: calc(var(--i) * -0.35s); }

/* keep content clear of the depth meter wherever it sits on the right (above 960px) */
@media (min-width: 961px) {
  .section, .process__sticky { padding-right: calc(var(--gutter) + 130px); }
  .contact__title { font-size: clamp(34px, 8vw, 170px); }
}
@media (max-width: 960px) {
  .land__beach { width: 100%; height: 47%; }
  .land__sun { right: 8%; top: 18%; }
  .hero__scroll { display: none; }
  .hero { padding-bottom: calc(24px + 15vh); }
  .hero::after { height: 20%; }
  .depth {
    top: auto; bottom: 12px; left: 12px; right: auto; transform: none; padding: 6px 12px;
    border-radius: 12px; background: rgba(0, 10, 25, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  }
  .depth__bar { display: none; }
  .depth__text { flex-direction: row; align-items: baseline; gap: 8px; }
  .depth__value { font-size: 13px; }
  .depth__zone { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ocean__rays, .land__cloud, .land__waves, .land__sun, .bubble, .fact, .polaroid, .contact__title .char { animation: none; }
  .ocean__bubbles { display: none; }
}

/* =========================================================
   DAY / NIGHT — html[data-time="night"] is set by main.js (visitor's local time or the toggle)
   ========================================================= */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  box-shadow: inset 0 0 0 1px var(--line); transition: background-color .3s, transform .5s var(--ease);
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.12); transform: rotate(20deg); }
.theme-toggle svg { grid-area: 1 / 1; width: 18px; height: 18px; transition: opacity .4s, transform .5s var(--ease); }
.theme-toggle__sun { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle__sun circle { fill: currentColor; stroke: none; }
.theme-toggle__moon { fill: currentColor; opacity: 0; transform: rotate(-60deg) scale(0.5); }
.nav.on-land .theme-toggle { color: var(--land-ink); box-shadow: inset 0 0 0 1px rgba(var(--land-ink-rgb), 0.25); }

html[data-time="night"] {
  --water-top: #08305a;
  --water-top-rgb: 8, 48, 90;
  --land-ink: #eef3ff;
  --land-ink-rgb: 238, 243, 255;
  --land-muted: #dfe7fb;
  --land-bg: #0a1433;
  --pill-alpha: 0.1;
  --cloud: rgba(70, 90, 140, 0.55);
}
html[data-time="night"] .hero { background: #030716; }
html[data-time="night"] .land__sky--night,
html[data-time="night"] .land__stars,
html[data-time="night"] .land__sea-night { opacity: 1; }
html[data-time="night"] .land__moon { opacity: 1; transform: none; }
html[data-time="night"] .land__reflection { opacity: 0.7; }
html[data-time="night"] .land__sun { opacity: 0; }
html[data-time="night"] .land__waves { opacity: 0.25; }
html[data-time="night"] .land__cloud { opacity: 0.6; }
html[data-time="night"] .sand-top { stop-color: #5d6790; }
html[data-time="night"] .sand-bottom { stop-color: #3d4568; }
html[data-time="night"] .land__foam { stroke: #c9d6ff; }
html[data-time="night"] .hero__title em { background: linear-gradient(90deg, #8cc8ff 10%, #d6e6ff 90%); -webkit-background-clip: text; background-clip: text; }
html[data-time="night"] .theme-toggle__sun { opacity: 0; transform: rotate(60deg) scale(0.5); }
html[data-time="night"] .theme-toggle__moon { opacity: 1; transform: none; }
html[data-time="night"] .nav.on-land.is-scrolled { background: rgba(5, 10, 30, 0.6); }
@media (prefers-reduced-motion: reduce) {
  .land__stars i, .land__reflection { animation: none; }
}
