/* Paso del Norte Beach Volleyball Association
   Palette is taken from the badge logo (public/assets/img/logo.png). */

:root {
  --navy: #14284b;
  --cream: #faf3e3;
  --sand: #f4e4be;
  --tan: #e9c98a;
  --terra: #c4683a;
  --terra-deep: #a8532a; /* darker terracotta: white text passes contrast on this */
  --brown: #8e4224;
  --blue: #2e6db4;
  --ink: #14284b;
  --muted: #4d5b78;
  --line: #e6d6ad;
  --card: #fffdf7;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Mountain skyline dividers: the front layer matches the section below. */
  --mtn-sand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpolygon fill='%23c4683a' fill-opacity='.35' points='0,140 0,86 110,52 210,78 330,18 450,72 590,36 750,84 900,26 1050,70 1190,40 1310,78 1440,50 1440,140'/%3E%3Cpolygon fill='%23f4e4be' points='0,140 0,112 170,82 310,106 470,70 630,106 790,86 950,112 1110,76 1270,106 1440,92 1440,140'/%3E%3C/svg%3E");
  --mtn-cream: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpolygon fill='%23c4683a' fill-opacity='.35' points='0,140 0,86 110,52 210,78 330,18 450,72 590,36 750,84 900,26 1050,70 1190,40 1310,78 1440,50 1440,140'/%3E%3Cpolygon fill='%23faf3e3' points='0,140 0,112 170,82 310,106 470,70 630,106 790,86 950,112 1110,76 1270,106 1440,92 1440,140'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
}
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brown); }
a:hover { color: var(--terra-deep); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.12;
  color: var(--navy);
}
h1, h2 { text-transform: uppercase; letter-spacing: .03em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.4rem; font-weight: 600; letter-spacing: .01em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding-inline: var(--gutter); }
.eyebrow {
  margin: 0 0 .8em;
  font: 500 .9rem/1.2 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--terra-deep);
}
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }

.skip { position: absolute; left: -999px; top: 0; z-index: 50; padding: 10px 18px; background: var(--navy); color: var(--cream); }
.skip:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.6em;
  border: 2px solid transparent; border-radius: 999px;
  font: 600 1rem/1 var(--display);
  letter-spacing: .09em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--terra-deep); color: #fff; }
.btn-primary:hover { background: var(--brown); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--navy); }
.btn-light:hover { background: var(--sand); color: var(--navy); }
.btn-ghost-light { border-color: var(--cream); color: var(--cream); }
.btn-ghost-light:hover { background: var(--cream); color: var(--navy); }
.btn-sm { padding: .65em 1.3em; font-size: .92rem; }
.btn-lg { padding: 1.05em 2.4em; font-size: 1.2rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--cream); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { width: 52px; height: 52px; }
.brand-text { display: flex; flex-direction: column; font-family: var(--display); text-transform: uppercase; line-height: 1.15; }
.brand-text strong { font-size: 1.2rem; letter-spacing: .13em; font-weight: 700; }
.brand-text span { font-size: .68rem; letter-spacing: .15em; font-weight: 500; color: var(--brown); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  padding: 6px 0; border-bottom: 2px solid transparent;
  font: 500 1rem/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--navy);
}
.nav a:not(.btn):hover, .nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--terra); }
.menu-toggle { display: none; position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after {
  content: ""; position: absolute; width: 24px; height: 2.5px; border-radius: 2px; background: var(--navy); transition: transform .2s, background .2s;
}
.menu-toggle .bars { left: 10px; top: 21px; }
.menu-toggle .bars::before { left: 0; top: -8px; }
.menu-toggle .bars::after { left: 0; top: 8px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px var(--gutter) 22px; background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 24px rgba(20, 40, 75, .12);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 18px; }
}
@media (max-width: 420px) {
  .brand-text span { display: none; }
}

/* Home hero */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 84px) 0 clamp(120px, 17vw, 210px); }
.hero::after, .page-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: clamp(80px, 12vw, 150px);
  background: var(--mtn-sand) bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.badge {
  justify-self: center; width: min(100%, 400px); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden; box-shadow: 0 22px 50px rgba(20, 40, 75, .28);
}
.badge img { width: 100%; height: 100%; transform: scale(1.065); }
@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .badge { order: -1; width: min(62%, 240px); }
}

