@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,wght@0,500;0,700;1,500&family=Public+Sans:wght@400;600&family=Space+Mono&display=swap');

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

:root {
  --harbour-ink: #172230;
  --deep-night: #0A1018;
  --oat-paper: #F4EFE3;
  --tidal-teal: #2E7D74;
  --fog-grey: #6B7480;
  --muted-plum: #5B4A55;
  --shell: 1180px;
  --article: 640px;
  --legal: 860px;
  --pad-d: 72px;
  --pad-d-lg: 88px;
  --pad-d-xl: 104px;
  --pad-d-xxl: 128px;
  --pad-m: 48px;
  --pad-m-md: 56px;
  --pad-m-lg: 72px;
}

html {
  scroll-behavior: auto;
  overflow-anchor: auto;
}

body {
  margin: 0;
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: currentColor; text-underline-offset: 0.18em; }

.surface-paper {
  background-color: var(--oat-paper);
  color: var(--harbour-ink);
  background-image:
    radial-gradient(circle at 18% 22%, rgba(23, 34, 48, 0.018) 0%, transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(23, 34, 48, 0.014) 0%, transparent 38%);
}
.surface-ink { background: var(--harbour-ink); color: var(--oat-paper); }
.surface-night { background: var(--deep-night); color: var(--oat-paper); }
.surface-teal { background: var(--tidal-teal); color: var(--oat-paper); }
.surface-plum { background: var(--muted-plum); color: var(--oat-paper); }

/* Header */
.site-header {
  border-bottom: 1px solid rgba(46, 125, 116, 0.35);
  padding: 20px 24px;
  background-color: var(--oat-paper);
}

.header-inner {
  max-width: var(--shell);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-logo span { color: var(--tidal-teal); font-style: italic; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}

.site-nav a {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }

/* Shell */
.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section-pad { padding-top: var(--pad-d); padding-bottom: var(--pad-d); }
.section-pad-lg { padding-top: var(--pad-d-lg); padding-bottom: var(--pad-d-lg); }
.section-pad-xl { padding-top: var(--pad-d-xl); padding-bottom: var(--pad-d-xl); }

/* Typography */
.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-grey);
  margin: 0 0 16px;
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  letter-spacing: -0.01em;
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); margin: 0 0 20px; }

.lead {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--tidal-teal);
  margin: 0 0 32px;
  line-height: 1.45;
}

/* Breadcrumb */
.breadcrumb {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fog-grey);
  padding: 16px 0;
  border-bottom: 1px solid rgba(107, 116, 128, 0.25);
  margin-bottom: 40px;
}

.breadcrumb a { text-decoration: none; color: inherit; }
.breadcrumb a:hover { text-decoration: underline; }

/* Dateline */
.dateline {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--tidal-teal);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Article */
.article-body {
  max-width: var(--article);
  margin: 0 auto;
  font-size: 19px;
  line-height: 1.75;
}

.article-body p { margin: 0 0 1.4em; }

.drop-cap::first-letter {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding-right: 0.08em;
  color: var(--tidal-teal);
}

/* Photo frame */
.photo-frame {
  border: 1px solid var(--tidal-teal);
  padding: 6px;
  margin: 32px 0;
}

.photo-caption {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fog-grey);
  margin-top: 10px;
  text-align: right;
}

/* End strip */
.end-strip {
  max-width: var(--article);
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(46, 125, 116, 0.4);
}

.end-strip a {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.end-strip a:hover { text-decoration: underline; }

/* Maps */
.map-b-wrap,
.map-c-wrap {
  contain: layout style;
}

.map-a {
  width: 100%;
  height: 480px;
  border: 1px solid var(--tidal-teal);
  opacity: 0.92;
}

.map-b-wrap { margin-top: 0; }
.map-b-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fog-grey);
  margin-bottom: 8px;
}
.map-b {
  width: 100%;
  height: 190px;
  border: 0;
  opacity: 0.88;
}

.map-c-wrap { margin-top: var(--pad-d); }
.map-c {
  width: 100%;
  height: 300px;
  border: 1px solid var(--tidal-teal);
  opacity: 0.92;
}

.map-d {
  width: 100%;
  max-width: 460px;
  height: 170px;
  border: 1px solid rgba(46, 125, 116, 0.5);
  opacity: 0.88;
}

