/* ─────────────────────────────────────────────────────────────────────────────
   Intertidal — Theme CSS
   ───────────────────────────────────────────────────────────────────────── */

/* ── Custom properties ───────────────────────────────────────────────────── */

:root {
  /* Palette */
  --c-deep:      #011627;
  --c-ocean:     #0a3d62;
  --c-mid:       #0d6b9b;
  --c-surface:   #1da1c8;
  --c-foam:      #00d4e8;
  --c-seafoam:   #7ae8ef;
  --c-rising:    #00e5a0;
  --c-falling:   #1da1c8;
  --c-text:      #caf0f8;
  --c-text-dim:  #6ba8b8;
  --c-border:    rgba(29, 161, 200, 0.18);

  /* Type */
  --f-display: "acumin-pro-condensed-black", sans-serif;
  --f-body:    "aktiv-grotesk", sans-serif;
  --f-thin:    "aktiv-grotesk-thin", sans-serif;
  --f-serif:   "joly-display", serif;

  /* Scale */
  --t-hero:   clamp(5rem, 16vw, 18rem);
  --t-h1:     clamp(2.5rem, 5vw, 5rem);
  --t-h2:     clamp(1.8rem, 3vw, 3rem);
  --t-h3:     clamp(1.2rem, 2vw, 1.8rem);
  --t-body:   1rem;
  --t-small:  0.8rem;
  --t-stat:   clamp(2rem, 4vw, 4rem);

  /* Layout */
  --max-w:     1280px;
  --pad-x:     clamp(1.5rem, 5vw, 4rem);
  --section-y: clamp(4rem, 8vw, 8rem);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ───────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  color: var(--c-text);
  background: var(--c-deep);
  line-height: 1.6;
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Site header ─────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 1.25rem var(--pad-x);
  mix-blend-mode: screen;
}

.site-header__logo {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-seafoam);
  text-decoration: none;
  margin-right: auto;
}

.site-header__nav { display: flex; gap: 2rem; }

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  font-family: var(--f-body);
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-menu a:hover { color: var(--c-foam); }

/* Live tide in header */
.site-header__tide {
  font-family: var(--f-body);
  font-size: var(--t-small);
  font-weight: 700;
  color: var(--c-rising);
  letter-spacing: 0.08em;
  margin-left: 2rem;
  font-variant-numeric: tabular-nums;
}

/* ── Music player ────────────────────────────────────────────────────────── */

.it-player {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 1.5rem;
}

.it-player__ticker {
  width: 150px;
  overflow: hidden;
  margin-right: 6px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.it-player.is-playing .it-player__ticker {
  opacity: 1;
}

.it-player__ticker-inner {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--f-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--c-text-dim);
  animation: it-ticker 12s linear infinite;
  padding-right: 2rem;
}

@keyframes it-ticker {
  0%   { transform: translateX(150px); }
  100% { transform: translateX(-100%); }
}

.it-player__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--c-text-dim);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  padding: 0;
}

.it-player__btn:hover {
  color: var(--c-foam);
  background: rgba(0, 212, 232, 0.08);
}

.it-player__btn--play {
  color: var(--c-seafoam);
}

.it-player__btn--play:hover {
  color: var(--c-foam);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  background: var(--c-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

#water-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.08);   /* bleed ~4% off each edge; hero overflow:hidden clips */
  transform-origin: center;
}

/* HTML text overlay — hidden; text is rendered entirely through WebGL */
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  pointer-events: none;
  opacity: 0;
}

.hero__title {
  font-family: var(--f-display);
  font-size: var(--t-hero);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-seafoam);
  line-height: 0.9;
  display: block;
  text-align: center;
}

.hero__sub {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  color: rgba(202, 240, 248, 0.7);
  display: block;
  text-align: center;
  letter-spacing: 0.02em;
}

.hero__scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-dim);
  animation: it-scroll-hint 2.5s ease-in-out infinite;
  z-index: 2;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.hero__scroll-hint,
.hero__scroll-hint:visited,
.hero__scroll-hint:hover {
  text-decoration: none;
  color: var(--c-text-dim);
}

@keyframes it-scroll-hint {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 1;   transform: translateX(-50%) translateY(6px); }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.section {
  padding: var(--section-y) 0;
  background: var(--c-deep);
}

