/* ═══════════════════════════════════════
   MESSI TRIBUTE  —  styles.css
   Palette: Argentine sky blue + white
   Fonts: Cormorant Garamond + Space Grotesk
════════════════════════════════════════ */

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

/* ── Tokens ── */
:root {
  --sky:        #74ACDF;   /* Argentine sky blue */
  --sky-mid:    #5491CC;
  --sky-deep:   #2D6BA4;
  --sky-pale:   #C2DCEF;
  --white:      #FFFFFF;
  --off:        #F5F8FC;
  --ink:        #0C0C0E;
  --muted:      #6C7A89;
  --rule:       #DDE4EC;

  --display:    'Cormorant Garamond', Georgia, serif;
  --body:       'Space Grotesk', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Base ── */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--body);
  background: var(--white);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

sup { font-size: 0.45em; vertical-align: super; }
em  { font-style: italic; }

/* ═══════════════════════════════════════
   NAV
════════════════════════════════════════ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3.5rem;
  transition: background 0.4s, box-shadow 0.4s, padding 0.3s;
}

.nav.scrolled {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--rule);
  padding: 1rem 3.5rem;
}

.nav-logo {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
  transition: color 0.4s;
  cursor: default;
  user-select: none;
}

.nav.scrolled .nav-logo { color: var(--sky-deep); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s, opacity 0.3s;
}

.nav.scrolled .nav-links a { color: var(--ink); }
.nav-links a:hover { opacity: 0.5; }

/* ═══════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 680px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0)    35%,
    rgba(0,0,0,0.65) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3.5rem 5.5rem;
  color: var(--white);
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
  font-weight: 300;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(5.5rem, 13vw, 11.5rem);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-title em {
  color: var(--sky-pale);
  font-style: italic;
}

.hero-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.55;
  font-weight: 300;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  right: 3.5rem;
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: rgba(255,255,255,0.4);
  writing-mode: vertical-rl;
  user-select: none;
}

/* ═══════════════════════════════════════
   QUICK NUMBERS  (sky blue bar)
════════════════════════════════════════ */
.numbers {
  background: var(--sky);
  padding: 4.5rem 3.5rem;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 1160px;
  margin: 0 auto;
}

.number-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(255,255,255,0.28);
}
.number-item:last-child { border-right: none; }

.number-value {
  font-family: var(--display);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.number-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 0.75rem;
  text-align: center;
  font-weight: 400;
}

/* ═══════════════════════════════════════
   SHARED SECTION / CONTAINER / TITLE
════════════════════════════════════════ */
.section { padding: 8rem 3.5rem; }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 4rem;
}

.section-title em { color: var(--sky); }

/* ═══════════════════════════════════════
   CAREER STATS
════════════════════════════════════════ */
.career-stats { background: var(--white); }

.stats-table-wrapper {
  overflow-x: auto;
  margin-bottom: 5rem;
  border-top: 1px solid var(--rule);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.stats-table th {
  text-align: left;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  padding: 1.2rem 0.5rem 1.2rem 0;
  border-bottom: 1px solid var(--rule);
}

.stats-table th:not(:first-child),
.stats-table td:not(:first-child) { text-align: center; }

.stats-table td {
  padding: 1.3rem 0.5rem 1.3rem 0;
  font-size: 0.93rem;
  font-weight: 300;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

.club-name { font-weight: 500; }

.total-row td {
  font-weight: 600;
  color: var(--sky-deep);
  border-top: 2px solid var(--sky);
  border-bottom: 2px solid var(--sky);
}

/* International */
.international-stats { margin-top: 2rem; }

.international-stats h3 {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: -0.015em;
  margin-bottom: 2.5rem;
}
.international-stats h3 em { color: var(--sky); }

.int-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--rule);
}

.int-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 0.5rem;
  border-right: 1px solid var(--rule);
}
.int-cell:last-child { border-right: none; }

.int-val {
  font-family: var(--display);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}

.int-lbl {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.6rem;
  text-align: center;
}

/* ═══════════════════════════════════════
   LEGACY  (split image + text)
════════════════════════════════════════ */
.legacy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 85vh;
  background: var(--off);
}

.legacy-image {
  overflow: hidden;
}

.legacy-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.8s var(--ease-out);
  filter: grayscale(12%);
}

.legacy-image:hover img { transform: scale(1.04); }

.legacy-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7rem 5.5rem;
}

.legacy-eyebrow {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.legacy-title {
  font-family: var(--display);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: 2rem;
}
.legacy-title em { color: var(--sky); }

.legacy-body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--muted);
  font-weight: 300;
  max-width: 450px;
  margin-bottom: 3rem;
}

.legacy-pillars {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-top: 2.5rem;
}

.pillar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--ink);
  font-weight: 300;
}

.pillar strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--sky-deep);
  min-width: 3rem;
}

/* ═══════════════════════════════════════
   HONOURS
════════════════════════════════════════ */
.honours { background: var(--white); padding: 8rem 3.5rem; }

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

.honours-col h3 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.01em;
}

.honours-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.honours-col li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--ink);
  line-height: 1.4;
}

.hc {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--sky);
  min-width: 2.75rem;
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   RECORDS  (dark section)
════════════════════════════════════════ */
.records {
  background: var(--ink);
  color: var(--white);
  padding: 8rem 3.5rem;
}

.records .section-title { color: var(--white); }
.records .section-title em { color: var(--sky-pale); }

.records-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
}

.records-col h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--sky-pale);
  letter-spacing: -0.01em;
  margin-bottom: 2rem;
}

.record-list { display: flex; flex-direction: column; }

.record-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.rl {
  font-size: 0.83rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
  flex: 1;
}

.rv {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
  text-align: right;
}