.map-note {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--fog-grey);
  margin-top: 10px;
}

/* Tide Table hero */
.hero-tide {
  min-height: 76vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad-d-xxl) 0 var(--pad-d-xl);
}

.hero-rule-strip {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(46, 125, 116, 0.35);
  margin-bottom: 40px;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-row-1 {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 40px;
  align-items: start;
  margin-bottom: 32px;
}

.hero-places {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 2.2;
  color: var(--fog-grey);
}

.hero-places span { display: block; border-top: 1px solid rgba(107, 116, 128, 0.3); padding-top: 8px; margin-top: 8px; }
.hero-places span:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.hero-welcome {
  font-size: 19px;
  max-width: 62ch;
  margin-bottom: 40px;
}

.hero-photo-wide { margin-top: 8px; }
.hero-photo-wide img { aspect-ratio: 21/9; object-fit: cover; width: 100%; }

.hero-hairline {
  height: 1px;
  background: var(--tidal-teal);
  margin-top: 24px;
}

/* Who strip */
.who-strip {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: center;
  padding: var(--pad-d) 0;
  border-top: 1px solid rgba(46, 125, 116, 0.3);
  border-bottom: 1px solid rgba(46, 125, 116, 0.3);
}

.who-strip img { width: 120px; height: 120px; object-fit: cover; border: 1px solid var(--tidal-teal); padding: 4px; }

.who-strip p { margin: 0; font-size: 17px; max-width: 55ch; }

/* Note cards */
.note-list { padding: var(--pad-d-lg) 0; }

.note-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(46, 125, 116, 0.25);
  text-decoration: none;
  color: inherit;
}

.note-card:hover h3 { color: var(--tidal-teal); }

.note-card-wide { grid-template-columns: 320px 1fr; }

.note-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border: 1px solid var(--tidal-teal);
  padding: 4px;
}

.note-card .card-date {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--tidal-teal);
  margin-bottom: 8px;
}

.note-card h3 {
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.note-card p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--fog-grey); }

.drop-cap-para {
  font-size: 19px;
  line-height: 1.75;
  max-width: 72ch;
  margin-bottom: var(--pad-d);
}

.drop-cap-para::first-letter {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 700;
  font-size: 3.2em;
  float: left;
  line-height: 0.85;
  padding-right: 0.08em;
  color: var(--tidal-teal);
}

/* Shelf */
.shelf-intro {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
  padding: var(--pad-d-lg) 0 var(--pad-d);
}

.shelf-intro img { border: 1px solid var(--tidal-teal); padding: 4px; }

.year-group { margin-bottom: var(--pad-d); }
.year-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tidal-teal);
  margin-bottom: 8px;
}

/* Me page */
.me-band {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 32px;
  align-items: end;
  padding: var(--pad-d-xl) 0 var(--pad-d-lg);
  margin-bottom: var(--pad-d);
}

.me-band h1 { font-size: clamp(2.2rem, 4vw, 3.5rem); }

.me-portrait {
  margin-bottom: -40px;
  position: relative;
  z-index: 1;
}

.me-portrait img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--tidal-teal);
  padding: 6px;
}

.me-columns {
  display: grid;
  grid-template-columns: 62% 38%;
  gap: 44px;
  padding-bottom: var(--pad-d-lg);
}

.me-sidebar img { border: 1px solid var(--tidal-teal); padding: 4px; margin-bottom: 16px; }

.me-pull {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--tidal-teal);
  margin-top: 16px;
}

.disclaimer-band {
  padding: var(--pad-d) 0;
  max-width: var(--legal);
}

/* Hello page */
.hello-intro { padding: var(--pad-d-lg) 0 var(--pad-d); max-width: 72ch; }

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px;
  margin-bottom: var(--pad-d);
}

.chip {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border: 1px solid rgba(244, 239, 227, 0.25);
}

.hello-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  padding-bottom: var(--pad-d-lg);
}

.form-photo img { aspect-ratio: 2.4/1; object-fit: cover; width: 100%; margin-bottom: 24px; border: 1px solid var(--tidal-teal); padding: 4px; }

