@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --night-ink: #111820;
  --deep-navy: #192733;
  --paper-cream: #F1E9DA;
  --warm-ivory: #FAF7F0;
  --electric-azure: #3C8DAD;
  --copper: #C77845;
  --muted-sage: #849B8D;
  --soft-line: #CBD0CA;
  --primary-text: #17222B;
  --light-text: #F7F3EA;

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --nav-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--paper-cream);
  color: var(--primary-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6, .serif-text {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
}

.mono-text {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: var(--copper);
  outline: none;
}

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

/* Layout Utilities */
.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-pad {
  padding: 8rem 0;
}

.bg-night {
  background-color: var(--night-ink);
  color: var(--light-text);
}

.bg-navy {
  background-color: var(--deep-navy);
  color: var(--light-text);
}

.bg-ivory {
  background-color: var(--warm-ivory);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  font-family: var(--font-sans);
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn.primary {
  background-color: var(--copper);
  color: var(--light-text);
}

.btn.primary:hover {
  background-color: var(--electric-azure);
  color: var(--light-text);
}

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

.btn.secondary:hover {
  background-color: var(--light-text);
  color: var(--night-ink);
}

.btn.dark {
  border-color: var(--night-ink);
  color: var(--night-ink);
}
.btn.dark:hover {
  background-color: var(--night-ink);
  color: var(--light-text);
}

/* Header & Nav */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: background-color 0.4s ease, border-bottom 0.4s ease;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text);
}

.masthead.scrolled {
  background-color: var(--night-ink);
  border-bottom: 1px solid var(--deep-navy);
}

.masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
  padding: 0 5%;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  gap: 2.5rem;
}

.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
}

.utility-nav {
  display: flex;
  gap: 1.5rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1rem;
  font-family: var(--font-mono);
  cursor: pointer;
}

/* Mobile Menu Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--night-ink);
  color: var(--light-text);
  z-index: 99;
  display: flex;
  flex-direction: column;
  padding: 120px 5% 2rem;
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateY(0);
}

.mobile-drawer a {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background-image: linear-gradient(to right, rgba(17, 24, 32, 0.9) 0%, rgba(17, 24, 32, 0.4) 50%, rgba(17, 24, 32, 0.1) 100%), url('images/home-stadium-night.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  padding: 10vh 5% 8vh;
  color: var(--light-text);
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero-label {
  color: var(--copper);
  margin-bottom: 1.5rem;
  display: block;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
  color: var(--paper-cream);
  font-weight: 300;
}

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

.hero-index {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2;
  text-align: right;
}

.hero-index-item {
  font-size: 0.75rem;
  color: var(--soft-line);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.hero-index-item:hover {
  opacity: 1;
  color: var(--warm-ivory);
}

/* Flags */
.flag {
  width: 32px;
  height: 22px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: inline-block;
  vertical-align: middle;
}
.bg-night .flag, .bg-navy .flag {
  border-color: rgba(255, 255, 255, 0.2);
}

/* RO16 Section - Asymmetric Layout */
.ro16-section {
  background-color: var(--paper-cream);
  position: relative;
}

.ro16-intro {
  margin-bottom: 5rem;
}

.ro16-number {
  font-family: var(--font-mono);
  font-size: 8rem;
  color: var(--muted-sage);
  opacity: 0.3;
  line-height: 0.8;
  margin-bottom: 1rem;
}

.ro16-eyebrow {
  color: var(--copper);
  margin-bottom: 1rem;
  display: block;
}

.ro16-heading {
  font-size: 3.5rem;
  max-width: 800px;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  gap: 24px;
  grid-auto-flow: dense;
}

.fixture-module {
  background-color: var(--warm-ivory);
  border: 1px solid var(--soft-line);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.fixture-module:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(17, 24, 32, 0.05);
  border-color: var(--muted-sage);
}

.fixture-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  color: var(--muted-sage);
}

.team-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.team-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--night-ink);
}

.vs-divider {
  font-family: var(--font-mono);
  color: var(--soft-line);
  margin: 0.5rem 0 0.5rem 3rem;
  font-size: 0.9rem;
}

.fixture-time {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--soft-line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-text);
}

/* Specific Placements */
.fix-1 { grid-column: 1 / 10; }
.fix-1 .teams-container { display: flex; align-items: center; justify-content: space-between; }
.fix-1 .vs-divider { margin: 0 2rem; }

.fix-2 { grid-column: 11 / 15; grid-row: 1 / 3; }
.fix-2 .team-name { font-size: 1.75rem; }

.fix-3 { grid-column: 5 / 11; }

.editorial-img-wrapper { grid-column: 1 / 5; grid-row: 2 / 4; }
.editorial-img-wrapper img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%); }

.fix-4 { grid-column: 3 / 15; margin-top: 2rem; }
.fix-4 .teams-container { display: flex; align-items: center; justify-content: space-between; }
.fix-4 .vs-divider { margin: 0 2rem; }

/* QF Section */
.qf-section {
  padding-bottom: 10rem;
}

.qf-heading {
  font-size: 4rem;
  text-align: center;
  margin-bottom: 6rem;
}

