/* ── MARAP theme ─────────────────────────────
   Deep ocean navy + teal/turquoise accents, clean Montserrat,
   photo-free but rich gradients + a live map as the centrepiece. */
:root {
  --navy:      #0a2a43;   /* deep ocean */
  --navy-2:    #0e3a5c;
  --teal:      #19a7a0;   /* turquoise accent */
  --teal-2:    #36c4bd;
  --sand:      #f4f1ea;
  --ink:       #15202b;
  --muted:     #5a6b78;
  --line:      #e4e8ec;
  --white:     #ffffff;
  --radius:    16px;
  --maxw:      1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); color: var(--navy); }
h3 { font-size: 1.15rem; color: var(--navy); }
p  { margin: 0 0 1rem; }
a  { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.section { padding: 88px 0; }
.section.alt { background: var(--sand); }
.kicker { text-transform: uppercase; letter-spacing: 2px; font-size: .78rem; font-weight: 700; color: var(--teal); margin-bottom: .5rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 3px; font-size: .8rem; font-weight: 700; color: var(--teal-2); margin: 0 0 1rem; }
.body { color: var(--muted); font-size: 1.06rem; }

/* ── Buttons ── */
.btn {
  display: inline-block; background: var(--teal); color: var(--white);
  font-weight: 700; padding: 14px 26px; border-radius: 999px; transition: transform .15s ease, background .15s ease;
  border: 2px solid var(--teal);
}
.btn:hover { background: var(--teal-2); border-color: var(--teal-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background .25s ease, box-shadow .25s ease;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; }
/* The MARAP wordmark is navy; invert to white while the nav sits over the dark hero. */
.brand-logo { height: 30px; width: auto; display: block; filter: brightness(0) invert(1); transition: filter .25s ease; }
#nav.scrolled .brand-logo { filter: none; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: #fff; font-weight: 600; font-size: .95rem; opacity: .92; }
.nav-links a:hover { opacity: 1; }
#nav.scrolled { background: rgba(255,255,255,.96); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(8px); }
#nav.scrolled .nav-links a { color: var(--navy); }
#nav.scrolled .nav-links a.btn { color: #fff; }

/* ── Hero ── */
.hero {
  position: relative; min-height: 92vh; display: flex; align-items: center;
  color: #fff; overflow: hidden;
  /* Real field photo (the app's sign-in onboarding image) under a navy/teal wash. */
  background:
    radial-gradient(1000px 520px at 85% -10%, rgba(54,196,189,.30), transparent 60%),
    linear-gradient(160deg, rgba(10,42,67,.86) 0%, rgba(9,58,92,.72) 55%, rgba(7,71,95,.66) 100%),
    url('assets/bg_1.jpg') center 30% / cover no-repeat;
}
.hero-overlay { position: absolute; inset: 0; background: radial-gradient(circle at 50% 120%, rgba(0,0,0,.3), transparent 55%); }
.hero-grid {
  position: relative; z-index: 2; padding-top: 84px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
}
.hero-copy { max-width: 560px; }
.hero h1 { margin-bottom: .3em; }
.hero .accent { color: var(--teal-2); }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.92); margin-bottom: 1.8rem; }