/* Form */
.contact-form label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 34, 48, 0.25);
  background: var(--oat-paper);
  color: var(--harbour-ink);
  margin-bottom: 20px;
}

.contact-form textarea { min-height: 160px; resize: vertical; }

.contact-form .checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.contact-form .checkbox-row input { width: auto; margin: 4px 0 0; }

.btn-primary {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary:hover { filter: brightness(1.08); }

.field-error {
  font-size: 14px;
  color: var(--harbour-ink);
  border-left: 2px solid var(--tidal-teal);
  padding-left: 10px;
  margin: -12px 0 16px;
}

.form-success {
  padding: 20px 24px;
  border: 1px solid var(--tidal-teal);
  margin-bottom: 24px;
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
}

.form-summary {
  padding: 16px 20px;
  border-left: 2px solid var(--tidal-teal);
  margin-bottom: 24px;
}

.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* Legal pages */
.legal-layout {
  display: grid;
  grid-template-columns: 26% 74%;
  gap: 40px;
  padding: var(--pad-d-lg) 0;
}

.legal-index {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 2.2;
  border-right: 1px solid rgba(46, 125, 116, 0.35);
  padding-right: 24px;
}

.legal-index a { text-decoration: none; color: var(--fog-grey); }
.legal-index a:hover { color: var(--harbour-ink); text-decoration: underline; }

.legal-prose { max-width: var(--legal); }
.legal-prose h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose ul { padding-left: 1.4em; }
.legal-prose li { margin-bottom: 0.6em; }

.legal-open {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}

.embed-section {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 32px;
  align-items: start;
  margin: 32px 0;
}

/* Footer */
.site-footer {
  padding: var(--pad-d) 24px;
  border-top: 1px solid rgba(46, 125, 116, 0.35);
  font-size: 15px;
  line-height: 1.8;
}

.footer-inner { max-width: var(--shell); margin: 0 auto; }

.footer-inner a { text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

.footer-meta { color: var(--fog-grey); font-size: 14px; margin-top: 12px; }

/* 404 */
.page-404 {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad-d-xxl) 0;
}

.page-404 .shell { max-width: 560px; }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 24px;
  border-top: 1px solid rgba(46, 125, 116, 0.5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.cookie-banner[hidden] { display: none; }

.cookie-banner p { margin: 0; font-size: 14px; max-width: 60ch; flex: 1; }

.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cookie-btn {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 2px;
}

.cookie-btn-teal { background: var(--tidal-teal); border-color: var(--tidal-teal); color: var(--oat-paper); }

.cookie-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 24px;
  border-top: 1px solid var(--tidal-teal);
}

.cookie-panel[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .legal-index { position: static !important; }
}

@media (min-width: 901px) {
  .legal-index { position: sticky; top: 24px; align-self: start; }
}

@media (max-width: 900px) {
  :root {
    --pad-d: 48px;
    --pad-d-lg: 56px;
    --pad-d-xl: 72px;
    --pad-d-xxl: 72px;
  }

  .hero-tide { min-height: 66vh; }
  .hero-row-1 { grid-template-columns: 1fr; }
  .hero-places { display: flex; gap: 16px; }
  .hero-places span { border-top: 0; padding: 0; margin: 0; }
  .hero-places span:not(:last-child)::after { content: ' ·'; }

  .note-card, .note-card-wide { grid-template-columns: 1fr; }
  .shelf-intro { grid-template-columns: 1fr; }
  .me-band { grid-template-columns: 1fr; }
  .me-portrait { margin-bottom: 0; }
  .me-columns { grid-template-columns: 1fr; }
  .hello-grid { grid-template-columns: 1fr; }
  .map-a { height: 300px; }
  .map-b { height: 130px; }
  .map-c { height: 200px; }
  .legal-layout { grid-template-columns: 1fr; }
  .legal-index { border-right: 0; border-bottom: 1px solid rgba(46, 125, 116, 0.35); padding-bottom: 16px; margin-bottom: 24px; }
  .legal-open, .embed-section { grid-template-columns: 1fr; }
  .who-strip { grid-template-columns: 80px 1fr; }
  .who-strip img { width: 80px; height: 80px; }
}

@media (max-width: 600px) {
  .site-nav ul { gap: 16px; }
  .site-nav a { font-size: 10px; }
}
