/* ==========================================================
   Mundial 2027 — palette and type taken from the event logo
   ========================================================== */
:root {
  --purple: #5B1F6B;
  --purple-deep: #3E1249;
  --magenta: #A8327F;
  --gold: #E8C25A;
  --butter: #F2D98A;
  --leaf: #4E8A3E;
  --leaf-dark: #3B6E2E;
  --orchid: #E98A92;

  --bg: #EEECEA;
  --surface: #FFFFFF;
  --surface-tint: #F6F1F4;
  --ink: #2A1530;
  --ink-soft: #5A4A60;
  --line: rgba(91, 31, 107, .18);
  --heading: var(--purple);
  --date: var(--leaf-dark);

  --radius: 18px;
  --shadow: 0 10px 30px rgba(62, 18, 73, .10);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --script: "Dancing Script", "Brush Script MT", cursive;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1B0E20;
    --surface: #26142D;
    --surface-tint: #211126;
    --ink: #F1E8F3;
    --ink-soft: #C7B6CC;
    --line: rgba(242, 217, 138, .18);
    --heading: #E7C6EE;
    --date: #8FCB7C;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--magenta); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--purple); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 32px); }

/* ---------- wordmark (split purple / magenta like the logo) ---------- */
.wordmark {
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  background: linear-gradient(180deg, var(--purple) 0 52%, var(--magenta) 52% 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.wordmark--sm { font-size: 1.35rem; }

/* ---------- headings ---------- */
.h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: .01em;
  background: linear-gradient(180deg, var(--heading) 0 55%, var(--magenta) 55% 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.h3 { font-size: 1.15rem; font-weight: 700; color: var(--heading); margin: 0 0 .5rem; }
.script {
  font-family: var(--script);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--magenta);
  margin: 0 0 .1rem;
  line-height: 1.2;
}
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.note { font-size: .875rem; color: var(--ink-soft); margin: .75rem 0 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font); font-weight: 800; text-decoration: none;
  text-transform: uppercase; letter-spacing: .06em;
  border-radius: 999px; border: 2px solid transparent;
  padding: .8rem 1.5rem; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn--sm { padding: .5rem 1.05rem; font-size: .8rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }
.btn--primary {
  color: #fff;
  background: linear-gradient(180deg, var(--purple) 0%, var(--magenta) 100%);
  box-shadow: 0 6px 18px rgba(168, 50, 127, .35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(168, 50, 127, .45); }
.btn--ghost { color: var(--heading); border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: var(--butter); color: var(--purple-deep); border-color: var(--butter); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  width: min(1200px, 100% - 32px); margin-inline: auto;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1.5rem;
}
.nav__brand { display: flex; align-items: baseline; gap: .4rem; text-decoration: none; }
.nav__year { font-weight: 700; color: var(--date); font-size: .95rem; }
.nav__links { display: flex; gap: 1.5rem; margin-left: auto; }
.nav__links a {
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.nav__links a:hover { border-bottom-color: var(--gold); }
.nav__actions { display: flex; align-items: center; gap: .75rem; }

.lang { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 2px; }
.lang__btn {
  font: 700 .75rem var(--font); letter-spacing: .05em;
  border: 0; background: transparent; color: var(--ink-soft);
  padding: .35rem .6rem; border-radius: 999px; cursor: pointer;
}
.lang__btn[aria-pressed="true"] { background: var(--purple); color: #fff; }

.nav__burger { display: none; }

@media (max-width: 820px) {
  .nav__inner { gap: .75rem; }
  .nav__brand { margin-right: auto; }
  .nav__burger {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; padding: 8px;
  }
  .nav__burger span { display: block; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: .5rem 16px 1rem;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 400px) {
  .nav__year { display: none; }
  .lang__btn { padding: .3rem .45rem; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(12px, 2vw, 24px) 16px clamp(16px, 3vw, 32px); }
.hero__frame {
  position: relative;
  width: min(1100px, 100%);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.hero__logo {
  /* capped by viewport height so dates + Register stay above the fold */
  flex: none;
  width: clamp(208px, 33.6vw, 384px);
  max-height: calc((100svh - var(--nav-h) - 48px) * .8);
  min-height: 208px;
  height: auto; aspect-ratio: 640 / 633; object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(60, 10, 60, .22));
}
.hero__side { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.hero__side .hero__facts { flex-direction: column; align-items: flex-start; gap: 1.1rem; margin: 0 0 1.4rem; }
.hero__side .hero__cta { justify-content: flex-start; padding-bottom: 0; }
@media (max-width: 760px) {
  .hero__frame { flex-direction: column; gap: 1rem; }
  .hero__logo { width: min(272px, 66vw); min-height: 0; }
  .hero__side { align-items: center; text-align: center; }
  .hero__side .hero__facts { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 1rem 2.5rem; margin: .4rem 0 .9rem; }
  .hero__side .hero__cta { justify-content: center; padding-bottom: clamp(1.25rem, 3vw, 2rem); }
}

.hero__facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.5rem;
  margin: clamp(.6rem, 1.5vw, 1.1rem) 0 .9rem;
}
.fact { display: flex; align-items: center; gap: .75rem; text-align: left; }
.fact__icon { width: 34px; height: 34px; fill: var(--magenta); flex: none; }
.fact__label {
  display: block; font-size: .75rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-soft);
}
.fact__value {
  display: block; font-size: clamp(1.15rem, 3vw, 1.6rem); font-weight: 800;
  color: var(--date); line-height: 1.2;
}

.countdown {
  display: inline-flex; gap: clamp(.5rem, 2vw, 1rem);
  margin-bottom: 1.1rem;
}
.countdown__unit {
  min-width: 66px; padding: .6rem .5rem;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  display: flex; flex-direction: column; align-items: center;
}
.countdown__num { font-size: clamp(1.3rem, 4vw, 1.9rem); font-weight: 900; color: var(--heading); font-variant-numeric: tabular-nums; line-height: 1.1; }
.countdown__lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); }

.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; padding-bottom: clamp(1.25rem, 3vw, 2rem); }

/* ---------- swirl divider ---------- */
.swirl { height: 60px; overflow: hidden; }
.swirl svg { width: 100%; height: 100%; }
.swirl path { fill: none; stroke-width: 6; stroke-linecap: round; }
.swirl path:first-child { stroke: var(--magenta); opacity: .55; }
.swirl path:last-child { stroke: var(--butter); stroke-width: 10; opacity: .8; stroke-dasharray: 1400; animation: flow 8s ease-in-out infinite alternate; }
@keyframes flow { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--tint { background: var(--surface-tint); }

.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.about__text p { margin: 0 0 1rem; font-size: 1.05rem; }
.about__divisions {
  background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  border-left: 5px solid var(--leaf);
}
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills li {
  padding: .4rem .9rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: color-mix(in srgb, var(--magenta) 12%, transparent); color: var(--heading);
}
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.days {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem;
}
.day {
  background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .2rem;
  border-top: 4px solid var(--magenta);
}
.day--finals { border-top-color: var(--gold); }
.day__dow { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.day__date { font-size: 1.6rem; font-weight: 900; color: var(--heading); }
.day__body { color: var(--ink-soft); font-size: .95rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.card {
  background: var(--surface); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--ink-soft); }
.card__icon {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.4rem; margin-bottom: .75rem;
  background: color-mix(in srgb, var(--butter) 55%, transparent);
}

/* ---------- register ---------- */
.section--register {
  background:
    radial-gradient(ellipse at 10% 0%, color-mix(in srgb, var(--magenta) 14%, transparent), transparent 55%),
    radial-gradient(ellipse at 90% 100%, color-mix(in srgb, var(--butter) 40%, transparent), transparent 55%),
    var(--bg);
}
.embed {
  margin-top: 1.5rem;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 2px solid var(--line);
  overflow: hidden;
}
.embed iframe { display: block; width: 100%; max-width: 680px; height: 640px; margin: 0 auto; border: 0; }
.embed__placeholder { padding: clamp(2rem, 6vw, 4rem) 1.5rem; text-align: center; }
.embed__placeholder p { color: var(--ink-soft); margin: 0; }
.embed__disc {
  width: 90px; height: 32px; margin: 0 auto 1.25rem; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, var(--purple-deep) 0 45%, var(--gold) 46% 50%, var(--purple) 51%);
  box-shadow: 0 8px 0 -2px color-mix(in srgb, var(--purple) 50%, transparent);
  animation: hover 2.4s ease-in-out infinite;
}
@keyframes hover { 50% { transform: translateY(-8px) rotate(-6deg); } }

/* ---------- faq ---------- */
.faq { display: grid; gap: .75rem; }
.faq details {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  padding: 0 1.25rem; border-left: 4px solid var(--magenta);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 0; font-weight: 700; color: var(--heading);
  display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--magenta); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ---------- footer ---------- */
.footer {
  border-top: 1.5px solid var(--purple);
  padding: 2.5rem 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface-tint);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; }
.footer__line { margin: .35rem 0 0; font-weight: 600; letter-spacing: .08em; color: var(--date); }
.footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-weight: 600; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; }
.footer__links span { color: var(--ink-soft); }
.footer__copy { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--ink-soft); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