/* Download block: QR + store badges */
.download { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.qr { display: flex; align-items: center; gap: 12px; }
.qr img { width: 96px; height: 96px; border-radius: 12px; background: #fff; padding: 7px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.qr span { font-size: .82rem; font-weight: 700; color: rgba(255,255,255,.9); line-height: 1.25; }
.download .store-badges { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.store-badge {
  background: #000; color: #fff; border: 1px solid rgba(255,255,255,.28);
  border-radius: 11px; padding: 8px 16px; display: inline-flex; align-items: center; gap: 11px;
  transition: transform .15s ease, background .15s ease;
}
.store-badge:hover { transform: translateY(-2px); background: #111; }
.store-badge.soon { opacity: .5; cursor: default; }
.store-badge.soon:hover { transform: none; background: #000; }
.store-badge svg { width: 22px; height: 22px; fill: #fff; flex: none; }
.store-badge small { display: block; font-size: .6rem; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; opacity: .85; }
.store-badge b { display: block; font-size: 1.02rem; font-weight: 700; line-height: 1.12; margin-top: -1px; }

/* Real-screenshot phone device */
.device {
  width: 264px; border-radius: 40px; padding: 11px; flex: none;
  background: linear-gradient(155deg, #16293a, #0a1a26);
  box-shadow: 0 34px 80px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.07);
}
.device img { display: block; width: 100%; border-radius: 30px; }

/* Hero: two overlapping phones for depth */
.hero-phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 580px; }
.hero-phones .device { position: absolute; }
.hero-phones .device.back  { transform: translateX(74px) translateY(26px) rotate(6deg) scale(.9); opacity: .92; }
.hero-phones .device.front { transform: translateX(-46px) rotate(-3deg); z-index: 2; }
.hero-wave {
  position: absolute; bottom: -1px; left: 0; right: 0; height: 90px; z-index: 1;
  background: var(--white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0 60 C 280 110 520 0 760 30 C 1020 62 1240 20 1440 50 L1440 90 L0 90 Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / cover;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath d='M0 60 C 280 110 520 0 760 30 C 1020 62 1240 20 1440 50 L1440 90 L0 90 Z' fill='%23000'/%3E%3C/svg%3E") no-repeat center / cover;
}

/* ── Metrics ── */
.metrics-section { padding: 56px 0; background: var(--navy); color: #fff; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.metric-num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: #fff; }
.metric-label { font-size: .9rem; color: rgba(255,255,255,.8); font-weight: 600; }

/* ── About (two-column with photo) ── */
.about-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.about-photo img {
  width: 100%; height: 100%; max-height: 480px; object-fit: cover;
  border-radius: var(--radius); box-shadow: 0 24px 56px rgba(10,42,67,.20);
}

/* ── How it works ── */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 42px; }
.how-step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px 28px 30px; text-align: center;
}
.how-icon {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(25,167,160,.12); display: flex; align-items: center; justify-content: center;
}
.how-icon svg {
  width: 32px; height: 32px; fill: none; stroke: var(--navy);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.how-step h3 { margin-bottom: .35em; }
.how-n { color: var(--teal); font-weight: 800; }
.how-step p { color: var(--muted); margin: 0; font-size: .98rem; }

/* ── Log types ── */
.logtypes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 42px; }
.logtype-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 24px 28px; text-align: center;
}
.logtype-icon {
  width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.logtype-icon svg { width: 30px; height: 30px; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.logtype-card h3 { margin-bottom: .35em; }
.logtype-card p { color: var(--muted); margin: 0; font-size: .94rem; }
.lt-sighting .logtype-icon { background: rgba(43,140,255,.12); }  .lt-sighting .logtype-icon svg { stroke: #2b8cff; }
.lt-catch    .logtype-icon { background: rgba(232,137,59,.14); }  .lt-catch    .logtype-icon svg { stroke: #e8893b; }
.lt-alert    .logtype-icon { background: rgba(226,67,78,.12); }   .lt-alert    .logtype-icon svg { stroke: #e2434e; }
.lt-project  .logtype-icon { background: rgba(25,167,160,.14); }  .lt-project  .logtype-icon svg { stroke: #19a7a0; }

/* ── Latest sightings ── */
.sightings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 42px; }
.sighting-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease;
}
.sighting-card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(10,42,67,.14); }
.sighting-media { aspect-ratio: 4 / 3; background: #0e3a5c; position: relative; overflow: hidden; }
.sighting-media img, .sighting-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.sighting-chip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 999px; color: #fff; background: #2b8cff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.sighting-card.t-catch .sighting-chip { background: #e8893b; }
.sighting-card.t-project .sighting-chip { background: #19a7a0; }
.sighting-body { padding: 14px 16px 16px; }
.sighting-user { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.sighting-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.sighting-avatar-fallback {
  background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
}
.sighting-meta { min-width: 0; }
.sighting-meta b { display: block; color: var(--navy); font-size: .9rem; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sighting-meta span { color: var(--muted); font-size: .76rem; }
.sighting-species { margin: 0 0 4px; font-size: 1.02rem; color: var(--navy); }
.sighting-notes {
  margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sighting-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 20px 0; }

/* ── Map ── */
.map-section { padding-bottom: 0; }
.map-head { margin-bottom: 34px; }
.map-wrap { position: relative; }
#mapbox { width: 100%; height: 600px; background: #0e3a5c; }
.map-legend {
  position: absolute; bottom: 18px; left: 18px; z-index: 3;
  background: rgba(255,255,255,.95); border-radius: 12px; padding: 10px 14px;
  display: flex; gap: 16px; flex-wrap: wrap; font-size: .82rem; font-weight: 600; color: var(--navy);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.dot-sighting { background: #2b8cff; }
.dot-catch    { background: #e8893b; }
.dot-report   { background: #e2434e; }
.dot-project  { background: #19a7a0; }
.map-status {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  background: rgba(10,42,67,.85); color: #fff; font-size: .8rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
}
.mar-popup .mapboxgl-popup-content { font-family: 'Montserrat', sans-serif; border-radius: 12px; padding: 12px 14px; }
.mar-popup h4 { margin: 0 0 2px; font-size: .95rem; color: var(--navy); }
.mar-popup p  { margin: 0; font-size: .8rem; color: var(--muted); }

/* ── Get the app ── */
.get-section { background: linear-gradient(160deg, var(--navy) 0%, #07475f 100%); color: #fff; }
.get-section h2 { color: #fff; }
.get-section .body { color: rgba(255,255,255,.85); }
.get-inner { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.get-copy { max-width: 460px; }
.store-badges { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.get-device { width: 248px; }

/* ── Tournaments (photo band) ── */
.tournament-section {
  position: relative; color: #fff;
  background-size: cover; background-position: center; background-color: var(--navy);
}
.tournament-overlay { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(10,42,67,.9), rgba(7,71,95,.82)); }
.tournament-content { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; text-align: center; }
.tournament-section h2 { color: #fff; }
.tournament-section .body { color: rgba(255,255,255,.9); }
.tournament-intro .btn { margin-top: 10px; }
.tournament-form {
  background: #fff; border-radius: var(--radius); padding: 30px; margin: 34px auto 0; max-width: 620px;
  text-align: left; box-shadow: 0 26px 64px rgba(0,0,0,.38);
  animation: tournamentReveal .4s ease both;
}
.tournament-form-title { margin: 0 0 18px; color: var(--navy); }
@keyframes tournamentReveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; color: var(--navy); font-size: .9rem; margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 500; font-size: .82rem; }
.tournament-form input, .tournament-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
}
.tournament-form input:focus, .tournament-form textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(25,167,160,.15);
}
.tournament-form textarea { resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.species-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px 14px; }
.species-checks label {
  display: flex; align-items: center; gap: 7px; margin: 0; cursor: pointer;
  font-weight: 500; font-size: .9rem; color: var(--ink);
}
.species-checks input { width: auto; accent-color: var(--teal); }
.tournament-form .btn { margin-top: 8px; border: none; cursor: pointer; font-family: inherit; font-size: 1rem; }
.form-status { margin: 12px 0 0; font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok  { color: var(--teal); }
.form-status.err { color: #e2434e; }

/* ── Footer ── */
footer { background: #06212f; color: #cdd8e0; padding: 48px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.footer-logo { height: 30px; width: auto; display: block; filter: brightness(0) invert(1); margin-bottom: 10px; }
.footer-tag { color: #8fa3b1; margin: 4px 0 0; font-size: .9rem; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: #cdd8e0; font-weight: 600; font-size: .92rem; }
.footer-links a:hover { color: var(--teal-2); }
.footer-copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: #7e93a2; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .metrics { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
  .hero { min-height: 0; padding: 40px 0 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; padding-top: 96px; }
  .hero-copy { max-width: none; margin: 0 auto; }
  .download { justify-content: center; }
  .download .store-badges { align-items: center; }
  .hero-phones { min-height: 0; }
  .hero-phones .device.back { display: none; }
  .hero-phones .device.front { position: relative; transform: rotate(-2deg); }
  .how-grid { grid-template-columns: 1fr; gap: 34px; }
  .logtypes-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { order: -1; }
  .about-photo img { max-height: 340px; }
  .sightings-grid { grid-template-columns: repeat(2, 1fr); }
  .get-inner { flex-direction: column; text-align: center; }
  .get-copy { max-width: none; }
  .store-badges { justify-content: center; }
}
@media (max-width: 680px) {
  .nav-links a:not(.btn) { display: none; }
  .logtypes-grid { grid-template-columns: repeat(2, 1fr); }
  .sightings-grid { grid-template-columns: 1fr; }
  .species-checks { grid-template-columns: repeat(2, 1fr); }
  .row2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  #mapbox { height: 460px; }
}
