/* Denville PAL Softball — shared stylesheet */

:root {
  --color-navy: #0b2545;
  --color-navy-light: #1a3c6e;
  --color-navy-dark: #081b33;
  --color-red: #c8102e;
  --color-red-dark: #9c0c23;
  --color-gold: #f2c230;
  --color-cream: #f7f5ef;
  --color-white: #ffffff;
  --color-gray-900: #1c2430;
  --color-gray-700: #3f4a5a;
  --color-gray-500: #6b7686;
  --color-gray-200: #e4e6ea;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-gray-900);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

a {
  color: var(--color-red);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 44px;
  width: auto;
  background: var(--color-white);
  border-radius: 8px;
  padding: 3px 5px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-white);
  border-radius: 1px;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  display: inline-block;
  color: var(--color-white);
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.98rem;
  padding: 0.35rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--color-gold);
}

.primary-nav a[aria-current="page"] {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: var(--color-white);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 48%, var(--color-gold) 125%);
}

/* Subtle stitched-seam accent pulled from the softball motif, done in pure CSS
   so no binary image asset is required. See images/README.md to swap this
   section for a real photo later. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    120deg,
    rgba(200, 16, 46, 0.35) 0px,
    rgba(200, 16, 46, 0.35) 2px,
    transparent 2px,
    transparent 34px
  );
  opacity: 0.5;
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 27, 51, 0.92) 0%, rgba(8, 27, 51, 0.35) 65%, rgba(8, 27, 51, 0.15) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-gold);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.01em;
}

.hero-home {
  min-height: 62vh;
}

.hero-home h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.hero-home p.hero-sub {
  max-width: 46ch;
  font-size: 1.1rem;
  margin: 1rem 0 1.75rem;
  color: var(--color-gray-200);
}

.hero-page {
  min-height: 230px;
}

.hero-page h1 {
  font-size: clamp(2.1rem, 4.5vw, 3rem);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  border-radius: 0.35rem;
  padding: 0.85rem 1.4rem;
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-red-dark);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--color-white);
  color: var(--color-navy);
}

.btn-disabled {
  opacity: 0.8;
  cursor: default;
  pointer-events: none;
}

.btn-disabled:hover,
.btn-disabled:focus-visible {
  background: var(--color-red);
}

/* ---------- Main content ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4rem;
}

h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-navy);
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
}

h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--color-navy);
  font-size: 1.3rem;
  margin: 1.75rem 0 0.5rem;
}

p {
  color: var(--color-gray-700);
  margin: 0 0 1rem;
}

.page-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.75rem;
  align-items: start;
}

.content-card {
  background: var(--color-white);
  border-radius: 0.6rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(11, 37, 69, 0.08), 0 8px 24px rgba(11, 37, 69, 0.06);
}

.placeholder-note {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-gray-500);
  border-left: 3px solid var(--color-gold);
  padding-left: 0.6rem;
}

/* ---------- Sponsor grid ---------- */

.sponsor-grid {
  margin-top: 1.5rem;
}

.sponsor-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--color-gray-200);
}

.sponsor-row:first-child {
  border-top: none;
}

.sponsor-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sponsor-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.sponsor-item a:hover,
.sponsor-item a:focus-visible {
  opacity: 0.8;
}

.sponsor-item img {
  max-width: 100%;
  max-height: 140px;
  width: auto;
  height: auto;
}

@media (max-width: 640px) {
  .sponsor-row {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

/* ---------- Sidebar CTA card ---------- */

.cta-card {
  position: sticky;
  top: 5.5rem;
  background: var(--color-navy);
  color: var(--color-white);
  border-left: 6px solid var(--color-gold);
  border-radius: 0.6rem;
  padding: 1.85rem;
  box-shadow: 0 8px 24px rgba(11, 37, 69, 0.18);
}

.cta-card h2 {
  color: var(--color-white);
  font-size: 1.4rem;
}

.cta-card p {
  color: var(--color-gray-200);
}

.cta-card .email-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--color-gold);
  font-weight: 600;
  text-decoration: none;
}

.cta-card .email-link:hover {
  text-decoration: underline;
}

.cta-card .btn {
  width: 100%;
}

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

.site-footer {
  background: var(--color-navy-dark);
  color: var(--color-gray-200);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.footer-inner h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gold);
  font-size: 1rem;
  margin: 0 0 0.85rem;
}

.footer-inner p,
.footer-inner a {
  color: var(--color-gray-200);
  font-size: 0.92rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.4rem;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: var(--color-gray-500);
}

/* ---------- 404 page ---------- */

.error-content {
  text-align: center;
  padding: 3rem 1.5rem;
}

/* ---------- Mobile ---------- */

@media (max-width: 860px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .cta-card {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .primary-nav.is-open {
    display: block;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .primary-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .primary-nav a {
    display: block;
    padding: 0.6rem 0.1rem;
  }
}
