/* SoCal Beach Foundation — shared styles */
:root {
  --ink: #0f2c3d;
  --ink-soft: #3d5564;
  --red: #d7191f;
  --red-dark: #b01217;
  --gold: #f5b21b;
  --sand: #f1e7d6;
  --sand-deep: #e4d3b6;
  --paper: #ffffff;
  --line: rgba(15, 44, 61, 0.14);

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 9vw, 6.5rem); }
h2 { font-size: clamp(2.4rem, 5.5vw, 3.75rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.measure { max-width: 64ch; }
.lede { font-size: clamp(1.125rem, 2vw, 1.3rem); line-height: 1.6; }

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

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.02em;
  padding: 0.7rem 1.5rem 0.75rem; border-radius: 4px; text-decoration: none;
  border: 2px solid transparent; transition: background-color 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ffc43d; }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #1b4258; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(1.4) blur(8px);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { width: 92px; height: auto; }
.brand span {
  font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1; max-width: 9em;
}

.nav-toggle {
  display: none; background: none; border: 2px solid var(--ink); border-radius: 4px;
  font: 700 0.95rem var(--body); color: var(--ink); padding: 0.45rem 0.8rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  display: block; padding: 0.5rem 0.75rem; font-weight: 600; font-size: 0.98rem; text-decoration: none; border-radius: 4px;
}
.site-nav a:hover { background: var(--sand); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.site-nav .nav-cta a { background: var(--red); color: #fff; margin-left: 0.5rem; padding-inline: 1.1rem; }
.site-nav .nav-cta a:hover { background: var(--red-dark); }

@media (max-width: 920px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1.25rem; gap: 0; }
  .site-nav a { padding: 0.85rem 0.25rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: 0.85rem; }
  .site-nav .nav-cta a { margin: 1rem 0 0; text-align: center; border-radius: 4px; border: 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero-photo { position: absolute; inset: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,44,61,0.15) 0%, rgba(15,44,61,0.35) 45%, rgba(15,44,61,0.88) 100%);
}
.hero-body { position: relative; padding: clamp(9rem, 26vw, 17rem) 0 clamp(2.5rem, 6vw, 4rem); }
.hero h1 { max-width: 12em; text-shadow: 0 2px 24px rgba(0,0,0,0.3); }
.hero p { max-width: 42ch; font-size: clamp(1.1rem, 2vw, 1.3rem); margin-bottom: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Net tape: the band along the top of a beach net */
.net-tape {
  position: relative; height: 22px; background: var(--red);
  border-top: 3px solid #fff; border-bottom: 3px solid #fff;
}
.net-tape::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 0;
  border-top: 2px dashed rgba(255,255,255,0.75); transform: translateY(-50%);
}
.net-mesh {
  height: 34px;
  background:
    repeating-linear-gradient(45deg, transparent 0 10px, rgba(15,44,61,0.22) 10px 11px),
    repeating-linear-gradient(-45deg, transparent 0 10px, rgba(15,44,61,0.22) 10px 11px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent);
          mask-image: linear-gradient(180deg, #000, transparent);
}

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-sand { background: var(--sand); }
.section-ink { background: var(--ink); color: #fff; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head p { color: var(--ink-soft); max-width: 60ch; }
.section-ink .section-head p { color: rgba(255,255,255,0.8); }

.mission { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.mission h2 { position: sticky; top: 110px; }
@media (max-width: 820px) { .mission { grid-template-columns: 1fr; } .mission h2 { position: static; } }

/* Pillars: 2x2 cards */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 2rem); counter-reset: pillar; }
.pillar {
  display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,44,61,0.06), 0 8px 24px rgba(15,44,61,0.06); counter-increment: pillar;
}
.pillar-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--sand-deep); }
.pillar-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.pillar:hover .pillar-media img { transform: scale(1.03); }
.pillar-media.is-logos { background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: clamp(1rem, 3vw, 1.75rem); }
.pillar-logos { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(0.9rem, 2.5vw, 1.5rem) clamp(1rem, 3vw, 2rem); }
.pillar-logos li { flex: 0 0 calc(33.333% - 1.5rem); display: flex; justify-content: center; }
.pillar-logos a { display: block; transition: transform 0.15s; }
.pillar-logos a:hover { transform: scale(1.05); }
.pillar:hover .pillar-media .pillar-logos img { transform: none; }
.pillar-media .pillar-logos img { width: auto; height: auto; max-width: 100%; max-height: 64px; object-fit: contain; }
.pillar-body { display: flex; flex-direction: column; flex: 1; padding: clamp(1.25rem, 3vw, 1.75rem); border-top: 5px solid var(--gold); }
.pillar-body::before {
  content: counter(pillar, decimal-leading-zero); font-family: var(--display); font-weight: 800;
  font-size: 1.1rem; letter-spacing: 0.08em; color: var(--red); margin-bottom: 0.35rem;
}
.pillar h3 { margin-bottom: 0.5em; }
.pillar p { color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar-media .pillar-logos img { max-height: 52px; }
}

