/* Freediver marketing site — LAYOUT ONLY.
   Every colour, radius, shadow, font and spacing value comes from the design system variables
   linked before this file (vendor/design-system/styles.css). No hex, rgb or hsl literal belongs here;
   `make site-check` greps for exactly that. */

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg-deep);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.skip {
  position: absolute; left: var(--s-4); top: -100px;
  padding: var(--s-2) var(--s-4);
  background: var(--accent-deep); color: var(--text-on-accent);
  border-radius: var(--r-sm);
}
.skip:focus { top: var(--s-4); }

/* ---- header ---------------------------------------------------------------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--s-6);
  max-width: 1120px; width: 100%; margin: 0 auto;
}
.wordmark { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.wordmark .logo { font-size: 28px; }
.mark { width: 36px; height: 36px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--border-subtle); }
.top nav { display: flex; align-items: center; gap: var(--s-5); }
.top nav a { text-decoration: none; color: var(--text-2); font-weight: 500; }
.top nav a:hover { color: var(--accent-bright); }

/* ---- buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  font: var(--type-btn, 700 14px/20px var(--font-ui));
  text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-btn);
}
.top nav .btn { color: var(--accent-dim); }
.btn-primary { background: var(--accent-deep); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent); color: var(--text-on-accent); }
.btn-secondary {
  background: transparent; color: var(--accent-dim);
  box-shadow: inset 0 0 0 1.5px var(--accent-border);
}
.btn-secondary:hover { background: var(--accent-tint); color: var(--accent-bright); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.btn:focus-visible { border-radius: var(--r-pill); }

/* ---- hero ------------------------------------------------------------------ */
main { flex: 1; }
section { max-width: 1120px; margin: 0 auto; padding: var(--s-10) var(--s-6); }
.hero { padding-top: calc(var(--s-10) * 2); padding-bottom: calc(var(--s-10) * 2); }
.hero > * { max-width: 760px; }
.hero-split { display: flex; align-items: center; justify-content: space-between; gap: var(--s-10); }
.hero-diver { height: 300px; width: auto; flex: none; opacity: 0.95; }
.display {
  font-family: var(--font-ui-large); font-weight: 900;
  font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.02em;
  margin: var(--s-3) 0 var(--s-5);
}
.lede { font-size: 18px; line-height: 1.5; color: var(--text-sub); max-width: 60ch; margin: 0 0 var(--s-8); }
.cta { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---- product truths -------------------------------------------------------- */
.section-title { font-size: 28px; font-weight: 700; line-height: 1.1; margin: 0 0 var(--s-6); }
.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--bg-card); border-radius: var(--r-lg);
  padding: var(--s-6); box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.card .ico { width: 28px; height: 28px; color: var(--accent); }
.card h3 { font-size: 18px; line-height: 1.2; }
.card p { color: var(--text-sub); margin: 0; line-height: 1.5; }

/* ---- features: one open column, not a grid (fd-b2e2) ----------------------- */
.features { max-width: 840px; }
.features { list-style: none; margin: 0; padding: 0; }
.feature {
  display: grid; grid-template-columns: 72px 1fr; gap: var(--s-6);
  align-items: start;
  padding: var(--s-8) 0;
  border-top: 1px solid var(--border-subtle);
}
.feature:last-child { border-bottom: 1px solid var(--border-subtle); }
.feature-ico { color: var(--accent); padding-top: var(--s-1); }
.feature-ico .ico { width: 40px; height: 40px; }
.feature-text h3 { font-size: 24px; line-height: 1.15; margin: 0 0 var(--s-3); }
.feature-text p { color: var(--text-sub); font-size: 17px; line-height: 1.55; margin: 0; max-width: 60ch; }
@media (min-width: 900px) {
  .feature { grid-template-columns: 120px 1fr; gap: var(--s-10); padding: var(--s-10) 0; }
  .feature-ico .ico { width: 48px; height: 48px; }
}

/* ---- get the app ----------------------------------------------------------- */
.get { border-top: 1px solid var(--border-subtle); }

/* ---- footer ---------------------------------------------------------------- */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4);
  max-width: 1120px; width: 100%; margin: 0 auto;
  padding: var(--s-6); border-top: 1px solid var(--border-subtle);
}
.foot nav { display: flex; gap: var(--s-5); }
.foot nav a { color: var(--text-3); text-decoration: none; }
.foot nav a:hover { color: var(--accent-bright); }

@media (max-width: 600px) {
  .top { padding: var(--s-3) var(--s-4); }
  .top nav { gap: var(--s-3); }
  .top nav a:not(.btn) { display: none; }
  section { padding-left: var(--s-4); padding-right: var(--s-4); }
  .hero { padding-top: var(--s-10); padding-bottom: var(--s-10); }
  .hero-diver { display: none; }
  .btn { width: 100%; }
  .feature { grid-template-columns: 1fr; gap: var(--s-3); padding: var(--s-6) 0; }
  .feature-text h3 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---- spot pages (generated by scripts/lib/site_spots.py) -------------------- */
.spot { max-width: 760px; }
.spot .meta a { color: var(--text-3); text-decoration: none; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-2) var(--s-5); margin: 0 0 var(--s-6); }
.facts dt { color: var(--text-3); }
.facts dd { margin: 0; color: var(--text-2); }
.spot p { color: var(--text-2); font-size: 16px; line-height: 1.55; max-width: 65ch; }
.spot h2 { margin-top: var(--s-8); }
.sources { color: var(--text-3); word-break: break-all; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent-bright); }

/* ---- Global Dive Sites (site/dive-sites/) ---------------------------------- */
.map-page main { display: flex; flex-direction: column; }
.map-main { max-width: 1120px; width: 100%; margin: 0 auto; padding: var(--s-6); flex: 1; display: flex; flex-direction: column; gap: var(--s-4); }
.map-head .section-title { margin-bottom: var(--s-2); }
.map-lede { margin: 0; font-size: 16px; }
.map { flex: 1; min-height: 60vh; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); background: var(--bg-card); }
.map-status { min-height: 1.2em; margin: 0; }
.maplibregl-popup-content { background: var(--bg-card); color: var(--text); border-radius: var(--r-md); box-shadow: var(--shadow-modal); padding: var(--s-3) var(--s-4); font-family: var(--font-ui); }
.maplibregl-popup-content a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; }
.maplibregl-popup-content a:hover { color: var(--accent-bright); }
.maplibregl-popup-content .popup-link { color: var(--accent); font-weight: 500; }
.maplibregl-popup-anchor-bottom .maplibregl-popup-tip { border-top-color: var(--bg-card); }
.maplibregl-popup-anchor-top .maplibregl-popup-tip { border-bottom-color: var(--bg-card); }
.maplibregl-popup-close-button { color: var(--text-3); font-size: 18px; }
.maplibregl-ctrl-group { background: var(--bg-card); box-shadow: var(--shadow-card); }
.maplibregl-ctrl-group button + button { border-top-color: var(--border-subtle); }
