/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pitch: #1b5e20;
  --pitch-bright: #2e7d32;
  --pitch-dark: #0d3310;
  --ink: #0f0f0f;
  --white: #f5f5f0;
  --warm-white: #fafaf5;
  --muted: #5a5a55;
  --rule: #d4d4cf;
  --accent: #1b5e20;
  --card-bg: #ffffff;
  --shadow: rgba(0,0,0,0.08);
  --header-bg: rgba(245,245,240,0.92);
}

@media (prefers-color-scheme: dark) {
  :root {
    --pitch: #2e7d32;
    --pitch-bright: #43a047;
    --pitch-dark: #1b5e20;
    --ink: #e8e8e0;
    --white: #121210;
    --warm-white: #1a1a16;
    --muted: #8a8a80;
    --rule: #2a2a25;
    --accent: #66bb6a;
    --card-bg: #1e1e1a;
    --shadow: rgba(0,0,0,0.3);
    --header-bg: rgba(18,18,16,0.92);
  }
}

html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--pitch); color: #fff;
  padding: 0.5rem 1rem; z-index: 200;
  font-weight: 600; text-decoration: none;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus { top: 0; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--pitch);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex; align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 900; font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--pitch);
  text-decoration: none;
}
nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600; font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.03em;
}
nav a:hover, nav a:focus-visible {
  background: var(--pitch);
  color: #fff;
}

/* ===== HERO ===== */
.hero {
  max-width: 1100px; margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 3rem;
  min-height: 70vh;
  position: relative;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block;
  background: var(--pitch);
  color: #fff;
  font-weight: 800; font-size: 0.75rem;
  letter-spacing: 0.2em;
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--ink);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 45ch;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--pitch);
  color: #fff;
  border: 2px solid var(--pitch);
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--pitch-bright);
  border-color: var(--pitch-bright);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(27,94,32,0.3);
}
.btn-large { padding: 1rem 2.5rem; font-size: 1rem; }

/* ===== FOOTBALL ANIMATION ===== */
.hero-ball {
  flex-shrink: 0;
  width: 280px; height: 280px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ball-svg {
  width: 200px; height: 200px;
  animation: ball-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(27,94,32,0.25));
}
.ball-shadow {
  width: 120px; height: 12px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.15) 0%, transparent 70%);
  border-radius: 50%;
  position: absolute; bottom: 20px;
  animation: shadow-pulse 2s ease-in-out infinite;
}

@keyframes ball-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-18px) rotate(8deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-10px) rotate(-5deg); }
}
@keyframes shadow-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  25% { transform: scale(0.8); opacity: 0.3; }
  50% { transform: scale(1); opacity: 0.6; }
  75% { transform: scale(0.9); opacity: 0.4; }
}

/* ===== SECTIONS ===== */
.section {
  max-width: 1100px; margin: 0 auto;
  padding: 4rem 1.5rem;
  border-top: 2px solid var(--rule);
}
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.num {
  font-size: 1rem;
  font-weight: 900;
  color: var(--pitch);
  background: var(--pitch-dark);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-text p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  max-width: 55ch;
}
.stats-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--pitch);
  line-height: 1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
}
.about-card {
  background: var(--pitch);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
  pointer-events: none;
}
.card-inner {
  position: relative;
  z-index: 1;
}
.card-quote {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  font-style: italic;
}

