/* ============================================================
   ATLÂNTIA INTERNATIONAL STEM OLYMPIAD — Shared Stylesheet
   Color palette from official Atlântia poster
   ============================================================ */

:root {
  --navy-deep:   #0A1B4D;
  --navy:        #122569;
  --navy-soft:   #1B3490;
  --blue:        #2E5BFF;
  --blue-bright: #3B82F6;
  --cyan:        #5BC0EB;
  --purple:      #7B3FF2;
  --orange:      #F97316;
  --green:       #16A34A;
  --ink:         #0B1230;
  --white:       #FFFFFF;
  --bone:        #F6F7FB;
  --line:        rgba(10, 27, 77, 0.10);
  --line-strong: rgba(10, 27, 77, 0.22);

  --grad-hero:    linear-gradient(135deg, #0A1B4D 0%, #122569 45%, #1B3490 100%);
  --grad-accent:  linear-gradient(90deg, #2E5BFF, #7B3FF2, #F97316);
  --grad-soft:    linear-gradient(180deg, #FFFFFF 0%, #F6F7FB 100%);

  --font-display: 'Sora', sans-serif;
  --font-body:    'Space Grotesk', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 16px rgba(10,27,77,0.06);
  --shadow:    0 12px 40px rgba(10,27,77,0.10);
  --shadow-lg: 0 30px 80px rgba(10,27,77,0.18);
}

*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  font-size: 16.5px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit;}

::selection { background: var(--purple); color: white; }

.container { width: min(1240px, 92%); margin: 0 auto; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 27, 77, 0.78);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background .3s ease;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: white; font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2E5BFF, #5BC0EB);
  border-radius: 10px;
  box-shadow: 0 0 24px rgba(91,192,235,0.4);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand small {
  display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--cyan); letter-spacing: 2px; margin-top: 2px;
}
.nav-links { display: flex; gap: 30px; align-items: center;}
.nav-links a {
  color: rgba(255,255,255,0.78);
  font-size: 14.5px; font-weight: 500;
  position: relative;
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: white; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--grad-accent);
  transition: width .3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  background: white; color: var(--navy-deep);
  padding: 11px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,255,255,0.25);}

.nav-toggle {
  display: none;
  color: white;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary {
  background: var(--grad-accent);
  background-size: 200% 100%;
  color: white;
  box-shadow: 0 14px 40px rgba(123,63,242,0.4);
}
.btn-primary:hover { transform: translateY(-3px); background-position: 100% 0; }
.btn-ghost {
  border: 1.5px solid rgba(255,255,255,0.3);
  color: white;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px);}
.btn-dark {
  background: var(--navy-deep);
  color: white;
}
.btn-dark:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(10,27,77,0.25);}
.btn svg { transition: transform .25s ease; }
.btn:hover svg { transform: translateX(4px); }