/* ═══════════════════════════════════════
   WORLD CUP 2022  (sky blue)
════════════════════════════════════════ */
.worldcup {
  background: var(--sky);
  color: var(--white);
  padding: 8rem 3.5rem;
}

.wc-header {
  text-align: center;
  margin-bottom: 5rem;
}

.wc-eyebrow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 1.2rem;
}

.wc-title {
  font-family: var(--display);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-bottom: 1.75rem;
}
.wc-title em { font-style: italic; }

.wc-desc {
  max-width: 580px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.8;
  opacity: 0.8;
  font-weight: 300;
}

/* WC stats grid */
.wc-numbers {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid rgba(255,255,255,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.3);
  margin-bottom: 5rem;
}

.wc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0.5rem;
  border-right: 1px solid rgba(255,255,255,0.25);
}
.wc-cell:last-child { border-right: none; }

.wc-num {
  font-family: var(--display);
  font-size: 3.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--white);
}

.wc-lbl {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-top: 0.6rem;
  text-align: center;
}

/* WC game list */
.wc-games h3 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  opacity: 0.85;
  letter-spacing: -0.01em;
}

.game-list { display: flex; flex-direction: column; }

.game-row {
  display: grid;
  grid-template-columns: 1fr 130px 1fr;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.g-match {
  font-size: 0.9rem;
  font-weight: 400;
}
.g-match small {
  font-size: 0.65rem;
  opacity: 0.6;
  letter-spacing: 0.08em;
  margin-left: 0.4rem;
}

.g-score {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
}
.g-score.win  { color: var(--white); }
.g-score.loss { color: rgba(255,255,255,0.45); }

.g-detail {
  font-size: 0.78rem;
  opacity: 0.65;
  font-weight: 300;
  text-align: right;
}

.final-row {
  background: rgba(255,255,255,0.1);
  padding: 1.1rem 1rem;
  border-radius: 4px;
  margin-top: 0.4rem;
  border-bottom: none !important;
}

.final-row .g-match,
.final-row .g-detail { opacity: 1; }

/* ═══════════════════════════════════════
   GALLERY
════════════════════════════════════════ */
.gallery {
  background: var(--off);
  padding: 8rem 0;
}

.gallery .container {
  padding: 0 3.5rem;
  margin-bottom: 2.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 0 4px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--rule);
}

.gallery-item.large {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.65s var(--ease-out), filter 0.5s;
  filter: grayscale(15%);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

.gallery-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1.25rem 1.1rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  opacity: 0;
  transition: opacity 0.35s;
}

.gallery-item:hover .gallery-cap { opacity: 1; }

/* ═══════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.footer {
  background: var(--ink);
  color: var(--white);
  padding: 6rem 3.5rem;
  text-align: center;
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
}

.footer-logo {
  display: block;
  font-family: var(--display);
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--sky-pale);
  margin-bottom: 2.5rem;
}

.footer-quote {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.75;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2.5rem;
  border: none;
}

.footer-sub {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.4rem;
}
.footer-sub.muted { opacity: 0.5; }

/* ═══════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */
@media (max-width: 1100px) {
  .int-grid { grid-template-columns: repeat(3, 1fr); }
  .int-cell { border-bottom: 1px solid var(--rule); }
  .int-cell:nth-child(3) { border-right: none; }
  .int-cell:last-child, .int-cell:nth-last-child(2), .int-cell:nth-last-child(3) { border-bottom: none; }
}

@media (max-width: 1024px) {
  .nav { padding: 1.2rem 2rem; }
  .nav.scrolled { padding: 0.9rem 2rem; }

  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .number-item:nth-child(2) { border-right: none; }
  .number-item { border-bottom: 1px solid rgba(255,255,255,0.2); }
  .number-item:nth-child(3), .number-item:nth-child(4) { border-bottom: none; }

  .honours-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .honours-grid .honours-col:last-child { grid-column: span 2; }

  .wc-numbers { grid-template-columns: repeat(3, 1fr); }
  .wc-cell:nth-child(3) { border-right: none; }
  .wc-cell:nth-child(4), .wc-cell:nth-child(5), .wc-cell:nth-child(6) {
    border-top: 1px solid rgba(255,255,255,0.25);
  }

  .legacy { grid-template-columns: 1fr; }
  .legacy-image { min-height: 55vw; }
  .legacy-text { padding: 5rem 3rem; }

  .records-split { gap: 3rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }

  .hero-content { padding: 0 1.75rem 4rem; }
  .hero-scroll  { right: 1.75rem; }

  .numbers { padding: 3rem 1.75rem; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }

  .section { padding: 5.5rem 1.75rem; }
  .honours  { padding: 5.5rem 1.75rem; }
  .records  { padding: 5.5rem 1.75rem; }
  .worldcup { padding: 5.5rem 1.75rem; }

  .honours-grid { grid-template-columns: 1fr; }
  .honours-grid .honours-col:last-child { grid-column: auto; }

  .records-split { grid-template-columns: 1fr; }
  .record-row { flex-direction: column; gap: 0.3rem; }
  .rv { text-align: left; color: var(--sky-pale); }

  .wc-numbers { grid-template-columns: repeat(2, 1fr); }
  .wc-cell { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
  .wc-cell:nth-child(even) { border-left: 1px solid rgba(255,255,255,0.2); }
  .wc-cell:last-child, .wc-cell:nth-last-child(1) { border-bottom: none; }

  .game-row { grid-template-columns: 1fr 90px; }
  .g-detail { display: none; }

  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item.large { grid-column: span 2; aspect-ratio: 4/3; }

  .legacy-text { padding: 4rem 1.75rem; }

  .int-grid { grid-template-columns: repeat(2, 1fr); }
}
