/* Fishinroad — maritime chart logbook landing */

:root {
  --navy: #06283D;
  --deep-teal: #0A4D68;
  --ocean: #088395;
  --seafoam: #05BFDB;
  --coral: #FF6B6B;
  --sunset: #FF8E53;
  --gold: #FFC857;
  --lagoon: #25C4A4;
  --sand: #F7E7CE;
  --foam: #E8F9FD;
  --ink: #06283D;
  --ink-soft: #0A4D68;
  --muted: #4a7a8a;
  --line: rgba(8, 131, 149, 0.18);
  --grid: rgba(8, 131, 149, 0.08);
  --shadow: 0 22px 60px rgba(6, 40, 61, 0.14);
  --max: 1120px;
  --radius: 20px;
  --radius-sm: 12px;
  --font-display: "Avenir Next", "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-soft);
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(5, 191, 219, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 10%, rgba(255, 107, 107, 0.12), transparent 50%),
    linear-gradient(180deg, var(--foam) 0%, #fff 45%, var(--sand) 100%);
  min-height: 100vh;
}

.chart-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

.wave-film {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 3px,
    var(--deep-teal) 3px,
    var(--deep-teal) 4px
  );
  z-index: 0;
}

a { color: var(--ocean); text-decoration: none; }
a:hover { color: var(--coral); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Top bar */
.deck-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  max-width: calc(var(--max) + 2.5rem);
  margin: 0 auto;
  background: rgba(232, 249, 253, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-mark svg { flex-shrink: 0; }

.deck-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}

.deck-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.deck-links a:hover { color: var(--coral); }

.deck-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.deck-toggle i {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

main {
  position: relative;
  z-index: 1;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.3rem, 5.8vw, 3.6rem);
  margin: 0 0 0.75rem;
}

h1 span {
  display: block;
  font-size: 0.42em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ocean);
  margin-bottom: 0.35rem;
}

h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--coral), var(--sunset), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin: 0 0 0.75rem;
  max-width: 22ch;
}

h3 {
  font-size: 1.12rem;
  margin: 0 0 0.4rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lagoon);
  margin: 0 0 0.6rem;
}

.lead {
  max-width: 58ch;
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
}

/* Chart hero */
.chart-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 2rem;
  display: grid;
  gap: 2rem;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 280px;
}

.coord-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(6, 40, 61, 0.55) 0%,
    rgba(6, 40, 61, 0.15) 45%,
    rgba(6, 40, 61, 0.35) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
}

.coord-readout {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.08em;
  margin: 0;
}

.coord-readout strong {
  color: var(--seafoam);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-wave {
  background: linear-gradient(135deg, var(--ocean), var(--seafoam));
  color: #fff;
  box-shadow: 0 10px 28px rgba(8, 131, 149, 0.32);
}

.btn-wave:hover { color: #fff; }

.btn-coral {
  border: 2px solid var(--coral);
  color: var(--coral);
  background: rgba(255, 107, 107, 0.07);
}

.atlas-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.5rem;
}

.atlas-stats li {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.atlas-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
}

.atlas-stats span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Waypoint chain */
.waypoint-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.waypoint-chain {
  position: relative;
  padding: 1.5rem 0 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.waypoint-track {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: max-content;
  padding: 0 0.5rem 1rem;
}

.waypoint-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  min-width: 88px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0.25rem;
  transition: transform 0.2s ease;
}

.waypoint-node:hover,
.waypoint-node.is-active {
  transform: translateY(-3px);
}

.waypoint-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ocean);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--ocean);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.waypoint-node.is-active .waypoint-dot {
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--coral), 0 0 16px rgba(255, 107, 107, 0.45);
}

.waypoint-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  max-width: 80px;
  line-height: 1.25;
}

.waypoint-node.is-active .waypoint-label { color: var(--navy); }

.waypoint-segment {
  width: 36px;
  height: 2px;
  background: linear-gradient(90deg, var(--ocean), var(--seafoam));
  flex-shrink: 0;
  margin-bottom: 1.4rem;
}

.waypoint-detail {
  margin: 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--coral);
  max-width: 68ch;
}

/* Deck panels */
.deck-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.deck-grid {
  display: grid;
  gap: 1rem;
}

.deck-panel {
  padding: 1.2rem 1.3rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(6, 40, 61, 0.05);
  position: relative;
  overflow: hidden;
}

.deck-panel::after {
  content: attr(data-deck);
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(8, 131, 149, 0.35);
  font-weight: 700;
}

.deck-icon {
  font-size: 1.4rem;
  margin-bottom: 0.45rem;
  display: block;
}

.deck-panel p { margin: 0; }

.deck-discover { border-top: 4px solid var(--coral); }
.deck-routes { border-top: 4px solid var(--ocean); }
.deck-ports { border-top: 4px solid var(--lagoon); }
.deck-islands { border-top: 4px solid var(--gold); }
.deck-shore { border-top: 4px solid var(--sunset); }
.deck-log { border-top: 4px solid var(--deep-teal); }

/* Gallery strip */
.gallery-strip {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 3.5rem;
}

.gallery-row {
  display: grid;
  gap: 0.85rem;
}

.gallery-tile {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(6, 40, 61, 0.08);
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Legal */
.legal-band,
.support-band {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.legal-band {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.legal-date {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--ocean);
  margin: 0 0 1.5rem;
}

.legal-stack {
  display: grid;
  gap: 0.85rem;
}

.legal-stack article {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
}

.legal-stack p { margin: 0; }
.legal-stack a { word-break: break-all; }

.support-cards {
  display: grid;
  gap: 0.85rem;
}

.support-tile {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 2px solid var(--line);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.support-tile:hover {
  border-color: var(--ocean);
  transform: translateY(-2px);
}

.support-tile span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.support-tile strong {
  font-size: 1rem;
  color: var(--navy);
}

.support-tile:hover strong { color: var(--coral); }

.support-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin: -0.25rem 0 1.25rem;
}

/* Footer */
.site-end {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
}

.end-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
}

.end-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.end-copy {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

@media (min-width: 768px) {
  .chart-hero {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    padding-top: 3rem;
  }

  .deck-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .deck-panel:last-child {
    grid-column: span 2;
    max-width: calc(50% - 0.5rem);
    justify-self: center;
  }

  .gallery-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .support-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .deck-toggle { display: flex; }

  .deck-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem 1.25rem;
    background: rgba(232, 249, 253, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .deck-links.is-open { display: flex; }

  .deck-panel:last-child { max-width: none; }
}