/* Sub-page hero */
.page-hero { position: relative; background: var(--sand); padding: clamp(40px, 6vw, 72px) 0 clamp(90px, 11vw, 140px); }
.page-hero::after { background-image: var(--mtn-cream); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: .3em; }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-sand { background: var(--sand); }
.section-navy { background: var(--navy); color: var(--cream); }
.section-navy h2, .section-navy h3 { color: var(--cream); }
.section-navy p { color: #e8dfc6; }
.section-head { max-width: 46em; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-head h2 + p { margin-top: .8em; }
.center { text-align: center; margin-inline: auto; }
.center .btn-row { justify-content: center; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--muted); }
.card-accent { border-top: 6px solid var(--terra); }
.card-accent.blue { border-top-color: var(--blue); }
.card-accent.tan { border-top-color: var(--tan); }
.card-link { display: inline-block; margin-top: 14px; font-weight: 700; }

.mission { max-width: 40em; margin-inline: auto; text-align: center; }
.mission p { font-size: 1.3rem; line-height: 1.5; }

/* Where to play */
.facility { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.facility img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; background: var(--sand); }
.facility-body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 22px 24px 26px; }
.facility-body h3 { margin: 0; }
.facility-body p { margin: 0; }
.tag {
  align-self: flex-start; padding: .25em .85em; border-radius: 999px;
  background: var(--sand); color: var(--brown);
  font: 600 .75rem/1.4 var(--display); letter-spacing: .13em; text-transform: uppercase;
}
.meta { font-size: .92rem; color: var(--muted); }
.facility-body .card-link { margin-top: auto; padding-top: 6px; }
.facility-note { border-style: dashed; border-color: var(--tan); background: transparent; display: grid; place-content: center; text-align: center; gap: 12px; padding: 32px; }
.note { margin-top: 28px; font-size: .95rem; color: var(--muted); }

/* Events */
.events { display: grid; gap: 20px; }
.event { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: center; }
.date { padding: 14px 8px; border-radius: 12px; background: var(--navy); color: var(--cream); text-align: center; font-family: var(--display); line-height: 1; }
.date .mo { display: block; font-size: .95rem; letter-spacing: .18em; text-transform: uppercase; color: var(--tan); }
.date .day { display: block; margin: 6px 0; font-size: 2.7rem; font-weight: 700; }
.date .dow { display: block; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; }
.event h3 { margin: .25em 0 .15em; }
.event p { margin: 0; }
.event .where { color: var(--brown); font-weight: 700; }
@media (max-width: 480px) {
  .event { grid-template-columns: 76px 1fr; gap: 16px; }
  .date .day { font-size: 2.1rem; }
}
.calendar-slot {
  display: grid; place-items: center; min-height: 440px; padding: 32px; text-align: center;
  border: 2px dashed var(--tan); border-radius: var(--radius); background: var(--card); color: var(--muted);
}
.calendar-slot svg { width: 56px; height: 56px; margin: 0 auto 12px; color: var(--terra); }
.calendar-slot h3 { margin-bottom: .3em; }
.calendar-slot:has(iframe) { display: block; padding: 0; border: 0; background: none; }
.calendar-slot iframe { width: 100%; height: 700px; border: 0; border-radius: var(--radius); }

/* Donate */
.goal-card h3 { margin-bottom: .3em; }
.goals { list-style: none; margin: 18px 0 0; padding: 0; }
.goals li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.goals .what { font-weight: 700; color: var(--navy); }
.cost { text-align: right; font: 600 1.7rem/1 var(--display); color: var(--brown); white-space: nowrap; }
.cost small { display: block; margin-bottom: 4px; font: 500 .68rem/1 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.total { margin-top: 28px; padding: 18px 24px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.total strong { font: 600 1.15rem var(--display); letter-spacing: .08em; text-transform: uppercase; }

/* Footer */
.site-footer { background: #0e1d38; color: var(--cream); padding: 56px 0 28px; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--tan); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.5fr 1fr 1fr; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-brand img { width: 64px; height: 64px; border-radius: 50%; }
.footer-brand strong { font: 700 1.25rem/1.15 var(--display); letter-spacing: .12em; text-transform: uppercase; }
.footer-about { max-width: 30em; color: #d9cfb4; font-size: .98rem; }
.footer-title { margin: 0 0 12px; font: 600 .9rem/1 var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--tan); }
.footer-links { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.socials { display: flex; gap: 12px; margin-top: 18px; }
.social { display: grid; place-items: center; width: 44px; height: 44px; border: 1.5px solid rgba(250, 243, 227, .4); border-radius: 50%; }
.social:hover { background: var(--cream); color: var(--navy) !important; border-color: var(--cream); }
.social svg { width: 21px; height: 21px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(250, 243, 227, .2); font-size: .9rem; color: #d9cfb4; }

/* 501(c)(3) statement dialog + page */
.statement-dialog {
  width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .4);
}
.statement-dialog::backdrop { background: rgba(20, 40, 75, .65); }
.dialog-inner { position: relative; max-height: calc(100vh - 48px); padding: 36px 32px 32px; overflow: auto; }
.dialog-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--sand); color: var(--navy);
  font: 400 1.7rem/1 var(--body); cursor: pointer;
}
.dialog-close:hover { background: var(--tan); }
.statement h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: .6em; text-transform: none; } /* keep the lowercase "c" in 501(c)(3) */
.statement-dialog .statement h1 { font-size: 1.7rem; padding-right: 40px; }
.statement p { color: var(--ink); }
.prose { max-width: 44em; }
.todo { padding: 0 .3em; border-radius: 4px; background: #fff2a8; font-weight: 700; color: #5a4400; }

.center-page { min-height: 52vh; display: grid; place-content: center; text-align: center; gap: 16px; padding: 64px var(--gutter); }
.center-page .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