/* ===== PHILOSOPHY ===== */
.phil-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.phil-card {
  background: var(--card-bg);
  border: 2px solid var(--rule);
  border-radius: 8px;
  padding: 1.75rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.phil-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--pitch);
}
.phil-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.phil-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.phil-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pitch);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem; top: 0.35rem;
  width: 14px; height: 14px;
  background: var(--pitch);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--pitch);
}
.tl-year {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--pitch);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.tl-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.tl-content p {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 55ch;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.contact-info p {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}
.contact-email a, .contact-tel a {
  color: var(--pitch);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.contact-email a:hover, .contact-tel a:hover {
  border-bottom-color: var(--pitch);
}
.cta-text {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
footer {
  border-top: 3px solid var(--pitch);
  margin-top: 2rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
footer .muted { color: var(--muted); font-size: 0.85rem; }
footer .attribution { font-size: 0.75rem; opacity: 0.7; }
footer .attribution a { color: var(--muted); text-decoration: underline; text-underline-offset: 0.15em; }

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fade-up 0.7s ease forwards;
}
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }
.fade-in:nth-child(5) { animation-delay: 0.4s; }

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FOCUS ===== */
:focus-visible { outline: 3px solid var(--pitch); outline-offset: 2px; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; animation: none; }
  .ball-svg { animation: none; }
  .ball-shadow { animation: none; }
}

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  background: var(--card-bg);
  border: 2px solid var(--rule);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--pitch);
}
.blog-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pitch);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.blog-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.blog-card-title a {
  color: var(--ink);
  text-decoration: none;
}
.blog-card-title a:hover {
  color: var(--pitch);
  text-decoration: underline;
}
.blog-excerpt {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}
.blog-readmore {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--pitch);
  text-decoration: none;
}
.blog-readmore:hover {
  text-decoration: underline;
}

/* ===== SINGLE POST ===== */
.back-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pitch);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.back-link:hover {
  text-decoration: underline;
}
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--rule);
}
.post-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.post-excerpt {
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 55ch;
}
.post-body {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 65ch;
}
.post-body p {
  margin-bottom: 1rem;
}
.post-body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 2rem 0 0.75rem;
}
.post-body h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 1.5rem 0 0.5rem;
}
.post-body ul, .post-body ol {
  margin: 0 0 1rem 1.5rem;
}
.post-body li {
  margin-bottom: 0.3rem;
}
.post-body blockquote {
  border-left: 4px solid var(--pitch);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--muted);
}
.post-body code {
  background: var(--rule);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}
.post-body pre {
  background: var(--card-bg);
  border: 2px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-body pre code {
  background: none;
  padding: 0;
}

/* ===== ADMIN LOGIN ===== */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.admin-login-card {
  background: var(--card-bg);
  border: 2px solid var(--rule);
  border-radius: 8px;
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
}
.admin-login-title {
  font-size: 1.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-align: center;
}
.admin-login-card label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-login-card input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  border: 2px solid var(--rule);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  margin-bottom: 1rem;
  font-family: inherit;
}
.admin-login-card input:focus {
  outline: none;
  border-color: var(--pitch);
}
.admin-login-card .btn {
  width: 100%;
  text-align: center;
}
.admin-error {
  color: #c62828;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-dashboard {
  min-height: 100vh;
  background: var(--white);
}
.admin-header {
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--pitch);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.admin-header h1 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--pitch);
}
.admin-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.admin-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.admin-form-section h2,
.admin-list-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--rule);
}
.admin-form label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-form input,
.admin-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  border: 2px solid var(--rule);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  margin-bottom: 1rem;
  font-family: inherit;
}
.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  border-color: var(--pitch);
}
.admin-form textarea {
  resize: vertical;
  min-height: 120px;
}
.admin-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 1rem;
  cursor: pointer;
}
.admin-checkbox input {
  width: auto;
  margin: 0;
}
.admin-form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.admin-post-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border: 2px solid var(--rule);
  border-radius: 6px;
  gap: 0.75rem;
}
.admin-post-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.admin-post-info strong {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-post-meta {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-draft {
  background: #ff8f00;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-post-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* ===== FOCUS ===== */
:focus-visible { outline: 3px solid var(--pitch); outline-offset: 2px; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; animation: none; }
  .ball-svg { animation: none; }
  .ball-shadow { animation: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding: 2rem 1.5rem 3rem;
    min-height: auto;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ball { width: 200px; height: 200px; }
  .ball-svg { width: 140px; height: 140px; }
  .ball-shadow { width: 80px; bottom: 30px; }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .phil-grid {
    grid-template-columns: 1fr;
  }
  .stats-row {
    justify-content: center;
  }
  .section-title {
    font-size: 1.4rem;
  }
  .header-inner {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }
  nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .timeline { padding-left: 1.5rem; }
  .timeline-item::before { left: -1.85rem; width: 12px; height: 12px; }

  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-header {
    flex-direction: column;
    text-align: center;
  }
  .admin-header-actions {
    justify-content: center;
  }
  .admin-post-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-post-actions {
    align-self: flex-end;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
