/* ICPC Uruguay — estilos base */

:root {
  --bg: #0a1628;
  --bg-alt: #0f1e36;
  --surface: #132745;
  --surface-2: #17305a;
  --border: #22375c;
  --text: #eaf1fb;
  --text-dim: #9fb3d1;
  --sky: #4fb4e8;
  --sky-strong: #7fd0ff;
  --gold: #ffcc33;
  --gold-strong: #ffdb6b;
  --danger: #ff6b6b;
  --radius: 14px;
  --max: 1120px;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(79, 180, 232, 0.16), transparent 60%),
    radial-gradient(50rem 35rem at -10% 20%, rgba(255, 204, 51, 0.10), transparent 55%),
    var(--bg);
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { color: var(--text-dim); margin: 0 0 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sky-strong);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head.center { margin-inline: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-strong), var(--gold));
  color: #1a1200;
  box-shadow: 0 10px 30px -12px rgba(255, 204, 51, 0.55);
}

.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(255, 204, 51, 0.65); }

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

.btn-outline:hover { border-color: var(--sky); color: var(--sky-strong); }

.btn-sky {
  background: linear-gradient(135deg, var(--sky-strong), var(--sky));
  color: #051524;
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 22, 40, 0.72);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand .sun {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg);
  display: grid;
  place-items: center;
}

.brand .sun svg { width: 22px; height: 22px; }

.brand .uy { color: var(--gold); }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color .15s ease, background .15s ease;
}

nav.main-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }

nav.main-nav a.is-active { color: var(--sky-strong); }

nav.main-nav a.highlight {
  color: var(--gold-strong);
  font-weight: 700;
}

.header-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 42px; height: 42px;
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  transition: border-color .15s ease;
}

.lang-toggle:hover { border-color: var(--sky); }

.lang-toggle:focus-visible {
  outline: 2px solid var(--sky-strong);
  outline-offset: 2px;
}

.lang-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sky-strong), var(--sky));
  box-shadow: 0 4px 14px -4px rgba(79, 180, 232, 0.65);
  transition: transform .28s cubic-bezier(.65, 0, .35, 1);
  z-index: 0;
}

.lang-toggle[data-active="en"] .lang-thumb { transform: translateX(100%); }

.lang-option {
  position: relative;
  z-index: 1;
  display: inline-block;
  min-width: 26px;
  padding: 7px 11px;
  border-radius: 999px;
  text-align: center;
  font-family: var(--font-head);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-dim);
  transition: color .2s ease;
}

.lang-option.is-active { color: #051524; }

/* Hero */
.hero {
  position: relative;
  padding: 172px 0 110px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}

.hero h1 .accent { color: var(--gold); }

.hero-lede {
  font-size: 1.1rem;
  max-width: 52ch;
}

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

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 56px;
  max-width: 640px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}

.stat .num {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--sky-strong);
}

.stat .label {
  font-size: .82rem;
  color: var(--text-dim);
}

.hero-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6);
}

.hero-card .tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 204, 51, 0.12);
  color: var(--gold-strong);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 16px;
}

.hero-card h3 { margin-bottom: 8px; }

.hero-card .deadline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--sky-strong);
}

/* Logic path (about section) */
.path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.path-step {
  position: relative;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}

.path-step .n {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 10px;
}

.path-step.is-current {
  border-color: var(--sky);
  background: rgba(79, 180, 232, 0.08);
}

.path.path-3col { grid-template-columns: repeat(3, 1fr); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Timeline / results */
.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.timeline-item:first-child { border-top: none; }

.timeline-item .year {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold-strong);
}

.timeline-item .badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(79, 180, 232, 0.14);
  color: var(--sky-strong);
  font-size: .74rem;
  font-weight: 700;
}

/* ICPC House */
#icpc-house {
  background:
    linear-gradient(180deg, rgba(255, 204, 51, 0.05), transparent 40%),
    var(--bg-alt);
}

.house-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 204, 51, 0.35);
  background: rgba(255, 204, 51, 0.08);
  margin-bottom: 48px;
}

.house-banner .countdown-label {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold-strong);
}

.house-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.feature-card {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.feature-card .icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(79, 180, 232, 0.14);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  color: var(--sky-strong);
}

.funding-goal {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 204, 51, 0.35);
  background: rgba(255, 204, 51, 0.06);
  margin: 32px 0 40px;
}

.funding-goal-icon {
  font-size: 1.7rem;
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255, 204, 51, 0.14);
  display: grid;
  place-items: center;
}

.funding-goal-body { flex: 1; min-width: 200px; }

.funding-goal-label {
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-strong);
  margin-bottom: 4px;
}

.funding-goal-amount {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.funding-goal-body p { margin: 0; max-width: 48ch; }

.house-driver {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.driver-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: border-color .15s ease, color .15s ease;
}

a.driver-logo:hover { border-color: var(--sky); color: var(--sky-strong); }

.house-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.house-step {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.house-step .n {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--sky);
  color: #051524;
  font-family: var(--font-head);
  font-weight: 700;
  margin-bottom: 12px;
}

/* Sponsors */
.sponsor-tiers { display: grid; gap: 28px; }

.sponsor-main {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 204, 51, 0.35);
  background: rgba(255, 204, 51, 0.06);
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.sponsor-slot {
  padding: 28px 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-card {
  padding: 30px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }

.contact-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
}

.contact-list a:hover { color: var(--sky-strong); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-note { font-size: .85rem; color: var(--text-dim); }

/* Responsive */
@media (max-width: 900px) {
  nav.main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .path { grid-template-columns: repeat(2, 1fr); }
  .path.path-3col { grid-template-columns: 1fr; }
  .house-features { grid-template-columns: 1fr; }
  .house-steps { grid-template-columns: 1fr; }
  .sponsor-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .site-header.nav-open nav.main-nav {
    display: flex;
    position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 24px;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
    gap: 2px;
  }
}

@media (max-width: 560px) {
  .hero { padding-top: 140px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