.pillar .pillar-link { margin-top: auto; padding-top: 1rem; font-weight: 700; color: var(--ink); }
.pillar-link a { text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.pillar-link a::after { content: " \2192"; }

/* Stats band */
.stats-band { background: var(--ink); color: #fff; padding: clamp(2.5rem, 6vw, 3.5rem) 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat strong { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; color: var(--gold); }
.stat span { display: block; margin-top: 0.4rem; font-weight: 600; color: rgba(255,255,255,0.85); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; } }

/* Sponsorship packages */
.packages { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.75rem); align-items: stretch; }
.package { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-top: 6px solid var(--gold); border-radius: 6px; padding: 1.75rem 1.5rem; }
.package.is-featured { border-top-color: var(--red); box-shadow: 0 10px 30px rgba(15,44,61,0.12); }
.package h3 { margin-bottom: 0.2em; }
.package .price { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; margin: 0.25rem 0 0.35rem; }
.package .price-note { font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); margin-bottom: 1.25rem; }
.package ul { margin: 0 0 1.5rem; padding-left: 1.2rem; color: var(--ink-soft); display: grid; gap: 0.5rem; }
.package .btn { margin-top: auto; }
.package-tag { align-self: flex-start; background: var(--red); color: #fff; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.2rem 0.6rem; border-radius: 3px; margin-bottom: 0.75rem; }
@media (max-width: 860px) { .packages { grid-template-columns: 1fr; } }

/* Partner logos */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.partner {
  display: flex; align-items: center; justify-content: center; height: 120px; padding: 1rem 1.25rem;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; transition: border-color 0.15s, box-shadow 0.15s;
}
a.partner:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(15,44,61,0.1); }
.partner.is-dark { background: #000; border-color: #000; }
.partner img { display: block; max-width: 100%; max-height: 84px; width: auto; height: auto; object-fit: contain; }
.partners-cta { margin-top: 1.75rem; color: var(--ink-soft); }
@media (max-width: 520px) { .partners { grid-template-columns: repeat(2, 1fr); } .partner { height: 96px; padding: 0.75rem; } .partner img { max-height: 64px; } }

/* Tournament schedule */
.schedule { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.75rem); }
.schedule-year { border: 1px solid var(--line); border-top: 6px solid var(--red); border-radius: 6px; padding: 1.5rem; }
.schedule-year h3 { font-size: 2.4rem; margin-bottom: 0.5rem; }
.schedule-year ul { list-style: none; margin: 0; padding: 0; }
.schedule-year li { padding: 0.55rem 0; border-top: 1px solid var(--line); font-weight: 600; }
@media (max-width: 760px) { .schedule { grid-template-columns: 1fr; } }

