/* ============================================================
   New Mexico Soccer Foundation — Site Styles
   Brand: coral #E25B4B on the New Mexico state shape
   ============================================================ */

:root {
  --coral: #E25B4B;
  --coral-dark: #C8463A;
  --coral-soft: #FBEEEB;
  --green: #1F3D33;
  --green-soft: #EAF1ED;
  --ink: #1A1A1A;
  --body: #3A3A3A;
  --muted: #6B6B6B;
  --cream: #FAF8F5;
  --white: #FFFFFF;
  --line: #ECE7E1;
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.08);
  --shadow-lg: 0 24px 60px rgba(26, 26, 26, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1160px;
  --font-head: "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--body);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--coral);
  margin: 0 0 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .98rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(226,91,75,.28); }
.btn-primary:hover { background: var(--coral-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, .9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 44px; width: auto; }
.brand span {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.05;
  max-width: 180px;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  font-size: .96rem;
}
.nav-links a:hover { color: var(--coral); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 40px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.7rem); }
.hero .lead {
  font-size: 1.18rem;
  color: var(--body);
  max-width: 30ch;
  margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  left: -18px;
  bottom: 26px;
  background: var(--coral);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.hero-badge strong { font-family: var(--font-head); font-size: 1.5rem; display: block; line-height: 1; }
.hero-badge small { font-size: .82rem; opacity: .92; }

/* ---------- Section base ---------- */
.section { padding: 84px 0; }
.section-head { max-width: 620px; margin: 0 auto 46px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.section-head p { font-size: 1.08rem; color: var(--muted); margin: 0; }

/* ---------- Events ---------- */
.events { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}
.event-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-date {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .82rem;
  margin-bottom: 12px;
}
.event-card h3 { font-size: 1.3rem; margin-bottom: 8px; }
.event-meta { font-size: .9rem; color: var(--muted); margin-bottom: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.event-card p.desc { margin: 0 0 20px; flex: 1; }
.event-card .btn { align-self: flex-start; }
.events-empty {
  text-align: center;
  color: var(--muted);
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 50px 24px;
}

/* ---------- Stats ---------- */
.stats { background: var(--green); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.stat { text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); color: #fff; line-height: 1; }
.stat .num span { color: var(--coral); }
.stat .label { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; margin: 12px 0 8px; }
.stat p { color: rgba(255,255,255,.75); font-size: .95rem; margin: 0 auto; max-width: 28ch; }

/* ---------- Mission / Values / Vision ---------- */
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.pillar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.pillar .icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--coral-soft); color: var(--coral);
  display: grid; place-items: center; margin-bottom: 18px;
}
.pillar .icon svg { width: 26px; height: 26px; }
.pillar h3 { font-size: 1.3rem; }
.pillar p { margin: 0; color: var(--body); }

/* ---------- Partners ---------- */
.partners { text-align: center; }
.partners-logos { display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; align-items: center; margin-top: 10px; }
.partners-logos img { height: 90px; width: auto; opacity: .95; filter: grayscale(0); transition: transform .2s ease; }
.partners-logos a:hover img { transform: scale(1.04); }

/* ---------- About / Board ---------- */
.about { background: var(--white); }
.founders {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  background: var(--coral-soft);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 56px;
}
.founders img { border-radius: var(--radius); width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.founders h3 { font-size: 1.6rem; margin-bottom: 4px; }
.founders .role { color: var(--coral); font-family: var(--font-head); font-weight: 600; margin-bottom: 14px; }

.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.member {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.member-photo { aspect-ratio: 4/5; overflow: hidden; background: var(--green-soft); }
.member-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.member-photo.monogram { display: grid; place-items: center; background: linear-gradient(135deg, var(--green), #2c5446); }
.member-photo.monogram.alt { background: linear-gradient(135deg, var(--coral), var(--coral-dark)); }
.member-photo.monogram span { font-family: var(--font-head); font-weight: 700; color: #fff; font-size: 3.6rem; letter-spacing: .03em; }
.member-body { padding: 22px 24px 26px; }
.member-body h3 { font-size: 1.25rem; margin-bottom: 2px; }
.member-body .role { color: var(--coral); font-family: var(--font-head); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.member-body p { margin: 0; font-size: .94rem; color: var(--body); }
details.bio { margin-top: 8px; }
details.bio summary { cursor: pointer; color: var(--coral); font-weight: 600; font-size: .9rem; list-style: none; }
details.bio summary::-webkit-details-marker { display: none; }
details.bio summary::after { content: " Read more →"; }
details.bio[open] summary::after { content: " Show less ↑"; }

/* ---------- Donate CTA ---------- */
.cta-band {
  background: var(--coral);
  color: #fff;
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.cta-band p { color: rgba(255,255,255,.9); font-size: 1.1rem; max-width: 46ch; margin: 0 auto 26px; }
.cta-band .btn-primary { background: #fff; color: var(--coral); box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--ink); color: #fff; }

/* ---------- Email signup (shared) ---------- */
.signup-form { display: flex; flex-direction: column; gap: 12px; }
.signup-form .row { display: flex; gap: 10px; }
.signup-form .row > * { flex: 1; }
.signup-form input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  transition: border .15s ease, box-shadow .15s ease;
}
.signup-form input:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(226,91,75,.15); }
.signup-form .btn { width: 100%; }
.signup-msg { font-size: .88rem; margin: 4px 0 0; min-height: 1em; }
.signup-msg.success { color: var(--green); }
.signup-msg.error { color: var(--coral-dark); }

/* ---------- Email popup modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 18, 16, .62);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius);
  max-width: 460px; width: 100%;
  padding: 44px 38px 38px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px) scale(.98);
  transition: transform .25s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: 0; cursor: pointer;
  font-size: 1.8rem; line-height: 1; color: var(--muted);
  width: 36px; height: 36px; border-radius: 50%;
  transition: background .15s ease, color .15s ease;
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal img.modal-logo { height: 60px; width: auto; margin: 0 auto 16px; }
.modal h3 { font-size: 1.6rem; margin-bottom: 8px; }
.modal > p { color: var(--body); margin: 0 0 22px; font-size: 1rem; }
.modal .signup-form input { background: #fff; }
.modal .signup-msg { text-align: center; }

/* ---------- Footer signup band ---------- */
.footer-signup {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  padding-bottom: 40px; margin-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-signup h3 { color: #fff; font-size: 1.5rem; margin-bottom: 6px; }
.footer-signup p { color: rgba(255,255,255,.7); margin: 0; font-size: .98rem; }
.footer-signup .signup-form input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.footer-signup .signup-form input::placeholder { color: rgba(255,255,255,.5); }
.footer-signup .signup-form input:focus { background: rgba(255,255,255,.14); border-color: var(--coral); }
.footer-signup .signup-msg { color: rgba(255,255,255,.85); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 56px 0 30px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer img.flogo { height: 50px; margin-bottom: 14px; }
.site-footer h4 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,.8); display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 22px; font-size: .85rem; color: rgba(255,255,255,.55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Apply page ---------- */
.apply-hero { background: var(--green); color: #fff; padding: 60px 0; text-align: center; }
.apply-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.apply-hero p { color: rgba(255,255,255,.85); max-width: 52ch; margin: 0 auto; font-size: 1.08rem; }

.form-wrap { max-width: 760px; margin: -40px auto 0; padding: 0 24px 90px; position: relative; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px; }
.form-section-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.15rem; margin: 34px 0 6px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section-title:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; color: var(--ink); font-size: .95rem; margin-bottom: 7px; }
.field .es { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.field .req { color: var(--coral); }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=number],
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cream);
  transition: border .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(226,91,75,.15); background: #fff;
}
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--coral); flex-shrink: 0; }
.check label { font-family: var(--font-body); font-weight: 500; color: var(--body); font-size: .92rem; }
.consent-box { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 22px; margin: 10px 0 24px; font-size: .9rem; color: var(--body); }
.consent-box h4 { font-size: 1rem; margin-bottom: 8px; }
.form-actions { margin-top: 14px; }
.form-actions .btn { width: 100%; padding: 16px; font-size: 1.05rem; }
.form-note { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 16px; }

.form-message { border-radius: var(--radius-sm); padding: 18px 20px; margin-bottom: 24px; font-weight: 500; display: none; }
.form-message.success { display: block; background: var(--green-soft); color: var(--green); border: 1px solid #bcd6c8; }
.form-message.error { display: block; background: var(--coral-soft); color: var(--coral-dark); border: 1px solid #f1c4bd; }

.closed-card { text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 60px 40px; }
.closed-card h2 { font-size: 1.8rem; }
.closed-card p { color: var(--muted); max-width: 44ch; margin: 0 auto 24px; }

.loading-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.spinner { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--coral); border-radius: 50%; margin: 0 auto 16px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-media { order: -1; }
  .hero .lead { max-width: none; }
  .stats .container { grid-template-columns: 1fr; gap: 34px; }
  .pillars-grid { grid-template-columns: 1fr; }
  .founders { grid-template-columns: 1fr; text-align: center; }
  .founders img { max-width: 240px; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav-links, .nav-cta .btn-outline { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 74px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: 24px; align-items: flex-start;
  }
  .form-card, .closed-card { padding: 28px; }
  .footer-signup { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 520px) {
  .section { padding: 60px 0; }
  .cta-band { padding: 40px 24px; }
  .modal { padding: 40px 24px 30px; }
  .signup-form .row { flex-direction: column; }
}
