/* Selkie — one page, two voices: the myth (Fraunces) against the machine (Grotesk, mono). */

:root {
  --abyss:    #071411;
  --depth:    #0B1D18;
  --shelf:    #102821;
  --rule:     #1B3A31;
  --foam:     #EDF5F1;
  --mist:     #8FA8A0;
  --haar:     #DCE7E1;
  --ink:      #14231E;
  --phosphor: #46E0BE;
  --coral:    #FF6D52;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: clamp(20px, 5vw, 40px);
  --column: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--abyss);
  color: var(--foam);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
dl, dd { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: var(--shelf);
  color: var(--foam);
  padding: 12px 18px;
  border: 1px solid var(--rule);
  text-decoration: none;
  font-size: 0.9375rem;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- top bar ---------- */

.topbar { padding-block: 22px; }

.topbar__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  text-decoration: none;
  color: var(--foam);
}

.topbar__cta {
  font-size: 0.9375rem;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.18s ease;
}
.topbar__cta:hover { color: var(--phosphor); }

/* ---------- hero ---------- */

.hero {
  padding-bottom: clamp(48px, 7vw, 96px);
  overflow-x: clip;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  min-height: calc(100svh - 160px);
  padding-block: clamp(28px, 5vw, 64px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--shelf);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 6px 11px;
  font-size: 0.8125rem;
  line-height: 1.2;
  color: var(--mist);
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--phosphor);
}

