/* ── CSS Custom Properties (CUSTOMIZE: edit colors/fonts here) ────────────── */
:root {
  --color-primary:   #B31B1B;   /* Cornell Red */
  --color-primary-dark: #8a1515;
  --color-accent:    #FFFFFF;
  --color-dark:      #1a1a1a;
  --color-surface:   #f7f8fa;
  --color-border:    #e5e7eb;
  --color-text:      #1f2328;
  --color-muted:     #57606a;
  --color-win:       #166534;
  --color-loss:      #991b1b;

  --font-base: -apple-system, "Segoe UI", system-ui, sans-serif;
  --radius: 6px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --max-width: 1100px;
  --nav-height: 64px;
}

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-base);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: #fff;
}
img { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Header / Nav ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-dark);
  height: var(--nav-height);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.site-logo {
  height: 40px;
  width: auto;
}
.site-name {
  color: var(--color-accent);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.main-nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: var(--color-primary);
  text-decoration: none;
}

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--color-dark);
  border: 1px solid #333;
  border-radius: var(--radius);
  min-width: 160px;
  box-shadow: var(--shadow);
  z-index: 200;
}
.dropdown-menu li a {
  display: block;
  padding: 0.55rem 1rem;
  color: #ccc;
  font-size: 0.875rem;
}
.dropdown-menu li a:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}
.dropdown.open .dropdown-menu { display: block; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #ccc;
  border-radius: 2px;
  transition: transform 0.2s;
}

/* ── Main ────────────────────────────────────────────────────────────────── */
.site-main {
  min-height: calc(100vh - var(--nav-height) - 80px);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-dark);
  color: #aaa;
  padding: 1.5rem 1.25rem;
  margin-top: 4rem;
  border-top: 3px solid var(--color-primary);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}
.footer-social { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.footer-social a { color: #ccc; font-size: 0.875rem; }
.footer-social a:hover { color: #fff; }
.footer-copy { font-size: 0.8rem; color: #666; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); text-decoration: none; }
.btn-primary   { background: var(--color-primary); color: #fff; }
.btn-secondary { background: transparent; color: #fff; border-color: #fff; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.825rem; }
.btn-danger { background: #991b1b; color: #fff; }

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
  background: var(--color-primary);
  color: #fff;
  padding: 2.5rem 1.25rem 2rem;
  text-align: center;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.page-header .team-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

/* ── Hero (Home) ─────────────────────────────────────────────────────────── */
.hero {
  background: var(--color-dark);
  color: #fff;
  padding: 5rem 1.25rem 4rem;
  text-align: center;
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero-logo {
  height: 120px;
  width: auto;
  margin: 0 auto 1.5rem;
}
.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.hero-tagline {
  font-size: 1.15rem;
  color: #bbb;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── Home cards ──────────────────────────────────────────────────────────── */
.home-sections {
  max-width: var(--max-width);
  margin: 3rem auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.home-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}
.home-card h2 {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
}
.home-links { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.home-links a { font-weight: 500; color: var(--color-text); }
.home-links a:hover { color: var(--color-primary); }

/* ── Content wrapper ─────────────────────────────────────────────────────── */
.content-wrap {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

/* ── Player / Coach cards ────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #ddd;
}
.card-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 2.5rem;
}
.card-body { padding: 0.9rem 1rem; }
.card-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.card-name { font-size: 1rem; font-weight: 700; margin: 0.2rem 0; }
.card-pos  { font-size: 0.8rem; color: var(--color-muted); }

/* Bio panel (expanded) */
.bio-panel {
  display: none;
  padding: 1rem;
  border-top: 1px solid var(--color-border);
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.6;
}
.bio-panel.open { display: block; }
.bio-meta { color: var(--color-muted); margin-bottom: 0.5rem; font-size: 0.8rem; }

/* ── Schedule table ──────────────────────────────────────────────────────── */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}
.schedule-table th {
  background: var(--color-primary);
  color: #fff;
  text-align: left;
  padding: 0.65rem 0.9rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.schedule-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--color-border);
}
.schedule-table tr:hover td { background: var(--color-surface); }
.result-win  { color: var(--color-win);  font-weight: 700; }
.result-loss { color: var(--color-loss); font-weight: 700; }
.upcoming td { color: var(--color-muted); font-style: italic; }
.badge-home { background: #dbeafe; color: #1e40af; }
.badge-away { background: #fef3c7; color: #92400e; }
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Recruit page ────────────────────────────────────────────────────────── */
.recruit-hero {
  background: var(--color-primary);
  color: #fff;
  padding: 3.5rem 1.25rem;
  text-align: center;
}
.recruit-hero h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.recruit-hero p  { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 1.5rem; }
.recruit-body {
  max-width: 800px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}
.recruit-highlights { margin: 1.5rem 0; padding-left: 1.25rem; }
.recruit-highlights li { margin-bottom: 0.5rem; list-style: disc; }
.recruit-form {
  margin-top: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}
.recruit-form h3 { margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.875rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-base);
  font-size: 0.9rem;
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ── Fan page ────────────────────────────────────────────────────────────── */
.fan-section {
  max-width: var(--max-width);
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}
.fan-section h2 {
  font-size: 1.4rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}
.merch-links { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.social-embeds { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.embed-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  min-height: 200px;
}
.embed-box h3 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--color-muted); }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-wrap {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}
.admin-header { margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th {
  background: var(--color-dark);
  color: #fff;
  text-align: left;
  padding: 0.55rem 0.75rem;
}
.admin-table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--color-border); }
.admin-table tr:hover td { background: var(--color-surface); }
.admin-nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.admin-nav a {
  padding: 0.5rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text);
}
.admin-nav a:hover { background: var(--color-primary); color: #fff; text-decoration: none; }
.admin-form { max-width: 600px; }
.admin-form .form-group { margin-bottom: 1.1rem; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-muted   { color: var(--color-muted); }
.text-center  { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-muted);
  font-size: 1rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-dark);
    border-top: 1px solid #333;
    padding: 0.5rem 0 1rem;
  }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; padding: 0 1rem; gap: 0; }
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: block;
    background: transparent;
  }
  .dropdown-menu li a { color: #aaa; }
  .home-sections { grid-template-columns: 1fr; }
  .social-embeds { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
