/* Bow Number — dawn water, carbon hull, buoy red */

:root {
  --hull: #0c1b2a;        /* carbon hull at dawn */
  --hull-2: #13293e;      /* raised panels on dark */
  --water: #eef3f6;       /* misty dawn water */
  --foam: #ffffff;        /* bow-card white */
  --buoy: #e23d2e;        /* last-250m buoy red */
  --steel: #55677a;       /* wet steel, secondary text */
  --ink: #16232f;         /* body text on light */
  --line: #d7e0e7;

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Instrument Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --container: 1060px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--water);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.04;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.9rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: 0.5em; }
h3 { font-size: 1.35rem; letter-spacing: 0.03em; }

.marker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--buoy);
  margin-bottom: 1.1rem;
}

.marker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--buoy);
  vertical-align: middle;
  margin-right: 10px;
}

.section-lede {
  max-width: 40em;
  font-size: 1.15rem;
  color: var(--steel);
  margin-bottom: 3rem;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9em 1.6em;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--buoy);
  color: var(--foam);
}
.btn-primary:hover { background: #c93122; }

.btn-ghost {
  color: var(--foam);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { border-color: var(--foam); }

.btn-small {
  padding: 0.55em 1.1em;
  font-size: 0.75rem;
  background: var(--foam);
  color: var(--hull);
}

/* ---------- course rail ---------- */

.course-rail {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.course-rail ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 44px;
  position: relative;
}

.rail-line {
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.course-rail li {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.course-rail .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--water);
  border: 1.5px solid var(--steel);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.course-rail .dot-finish { border-color: var(--buoy); }

.course-rail .lbl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: var(--steel);
  opacity: 0.55;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.course-rail li.is-active .dot {
  background: var(--buoy);
  border-color: var(--buoy);
  transform: scale(1.25);
}
.course-rail li.is-active .lbl {
  opacity: 1;
  color: var(--ink);
}

@media (max-width: 1220px) {
  .course-rail { display: none; }
}

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

.hero {
  background:
    linear-gradient(180deg, rgba(12, 27, 42, 0) 55%, rgba(226, 61, 46, 0.06) 100%),
    var(--hull);
  color: var(--foam);
  position: relative;
  overflow: hidden;
}

/* faint water lines */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px,
    transparent 47px,
    rgba(255, 255, 255, 0.035) 47px,
    rgba(255, 255, 255, 0.035) 48px
  );
  pointer-events: none;
}

.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.mark-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 30px;
  background: var(--foam);
  color: var(--hull);
  border-radius: 3px;
  font-size: 1rem;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a:not(.btn) {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.15s ease;
}
.nav-links a:not(.btn):hover { color: var(--foam); }

@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) 24px clamp(56px, 10vh, 120px);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  position: relative;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1.4rem;
}

.hero-sub {
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 34em;
  margin: 1.4rem 0 2.2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* the bow card */

.hero-card {
  justify-self: center;
  text-align: center;
}

.bow-card {
  position: relative;
  width: clamp(150px, 16vw, 210px);
  aspect-ratio: 3 / 4;
  background: var(--foam);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-4deg);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.45),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

.bow-card-num {
  font-family: var(--font-display);
  font-size: clamp(6rem, 11vw, 9rem);
  color: var(--hull);
  line-height: 1;
}

/* mounting slot at the base of the card */
.bow-card-mount {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 7px;
  border-radius: 4px;
  background: var(--water);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.bow-card-caption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 26px;
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
}

/* lane buoys along the hero's waterline */

.buoy-strip {
  display: flex;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 26px;
  position: relative;
}

.buoy-strip span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.buoy-strip .buoy-red { background: var(--buoy); }

@media (max-width: 640px) {
  .buoy-strip span:nth-child(2n) { display: none; }
}

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

.section { padding: clamp(72px, 11vh, 130px) 0; }

.section-alt {
  background: var(--foam);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* boats */

.boat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 780px) {
  .boat-grid { grid-template-columns: 1fr; }
}

.boat {
  background: var(--foam);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 26px 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boat:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(12, 27, 42, 0.1);
}

.boat svg {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 14px;
}

.boat .hull { fill: var(--hull); }
.boat .seat { fill: var(--foam); }
.boat .cox  { fill: var(--buoy); }
.boat .oar  { stroke: var(--steel); stroke-width: 2.5; stroke-linecap: round; }
.boat .blade { fill: var(--buoy); }
.boat .card  { fill: var(--foam); stroke: var(--steel); stroke-width: 1; }
.boat .card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  fill: var(--ink);
  text-anchor: middle;
}

.boat figcaption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.boat strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.boat code, .footnote code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--water);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 7px;
}

.boat span {
  flex-basis: 100%;
  color: var(--steel);
  font-size: 0.95rem;
}

.footnote {
  margin-top: 26px;
  font-size: 0.95rem;
  color: var(--steel);
  max-width: 46em;
}

/* language */

.term-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 900px) { .term-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .term-grid { grid-template-columns: 1fr; } }

.term {
  border-top: 3px solid var(--hull);
  padding-top: 16px;
}

.term dt {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.term dd {
  color: var(--steel);
  font-size: 0.98rem;
}

/* race day */

.race-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 56px;
}

@media (max-width: 720px) { .race-grid { grid-template-columns: 1fr; } }

.race-card {
  background: var(--hull);
  color: var(--foam);
  border-radius: 10px;
  padding: 30px;
}

.race-card h3 { margin-bottom: 4px; }

.race-meta {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--buoy);
  margin-bottom: 14px;
}

.race-card p:last-child {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.99rem;
}

.namesake {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
  background: var(--foam);
  border: 1px solid var(--line);
  border-left: 5px solid var(--buoy);
  border-radius: 10px;
  padding: 34px 38px;
}

@media (max-width: 640px) {
  .namesake { grid-template-columns: 1fr; }
  .namesake-card { display: none; }
}

.bow-card-sm {
  width: 96px;
  box-shadow: 0 10px 22px rgba(12, 27, 42, 0.22);
  border: 1px solid var(--line);
}

.bow-card-sm .bow-card-num { font-size: 3.4rem; }
.bow-card-sm .bow-card-mount { width: 20px; height: 5px; bottom: 7px; }

.namesake h3 { margin-bottom: 10px; }
.namesake p { color: var(--steel); max-width: 52em; }

/* finish */

.section-finish {
  background:
    linear-gradient(180deg, rgba(226, 61, 46, 0.07) 0%, rgba(12, 27, 42, 0) 30%),
    var(--hull);
  color: var(--foam);
  text-align: center;
}

.section-finish .container { max-width: 760px; }

.marker-light { justify-content: center; }
.section-finish .marker::before { margin-right: 10px; }

.lede-light {
  color: rgba(255, 255, 255, 0.75);
  margin-left: auto;
  margin-right: auto;
}

.finish-stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--buoy);
  border: 1.5px solid var(--buoy);
  border-radius: 4px;
  padding: 0.8em 1.6em;
  transform: rotate(-2deg);
}

/* ---------- footer ---------- */

.footer {
  background: var(--hull);
  color: rgba(255, 255, 255, 0.65);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0;
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.wordmark-footer { color: var(--foam); font-size: 0.95rem; }
.wordmark-footer .mark-card { width: 20px; height: 24px; font-size: 0.8rem; }

.footer a { color: rgba(255, 255, 255, 0.85); }

.footer-fine { opacity: 0.6; }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .boat, .course-rail .dot { transition: none; }
}