.section--map {
  background: linear-gradient(180deg, var(--c-deep) 0%, #020e1a 100%);
}

/* ── Terrarium video ─────────────────────────────────────────────────────── */
/* Prominent video showcasing the parked-car intervention, sitting between
   the water hero and the live data dashboard. Centred figure, framed video
   with the seafoam border treatment, italic serif caption below. */

.terrarium-video {
  margin: 0 auto;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.terrarium-video__player {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--it-radius, 16px);
  background: #000;
  border: 1px solid var(--c-border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  object-fit: cover;
}

.terrarium-video__caption {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--f-body);
  font-size: clamp(0.95rem, 1.05vw, 1.05rem);
  line-height: 1.65;
  color: rgba(202, 240, 248, 0.78);
}

.terrarium-video__caption p {
  margin: 0;
}

.terrarium-video__caption p + p {
  margin-top: 1.1em;
}

.section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section__header {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section__title {
  font-family: var(--f-display);
  font-size: var(--t-h2);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.section__subtitle {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--c-text-dim);
}

/* ── Page content ────────────────────────────────────────────────────────── */

.main-content {
  padding-top: 8rem;
  min-height: 60vh;
}

.page-title {
  font-family: var(--f-display);
  font-size: var(--t-h1);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text);
  line-height: 1;
  margin-bottom: 2rem;
}

.page-body {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 68ch;
}

.page-body h2, .page-body h3 {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-seafoam);
  margin: 2.5rem 0 0.75rem;
}

.page-body em {
  font-family: var(--f-serif);
  font-style: italic;
}

.page-body a {
  color: var(--c-foam);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ── Page partners banner ────────────────────────────────────────────────── */
/* Sits at the bottom of every page's content, just above the site footer.
   Logos are whited-out via brightness(0) + invert(1) so any source image
   renders as a clean white silhouette regardless of its native colours. */

.page-partners {
  border-top: 1px solid var(--c-border);
  padding: 3.5rem var(--pad-x);
}

.page-partners__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.page-partners__link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  opacity: 0.55;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.page-partners__link:hover,
.page-partners__link:focus-visible { opacity: 1; }

.page-partners__link img {
  display: block;
  width: auto;
  filter: brightness(0) invert(1);
  /* Default cap on both axes so each logo lands at a similar visual weight
     regardless of its native aspect ratio. */
  max-height: 56px;
  max-width: 200px;
}

/* ── Site footer ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 3rem var(--pad-x);
}

.site-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.site-footer__name {
  font-family: var(--f-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-seafoam);
}

.site-footer__location {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--c-text-dim);
}

.site-footer__credit {
  font-size: var(--t-small);
  color: var(--c-text-dim);
  margin-left: auto;
  opacity: 0.6;
}


/* ── Subfooter: copyright + forged-by badge ──────────────────────────────── */

.site-footer__sub {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer__copyright {
  font-size: var(--t-small);
  color: var(--c-text-dim);
  opacity: 0.6;
  margin: 0;
  line-height: 1;     /* shrink the box around the glyphs so flex-end aligns the visible text, not the descender slack below it */
}

.site-footer__forged {
  display: inline-flex;
  line-height: 0;
  opacity: 0.65;
  transition: opacity 0.25s ease;
}
.site-footer__forged:hover,
.site-footer__forged:focus-visible { opacity: 1; }

.site-footer__forged img {
  display: block;
  height: 28px;
  width: auto;
}

/* ── Typography utilities ────────────────────────────────────────────────── */

.t-display {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.t-stat {
  font-family: var(--f-display);
  font-size: var(--t-stat);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--c-text);
}

.t-label {
  font-family: var(--f-thin);
  font-size: var(--t-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

.t-serif {
  font-family: var(--f-serif);
  font-style: italic;
}

/* ── Custom cursor ───────────────────────────────────────────────────────── */

@media (pointer: fine) {
  *, *::before, *::after { cursor: none !important; }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0; /* shown by cursor.js once GSAP is ready */
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-text-dim);
}

.cursor-ring {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(107, 168, 184, 0.5);
}

/* ── WordPress admin bar offset ──────────────────────────────────────────── */

.admin-bar .site-header { top: 32px; }

@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .site-header__nav { display: none; }
  .site-footer__credit { margin-left: 0; width: 100%; }
}