.qf-band {
  display: flex;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.qf-band:last-child {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.qf-stage {
  flex: 0 0 150px;
  color: var(--electric-azure);
}

.qf-teams {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

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

.qf-team-name {
  font-family: var(--font-serif);
  font-size: 3.5rem;
}

.qf-route-line {
  flex-grow: 1;
  height: 1px;
  background-color: var(--copper);
  opacity: 0.5;
  position: relative;
}

.qf-route-line::after {
  content: 'VS';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--deep-navy);
  padding: 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--soft-line);
}

.qf-meta {
  flex: 0 0 200px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--paper-cream);
}

/* Match Journal Detail Rail */
.journal-rail {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 0;
}

.journal-rail::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background-color: var(--soft-line);
  transform: translateX(-50%);
}

.journal-node {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6rem;
  position: relative;
  width: 100%;
}

.journal-node:last-child {
  margin-bottom: 0;
}

.journal-content {
  width: 45%;
  background-color: var(--warm-ivory);
  padding: 2.5rem;
  border: 1px solid var(--soft-line);
  position: relative;
}

.journal-node.left .journal-content { margin-right: auto; }
.journal-node.right .journal-content { margin-left: auto; }

.journal-time {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  color: var(--night-ink);
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}

.journal-day {
  color: var(--copper);
  margin-bottom: 2rem;
  display: block;
}

.journal-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: var(--night-ink);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 8px var(--paper-cream);
}

/* Context / Editorial Sections */
.context-section {
  background-color: var(--warm-ivory);
  border-top: 1px solid var(--soft-line);
  border-bottom: 1px solid var(--soft-line);
}

.context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.context-text h2 {
  font-size: 3rem;
  margin-bottom: 2rem;
}

.context-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--night-ink);
}

.context-text ul {
  list-style: none;
  margin-top: 2rem;
}

.context-text li {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.context-text li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--copper);
}

.context-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--soft-line);
}

/* Forms */
.contact-form {
  max-width: 700px;
  margin: 0 auto;
  background-color: var(--warm-ivory);
  padding: 4rem;
  border: 1px solid var(--soft-line);
}

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

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--night-ink);
}

.form-control {
  width: 100%;
  padding: 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--soft-line);
  background-color: var(--paper-cream);
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--electric-azure);
}

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

/* Footer */
.site-footer {
  background-color: var(--night-ink);
  color: var(--light-text);
  padding: 6rem 0 3rem;
  border-top: 1px solid var(--deep-navy);
}

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

.footer-brand {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.footer-desc {
  color: var(--soft-line);
  max-width: 400px;
  font-size: 0.9rem;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--copper);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
}

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

.footer-links a {
  color: var(--soft-line);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--warm-ivory);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted-sage);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 5%;
  right: 5%;
  max-width: 800px;
  background-color: var(--deep-navy);
  color: var(--light-text);
  padding: 2rem;
  border: 1px solid var(--electric-azure);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transform: translateY(150%);
  transition: transform 0.5s ease;
}

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

.cookie-text p {
  font-size: 0.9rem;
  color: var(--soft-line);
  margin-bottom: 0.5rem;
}

.cookie-text a {
  text-decoration: underline;
  color: var(--warm-ivory);
}

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

.cookie-actions button {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.3s;
}

.btn-accept { background-color: var(--copper); border-color: var(--copper); color: #fff; }
.btn-accept:hover { background-color: var(--electric-azure); border-color: var(--electric-azure); }
.btn-reject { background-color: transparent; border-color: var(--soft-line); color: var(--light-text); }
.btn-reject:hover { background-color: var(--soft-line); color: var(--night-ink); }
.btn-manage { background-color: transparent; border: none; color: var(--muted-sage); text-decoration: underline; }
.btn-manage:hover { color: var(--light-text); }

/* Standard Content Pages (Terms, Privacy) */
.page-header {
  padding: 12rem 0 6rem;
  background-color: var(--night-ink);
  color: var(--light-text);
  text-align: center;
}

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

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

.legal-content h2 {
  font-size: 2rem;
  margin: 3rem 0 1.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

.legal-content p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .editorial-grid {
    grid-template-columns: repeat(8, 1fr);
  }
  
  .fix-1 { grid-column: 1 / 9; }
  .fix-1 .teams-container { flex-direction: column; align-items: flex-start; }
  .fix-1 .vs-divider { margin: 1rem 0; }
  
  .fix-2 { grid-column: 1 / 5; grid-row: auto; }
  .fix-3 { grid-column: 5 / 9; }
  
  .editorial-img-wrapper { display: none; }
  .fix-4 { grid-column: 1 / 9; }
  
  .qf-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .qf-teams {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .qf-route-line {
    width: 100%;
    height: 1px;
    margin: 1rem 0;
  }
  .qf-meta {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .main-nav, .utility-nav {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-index {
    display: none;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
  }
  
  .fix-1, .fix-2, .fix-3, .fix-4 {
    grid-column: 1 / -1;
  }
  
  .fixture-module {
    padding: 1.5rem;
  }
  
  .team-name {
    font-size: 1.5rem;
  }
  
  .qf-team-name {
    font-size: 2rem;
  }
  
  .context-grid, .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .journal-rail::before {
    left: 0;
  }
  
  .journal-node {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .journal-content {
    width: 100%;
    margin-left: 2rem !important;
  }
  
  .journal-marker {
    left: 0;
  }

  .contact-form {
    padding: 2rem;
  }
}

@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;
  }
}