/* ============ HERO (page header) ============ */
.page-hero {
  position: relative;
  padding: 180px 0 100px;
  background: var(--grad-hero);
  color: white;
  overflow: hidden;
  text-align: center;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(91,192,235,0.25), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(123,63,242,0.30), transparent 45%);
  pointer-events: none;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(91,192,235,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,192,235,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 2;}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  border: 1px solid rgba(91,192,235,0.4);
  background: rgba(91,192,235,0.08);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 28px;
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 0 0 24px;
}
.page-hero h1 .accent {
  background: linear-gradient(90deg, #5BC0EB, #7B3FF2, #F97316);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.page-hero p {
  font-size: 19px;
  color: rgba(255,255,255,0.78);
  max-width: 700px;
  margin: 0 auto 36px;
}
.breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.breadcrumb a { color: rgba(255,255,255,0.7); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb span { color: rgba(255,255,255,0.3);}

/* ============ SECTIONS ============ */
section { padding: 110px 0; position: relative; }
.section-head { margin-bottom: 60px; max-width: 760px;}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center;}
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.section-tag::before {
  content: ""; width: 32px; height: 2px; background: var(--grad-accent);
}
.section-head.center .section-tag { justify-content: center;}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.8vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 22px;
}
.section-title em {
  font-style: normal;
  background: var(--grad-accent);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.section-sub {
  font-size: 18px;
  color: rgba(11,18,48,0.65);
  max-width: 640px;
}
.section-head.center .section-sub { margin-left: auto; margin-right: auto;}

/* Dark sections override */
.dark { background: var(--navy-deep); color: white; }
.dark .section-title { color: white;}
.dark .section-sub { color: rgba(255,255,255,0.65);}
.dark .section-tag { color: var(--cyan);}

.bone-bg { background: var(--bone); }

/* ============ MARQUEE ============ */
.marquee {
  background: var(--ink); color: white;
  padding: 22px 0; overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marquee-track {
  display: flex; gap: 60px;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
.marquee-track span {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 60px;
}
.marquee-track span::after { content: "✦"; color: var(--orange); font-size: 14px;}

/* ============ CARDS ============ */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow);}

/* ============ FOOTER ============ */
footer {
  background: #060B22;
  color: rgba(255,255,255,0.7);
  padding: 70px 0 32px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.foot-brand p {
  margin: 18px 0 22px;
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 320px;
}
.foot-brand .city {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--cyan);
}
.foot-col h6 {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  color: white;
  margin: 0 0 18px;
  letter-spacing: 1.5px; text-transform: uppercase;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px;}
.foot-col a {
  font-size: 14px; color: rgba(255,255,255,0.6);
  transition: color .2s ease;
}
.foot-col a:hover { color: var(--cyan);}
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.foot-bottom .socials { display: flex; gap: 14px;}
.foot-bottom .socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.6);
  transition: all .25s ease;
}
.foot-bottom .socials a:hover { background: var(--blue); color: white; border-color: var(--blue);}

/* ============ IMAGE HELPERS ============ */
/* Image with svg fallback layered behind */
.img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
}
.img-wrap .fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}
.img-wrap .real {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity .4s ease;
}
.img-wrap .real.loaded { opacity: 1; }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px);} to {opacity:1; transform:none;} }
@keyframes pulse { 0%,100%{transform:scale(1); opacity:1;} 50%{transform:scale(1.4); opacity:.6;} }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee {
  from { transform: translateX(0);}
  to   { transform: translateX(-50%);}
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px;}
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: rgba(6, 11, 34, 0.96);
    padding: 20px;
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-toggle { display: flex;}
  .nav-cta { padding: 9px 16px; font-size: 13px;}
  section { padding: 80px 0; }
  .page-hero { padding: 130px 0 70px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px;}
}

/* ============ LANGUAGE SWITCHER ============ */
.lang-switcher {
  position: relative;
  margin-right: 4px;
}
.lang-current {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.lang-current:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25);}
.lang-current .flag { font-size: 15px;}
.lang-current .caret {
  width: 10px; height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  opacity: 0.7;
  transition: transform .25s ease;
}
.lang-switcher[open] .lang-current .caret {
  transform: rotate(225deg) translate(-2px, -2px);
}
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: rgba(6, 11, 34, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 110;
}
.lang-switcher[open] .lang-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.lang-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.78);
  border-radius: 8px;
  transition: background .15s ease, color .15s ease;
}
.lang-menu a:hover { background: rgba(91,192,235,0.10); color: white;}
.lang-menu a.active { color: var(--cyan); font-weight: 600;}
.lang-menu a.active::before {
  content: "✓";
  margin-right: -4px;
}
.lang-menu .flag { font-size: 18px;}

@media (max-width: 768px) {
  .lang-switcher { display: none; }
  .lang-menu-mobile {
    display: block;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.10);
  }
  .lang-menu-mobile h6 {
    margin: 0 0 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
  }
  .lang-menu-mobile .links {
    display: flex; flex-wrap: wrap; gap: 6px;
  }
  .lang-menu-mobile a {
    padding: 6px 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
  }
  .lang-menu-mobile a.active { background: var(--blue); color: white;}
}
@media (min-width: 769px) {
  .lang-menu-mobile { display: none; }
}
