/* 1. CSS Variables */
:root {
  --bg-night-pitch: #071116;
  --bg-tunnel-slate: #101D24;
  --surface-chalk-white: #F4F2EA;
  --surface-concrete-mist: #DCE2DF;
  --accent-electric-lime: #C7F000;
  --accent-signal-coral: #FF5D4A;
  --accent-match-blue: #3185FC;
  --text-muted: #93A3AA;
  --text-light: #F8FAF7;
  --text-dark: #101A20;
  --border-color: rgba(255,255,255,0.13);
  
  --font-display: 'Impact', 'Oswald', 'Arial Narrow', 'Teko', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  
  --header-height: 70px;
  --container-width: 1400px;
  --transition-speed: 0.3s;
}

/* 2. Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-night-pitch);
  color: var(--text-light);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

button, input, textarea {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

/* 3. Base Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.05em;
}

.text-accent-lime { color: var(--accent-electric-lime); }
.text-accent-coral { color: var(--accent-signal-coral); }
.text-accent-blue { color: var(--accent-match-blue); }
.text-muted { color: var(--text-muted); }

.label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* 4. Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-electric-lime);
  outline-offset: 4px;
}

/* 5. Layout Containers */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

.page-wrapper {
  padding-top: var(--header-height);
  min-height: calc(100vh - 300px);
}

/* 6. Match Control Header */
.match-control-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(16, 29, 36, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.rail-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.rail-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--accent-electric-lime);
  letter-spacing: 0.1em;
}

.rail-indicator::before,
.rail-indicator::after {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--border-color);
}

.desktop-nav {
  display: flex;
  gap: 2rem;
}

.desktop-nav a {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--accent-electric-lime);
}

.nav-trigger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
}

.nav-trigger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-light);
  transition: var(--transition-speed);
}

/* 7. Mobile Navigation */
.mobile-nav-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--header-height));
  background: var(--bg-tunnel-slate);
  z-index: 999;
  transform: translateX(100%);
  transition: transform var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.mobile-nav-overlay.is-open {
  transform: translateX(0);
}

