/* ============================================================
   Holmgaard Line — minimal editorial / maritime house style
   ============================================================ */

:root {
  /* Paper & ink */
  --paper:      #efe6d3;   /* warm cream */
  --paper-2:    #e6dcc3;   /* slightly deeper */
  --ink:        #18222e;   /* deep navy ink */
  --ink-2:      #4b5564;
  --ink-3:      #7a8390;
  --rule:       rgba(24, 34, 46, 0.16);
  --rule-soft:  rgba(24, 34, 46, 0.10);
  --brass:      #9a6a2c;   /* oxidised brass accent */
  --brass-soft: rgba(154, 106, 44, 0.14);

  --card-radius: 4px;
  --easing: cubic-bezier(.2, .8, .2, 1);
  --serif: 'Fraunces', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --sans:  'Inter', -apple-system, 'Segoe UI', sans-serif;
}

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

html { background: var(--paper); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
hr { border: 0; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- Type primitives ---------- */
.eyebrow,
.small-caps {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
}

.rule {
  height: 1px;
  background: var(--rule);
  margin: 36px 0;
}

/* ---------- Topbar ---------- */
.topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  padding: 28px clamp(20px, 5vw, 64px) 22px;
  border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--ink);
}
.brand-mark { width: 30px; height: 30px; color: var(--brass); flex: 0 0 30px; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.22em;
}
.brand-sub {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
}
.primary-nav {
  justify-self: center;
  display: flex; gap: 32px;
  font-size: 13px;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.primary-nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--brass);
  transform-origin: left; transform: scaleX(0);
  transition: transform 0.4s var(--easing);
}
.primary-nav a:hover { color: var(--ink); }
.primary-nav a:hover::after { transform: scaleX(1); }
.topbar-meta {
  justify-self: end;
  display: flex; gap: 18px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.topbar-meta .meta-pair {
  display: inline-flex; gap: 6px; align-items: baseline;
}
.topbar-meta .meta-pair b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: center;
  padding: clamp(56px, 9vw, 120px) clamp(20px, 5vw, 64px) clamp(56px, 8vw, 96px);
  max-width: 1480px;
  margin: 0 auto;
}

.hero-copy { max-width: 580px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.eyebrow-rule {
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--brass);
}

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink);
  font-feature-settings: "salt" on, "ss01" on;
}
.headline em {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--brass);
}

.lede {
  margin-top: 26px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(15px, 1.15vw, 17.5px);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 500px;
  font-feature-settings: "onum" on;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px 13px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 2px;
  transition: background 0.25s ease, transform 0.25s ease;
}
.cta:hover { background: #0c1521; transform: translateY(-1px); }
.cta--ghost {
  background: transparent;
  color: var(--ink);
  padding: 14px 0 13px;
  border-radius: 0;
  border-bottom: 1px solid var(--rule);
  text-transform: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0;
  font-weight: 400;
}
.cta--ghost:hover { border-bottom-color: var(--brass); color: var(--brass); transform: none; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.hero-stats > div {
  display: flex; flex-direction: column; gap: 6px;
  padding-right: 14px;
}
.hero-stats dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: 0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums lining-nums;
}
.hero-stats dt span {
  font-family: var(--sans);
  font-size: 0.55em;
  letter-spacing: 0;
  color: var(--brass);
  margin-left: 2px;
  vertical-align: 0.35em;
}
.hero-stats dd {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ports {
  margin-top: 36px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 540px;
}
.ports span {
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 10px;
}

/* ---------- Visual / Card ---------- */
.hero-visual {
  position: relative;
}
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 534 / 456;
  max-width: 640px;
  margin: 0 auto;
  touch-action: pan-y;
}
.card {
  position: relative;
  width: 100%; height: 100%;
  border-radius: var(--card-radius);
  overflow: hidden;
  isolation: isolate;
  /* The card frame stays still — only the layers inside it move. */
}
/* Plate frame — thin double-line border, no shadow, evokes an inset engraving */
.card-bezel {
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 7;
  border: 1px solid rgba(24, 34, 46, 0.5);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px rgba(24, 34, 46, 0.5);
}

.defs-only { position: absolute; width: 0; height: 0; }

.layer-bg,
.layer-water,
.layer-foam,
.layer-ship,
.layer-boat,
.layer-ripples {
  position: absolute; inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.layer-bg {
  background:
    radial-gradient(110% 70% at 50% 40%, rgba(13, 92, 28, 0), rgba(0, 0, 0, 0.32) 100%),
    #073f03;
  z-index: 1;
}
.layer-water img,
.layer-ship img,
.layer-boat img {
  width: 100%; height: 100%;
  object-fit: cover;
  user-select: none; -webkit-user-drag: none;
}
.layer-water {
  z-index: 2;
  transform: translate(var(--water-x, 0px), var(--water-y, 0px));
  will-change: transform;
  filter: url(#waterRipple);
}
.layer-foam {
  z-index: 3;
  transform: translate(var(--foam-x, 0px), var(--water-y, 0px));
}
.layer-foam svg {
  position: absolute;
  left: -8%; right: -8%;
  bottom: 22%;
  width: 116%; height: 5%;
}
.foamline { stroke-dasharray: 60 28; }
.foam-a { animation: foam-shift 9s linear infinite; }
.foam-b { animation: foam-shift 14s linear infinite reverse; }
@keyframes foam-shift {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -240; }
}
.layer-ship {
  z-index: 4;
  transform-origin: 50% 72%;
  transform:
    rotate(var(--ship-rock, 0deg))
    translate(var(--ship-x, 0px), var(--ship-y, 0px));
  will-change: transform;
  filter: url(#hullRipple);
}
.layer-boat {
  z-index: 5;
  transform-origin: 33% 68%;
  transform:
    rotate(var(--boat-rock, 0deg))
    translate(var(--boat-x, 0px), var(--boat-y, 0px));
  will-change: transform;
}
.layer-ripples { z-index: 6; }
.layer-ripples .ring {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ring-grow 1.6s ease-out forwards;
}
@keyframes ring-grow {
  0%   { width: 8px;   height: 8px;   opacity: 0.85; }
  100% { width: 160px; height: 60px;  opacity: 0;    }
}
.plate-caption {
  display: flex; gap: 14px;
  margin: 24px 4px 0;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  border-top: 1px solid var(--rule-soft);
  padding-top: 14px;
}
.plate-no {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  font-size: 10.5px;
  padding-top: 3px;
  white-space: nowrap;
}
.plate-text { display: flex; flex-direction: column; gap: 4px; }
.plate-text i { color: var(--ink); }
.plate-sub {
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
}

/* ---------- Chart of Routes ---------- */
.chart {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 120px) clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s var(--easing), transform 1.1s var(--easing);
}
.chart.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.chart-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 720px;
  margin: 0 0 48px;
}
.chart-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}
.chart-eyebrow .eyebrow-rule {
  width: 22px; height: 1px; background: var(--brass);
}
.chart-title {
  margin-top: 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink);
}
.chart-title em {
  font-style: italic;
  color: var(--brass);
}
.chart-sub {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 540px;
  font-feature-settings: "onum" on;
}

