:root {
  --bg-primary: #f3f5f7;
  --bg-secondary: #e7ebef;
  --surface: #ffffff;
  --accent: #184e77;
  --accent2: #2d6a4f;
  --accent3: #9a6c3d;
  --border: #d5dce3;
  --text: #1b2430;
  --text-muted: #5c6672;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.main-nav a.secondary {
  font-size: 0.85rem;
  opacity: 0.85;
}

.cta-btn {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}
.cta-btn:hover { background: #123a5a; transform: translateY(-1px); }

.ghost-btn {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  background: var(--surface);
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}
.ghost-btn:hover { border-color: var(--accent); color: var(--accent); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--text);
  cursor: pointer;
}

/* HERO */
.hero {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 80px 0 70px;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.6s ease forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 4px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 22px;
  color: var(--text);
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 30px;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* PAGE HEAD */
.page-head {
  background: var(--surface);
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--border);
}
.page-head h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

/* SECTIONS */
.section { padding: 70px 0; }
.section.alt { background: var(--bg-secondary); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.section-head h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-intro {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 780px;
  margin-bottom: 32px;
}

.more-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.more-link:hover { text-decoration: underline; }

/* CARDS */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.country-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  opacity: 0;
  transform: translateY(8px);
}
.country-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.country-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(24,78,119,0.06);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.rank-pill {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}

.chance-pill {
  background: var(--bg-secondary);
  color: var(--accent2);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 4px;
}

.country-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.card-artist {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.card-song {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* TABLE */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  -webkit-overflow-scrolling: touch;
}

.odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 760px;
}

.odds-table thead {
  background: var(--bg-secondary);
}
.odds-table.sticky thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.odds-table th {
  text-align: left;
  padding: 14px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  white-space: nowrap;
}

.odds-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
}

.odds-table tbody tr {
  transition: background 0.15s;
}
.odds-table tbody tr:hover {
  background: var(--bg-primary);
}

.odds-table tbody tr:last-child td { border-bottom: none; }

.odds-table .rank-cell {
  font-weight: 700;
  color: var(--accent);
}
.odds-table .country-cell {
  font-weight: 600;
}
.odds-table .chance-cell {
  font-weight: 700;
  color: var(--accent2);
}

.table-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 14px;
  font-style: italic;
}

/* PREDICTION PREVIEW */
.prediction-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.pred-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
}

.pred-block h3 {
  font-size: 1.2rem;
  margin: 14px 0 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 4px;
  color: #fff;
}
.tag.accent { background: var(--accent); }
.tag.accent2 { background: var(--accent2); }
.tag.accent3 { background: var(--accent3); }

/* DOC BLOCKS */
.content-narrow { max-width: 820px; }

.doc-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 18px;
}

.doc-block h2 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
}

.doc-block p {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 0.98rem;
}
.doc-block p:last-child { margin-bottom: 0; }

.doc-block address {
  font-style: normal;
  color: var(--text);
  line-height: 1.7;
}

/* CONTACT */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}

.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-primary);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
}

.contact-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
}
.contact-info h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
  margin-top: 18px;
  font-weight: 700;
}
.contact-info h3:first-child { margin-top: 0; }
.contact-info address { font-style: normal; line-height: 1.7; }
.contact-info p { color: var(--text-muted); font-size: 0.95rem; }

/* FOOTER */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-grid h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.footer-grid a:hover { color: var(--accent); }

.footer-grid p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 10px;
}

.footer-grid address {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.source-note { font-style: italic; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    gap: 14px;
    animation: slideDown 0.25s ease;
  }
  .main-nav.open { display: flex; }
  @keyframes slideDown { from { opacity: 0; transform: translateY(-6px);} to { opacity: 1; transform: translateY(0);} }

  .menu-toggle { display: block; }
  .cta-btn { display: none; }
  .header-inner { position: relative; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero { padding: 60px 0 50px; }
  .section { padding: 50px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .doc-block { padding: 24px; }
  .contact-form { padding: 24px; }
}