/* Mountain Valley Baseball Club — mvbaseball.org */

:root {
  --cream: #FAF7F2;
  --navy: #113352;
  --navy-deep: #0C2740;
  --red: #C9272C;
  --red-deep: #A81E23;
  --stone: #E6E3DC;
  --line: #C9C6BE;
  --white: #FFFFFF;
  --display: "Montserrat", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --body: "Figtree", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 14px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  font-weight: 500;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-style: italic;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--navy); color: var(--white);
  padding: 10px 16px; border-radius: 8px; z-index: 100;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  border-bottom: 4px solid var(--navy);
  position: sticky; top: 0; z-index: 50;
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding-top: 12px; padding-bottom: 10px;
}

.brand {
  display: inline-flex; flex-direction: column; align-items: center;
  text-decoration: none; line-height: 1;
}
.brand img { width: 176px; }
.brand-sub {
  font-family: var(--display); font-weight: 800; font-size: 0.72rem;
  letter-spacing: 0.34em; margin: 7px 0 0 0.34em;
}
.brand-star { width: 15px; height: 15px; margin-top: 3px; fill: var(--red); }

.nav { display: flex; gap: 6px; }
.nav a {
  font-family: var(--display); font-weight: 700; font-size: 1.02rem;
  text-decoration: none; padding: 10px 16px; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 2px;
  height: 4px; background: var(--red); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--navy); border-radius: 10px;
  width: 46px; height: 46px; padding: 0; cursor: pointer; color: var(--navy);
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ---------- Shared pieces ---------- */

.page-head { padding: 44px 0 8px; }
.page-title { font-size: clamp(2.4rem, 6vw, 3.6rem); display: inline-block; }
.page-title::after {
  content: ""; display: block; width: 46%; min-width: 120px; height: 6px;
  background: var(--red); border-radius: 3px; margin-top: 10px;
}

.section { padding: 44px 0; }
.section-tight { padding: 28px 0; }

.rule-title {
  display: flex; align-items: center; gap: 24px;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem); text-align: center;
}
.rule-title::before, .rule-title::after {
  content: ""; flex: 1; height: 4px; background: var(--red); border-radius: 2px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-family: var(--display); font-weight: 800; font-style: italic;
  text-transform: uppercase; text-decoration: none; letter-spacing: 0.01em;
  font-size: 1.25rem; line-height: 1;
  padding: 18px 40px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--red); color: var(--white);
  box-shadow: 0 3px 0 var(--red-deep);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--red-deep); transform: translateY(-1px); box-shadow: 0 4px 0 #8a181c; }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn svg { width: 18px; height: 18px; }
.btn-ghost {
  background: transparent; color: var(--navy);
  box-shadow: inset 0 0 0 3px var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); box-shadow: inset 0 0 0 3px var(--navy); }

.star { fill: var(--red); }

/* ---------- Home ---------- */

.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero-photo {
  width: 100%; height: clamp(200px, 27vw, 440px);
  object-fit: cover; object-position: 50% 30%;
}
.hero-logo {
  position: absolute; left: 50%; top: calc(42% - 30px); transform: translate(-50%, -50%);
  width: clamp(170px, 23vw, 350px); height: auto;
}

.home-intro { text-align: center; padding: 28px 0 24px; }
.home-intro h1 { font-size: clamp(2.1rem, 6vw, 4rem); }
.home-intro h1 span { color: var(--red); }
.star-rule {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 18px auto 20px; max-width: 560px;
}
.star-rule::before, .star-rule::after {
  content: ""; flex: 1; height: 4px; background: var(--red); border-radius: 2px;
}
.star-rule svg { width: 34px; height: 34px; }
.tagline {
  font-family: var(--display); font-style: italic; font-weight: 600;
  font-size: clamp(1.15rem, 2.6vw, 1.7rem); line-height: 1.3;
  max-width: 30em; margin: 0 auto; text-wrap: balance;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 32px; }

.facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin: 0; padding: 0; list-style: none;
}
.fact {
  background: var(--white); border: 2px solid var(--navy); border-radius: var(--radius);
  padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 6px;
}
.fact .label {
  font-family: var(--display); font-weight: 800; font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--red);
}
.fact h2 { font-size: 1.55rem; }
.fact p { font-size: 1.02rem; }
.fact a {
  margin-top: auto; padding-top: 10px; font-family: var(--display); font-weight: 700;
  font-size: 0.98rem; text-decoration-color: var(--red); text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.fact a:hover { color: var(--red); }

/* ---------- About ---------- */

.about-lead {
  display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center;
  padding: 36px 0 44px;
}
.about-lead .page-title { margin-bottom: 22px; }
.about-lead p { font-size: 1.2rem; }
.about-lead img {
  width: 100%; border-radius: var(--radius); aspect-ratio: 12 / 5; object-fit: cover;
}

.mission {
  background: var(--navy); color: var(--white); border-radius: 6px;
  display: grid; grid-template-columns: auto 1fr; align-items: center;
}
.mission h2 { font-size: clamp(2rem, 4vw, 2.7rem); padding: 30px 40px; text-align: center; }
.mission p {
  border-left: 4px solid var(--red); padding: 4px 40px 4px 30px; margin: 26px 0;
  font-size: 1.12rem;
}

.serve { text-align: center; }
.serve h2 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); margin-bottom: 8px; }

.teams {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 30px;
}
.team { text-align: center; padding: 4px 24px 8px; }
.team + .team { border-left: 3px solid var(--line); }
.team-tag {
  display: inline-flex; font-family: var(--display); font-style: italic; font-weight: 800;
  line-height: 1; filter: drop-shadow(0 1px 0 rgba(17, 51, 82, .08));
}
.team-tag b, .team-tag span { display: block; padding: 12px 40px; }
.team-tag b {
  background: var(--navy); color: var(--white); font-size: 2.5rem; font-weight: 800;
  clip-path: polygon(22% 0, 100% 0, 100% 100%, 0 100%);
  padding-left: 62px; padding-right: 28px;
}
.team-tag span {
  background: var(--stone); font-size: 1.7rem; align-self: stretch;
  display: flex; align-items: center; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%);
  padding-left: 30px; padding-right: 62px; margin-left: -1px;
}
.team p {
  font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin-top: 14px;
}

.register { text-align: center; padding: 36px 0 12px; }
.register .btn { font-size: 1.6rem; padding: 22px 64px; }

.leadership {
  border: 3px solid var(--navy); border-radius: 18px; background: var(--white);
  display: grid; grid-template-columns: auto repeat(4, 1fr); align-items: center;
  padding: 20px 8px 20px 28px;
}
.leadership h2 {
  font-size: 1.9rem; padding-right: 26px; border-right: 4px solid var(--red);
}
.leadership dl { margin: 0; display: contents; }
.leadership .role { text-align: center; padding: 6px 18px; border-left: 2px solid var(--line); }
.leadership .role:first-of-type { border-left: 0; }
.leadership dt { font-family: var(--display); font-weight: 800; font-size: 1.05rem; }
.leadership dd { margin: 2px 0 0; font-size: 1.08rem; }

/* ---------- Club Information ---------- */

.info-grid {
  display: grid; grid-template-columns: 1.85fr 1fr; gap: 0 44px; align-items: stretch;
  padding-top: 28px;
}
.info-grid { position: relative; }
.info-grid::after {
  content: ""; position: absolute; top: 28px; bottom: 0; width: 3px; background: var(--navy);
  left: calc((100% - 44px) * 0.6491 + 21px);
}

