@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&display=swap");

:root{
  --color-primary:#5e18eb;
  --color-accent:#cc6be6;
  --color-tertiary:#1900ad;
  --bg:#081126;
  --surface:#0e1733;
  --surface-alt:#121c3c;
  --border:rgba(255,255,255,.10);
  --text:#f8f7ff;
  --muted:#aeb7d5;
  --container:1180px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:"EB Garamond", Georgia, serif;background:radial-gradient(circle at 20% -10%,rgba(94,24,235,.28),transparent 35%),radial-gradient(circle at 90% 5%,rgba(204,107,230,.16),transparent 34%),linear-gradient(180deg,#081126 0%,#0a1024 55%,#070d1c 100%);color:var(--text);line-height:1.56;-webkit-font-smoothing:antialiased;}
a{color:inherit;text-decoration:none}img{display:block;max-width:100%}.section-container,.container{width:min(var(--container),calc(100% - 40px));margin-inline:auto}.section-py,.section{padding:84px 0}.bg-surface-alt{background:linear-gradient(180deg,rgba(255,255,255,.025),rgba(255,255,255,.012))}.site-header{position:fixed;top:0;left:0;right:0;z-index:50;height:64px;display:flex;align-items:center;background:rgba(8,17,38,.84);backdrop-filter:blur(16px);border-bottom:1px solid var(--border)}.nav-wrap{height:64px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:34px}.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:17px;letter-spacing:-.02em}.brand img{width:34px;height:34px;border-radius:999px}.nav{display:flex;align-items:center;justify-content:center;gap:32px}.nav a{font-size:14px;color:var(--muted);font-weight:700;transition:.22s}.nav a:hover,.nav a.active{color:#fff}.btn,.btn-outline,.btn-primary{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:11px 18px;font-weight:800;font-size:14px;border:1px solid var(--border);transition:transform .22s ease,border-color .22s ease,box-shadow .22s ease,background .22s ease;cursor:pointer}.btn:hover,.btn-outline:hover,.btn-primary:hover{transform:translateY(-2px);border-color:rgba(204,107,230,.55);box-shadow:0 12px 32px rgba(94,24,235,.22)}.btn-primary{background:linear-gradient(135deg,var(--color-primary),var(--color-accent));color:white;border-color:transparent}.btn-outline{background:rgba(255,255,255,.025);color:#fff}.hero{min-height:90vh;display:flex;align-items:flex-end;position:relative;overflow:hidden}.hero-img{position:absolute;inset:0;background-image:linear-gradient(to top,rgba(8,17,38,.97),rgba(8,17,38,.62),rgba(8,17,38,.16)),url('../images/home-hero-banner.png');background-size:cover;background-position:center;transform:scale(1.02);animation:heroKenburns 18s ease-in-out infinite alternate}.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent 0 30%,rgba(204,107,230,.08) 45%,transparent 60%);transform:translateX(-60%);animation:lightSweep 7s ease-in-out infinite}.hero-content{position:relative;z-index:2;padding:150px 0 88px}.hero h1{font-size:clamp(58px,9vw,118px);line-height:.9;margin:0 0 18px;font-weight:900;letter-spacing:-.075em}.hero p,.lead{font-size:clamp(18px,2vw,22px);color:#d8def5;max-width:760px;margin:0 0 28px}.page-hero{padding:128px 0 62px;border-bottom:1px solid var(--border);background:radial-gradient(circle at 20% 0%,rgba(94,24,235,.22),transparent 40%),linear-gradient(180deg,rgba(255,255,255,.03),transparent)}.page-hero h1{font-size:clamp(44px,7vw,84px);line-height:.94;letter-spacing:-.06em;margin:0 0 12px}.page-hero p{color:var(--muted);font-size:20px;max-width:850px}.logos{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.logo-card,.card{background:linear-gradient(180deg,rgba(255,255,255,.055),rgba(255,255,255,.022));border:1px solid var(--border);border-radius:18px}.logo-card{height:104px;display:flex;align-items:center;justify-content:center;padding:20px;overflow:hidden}.logo-card img{max-height:60px;max-width:85%;object-fit:contain;filter:saturate(1.02);opacity:.9}.grid{display:grid;gap:16px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}h2{font-size:clamp(34px,5vw,58px);line-height:1;letter-spacing:-.055em;margin:0 0 12px}h3{font-size:22px;line-height:1.16;margin:0 0 8px}.card{position:relative;overflow:hidden;padding:28px;min-height:100%;transition:transform .28s ease,border-color .28s ease,box-shadow .28s ease}.card::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 10% 0%,rgba(204,107,230,.12),transparent 36%);opacity:.85;pointer-events:none}.card>*{position:relative}.card:hover{transform:translateY(-5px);border-color:rgba(204,107,230,.52);box-shadow:0 22px 60px rgba(0,0,0,.22),0 0 36px rgba(94,24,235,.12)}.badge{display:inline-flex;align-items:center;border:1px solid rgba(204,107,230,.36);background:rgba(94,24,235,.16);color:#f0ccff;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900;letter-spacing:.01em;margin-bottom:14px}.muted{color:var(--muted)}.split{display:grid;grid-template-columns:1fr 1fr;gap:48px;align-items:center}.image-panel{border:1px solid var(--border);border-radius:20px;overflow:hidden;min-height:360px;background:var(--surface-alt)}.image-panel img{width:100%;height:100%;object-fit:cover}.video{aspect-ratio:16/9;border:1px solid var(--border);border-radius:20px;overflow:hidden;background:#000}.video iframe{width:100%;height:100%;border:0}.tournament{display:flex;gap:18px;align-items:center}.tournament img{width:92px;max-height:62px;object-fit:contain}.team-card a{color:var(--color-accent);word-break:break-word}.flag-row{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.flag-row img,.footer-flags img{width:26px;height:18px;object-fit:cover;border-radius:3px;opacity:.75;border:1px solid rgba(255,255,255,.1)}.identity-icon{height:62px;width:42px;object-fit:contain;margin-bottom:20px}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.stat{padding:26px;border-radius:18px;background:rgba(255,255,255,.045);border:1px solid var(--border)}.stat strong{display:block;font-size:46px;line-height:1;color:#fff}.stat span{color:var(--muted);font-weight:750}.site-footer{border-top:1px solid var(--border);padding:54px 0 30px;background:rgba(8,17,38,.76)}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:28px}.footer-grid h4{margin:0 0 14px}.footer-grid a{display:block;color:var(--muted);font-size:14px;margin:8px 0}.footer-flags{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin:34px 0 20px}.copyright{border-top:1px solid var(--border);display:flex;justify-content:space-between;gap:16px;padding-top:20px;color:var(--muted);font-size:14px}.mobile-toggle{display:none;background:none;border:none;color:#fff;font-size:28px}.reveal{opacity:0;transform:translateY(28px) scale(.985);filter:blur(4px);transition:opacity .8s cubic-bezier(.2,.8,.2,1),transform .8s cubic-bezier(.2,.8,.2,1),filter .8s}.reveal.in{opacity:1;transform:none;filter:blur(0)}.stagger>*{opacity:0;transform:translateY(18px);transition:opacity .65s ease,transform .65s ease}.stagger.in>*{opacity:1;transform:none}.stagger.in>*:nth-child(2){transition-delay:.08s}.stagger.in>*:nth-child(3){transition-delay:.16s}.stagger.in>*:nth-child(4){transition-delay:.24s}.stagger.in>*:nth-child(5){transition-delay:.32s}.article{max-width:920px}.article h2{font-size:38px;margin-top:44px}.article p{color:#c8d0e6}.link-accent{color:var(--color-accent);font-weight:900}
@keyframes heroKenburns{0%{transform:scale(1.02)}100%{transform:scale(1.08)}}@keyframes lightSweep{0%,55%{transform:translateX(-70%);opacity:0}65%{opacity:1}100%{transform:translateX(70%);opacity:0}}
@media(max-width:880px){.nav{display:none;position:absolute;top:64px;left:0;right:0;background:#081126;border-bottom:1px solid var(--border);padding:18px 20px;flex-direction:column;align-items:flex-start}.nav.open{display:flex}.mobile-toggle{display:block}.nav-wrap{grid-template-columns:auto auto}.nav-cta{display:none}.logos,.grid.two,.grid.three,.grid.four,.split,.stat-grid,.footer-grid{grid-template-columns:1fr}.section,.section-py{padding:58px 0}.hero{min-height:78vh}.copyright{display:block}.hero h1{font-size:56px}}


/* Font update requested: Impact for titles, EB Garamond for smaller/body text */
h1, h2, h3, .brand, .btn, .btn-outline, .btn-primary, .badge, .nav a, .stat strong, .link-accent {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  letter-spacing: .018em;
  font-weight: 400;
}
body, p, .lead, .muted, .team-card a, .footer-grid a, .copyright, .stat span {
  font-family: "EB Garamond", Georgia, serif;
}

/* Homepage hero: zoom/crop uploaded top image so it fills the header cleanly */
.hero-img{
  background-size: cover !important;
  background-position: center 42% !important;
  transform: scale(1.12) !important;
}
@keyframes heroKenburns{
  0%{transform:scale(1.12)}
  100%{transform:scale(1.18)}
}

/* Homepage Meet The Team: tighter one-line layout */
.team-card{
  padding: 18px 16px !important;
  min-width: 0;
}
.team-card h3{
  font-size: clamp(15px, 1.35vw, 18px) !important;
  line-height: 1.05 !important;
  margin-bottom: 6px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-card p,
.team-card a{
  display: block;
  font-size: clamp(13px, 1.05vw, 15px) !important;
  line-height: 1.18 !important;
  margin: 4px 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal !important;
}
.team-card .flag-row{
  margin-top: 8px !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  overflow: hidden;
}
.team-card .flag-row img{
  width: 22px !important;
  height: 15px !important;
  flex: 0 0 auto;
}

/* Give homepage team grid a little more breathing room across four columns */
.grid.four{
  gap: 12px !important;
}

@media(max-width:1180px){
  .grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}
  .team-card h3{font-size:18px !important}
  .team-card p,.team-card a{font-size:15px !important}
}
@media(max-width:620px){
  .grid.four{grid-template-columns:1fr}
  .team-card h3,.team-card p,.team-card a{white-space:normal}
}


/* Update: full-screen desktop hero */
@media (min-width: 1024px){
  .hero{min-height:100vh;}
  .hero-content{padding-bottom:6vh;}
  .hero-img{background-position:center center !important; transform:scale(1.18) !important;}
  @keyframes heroKenburns{0%{transform:scale(1.18)}100%{transform:scale(1.24)}}
}

/* Footer flag divider between local and international flags */
.footer-flags{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;}
.footer-flags > *{display:inline-flex;align-items:center;}
.footer-flags > *:nth-child(4){margin-right:8px;padding-right:18px;border-right:1px solid rgba(255,255,255,.22);}
.footer-flags a img{transition:opacity .2s ease, transform .2s ease;}
.footer-flags a:hover img{opacity:1;transform:translateY(-1px);}


/* Updated footer flags and typewriter reveal */
.footer-flags{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;row-gap:12px}
.footer-flags img{width:26px;height:18px;object-fit:cover;border-radius:3px;opacity:.88;border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.02)}
.footer-flags .footer-divider{width:1px;height:20px;background:rgba(255,255,255,.26);margin:0 8px}
.footer-flags a{display:inline-flex;align-items:center}
.footer-flags a:hover img,.footer-flags img:hover{opacity:1;transform:translateY(-1px)}
.footer-flags a img,.footer-flags img{transition:opacity .22s ease, transform .22s ease}

.type-target{position:relative}


50%,100%{opacity:0}}

/* Tournament logo correction */
.tournament img[src$="logo-stem-racing-malaysia.svg"]{
  object-fit: contain !important;
  max-width: 120px;
  width: 92px;
  height: auto;
  filter: none !important;
}

/* Increase spacing for main title */
.hero h1{
  letter-spacing: .025em !important;
}

/* Remove typing cursor */
.type-target::after{ content: none !important; }


/* Sponsor logos: slightly larger and centered */
.logos{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(170px, 1fr)) !important;
  gap:20px !important;
  align-items:center !important;
  justify-items:center !important;
  max-width:980px !important;
  margin:0 auto !important;
}
.logo-card{
  width:100% !important;
  min-height:126px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  padding:20px 18px !important;
}
.logo-card a{
  width:100% !important;
  height:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.logo-card img{
  max-width:150px !important;
  max-height:62px !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain !important;
  margin:0 auto !important;
}
@media (max-width: 980px){
  .logos{grid-template-columns:repeat(2, minmax(160px, 1fr)) !important; max-width:700px !important;}
}
@media (max-width: 560px){
  .logos{grid-template-columns:1fr !important; max-width:320px !important;}
}


/* Competition card logo only */
.tournament img[src$="logo-stem-racing-card.png"]{
  width: 170px !important;
  max-width: 100% !important;
  max-height: 96px !important;
  height: auto !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  filter: none !important;
}

/* Fix flag rendering */
.footer-flags img[src$="flag-malaysia-fixed.png"]{
  object-fit: contain !important;
  background: transparent !important;
}