.mobile-nav-overlay a {
  font-family: var(--font-display);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* 8. Hero - Cinematic Three-Lane */
.hero-cinematic {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
  background-color: var(--bg-night-pitch);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(7,17,22,0.2) 0%, rgba(7,17,22,1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-label {
  display: inline-block;
  background: var(--accent-electric-lime);
  color: var(--bg-night-pitch);
  padding: 0.25rem 1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.hero-headline {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.9;
  margin-bottom: 1.5rem;
  max-width: 1000px;
}

.hero-supporting {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-primary {
  background: var(--surface-chalk-white);
  color: var(--text-dark);
}

.btn-primary:hover {
  background: var(--accent-electric-lime);
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--text-light);
}

.static-badge {
  position: absolute;
  top: 8rem;
  right: 2rem;
  border: 1px solid var(--accent-signal-coral);
  padding: 0.5rem 1rem;
  color: var(--accent-signal-coral);
  font-family: var(--font-display);
  font-size: 0.8rem;
  z-index: 2;
  transform: rotate(2deg);
}

/* 9. Snapshot Rail */
.snapshot-rail {
  background: var(--bg-tunnel-slate);
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.snapshot-item h3 {
  font-size: 2rem;
  color: var(--accent-electric-lime);
  margin-bottom: 0.25rem;
}

.snapshot-item p {
  font-family: var(--font-display);
  color: var(--text-muted);
  text-transform: uppercase;
}

/* 10 & 11. Three-Lane Board & Fixture Lanes */
.three-lane-board {
  background: var(--bg-night-pitch);
}

.board-header {
  margin-bottom: 3rem;
  border-bottom: 2px solid var(--text-light);
  padding-bottom: 1rem;
}

.lane-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fixture-lane {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  background: var(--bg-tunnel-slate);
  border: 1px solid var(--border-color);
  padding: 2rem;
  transition: transform var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.fixture-lane:hover {
  border-color: var(--accent-electric-lime);
  transform: translateX(10px);
}

.lane-number {
  font-family: var(--font-display);
  font-size: 4rem;
  color: rgba(255,255,255,0.05);
  position: absolute;
  left: -10px;
  bottom: -20px;
  pointer-events: none;
}

.team-block {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.team-block.right {
  flex-direction: row-reverse;
  text-align: right;
}

.team-flag {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background-color: var(--bg-night-pitch);
}

.team-name {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
}

.vs-marker {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-signal-coral);
  text-align: center;
  padding: 0 2rem;
}

.meta-block {
  text-align: right;
  border-left: 1px solid var(--border-color);
  padding-left: 2rem;
  min-width: 150px;
}

.meta-stage {
  font-family: var(--font-display);
  color: var(--accent-match-blue);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.meta-date {
  font-size: 1rem;
  color: var(--text-muted);
}

.meta-time {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-light);
}

/* 12. Kickoff Sequence */
.kickoff-sequence {
  background: var(--bg-tunnel-slate);
}

.sequence-list {
  display: flex;
  flex-direction: column;
  position: relative;
}

.sequence-list::before {
  content: '';
  position: absolute;
  left: 200px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.sequence-item {
  display: flex;
  padding: 2rem 0;
  position: relative;
}

.sequence-item::before {
  content: '';
  position: absolute;
  left: 196px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: var(--accent-electric-lime);
  border-radius: 50%;
}

.seq-time-col {
  width: 200px;
  padding-right: 2rem;
  text-align: right;
}

.seq-time-col .date { color: var(--text-muted); font-size: 0.9rem; }
.seq-time-col .time { font-family: var(--font-display); font-size: 2rem; color: var(--surface-chalk-white); }

.seq-match-col {
  padding-left: 3rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  color: var(--text-light);
}

/* 13. Six Sides Wall */
.six-sides {
  background: var(--bg-night-pitch);
  overflow: hidden;
}

.wall-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.wall-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 3rem;
  border: 1px solid var(--border-color);
  background: var(--bg-tunnel-slate);
}

.wall-item img {
  width: 40px;
  height: 26px;
}

.wall-item span {
  font-family: var(--font-display);
  font-size: 2rem;
}

/* 14. Fixture Runway (fixtures.html) */
.fixture-chapter {
  min-height: 80vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.chapter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.chapter-reverse .chapter-inner {
  grid-template-columns: 1fr 1fr;
  direction: rtl;
}

.chapter-reverse .chapter-content {
  direction: ltr;
}

.chapter-full {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 6rem 0;
}

.chapter-full .chapter-inner {
  grid-template-columns: 1fr;
  max-width: 1000px;
  margin: 0 auto;
}

.chapter-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.chapter-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chapter-content h2 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  margin-bottom: 2rem;
}

.chapter-meta {
  display: inline-block;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  background: rgba(16,29,36,0.5);
}

.chapter-meta .stage { color: var(--accent-match-blue); font-family: var(--font-display); margin-bottom: 0.5rem; display: block; }
.chapter-meta .date { font-size: 1.2rem; color: var(--text-muted); display: block; }
.chapter-meta .time { font-family: var(--font-display); font-size: 3rem; display: block; line-height: 1; margin-top: 0.5rem;}

/* 15. Match Notes & Article Structure */
.editorial-header {
  text-align: center;
  margin-bottom: 4rem;
}

.editorial-header h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.editorial-content {
  max-width: 800px;
  margin: 0 auto;
}

.note-block {
  background: var(--bg-tunnel-slate);
  padding: 3rem;
  border-left: 4px solid var(--accent-electric-lime);
  margin-bottom: 2rem;
}

.note-block h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--surface-chalk-white);
}

.note-block p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* 16. About */
.about-hero {
  margin-bottom: 4rem;
}

.about-hero img {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h2 { margin: 3rem 0 1rem; font-size: 2.5rem; }
.prose p { margin-bottom: 1.5rem; font-size: 1.1rem; color: var(--text-muted); }
.prose ul { margin-bottom: 1.5rem; padding-left: 2rem; color: var(--text-muted); font-size: 1.1rem;}
.prose li { margin-bottom: 0.5rem; }

/* 17. Contact Form */
.contact-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-tunnel-slate);
  padding: 3rem;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

.form-control {
  width: 100%;
  padding: 1rem;
  background: var(--bg-night-pitch);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  font-family: var(--font-body);
  transition: border-color var(--transition-speed);
}

.form-control:focus {
  border-color: var(--accent-electric-lime);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.form-message {
  margin-top: 1.5rem;
  padding: 1rem;
  display: none;
  font-family: var(--font-display);
}

.form-message.success {
  display: block;
  background: rgba(199, 240, 0, 0.1);
  border: 1px solid var(--accent-electric-lime);
  color: var(--accent-electric-lime);
}

/* 18. Legal Pages */
.legal-page .prose {
  background: var(--bg-tunnel-slate);
  padding: 4rem;
  border: 1px solid var(--border-color);
}

/* 19. Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-tunnel-slate);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateY(100%);
  transition: transform var(--transition-speed) ease-in-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-btn {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-light);
  text-transform: uppercase;
}

.cookie-btn.accept {
  background: var(--surface-chalk-white);
  color: var(--text-dark);
}

/* 20. Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 17, 22, 0.9);
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
}

.cookie-modal-overlay.show {
  display: flex;
}

.cookie-modal {
  background: var(--bg-tunnel-slate);
  border: 1px solid var(--border-color);
  width: 90%;
  max-width: 600px;
  padding: 2rem;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.cookie-option {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cookie-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cookie-option h4 {
  font-size: 1.2rem;
}

.cookie-option p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* 21. Footer */
.site-footer {
  background: var(--bg-tunnel-slate);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  color: var(--surface-chalk-white);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-col p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-col ul a:hover {
  color: var(--accent-electric-lime);
}

address.business-address {
  font-style: normal;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-col address.business-address {
  font-size: 0.9rem;
  margin-top: 1rem;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 22 & 23. Animations & Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 24. 1200px Breakpoint */
@media (max-width: 1200px) {
  .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
  .fixture-lane { grid-template-columns: 1fr auto 1fr; padding: 1.5rem; row-gap: 1.5rem; }
  .meta-block { grid-column: 1 / -1; text-align: left; border-left: none; border-top: 1px solid var(--border-color); padding-left: 0; padding-top: 1rem; display: flex; justify-content: space-between; align-items: flex-end; }
  .team-name { font-size: 2.5rem; }
}

/* 25. 768px Breakpoint */
@media (max-width: 768px) {
  .rail-indicator, .desktop-nav { display: none; }
  .nav-trigger { display: flex; }
  .hero-headline { font-size: 3.5rem; }
  
  .fixture-lane { display: flex; flex-direction: column; align-items: flex-start; }
  .team-block { width: 100%; justify-content: flex-start; }
  .team-block.right { flex-direction: row; text-align: left; }
  .vs-marker { padding: 1rem 0; width: 100%; text-align: left; }
  .meta-block { width: 100%; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  
  .sequence-list::before { left: 20px; }
  .sequence-item { flex-direction: column; padding-left: 50px; }
  .sequence-item::before { left: 16px; top: 30px; }
  .seq-time-col { width: 100%; text-align: left; padding-right: 0; margin-bottom: 0.5rem; }
  .seq-match-col { padding-left: 0; font-size: 1.8rem; }
  
  .chapter-inner, .chapter-reverse .chapter-inner { grid-template-columns: 1fr; gap: 2rem; }
  
  .footer-grid { grid-template-columns: 1fr 1fr; }
  
  .legal-page .prose { padding: 2rem; }
}

/* 26. 480px Breakpoint */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-secondary { width: 100%; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .team-name { font-size: 2rem; }
  .wall-item { width: 100%; justify-content: center; }
  .cookie-actions { flex-direction: column; }
  .cookie-btn { width: 100%; text-align: center; }
}