@font-face {
  font-family: "Funnel Display";
  src: url("/fonts/funnel-display.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("/fonts/funnel-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --shallows: #c5e4e1;
  --foam: #f3faf9;
  --channel: #0b3b43;
  --channel-soft: #35606a;
  --pandanus: #f0602a;
  --sun: #ffd166;
  --line: #a9cdca;
  --display: "Funnel Display", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Funnel Sans", "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--foam);
  color: var(--channel);
  font: 400 1.125rem/1.55 var(--body);
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--channel); outline-offset: 4px; border-radius: 2px; }
h1, h2 { font-family: var(--display); text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; }

.wrap { width: min(100% - 2.5rem, 76rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 2; background: var(--foam); padding: 0.5rem 1rem; }

/* Header */
.site-header {
  position: absolute; inset: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.25rem 1.5rem; padding-block: 1.25rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font: 600 1.125rem/1.2 var(--display); text-decoration: none;
}
.site-header nav { display: flex; gap: 1.5rem; font-size: 1rem; }
.site-header nav a { padding-block: 0.6rem; }

/* Hero */
.hero { background: var(--shallows); padding-block: clamp(7rem, 13vh, 9.5rem) 1.75rem; overflow: hidden; }
.hero h1 {
  max-width: 19ch;
  font-size: clamp(2.35rem, 1.2rem + 4.3vw, 4.9rem);
  line-height: 1; font-weight: 600; letter-spacing: -0.035em;
}
.hero-copy p { margin-top: 1.25rem; max-width: 46ch; font-size: 1.25rem; line-height: 1.45; }
.tide { margin-top: clamp(1.5rem, 4vh, 3rem); }
#tide-scene { display: block; width: 100%; height: auto; font-family: var(--body); }
.tide figcaption { margin-top: 0.75rem; font-size: 0.95rem; color: var(--channel-soft); }

.pane { transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1); }

.tide-controls { display: flex; flex-direction: column; margin-top: 1rem; font-size: 1rem; }
.tide-controls[hidden] { display: none; }
input[type="range"] { width: 100%; margin: 0; height: 2.75rem; appearance: none; background: none; cursor: grab; }
input[type="range"]:active { cursor: grabbing; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--channel); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--channel); }
input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 26px; height: 26px; margin-top: -11px;
  border: 4px solid var(--channel); border-radius: 50%; background: var(--sun);
}
input[type="range"]::-moz-range-thumb {
  box-sizing: border-box; width: 26px; height: 26px;
  border: 4px solid var(--channel); border-radius: 50%; background: var(--sun);
}

/* Platforms */
.platforms { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem 4rem; align-items: end; }
.section-intro p { max-width: 48ch; }
table { width: 100%; margin-top: clamp(2.5rem, 5vw, 4rem); border-collapse: collapse; text-align: left; }
thead th { padding: 0 1.5rem 0.75rem 0; font-weight: 400; font-size: 1rem; color: var(--channel-soft); }
tbody tr { border-top: 1px solid var(--line); }
tbody th { width: 24%; font: 600 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.2 var(--display); letter-spacing: -0.015em; }
tbody th, tbody td { padding: 1.35rem 1.5rem 1.35rem 0; vertical-align: baseline; }
tbody td { width: 25%; line-height: 1.4; }

/* Contact */
.contact { background: var(--channel); color: var(--foam); padding-block: clamp(4rem, 9vw, 7rem); }
.contact :focus-visible, .site-footer :focus-visible { outline-color: var(--sun); }
.contact-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 3rem 4rem; align-items: start; }
.email {
  display: inline-block; margin-top: 1.5rem; color: var(--sun);
  font: 500 clamp(1.05rem, 0.75rem + 1.9vw, 2rem)/1.25 var(--display);
}
address { font-style: normal; }
address strong { display: block; margin-bottom: 0.6rem; font-weight: 600; }
address a { display: block; width: fit-content; margin-top: 1rem; }

.site-footer { background: var(--channel); color: var(--shallows); font-size: 1rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding-block: 1.5rem; border-top: 1px solid var(--channel-soft);
}

/* Privacy and not-found pages */
.page { padding-block: clamp(7rem, 14vh, 10rem) 5rem; min-height: 80vh; }
.page h1 { font-size: clamp(2.35rem, 1.5rem + 3vw, 4rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.03em; }
.page h2 { margin-top: 2.5rem; font-size: 1.5rem; letter-spacing: -0.01em; }
.page p { margin-top: 0.75rem; max-width: 64ch; }
.page a { overflow-wrap: anywhere; }

@media (max-width: 46rem) {
  .section-intro, .contact-grid { grid-template-columns: 1fr; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table, tbody, tr, tbody th, tbody td { display: block; width: 100%; }
  tbody tr { padding-block: 1.25rem; }
  tbody th, tbody td { padding: 0; }
  tbody td { display: grid; grid-template-columns: 6.5rem 1fr; margin-top: 0.6rem; }
  tbody td::before { content: attr(data-label); color: var(--channel-soft); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pane { transition: none; }
}