.card {
  background: var(--white); border: 2px solid var(--line); border-radius: 18px; overflow: hidden;
}
.card-head {
  background: var(--navy); color: var(--white); padding: 14px 16px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.card-head h2 { font-size: 1.75rem; }

.cal .card-head { justify-content: space-between; padding: 10px 14px; }
.cal .card-head h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.cal-btn {
  background: none; border: 0; color: var(--white); cursor: pointer;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  transition: background .15s ease;
}
.cal-btn:hover { background: rgba(255, 255, 255, .16); }
.cal-btn svg { width: 22px; height: 22px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-dow {
  background: #DDE3EA; font-family: var(--display); font-style: italic; font-weight: 700;
  text-align: center; padding: 9px 0; font-size: 1rem;
}
.cal-day {
  min-height: 62px; padding: 6px 10px; border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; position: relative;
}
.cal-day:nth-child(7n + 1) { border-left: 0; }
.cal-day.today span {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; margin: -3px 0 0 -6px;
  border: 2px solid var(--navy); border-radius: 50%;
}
.cal-day.has-event { background: #FBEDED; }
.cal-day.has-event span {
  display: inline-grid; place-items: center; min-width: 30px; height: 30px; margin: -3px 0 0 -6px;
  background: var(--red); color: var(--white); border-radius: 50%; border: 0;
}
.cal-day em {
  display: block; font-family: var(--body); font-style: normal; font-weight: 700;
  font-size: 0.72rem; line-height: 1.15; color: var(--red-deep); margin-top: 3px;
}

.events { display: flex; flex-direction: column; }
.events-body { padding: 8px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.event {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 22px 0; border: 0; border-bottom: 2px solid var(--line);
  background: none; text-align: left; cursor: pointer; color: inherit;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.5rem; line-height: 1.15;
}
.event svg { width: 58px; height: 58px; flex: none; }
.event span { border-left: 4px solid var(--red); padding-left: 16px; }
.event span small { display: block; font-size: 1em; font-weight: 600; }
.event:hover span { color: var(--red); }
.events-note {
  font-family: var(--display); font-style: italic; font-weight: 600; font-size: 1.22rem;
  text-align: center; margin: auto 0; padding: 26px 6px 6px; line-height: 1.3;
}

.field {
  display: flex; align-items: center; gap: 22px; justify-content: center; padding: 36px 0 8px;
}
.field svg { width: 54px; height: 66px; flex: none; }
.field div { border-left: 4px solid var(--red); padding-left: 22px; }
.field h2 { font-size: 1.8rem; }
.field a { text-decoration-color: var(--red); text-underline-offset: 4px; }

.links {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px;
  padding: 0; list-style: none;
}
.link-tile {
  display: flex; align-items: center; gap: 18px; height: 100%;
  background: var(--navy); color: var(--white); text-decoration: none;
  border-radius: 16px; padding: 20px 24px;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.3rem; line-height: 1.15;
  transition: background .15s ease, transform .15s ease;
}
.link-tile svg { width: 44px; height: 44px; flex: none; }
a.link-tile:hover { background: var(--navy-deep); transform: translateY(-2px); }
.link-tile small {
  display: block; font-family: var(--body); font-style: normal; font-weight: 600;
  font-size: 0.82rem; opacity: .8; margin-top: 4px;
}

.fineprint {
  display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--line);
  margin-top: 44px; padding-top: 28px;
}
.fineprint p { padding: 4px 44px; }
.fineprint p + p { border-left: 3px solid var(--navy); }

/* ---------- Contact ---------- */

.contact-intro { font-size: 1.25rem; padding: 18px 0 34px; }

.form-card {
  background: var(--white); border: 2px solid var(--navy); border-radius: 24px;
  max-width: 820px; margin: 0 auto; padding: 34px 36px 38px;
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block; font-family: var(--display); font-weight: 800; font-size: 1.08rem; margin-bottom: 8px;
}
.form-row label i { color: var(--red); font-style: normal; margin-left: 4px; }
.form-row input, .form-row textarea {
  width: 100%; font: inherit; color: var(--navy);
  background: var(--white); border: 2px solid var(--navy); border-radius: 10px; padding: 12px 14px;
}
.form-row textarea { min-height: 150px; resize: vertical; }
.form-row input:focus, .form-row textarea:focus {
  outline: 0; border-color: var(--red); box-shadow: 0 0 0 4px rgba(201, 39, 44, .16);
}
.form-actions { text-align: center; margin-top: 30px; }
.form-actions .btn { min-width: min(100%, 440px); border-radius: 999px; }
.form-status {
  text-align: center; font-weight: 700; margin-top: 18px; min-height: 1.5em;
}
.form-status.error { color: var(--red-deep); }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */

.site-footer { margin-top: 56px; padding-bottom: 36px; text-align: center; }
.footer-rule { border-top: 3px solid var(--navy); }
.footer-patch { width: 124px; margin: -1px auto 0; padding-top: 22px; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px; margin: 22px 0 14px; }
.footer-nav a {
  font-family: var(--display); font-weight: 700; font-size: 0.98rem; text-decoration: none; padding: 4px 0;
}
.footer-nav a:hover { color: var(--red); }
.site-footer p { font-size: 0.92rem; opacity: .85; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .leadership { grid-template-columns: 1fr 1fr; padding: 22px; gap: 18px 0; }
  .leadership h2 { grid-column: 1 / -1; border-right: 0; border-bottom: 4px solid var(--red); padding: 0 0 12px; text-align: center; }
  .leadership .role:nth-of-type(odd) { border-left: 0; }
  .team-tag b { font-size: 2rem; padding-left: 48px; }
  .team-tag span { font-size: 1.35rem; padding-right: 48px; }
  .links { grid-template-columns: 1fr; }
  .link-tile br { display: none; }
}

@media (max-width: 820px) {
  body { font-size: 1.06rem; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--cream); border-bottom: 4px solid var(--navy);
    flex-direction: column; gap: 0; padding: 6px 24px 14px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; font-size: 1.15rem; border-top: 1px solid var(--line); }
  .nav a:first-child { border-top: 0; }
  .nav a::after { left: 0; right: auto; width: 56px; bottom: 6px; }
  .brand img { width: 150px; }

  .hero-photo { height: clamp(190px, 44vw, 300px); object-position: 66% 40%; }
  .hero-logo { left: 37%; top: 38%; width: clamp(150px, 42vw, 260px); }
  .facts { grid-template-columns: 1fr; }

  .about-lead { grid-template-columns: 1fr; gap: 26px; padding-bottom: 34px; }
  .mission { grid-template-columns: 1fr; }
  .mission h2 { padding: 26px 24px 0; }
  .mission h2 br { display: none; }
  .mission p { border-left: 0; border-top: 4px solid var(--red); margin: 16px 24px 26px; padding: 16px 0 0; }
  .teams { grid-template-columns: 1fr; gap: 26px; }
  .team + .team { border-left: 0; border-top: 3px solid var(--line); padding-top: 28px; }

  .info-grid { grid-template-columns: 1fr; gap: 24px; }
  .info-grid::after { display: none; }
  .events-note { padding-top: 22px; }
  .fineprint { grid-template-columns: 1fr; gap: 16px; }
  .fineprint p { padding: 0; }
  .fineprint p + p { border-left: 0; border-top: 3px solid var(--navy); padding-top: 16px; }
  .field { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 18px; }
  .btn { width: 100%; padding: 18px 20px; }
  .register .btn { font-size: 1.3rem; padding: 20px; }
  .rule-title { gap: 14px; }
  .cal-day { min-height: 50px; padding: 5px 6px; font-size: .92rem; }
  .cal-dow { font-size: .82rem; }
  .cal-day em { font-size: .6rem; }
  .form-card { padding: 24px 18px 28px; border-radius: 18px; }
  .leadership { grid-template-columns: 1fr; }
  .leadership .role { border-left: 0; }
  .event { font-size: 1.3rem; }
}

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

.team-tag b, .team-tag span { white-space: nowrap; }
@media (max-width: 520px) {
  .team-tag b { font-size: 1.7rem; padding: 10px 20px 10px 40px; }
  .team-tag span { font-size: 1.15rem; padding: 10px 40px 10px 20px; }
}

.contact-direct { text-align: center; max-width: 820px; margin: 26px auto 0; font-size: 1.1rem; }
.contact-direct a {
  font-weight: 700; overflow-wrap: anywhere;
  text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 5px;
}
.contact-direct a:hover { color: var(--red); }