.chart-plate {
  position: relative;
  width: 100%;
  border: 1px solid rgba(24, 34, 46, 0.5);
  box-shadow:
    inset 0 0 0 4px var(--paper),
    inset 0 0 0 5px rgba(24, 34, 46, 0.5);
}
.chart-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1000 / 500;
}
.chart-bg { fill: #073f03; }

.chart-grid line {
  stroke: rgba(245, 235, 210, 0.16);
  stroke-width: 0.6;
  stroke-dasharray: 2 3;
}
.chart-grid .grid-equator {
  stroke: rgba(245, 235, 210, 0.32);
  stroke-width: 0.9;
  stroke-dasharray: none;
}

.chart-land path {
  fill: rgba(245, 235, 210, 0.06);
  stroke: rgba(245, 235, 210, 0.55);
  stroke-width: 0.4;
  vector-effect: non-scaling-stroke;
}

.chart-routes .route {
  stroke: rgba(245, 235, 210, 0.85);
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.8s var(--easing);
}
.chart.is-revealed .chart-routes .route { stroke-dashoffset: 0; }
.chart.is-revealed .chart-routes .route:nth-child(2) { transition-delay: 0.10s; }
.chart.is-revealed .chart-routes .route:nth-child(3) { transition-delay: 0.20s; }
.chart.is-revealed .chart-routes .route:nth-child(4) { transition-delay: 0.30s; }
.chart.is-revealed .chart-routes .route:nth-child(5) { transition-delay: 0.40s; }
.chart.is-revealed .chart-routes .route:nth-child(6) { transition-delay: 0.50s; }
.chart.is-revealed .chart-routes .route:nth-child(7) { transition-delay: 0.60s; }
.chart.is-revealed .chart-routes .route:nth-child(8) { transition-delay: 0.70s; }

.chart-ports .port {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.chart.is-revealed .chart-ports .port { opacity: 1; transition-delay: 0.9s; }
.chart-ports circle {
  fill: var(--paper);
  stroke: var(--paper);
  stroke-width: 0.5;
}
.chart-ports line {
  stroke: rgba(245, 235, 210, 0.85);
  stroke-width: 0.9;
}
.chart-ports text {
  font-family: 'Fraunces', serif;
  font-size: 12px;
  font-style: italic;
  fill: rgba(245, 235, 210, 0.92);
  letter-spacing: 0.02em;
}

.chart-rose circle { stroke: rgba(245, 235, 210, 0.5); stroke-width: 0.6; }
.chart-rose line   { stroke: rgba(245, 235, 210, 0.5); stroke-width: 0.6; }
.chart-rose .rose-n {
  font-family: 'Fraunces', serif;
  font-size: 10px;
  fill: rgba(245, 235, 210, 0.85);
  letter-spacing: 0.12em;
}

.chart-title-in {
  font-family: 'Fraunces', serif;
  font-size: 10px;
  letter-spacing: 0.34em;
  fill: rgba(245, 235, 210, 0.55);
  text-transform: uppercase;
}
.chart-scale {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 10px;
  fill: rgba(245, 235, 210, 0.45);
}

@media (max-width: 980px) {
  .chart-head { grid-template-columns: 1fr; gap: 14px; }
  .chart-ports text { font-size: 11px; }
}
@media (max-width: 540px) {
  .chart-title { font-size: 26px; }
  .chart-ports text { font-size: 10px; }
}

/* ---------- Footer ---------- */
.footnote {
  border-top: 1px solid var(--rule);
  padding: 24px clamp(20px, 5vw, 64px);
}
.footnote-row {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-3);
  max-width: 1480px;
  margin: 0 auto;
}
.footnote-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  color: var(--brass);
  line-height: 1;
}
.footnote-main { flex: 1; letter-spacing: 0.02em; }
.footnote-meta {
  font-style: italic;
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 20px 60px;
    gap: 48px;
  }
  .hero-copy { max-width: 100%; }
  .primary-nav { display: none; }
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 18px 20px;
  }
  .topbar-meta { display: none; }
  .stage { max-width: 100%; }
  .hero-stats { gap: 18px; }
  .footnote-row { flex-direction: column; gap: 8px; align-items: flex-start; }
}
@media (max-width: 540px) {
  .headline { font-size: 38px; }
  .hero-stats dt { font-size: 22px; }
  .brand-sub { display: none; }
  .footnote-meta { display: none; }
}
