/* ================================================
   GORAN IVANISEVIC — SHARED STYLESHEET
   Wimbledon editorial aesthetic
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Space+Grotesk:wght@300;400;500;600&display=swap');

/* ---- Variables ---- */
:root {
  --green-dark:   #005C2C;
  --green-mid:    #007A3C;
  --green-light:  #E8F5EE;
  --purple:       #4A1478;
  --purple-light: #F3EBF9;
  --gold:         #C9A84C;
  --gold-light:   #FFF8E7;
  --white:        #FFFFFF;
  --offwhite:     #FAFAF8;
  --cream:        #F5F2EC;
  --ink:          #1A1A18;
  --ink-light:    #4A4A44;
  --ink-muted:    #8A8A82;
  --rule:         #D8D4CC;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'Space Grotesk', system-ui, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--offwhite);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; }
p  { margin-bottom: 1.25em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

/* ---- Layout ---- */
.container  { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 24px; }
}

/* ---- NAV ---- */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--green-dark);
  border-bottom: 3px solid var(--gold);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; max-width: 1160px; margin: 0 auto; height: 60px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 0; list-style: none; }
.nav-links a {
  display: block; padding: 0 16px; height: 60px; line-height: 60px;
  font-family: var(--font-ui); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: white; margin: 5px 0; transition: 0.3s; }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.5);
  padding: 48px 24px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px;
}
.footer-col h4 {
  font-family: var(--font-ui);
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px; font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  color: rgba(255,255,255,0.5);
  text-decoration: none; font-family: var(--font-ui); font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-col ul a:hover { color: white; }
.footer-bottom {
  max-width: 1160px; margin: 32px auto 0;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  font-family: var(--font-ui); font-size: 0.75rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ---- SECTION LABEL ---- */
.label {
  font-family: var(--font-ui);
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green-dark); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.label::before {
  content: ''; display: block;
  width: 24px; height: 2px; background: var(--gold);
}

/* ---- DIVIDER ---- */
.divider {
  border: none; border-top: 1px solid var(--rule);
  margin: 48px 0;
}

/* ---- PULL QUOTE ---- */
.pull-quote {
  border-left: 4px solid var(--gold);
  margin: 32px 0;
  padding: 8px 0 8px 24px;
}
.pull-quote p {
  font-family: var(--font-display);
  font-size: 1.3rem; font-style: italic;
  color: var(--ink-light); line-height: 1.5;
  margin: 0;
}

/* ---- STAT BOX ---- */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; margin: 32px 0; }
.stat-box { background: var(--white); padding: 24px; text-align: center; }
.stat-box .num { font-family: var(--font-display); font-size: 2.4rem; font-weight: 900; color: var(--green-dark); line-height: 1; }
.stat-box .desc { font-family: var(--font-ui); font-size: 0.75rem; color: var(--ink-muted); margin-top: 6px; letter-spacing: 0.05em; text-transform: uppercase; }
@media (max-width: 600px) { .stat-row { grid-template-columns: repeat(2,1fr); } }

/* ---- TABLE ---- */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; font-family: var(--font-ui); font-size: 0.9rem; }
.data-table th { background: var(--green-dark); color: white; padding: 12px 16px; text-align: left; font-weight: 500; letter-spacing: 0.05em; font-size: 0.78rem; text-transform: uppercase; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--cream); }
.data-table td.highlight { font-weight: 700; color: var(--green-dark); }
.data-table td.gold-badge::after { content: ' 🏆'; }

/* ---- CARD ---- */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.card-body { padding: 24px; }
.card-label { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-dark); font-weight: 600; margin-bottom: 8px; }
.card h3 { margin-bottom: 12px; }
.card p { font-size: 0.95rem; color: var(--ink-light); }

/* ---- CTA BUTTON ---- */
.btn {
  display: inline-block;
  font-family: var(--font-ui); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 14px 28px; border-radius: 4px;
  text-decoration: none; transition: all 0.2s;
  cursor: pointer; border: none;
}
.btn-primary { background: var(--green-dark); color: white; }
.btn-primary:hover { background: var(--green-mid); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #b8973d; }
.btn-outline { background: transparent; color: var(--green-dark); border: 2px solid var(--green-dark); }
.btn-outline:hover { background: var(--green-dark); color: white; }

/* ---- BREADCRUMB ---- */
.breadcrumb {
  font-family: var(--font-ui); font-size: 0.8rem;
  color: var(--ink-muted); padding: 16px 0;
  display: flex; gap: 8px; align-items: center;
}
.breadcrumb a { color: var(--green-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--rule); }

/* ---- CONTENT PAGE ---- */
.content-header {
  background: var(--green-dark);
  padding: 60px 24px 48px;
  position: relative; overflow: hidden;
}
.content-header::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 40px;
  background: var(--offwhite);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.content-header .label { color: var(--gold); }
.content-header .label::before { background: rgba(255,255,255,0.3); }
.content-header h1 { color: white; max-width: 820px; }
.content-header .subtitle {
  font-family: var(--font-body); font-size: 1.1rem; font-style: italic;
  color: rgba(255,255,255,0.7); margin-top: 16px; max-width: 640px;
}

.content-body { padding: 56px 24px; }

/* ---- TIMELINE ---- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: ''; position: absolute; left: -24px; top: 6px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-item .year {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 4px;
}
.timeline-item h3 { font-size: 1.15rem; margin-bottom: 8px; }
.timeline-item p { font-size: 0.95rem; color: var(--ink-light); margin: 0; }

/* ---- MATCH BOX ---- */
.match-box {
  background: var(--green-dark);
  border-radius: 8px; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between;
  color: white; margin: 12px 0;
}
.match-box .round { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.match-box .players { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }
.match-box .score { font-family: var(--font-ui); font-size: 0.9rem; color: rgba(255,255,255,0.7); text-align: right; }

/* ---- ANIMATIONS ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-up { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }

/* ---- INTERNAL LINK BLOCK ---- */
.see-also {
  background: var(--green-light);
  border-left: 4px solid var(--green-dark);
  padding: 16px 20px; border-radius: 0 6px 6px 0;
  margin: 32px 0; font-family: var(--font-ui); font-size: 0.9rem;
}
.see-also strong { color: var(--green-dark); }
.see-also a { color: var(--green-dark); font-weight: 600; text-decoration: underline; }