/* Featured event photos (home page) */
.instagram-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.instagram-head h2, .instagram-head p { margin-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--sand-deep); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.photo-grid a:hover img { transform: scale(1.04); }
@media (max-width: 600px) { .photo-grid { grid-template-columns: repeat(2, 1fr); } }

/* Donate band */
.donate-band { background: var(--red); color: #fff; padding: clamp(3rem, 7vw, 4.5rem) 0; }
.donate-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.donate-inner h2 { margin: 0; max-width: 14em; }
.donate-inner p { margin: 0.5rem 0 0; max-width: 46ch; color: rgba(255,255,255,0.92); }

/* Photo strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #fff; }
.strip a { display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.strip img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.strip a:hover img { transform: scale(1.04); }
@media (max-width: 700px) { .strip { grid-template-columns: repeat(2, 1fr); } }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(1.5rem, 3vw, 2.25rem); }
.person img {
  width: 140px; height: 140px; object-fit: cover; object-position: center 25%; border-radius: 50%;
  border: 4px solid var(--gold); margin-bottom: 1rem; background: var(--sand-deep);
}
.person h3 { margin-bottom: 0.15em; }
.person .role { font-weight: 700; color: var(--red); margin-bottom: 0.75rem; font-size: 0.98rem; }
.person p { color: var(--ink-soft); font-size: 1rem; }
.person-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.95rem; font-weight: 600; }
.person-links a { text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Connect list */
.connect { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.18); }
.connect a { display: block; padding: 1.4rem 1.5rem; background: var(--ink); text-decoration: none; transition: background-color 0.15s; }
.connect a:hover { background: #17394d; }
.connect strong { display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 800; line-height: 1; margin-bottom: 0.3rem; }
.connect span { color: rgba(255,255,255,0.75); font-size: 0.95rem; }

@media (max-width: 820px) { .connect { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .connect { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--sand); padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); }
.page-head p { color: var(--ink-soft); }

/* About */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split figure { margin: 0; border-radius: 6px; overflow: hidden; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* Gallery */
.event-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.event-nav a { padding: 0.45rem 0.9rem; border: 2px solid var(--ink); border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.event-nav a:hover { background: var(--ink); color: #fff; }
.event { padding: clamp(2.5rem, 6vw, 4rem) 0; scroll-margin-top: 90px; }
.event + .event { border-top: 1px solid var(--line); }
.event-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.event-head h2 { margin: 0; }
.event-head span { color: var(--ink-soft); font-weight: 600; }
.grid-photos { columns: 3 260px; column-gap: 8px; }
.grid-photos a { display: block; margin-bottom: 8px; break-inside: avoid; border-radius: 4px; overflow: hidden; background: var(--sand); }
.grid-photos img { width: 100%; transition: opacity 0.2s; }
.grid-photos a:hover img { opacity: 0.88; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(8, 22, 31, 0.94);
  display: none; align-items: center; justify-content: center; padding: 3.5rem 4rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 4px; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,0.12); color: #fff; border: 0; border-radius: 50%;
  width: 48px; height: 48px; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,0.25); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1rem; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.75); font-size: 0.9rem; }
@media (max-width: 600px) { .lightbox { padding: 4rem 0.5rem; } .lb-prev, .lb-next { top: auto; bottom: 0.75rem; transform: none; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.contact-card { border: 1px solid var(--line); border-top: 6px solid var(--gold); border-radius: 6px; padding: 1.5rem; }
.contact-card h3 { margin-bottom: 0.4em; }
.contact-card p { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.85); padding: clamp(3rem, 6vw, 4rem) 0 2rem; font-size: 0.98rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font-size: 1.5rem; color: #fff; margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer a { color: #fff; text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 3px; }
.site-footer a:hover { text-decoration-color: var(--gold); }
.footer-logo { width: 120px; margin-bottom: 1rem; }
.footer-base { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 2.5rem; padding-top: 1.5rem; font-size: 0.88rem; color: rgba(255,255,255,0.6); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
