/* ===========================================================
   Tees River Rescue — site stylesheet
   Design language: marine instrument panel meets clean charity site.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700;800&display=swap');

:root{
  --ink:        #2F4760;
  --ink-2:      #1F3245;
  --brand-blue: #006A9D;
  --bar-accent: #FFE099;
  --panel:      #16283A;
  --panel-2:    #1C3349;
  --orange:     #EA6F25;
  --orange-d:   #C95A18;
  --amber:      #FFB23F;
  --foam:       #F7F9F9;
  --foam-dim:   #ECF0F1;
  --slate:      #6B7E91;
  --slate-d:    #3C5269;
  --red:        #C81E2C;
  --line:       rgba(47,71,96,.14);
  --line-dark:  rgba(247,249,249,.14);

  --display: 'Big Shoulders Display', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
  --body: 'Inter', sans-serif;

  --maxw: 1180px;
  --radius: 14px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--body);
  color:var(--ink);
  background:var(--foam);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
section{ position:relative; }

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

h1,h2,h3,h4{
  font-family:var(--display);
  font-weight:800;
  line-height:1.02;
  margin:0 0 .4em;
  letter-spacing:.2px;
}
h1{ font-size:clamp(2.6rem,7vw,5.2rem); text-transform:uppercase; }
h2{ font-size:clamp(2rem,4.4vw,3rem); text-transform:uppercase; }
h3{ font-size:clamp(1.3rem,2.6vw,1.7rem); text-transform:uppercase; }
p{ margin:0 0 1em; color:var(--slate-d); }
.lede{ font-size:1.18rem; color:var(--slate-d); max-width:62ch; }

.eyebrow{
  font-family:var(--mono);
  font-size:.74rem;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--orange);
  display:flex;
  align-items:center;
  gap:.6em;
  margin-bottom:.9em;
}
.eyebrow::before{
  content:"";
  width:18px; height:2px;
  background:var(--orange);
  display:inline-block;
}
.eyebrow.on-dark{
  color:var(--amber);
  /* keeps the text legible where the hero photo is bright (e.g. the sky
     on phones) without changing the brand colour */
  text-shadow:0 2px 4px rgba(6,16,27,.95), 0 0 14px rgba(6,16,27,.7);
}
.eyebrow.on-dark::before{ background:var(--amber); box-shadow:0 1px 3px rgba(6,16,27,.6); }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:.5em;
  font-family:var(--mono);
  font-size:.82rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:.95em 1.5em;
  border-radius:999px;
  border:1.5px solid transparent;
  cursor:pointer;
  transition:transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  font-weight:500;
}
.btn:hover{ transform:translateY(-2px); }
.btn-primary{ background:var(--orange); color:#fff; }
.btn-primary:hover{ background:var(--orange-d); }
.btn-ghost{ border-color:var(--line-dark); color:#fff; }
.btn-ghost:hover{ border-color:#fff; }
.btn-outline{ border-color:var(--ink); color:var(--ink); }
.btn-outline:hover{ background:var(--ink); color:#fff; }
.btn-sm{ padding:.7em 1.2em; font-size:.74rem; }
.btn-emergency{ background:var(--red); color:#fff; }
.btn-emergency:hover{ background:#a3141f; }

/* ---------- utility safety bar ---------- */
.safety-bar{
  background:var(--brand-blue);
  color:#fff;
  font-family:var(--mono);
  font-size:.74rem;
  letter-spacing:.03em;
}
.safety-bar .wrap{
  display:flex; align-items:center; justify-content:space-between;
  gap:1em; padding:8px 24px; flex-wrap:wrap;
}
.safety-bar strong{ color:var(--bar-accent); font-weight:600; }
.safety-bar a{ color:#fff; border-bottom:1px solid var(--bar-accent); }

/* ---------- header ---------- */
header.site{
  position:sticky; top:0; z-index:60;
  background:rgba(247,249,249,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
header.site .wrap{
  display:flex; align-items:center; justify-content:space-between;
  padding-top:12px; padding-bottom:12px; gap:24px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand img{ height:38px; width:auto; }
nav.primary{ display:flex; align-items:center; gap:28px; }
nav.primary a{
  font-family:var(--mono); font-size:.74rem; letter-spacing:.08em;
  text-transform:uppercase; color:var(--slate-d);
  padding:6px 0; border-bottom:2px solid transparent;
  transition:color .15s ease, border-color .15s ease;
}
nav.primary a:hover, nav.primary a.active{ color:var(--orange); border-color:var(--orange); }
.header-cta{ display:flex; align-items:center; gap:14px; }
.nav-toggle{ display:none; }

@media (max-width:920px){
  /* No backdrop-filter on mobile: it turns the header into the containing
     block for fixed descendants (the original menu-behind-hero bug) and
     buys nothing on a small screen. Solid background instead. */
  header.site{ backdrop-filter:none; background:var(--foam); }

  /* Dropdown panel anchored to the sticky header. Positioned absolute
     (not fixed) so no ancestor filter can hijack its containing block,
     and it inherits the header's stacking context — always above the
     hero image. */
  nav.primary{
    z-index:1000;
    position:absolute; top:100%; left:0; right:0;
    background:var(--foam);
    flex-direction:column; align-items:stretch;
    padding:4px 24px 16px; gap:0;
    border-bottom:1px solid var(--line);
    box-shadow:0 28px 44px -28px rgba(8,20,32,.45);
    max-height:calc(100vh - 120px); overflow-y:auto;
    display:none;
  }
  nav.primary.open{ display:flex; }
  nav.primary a{
    font-size:.95rem; padding:14px 2px;
    border-bottom:1px solid var(--line);
  }
  nav.primary a:last-child{ border-bottom-color:transparent; }
  .header-cta .btn-outline{ display:none; }
  .nav-toggle{
    display:flex; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:8px;
  }
  .nav-toggle span{ width:22px; height:2px; background:var(--ink); display:block; transition:transform .2s ease, opacity .2s ease; }
  .nav-toggle.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2){ opacity:0; }
  .nav-toggle.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }
}

/* ---------- hero ---------- */
.hero{
  position:relative; overflow:hidden;
  min-height:54vh; display:flex; align-items:flex-end;
  background-size:cover; background-position:center; background-repeat:no-repeat;
  color:#fff; padding-top:120px;
}
.hero::before{
  content:""; position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg, rgba(8,20,32,.1) 0%, rgba(8,20,32,.38) 55%, rgba(6,16,27,.86) 100%);
}
.hero-inner{ position:relative; z-index:2; padding-bottom:56px; max-width:880px; }
.hero h1{ color:#fff; margin-bottom:.25em; }
.hero h1 span{ color:var(--orange); }
.hero .lede{ color:rgba(247,249,249,.86); margin-bottom:1.6em; }
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; }

.page-hero{
  position:relative; overflow:hidden;
  min-height:46vh; display:flex; align-items:flex-end;
  background-size:cover; background-position:center; background-repeat:no-repeat;
  color:#fff; padding-top:120px;
}
.page-hero::before{
  content:""; position:absolute; inset:0; z-index:1;
  background:linear-gradient(180deg, rgba(10,30,48,.3) 0%, rgba(6,16,27,.92) 100%);
}
.page-hero-inner{ position:relative; z-index:2; padding-bottom:48px; max-width:760px; }
.page-hero h1{ color:#fff; }
.page-hero .lede{ color:rgba(247,249,249,.85); }

/* ---------- instrument console (signature element) ---------- */
.console{
  background:
    radial-gradient(1200px 400px at 10% -20%, rgba(255,178,63,.08), transparent),
    var(--panel);
  border-top:1px solid var(--line-dark);
  border-bottom:1px solid var(--line-dark);
  padding:48px 0 56px;
}
.console-head{ display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:26px; }
.console-head h2{ color:#fff; font-size:clamp(1.5rem,3vw,2rem); margin:0; }
.console-head .updated{ font-family:var(--mono); font-size:.72rem; color:var(--slate); letter-spacing:.06em; }
.gauges{
  display:grid; grid-template-columns:repeat(4,1fr); gap:16px;
}
@media (max-width:980px){ .gauges{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .gauges{ grid-template-columns:1fr; } }

.gauge{
  background:var(--panel-2);
  border:1px solid var(--line-dark);
  border-radius:var(--radius);
  padding:20px 20px 18px;
  position:relative;
  overflow:hidden;
}
.gauge::before{
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg, var(--orange), var(--amber));
  opacity:.85;
}
.gauge-label{
  font-family:var(--mono); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase;
  color:var(--slate); display:flex; align-items:center; gap:8px; margin-bottom:14px;
}
.dot{ width:7px; height:7px; border-radius:50%; background:var(--amber); box-shadow:0 0 8px var(--amber); flex:none; }
.dot.idle{ background:var(--slate); box-shadow:none; }
.gauge-value{
  font-family:var(--mono); font-weight:600; font-size:2.1rem; color:#fff; line-height:1;
  display:flex; align-items:baseline; gap:6px;
}
.gauge-value small{ font-size:1rem; color:var(--slate); }
.gauge-sub{ font-family:var(--mono); font-size:.74rem; color:var(--slate); margin-top:10px; }
.gauge-sub a{ color:var(--amber); border-bottom:1px solid rgba(255,178,63,.4); }
.gauge .btn{ margin-top:14px; }

/* ---------- sections ---------- */
.section{ padding:88px 0; }
.section.tight{ padding:64px 0; }
.section.dark{ background:var(--ink); color:#fff; }
.section.dark p{ color:rgba(247,249,249,.78); }
.section.dim{ background:var(--foam-dim); }
.section-head{ max-width:680px; margin-bottom:48px; }

/* pillars: patrol / search / rescue */
.pillars{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
@media (max-width:880px){ .pillars{ grid-template-columns:1fr; } }
.pillars.cols-4{ grid-template-columns:repeat(4,1fr); }
@media (max-width:1080px){ .pillars.cols-4{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .pillars.cols-4{ grid-template-columns:1fr; } }
.pillar{
  border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:#fff;
  display:flex; flex-direction:column;
}
.pillar figure{ margin:0; aspect-ratio:4/3; overflow:hidden; }
.pillar img{ width:100%; height:100%; object-fit:cover; transition:transform .5s ease; }
.pillar:hover img{ transform:scale(1.05); }
.pillar-body{ padding:24px 24px 28px; }
.pillar-num{ font-family:var(--mono); color:var(--orange); font-size:.78rem; letter-spacing:.1em; }
.pillar h3{ margin:.4em 0 .5em; }

/* stat band */
.stats{ display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line-dark); border:1px solid var(--line-dark); border-radius:var(--radius); overflow:hidden; }
@media (max-width:880px){ .stats{ grid-template-columns:repeat(2,1fr); } }
.stat{ background:var(--panel-2); padding:28px 22px; }
.stat-num{ font-family:var(--display); font-weight:800; font-size:2.3rem; color:#fff; line-height:1; }
.stat-label{ font-family:var(--mono); font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; color:var(--slate); margin-top:8px; }

/* card grid generic */
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:28px; }
@media (max-width:880px){ .grid-3{ grid-template-columns:1fr; } .grid-2{ grid-template-columns:1fr; } }

.card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:26px; }
.card h3{ margin-top:0; }
.card .tag{ font-family:var(--mono); font-size:.7rem; color:var(--orange); letter-spacing:.08em; text-transform:uppercase; margin-bottom:10px; display:block; }

/* split content/image */
.split{ display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:center; }
@media (max-width:880px){ .split{ grid-template-columns:1fr; } }
.split.reverse{ grid-template-columns:.9fr 1.1fr; }
@media (max-width:880px){ .split.reverse{ grid-template-columns:1fr; } }
.split.reverse .split-media{ order:-1; }
@media (max-width:880px){ .split.reverse .split-media{ order:0; } }
.split-media img{ border-radius:var(--radius); width:100%; height:100%; object-fit:cover; aspect-ratio:4/3; }
.split-media.tall img{ aspect-ratio:3/4; }

ul.checklist{ margin:1.2em 0; }
ul.checklist li{
  position:relative; padding-left:1.6em; margin-bottom:.7em; color:var(--slate-d);
}
ul.checklist li::before{
  content:"—"; position:absolute; left:0; color:var(--orange); font-family:var(--mono);
}

.hero-slides{ position:absolute; inset:0; z-index:0; }
.hero-slide{
  position:absolute; inset:0; background-size:cover; background-position:center;
  opacity:0; transition:opacity 1.4s ease;
}
.hero-slide.is-active{ opacity:1; }

/* featured video */
.video-feature{ background:var(--ink); color:#fff; padding:64px 0; }
.video-feature .lede{ color:rgba(247,249,249,.82); }
.video-feature-head{ max-width:760px; margin:0 auto 32px; text-align:center; }
.video-feature-head .eyebrow{ justify-content:center; }
.video-feature-head h2{ color:#fff; }
.form-embed{ max-width:640px; margin:0 auto; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:#fff; }
.form-embed iframe{ width:100%; height:900px; display:block; border:0; }
.form-embed-wide{ max-width:900px; }
@media (max-width:560px){ .form-embed iframe{ height:1100px; } }

.video-wrap{
  max-width:920px; margin:0 auto; border-radius:var(--radius); overflow:hidden;
  background:#000; box-shadow:0 30px 60px -20px rgba(0,0,0,.5);
}
.video-wrap video{ width:100%; display:block; aspect-ratio:16/9; background:#000; }
.video-feature-actions{ display:flex; justify-content:center; margin-top:24px; }
#shareVideoBtn{ min-width:200px; justify-content:center; }

/* donate page */
.tier-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin:1.4em 0; }
@media (max-width:760px){ .tier-row{ grid-template-columns:repeat(2,1fr); } }
.tier{
  display:block; text-align:center; background:var(--panel-2); border:1px solid var(--line-dark);
  border-radius:var(--radius); padding:22px 12px; color:#fff; transition:transform .15s ease, border-color .15s ease;
}
.tier:hover{ transform:translateY(-3px); border-color:var(--amber); }
.tier .amount{ font-family:var(--display); font-weight:800; font-size:1.6rem; display:block; }
.tier .period{ font-family:var(--mono); font-size:.68rem; color:var(--slate); letter-spacing:.06em; text-transform:uppercase; }
.place-list{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px 28px; margin:1em 0 1.6em; }
@media (max-width:600px){ .place-list{ grid-template-columns:1fr; } }
.place-list li{
  font-family:var(--mono); font-size:.86rem; color:var(--slate-d); padding:8px 0;
  border-bottom:1px solid var(--line); list-style:none;
}

/* gallery */
.gallery{ display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:170px; gap:10px; }
.gallery a{ overflow:hidden; border-radius:10px; display:block; }
.gallery img{ width:100%; height:100%; object-fit:cover; transition:transform .4s ease; }
.gallery a:hover img{ transform:scale(1.07); }
.gallery .tall{ grid-row:span 2; }
.gallery .wide{ grid-column:span 2; }
@media (max-width:880px){ .gallery{ grid-template-columns:repeat(2,1fr); grid-auto-rows:140px; } .gallery .wide{ grid-column:span 2; } }

/* training course cards */
.course-card{
  background:var(--panel-2); border:1px solid var(--line-dark); border-radius:var(--radius);
  padding:26px; color:#fff;
}
.course-card .tag{ color:var(--amber); }
.course-card p{ color:rgba(247,249,249,.75); }
.course-meta{ display:flex; gap:14px; flex-wrap:wrap; font-family:var(--mono); font-size:.72rem; color:var(--slate); margin-top:12px; letter-spacing:.05em; text-transform:uppercase; }

.iframe-wrap{
  border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); background:#fff;
}
.iframe-wrap iframe{ width:100%; border:0; display:block; }

/* donate page: one-off + monthly side by side */
.donate-grid{
  display:grid; grid-template-columns:1fr 1.2fr; gap:24px; align-items:stretch;
}
@media (max-width:880px){ .donate-grid{ grid-template-columns:1fr; } }
.donate-col{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  padding:30px 30px 26px; display:flex; flex-direction:column;
}
.donate-col .eyebrow{ margin-bottom:10px; }
.donate-col h3{ font-family:var(--display); font-weight:800; font-size:1.5rem; letter-spacing:.01em; margin-bottom:.35em; }
.donate-col > p{ color:var(--slate-d); font-size:.95rem; margin-bottom:1.2em; }
.donate-widget{ max-width:400px; }
.donate-widget iframe{ width:100%; border:0; display:block; border-radius:8px; }
.donate-col .tier-row{ grid-template-columns:repeat(2,1fr); margin:.2em 0 1em; }
.donate-col .tier{ background:var(--ink); }
.donate-note{ font-size:.82rem; color:var(--slate); margin-top:auto; }

/* CTA banner */
.cta-band{
  background:linear-gradient(120deg, var(--ink) 0%, var(--ink-2) 100%);
  color:#fff; border-radius:var(--radius); padding:48px; text-align:center;
}
.cta-band h2{ color:#fff; }
.cta-band .lede{ color:rgba(247,249,249,.8); margin:0 auto 1.6em; }
.cta-band .hero-actions{ justify-content:center; }

/* footer */
footer.site{ background:var(--ink); color:rgba(247,249,249,.75); padding:64px 0 28px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:36px; margin-bottom:48px; }
@media (max-width:880px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
footer.site h4{ color:#fff; font-size:.78rem; letter-spacing:.1em; font-family:var(--mono); text-transform:uppercase; margin-bottom:1em; }
footer.site a{ display:block; color:rgba(247,249,249,.65); margin-bottom:.6em; font-size:.92rem; }
footer.site a:hover{ color:var(--amber); }
.footer-brand .logo-badge{
  display:inline-block; background:#fff; padding:10px 16px;
  border-radius:10px; margin-bottom:16px; line-height:0;
}
.footer-brand .logo-badge img{ height:28px; width:auto; display:block; }
.footer-bottom{
  border-top:1px solid var(--line-dark); padding-top:24px; display:flex; justify-content:space-between;
  align-items:center; flex-wrap:wrap; gap:12px; font-size:.78rem; color:var(--slate);
}
.footer-bottom a{ display:inline; color:var(--slate); margin:0 8px; }
.social-row{ display:flex; gap:12px; }
.social-row a{
  width:42px; height:42px; border-radius:50%; margin:0;
  background:rgba(247,249,249,.08); border:1px solid var(--line-dark);
  display:flex; align-items:center; justify-content:center;
  transition:background .15s ease, border-color .15s ease, transform .15s ease;
}
.social-row a svg{ width:20px; height:20px; fill:rgba(247,249,249,.85); transition:fill .15s ease; }
.social-row a:hover{ background:var(--amber); border-color:var(--amber); transform:translateY(-2px); }
.social-row a:hover svg{ fill:var(--ink); }

/* badges */
.badge-row{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; margin-top:18px; }
.badge{
  font-family:var(--mono); font-size:.68rem; letter-spacing:.08em; text-transform:uppercase;
  border:1px solid var(--line-dark); color:var(--slate); padding:8px 14px; border-radius:999px;
}

/* ---------- Phone Float Throw (NWSF / Respect The Water) ---------- */
.pft{ text-align:center; }
.pft .section-head{ margin-left:auto; margin-right:auto; }
.pft .eyebrow{ justify-content:center; }
.pft h2 .pft-sep{ color:var(--red); }
.pft-steps{
  display:grid; grid-template-columns:repeat(3,1fr); gap:16px;
  max-width:980px; margin:0 auto;
}
@media (max-width:760px){ .pft-steps{ grid-template-columns:1fr; } }
.pft-step{
  background:var(--panel-2); border:1px solid var(--line-dark);
  border-radius:var(--radius); padding:28px 22px 24px;
}
.pft-icon{
  width:140px; height:140px; margin:0 auto 20px;
  border-radius:50%; background:#fff;
  border:6px solid var(--red);           /* life-ring nod */
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
@media (max-width:760px){ .pft-icon{ width:112px; height:112px; } }
.pft-icon img{ width:64%; height:64%; object-fit:contain; }
.pft-icon.noimg img{ display:none; }
.pft-icon.noimg::after{
  content:attr(data-n);
  font-family:var(--display); font-weight:800; font-size:2.6rem; color:var(--red);
}
.pft-step h3{ color:#fff; margin-bottom:.35em; }
.pft-step h3 strong{ color:var(--amber); }
.pft-step p{ color:rgba(247,249,249,.75); margin:0; font-size:.95rem; }
.pft-warning{
  max-width:980px; margin:18px auto 0;
  font-family:var(--mono); font-size:.8rem; letter-spacing:.04em;
  color:#fff; background:rgba(200,30,44,.18);
  border:1px solid rgba(200,30,44,.5); border-radius:var(--radius);
  padding:14px 18px;
}
.pft-credit{
  margin:22px auto 0; font-size:.82rem; color:var(--slate);
}
.pft-credit a{ color:var(--amber); border-bottom:1px solid rgba(255,178,63,.4); }

/* small-screen polish */
@media (max-width:560px){
  .brand img{ height:32px; }
  .hero{ min-height:50vh; padding-top:96px; }
  .hero-inner{ padding-bottom:40px; }
  .section{ padding:64px 0; }
  .cta-band{ padding:36px 22px; }
  .safety-bar .wrap span:last-child{ display:none; }
}

/* reveal animation */
.reveal{ opacity:1; transform:none; }
.reveal.in{ opacity:1; transform:none; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .pillar img, .gallery img{ transition:none; }
}

:focus-visible{ outline:2px solid var(--orange); outline-offset:2px; }