.hero__title {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(2.5rem, 5.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin-block: clamp(20px, 2.6vw, 32px) clamp(18px, 2vw, 26px);
  max-width: 14ch;
}

.hero__sub {
  color: var(--mist);
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  line-height: 1.65;
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: clamp(28px, 3vw, 40px);
}

.btn {
  display: inline-block;
  background: var(--phosphor);
  color: var(--abyss);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 2px;
  transition: background-color 0.18s ease;
}
.btn:hover { background: #74EDD3; }

.link {
  color: var(--phosphor);
  text-decoration: none;
  font-size: 0.9375rem;
  border-bottom: 1px solid rgba(70, 224, 190, 0.4);
  padding-bottom: 3px;
  transition: color 0.18s ease, border-color 0.18s ease;
}
.link:hover { color: var(--foam); border-bottom-color: var(--foam); }

.hero__map {
  width: 100%;
  aspect-ratio: 900 / 760;
  max-height: 74svh;
  justify-self: end;
}

/* let the map run out towards the right edge of the viewport, capped so it
   cannot outgrow the fold on very wide screens */
@media (min-width: 1140px) {
  .hero__map {
    width: auto;
    justify-self: stretch;
    margin-right: max(-240px, 520px - 50vw);
  }
}

.map { display: block; width: 100%; height: 100%; }

/* ---------- hero map ---------- */

.map-bg { fill: #0A1F1A; }

.map .land {
  fill: #16342C;
  stroke: #35705E;
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.map .bathy path {
  stroke: #21463B;
  stroke-width: 1;
  opacity: 0.9;
}

/* cables are infrastructure, not Selkie acting — kept off the phosphor, which
   belongs to the inferred track alone */
.map .cables path {
  stroke: #4E8877;
  stroke-width: 1.4;
  stroke-dasharray: 13 9;
  opacity: 0.85;
}

.map-frame path {
  stroke: var(--rule);
  stroke-width: 1;
}

.map-label {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.14em;
  fill: var(--mist);
  opacity: 0.75;
}

.map-label--cable {
  font-size: 13px;
  letter-spacing: 0.1em;
  fill: #7FB6A4;
  opacity: 0.9;
}

.map-caption {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.04em;
  fill: var(--mist);
}

/* vessels, tracks and the one flagged event */
.v-trail {
  stroke: var(--mist);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.4;
}
.v-inferred {
  fill: none;
  stroke: var(--phosphor);
  stroke-width: 1.4;
  stroke-dasharray: 3 6;
  stroke-linecap: round;
}
.v-dot { fill: var(--foam); }
.v-dot--dark { fill: none; stroke: var(--mist); stroke-width: 1.4; }
.v-dot--flag { fill: var(--coral); stroke: none; }
.v-ping { fill: none; stroke: var(--mist); stroke-width: 1; }
.v-ping--coral { fill: none; stroke: var(--coral); stroke-width: 1.6; }

.v-chip__box { fill: var(--shelf); stroke: var(--rule); stroke-width: 1; }
.v-chip__bar { fill: var(--coral); }
.v-chip__lead { stroke: var(--coral); stroke-width: 1; opacity: 0.55; }
/* no font-size here: the chip scales itself on small screens through the
   font-size attribute, which a rule here would override */
.v-chip__line {
  font-family: var(--mono);
  font-weight: 300;
  letter-spacing: 0.01em;
  fill: var(--foam);
}
.v-chip__line--sub { fill: var(--mist); }

/* ---------- myth band: the one light section ---------- */

.myth {
  background: var(--haar);
  color: var(--ink);
  padding-block: clamp(88px, 12vw, 168px);
}

.myth__quote {
  margin: 0;
  max-width: 50ch;
  margin-inline: auto;
  text-align: center;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.myth__quote p + p {
  margin-top: 1.4em;
  font-size: 0.78em;
  line-height: 1.5;
}

/* ---------- sections ---------- */

.section { padding-block: clamp(76px, 9vw, 136px); }
.section--alt { background: var(--depth); }

.section__head {
  border-top: 1px solid var(--rule);
  padding-top: clamp(20px, 2vw, 28px);
  margin-bottom: clamp(30px, 3.4vw, 46px);
}

.section h2 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.875rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  max-width: 20ch;
}

.prose p {
  color: var(--mist);
  max-width: 70ch;
  line-height: 1.75;
}
.prose p + p { margin-top: 1.35em; }

.prose em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.06em;
  color: var(--foam);
}

/* ---------- manifest rows ---------- */

.manifest { border-top: 1px solid var(--rule); }

.manifest__row {
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: 8px clamp(24px, 4vw, 56px);
  padding-block: clamp(22px, 2.4vw, 32px);
  border-bottom: 1px solid var(--rule);
}

.manifest__row dt {
  font-weight: 500;
  letter-spacing: -0.008em;
  color: var(--foam);
}

.manifest__row dd {
  color: var(--mist);
  line-height: 1.7;
  max-width: 62ch;
}

/* ---------- pipeline ---------- */

.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.pipeline__step h3,
.pipeline__step p { padding-right: clamp(16px, 2.4vw, 34px); }

.plate {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 22px;
}

.plate__motif { stroke: var(--mist); stroke-width: 1; opacity: 0.55; }
.plate__motif circle { fill: none; }
.plate__rail { stroke: var(--rule); stroke-width: 1; fill: none; }
.plate__node { fill: var(--phosphor); }
.plate__accent { stroke: var(--phosphor); opacity: 1; }
circle.plate__accent { fill: none; }

.plate__num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.12em;
  fill: var(--mist);
}

.pipeline__step h3 {
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.008em;
  margin-bottom: 8px;
}

.pipeline__step p {
  color: var(--mist);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.kicker {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: clamp(1.5rem, 3vw, 2.375rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--foam);
  max-width: 24ch;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--rule);
}

/* ---------- final cta + footer ---------- */

.section--cta .btn { margin-top: clamp(28px, 3vw, 40px); }

.footer {
  background: var(--depth);
  padding-block: 34px 44px;
}

.footer p {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
  color: var(--mist);
  font-size: 0.875rem;
  max-width: 70ch;
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    gap: clamp(36px, 6vw, 56px);
  }
  .hero__title { max-width: 18ch; }
  .hero__map {
    max-height: 56svh;
    justify-self: stretch;
  }
}

@media (max-width: 760px) {
  .manifest__row { grid-template-columns: minmax(0, 1fr); }
  .manifest__row dt { margin-bottom: 4px; }

  .pipeline { grid-template-columns: minmax(0, 1fr); }
  .pipeline__step { position: relative; padding-bottom: 38px; }
  .pipeline__step:last-child { padding-bottom: 0; }
  .pipeline__step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 6.4%;
    bottom: 8px;
    width: 1px;
    height: 24px;
    background: var(--rule);
  }
  .pipeline__step h3,
  .pipeline__step p { padding-right: 0; }
  .plate { max-width: 460px; margin-bottom: 16px; }
}

/* mobile map: one cable, three vessels, full bleed, instrument text scaled up
   so the synthetic-data caption stays legible */
@media (max-width: 760px) {
  .map .detail { display: none; }
  .map-label { font-size: 26px; }
  .map-label--cable { font-size: 24px; }
  .map-caption { font-size: 28px; }
  .hero__map {
    margin-inline: calc(-1 * var(--gutter));
    width: calc(100% + 2 * var(--gutter));
  }
}

@media (max-width: 560px) {
  .hero__map { max-height: 62svh; }
  .hero__title { max-width: none; }
}

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