/* ===== SUMX extras: themes, 3D, AI chat, effects ===== */
:root{ --soft:#c3cbdb; color-scheme:dark; }
html[data-theme="light"]{
  color-scheme:light;
  --ink:#f2f5fb; --surface:#ffffff; --surface-2:#e9eff9; --line:#d2dbec;
  --text:#0f172a; --text-dim:#46526b; --text-faint:#66728b; --white:#0b1222; --soft:#27324a;
  --amber:#d98a00; --amber-dim:#a86c00; --shadow-1:0 18px 40px -22px rgba(20,40,90,.28);
}
body{ transition:background .45s ease, color .45s ease; }
.section-alt, .spec-strip, footer, header.site-nav, .req-card, .eval-card, .platform-card, .fact-box, .contact-panel, .form-panel{ transition:background .45s ease, border-color .45s ease; }

html[data-theme="light"] header.site-nav{ background:rgba(255,255,255,.78); border-bottom-color:rgba(0,0,0,.08); }
html[data-theme="light"] .mobile-panel{ background:#f2f5fb; }
html[data-theme="light"] .hero{
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(62,142,237,0.20), transparent 60%),
    radial-gradient(45% 45% at 8% 92%, rgba(255,182,39,0.22), transparent 60%),
    linear-gradient(180deg,#f7f9fd 0%, #e8eef9 100%);
  border-bottom-color:rgba(0,0,0,.07);
}
html[data-theme="light"] .spec-strip{ background:#e6edf8; border-bottom-color:rgba(0,0,0,.07); }
html[data-theme="light"] .spec-cell{ border-left-color:rgba(0,0,0,.08); }
html[data-theme="light"] footer{ background:#e2e9f5; border-top-color:rgba(0,0,0,.08); }
html[data-theme="light"] .footer-bottom{ border-top-color:rgba(0,0,0,.08); }
html[data-theme="light"] .btn-primary{ background:#ffb627; color:#231400; }
html[data-theme="light"] .btn-ghost, html[data-theme="light"] .btn-lang, html[data-theme="light"] .menu-toggle{ border-color:rgba(0,0,0,.22); }
html[data-theme="light"] .btn-ghost:hover{ background:rgba(0,0,0,.05); border-color:rgba(0,0,0,.4); }
html[data-theme="light"] .btn-lang{ background:rgba(0,0,0,.03); }
html[data-theme="light"] .brand-mark{ color:#fff; }
html[data-theme="light"] nav.nav-links a:hover{ background:rgba(0,0,0,.06); }
html[data-theme="light"] .na-item{ color:#8a2d1e; }
html[data-theme="light"] .countdown-plate{ background:linear-gradient(155deg,#ffffff,#e9eff9); }
html[data-theme="light"] .about-figure figcaption{ color:#e5ebf6; }
html[data-theme="light"] .cta-inner h3{ color:#fff; }
html[data-theme="light"] .fees-note li, html[data-theme="light"] .future-list li{ background:#fff; }
html[data-theme="light"] .section-alt{ border-color:rgba(0,0,0,.06); }
html[data-theme="light"] .hero-eyebrow{ background:rgba(255,255,255,.7); }
html[data-theme="light"] .ring-badge{ background:#fff; }
html[data-theme="light"] .podium-1{ background:linear-gradient(180deg,rgba(255,182,39,0.3),transparent); }
.cta-inner h3{ color:#fff; }
.champion-plate h3, .champion-plate strong{ color:#fff; }

/* theme toggle */
.btn-theme{ width:40px; height:40px; padding:0; font-size:17px; line-height:1; }
.btn-theme .moon{ display:inline; } .btn-theme .sun{ display:none; }
html[data-theme="light"] .btn-theme .moon{ display:none; } html[data-theme="light"] .btn-theme .sun{ display:inline; }

/* ---------- 3D hero ---------- */
.ring-wrap{ height:500px; }
.ring-wrap canvas#hero3d{ position:absolute; inset:-30px -20px; width:calc(100% + 40px); height:calc(100% + 60px); display:none; touch-action:pan-y; }
.ring-wrap.is3d canvas#hero3d{ display:block; }
.ring-wrap.is3d .ring-outer{ display:none; }
.ring-wrap.is3d .ring-badge{ z-index:2; bottom:2px; }
.hero::before{
  content:''; position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:linear-gradient(rgba(120,160,230,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(120,160,230,.07) 1px, transparent 1px);
  background-size:56px 56px; mask-image:radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 80%);
  -webkit-mask-image:radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 80%);
}
html[data-theme="light"] .hero::before{ background-image:linear-gradient(rgba(20,50,110,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(20,50,110,.08) 1px, transparent 1px); }
.hero .container{ position:relative; z-index:1; }
.hero h1 .accent{
  background:linear-gradient(100deg,#ffb627,#ff7a3d 45%,#ffb627); background-size:200% auto;
  -webkit-background-clip:text; background-clip:text; color:transparent; -webkit-text-fill-color:transparent;
  animation:shine 5s linear infinite;
}
@keyframes shine{ to{ background-position:200% center; } }

/* bg particles + cursor glow */
#bgfx{ position:fixed; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; opacity:.55; }
.cursor-glow{
  position:fixed; left:0; top:0; width:420px; height:420px; margin:-210px 0 0 -210px; border-radius:50%; pointer-events:none; z-index:1;
  background:radial-gradient(circle, rgba(255,182,39,.10), transparent 62%); opacity:0; transition:opacity .4s;
  mix-blend-mode:screen;
}
html[data-theme="light"] .cursor-glow{ mix-blend-mode:multiply; background:radial-gradient(circle, rgba(62,142,237,.14), transparent 62%); }
@media (hover:none){ .cursor-glow{ display:none; } }
main, section, .spec-strip, .cta-band, .marquee{ position:relative; z-index:2; }
section.section:not(.section-alt){ background:transparent; }

/* marquee */
.marquee{ overflow:hidden; background:var(--amber); color:#1c1100; border-block:1px solid rgba(0,0,0,.15); direction:ltr; }
.marquee-track{ display:flex; width:max-content; animation:marq 38s linear infinite; }
.marquee:hover .marquee-track{ animation-play-state:paused; }
.marquee span{ font-family:'Archivo','Tajawal',sans-serif; font-weight:800; font-size:15px; letter-spacing:.06em; text-transform:uppercase; padding:13px 0; white-space:nowrap; }
.marquee span::after{ content:'✦'; margin:0 26px; opacity:.55; }
@keyframes marq{ to{ transform:translateX(-50%); } }

/* tilt cards */
.tilt{ transform-style:preserve-3d; will-change:transform; }
.tilt.in{ transition:transform .15s ease-out, border-color .2s ease, opacity .7s ease; }
.tilt .shine{ position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:0; transition:opacity .25s;
  background:radial-gradient(260px circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.10), transparent 60%); }
.tilt:hover .shine{ opacity:1; }
.req-card, .eval-card, .platform-card, .fact-box{ position:relative; }

/* gradient section underline */
.section-head h2::after{ content:''; display:block; width:54px; height:4px; border-radius:4px; margin-top:16px; background:linear-gradient(90deg,var(--amber),var(--blue)); }
.section-head.center h2::after{ margin-inline:auto; }

/* ---------- AI assistant ---------- */
.ai-fab{
  position:fixed; z-index:300; right:22px; bottom:22px; display:flex; align-items:center; gap:10px; cursor:pointer;
  padding:13px 20px 13px 14px; border-radius:999px; border:1px solid rgba(255,255,255,.2);
  background:linear-gradient(135deg,#2a6fd0,#1b3f7a 60%,#6a3fd0); color:#fff; font-weight:700; font-size:14.5px;
  box-shadow:0 14px 34px -10px rgba(40,100,220,.7), 0 0 0 0 rgba(62,142,237,.5); animation:fabpulse 2.8s infinite;
  font-family:inherit;
}
body[dir="rtl"] .ai-fab{ right:auto; left:22px; padding:13px 14px 13px 20px; }
.ai-fab .orb{ width:30px; height:30px; border-radius:50%; background:radial-gradient(circle at 30% 30%, #fff, #8fc2ff 35%, #3e8eed 70%); box-shadow:0 0 14px #6fb0ff; display:flex; align-items:center; justify-content:center; color:#0a2a5c; font-size:15px; }
@keyframes fabpulse{ 70%{ box-shadow:0 14px 34px -10px rgba(40,100,220,.7), 0 0 0 16px rgba(62,142,237,0); } 100%{ box-shadow:0 14px 34px -10px rgba(40,100,220,.7), 0 0 0 0 rgba(62,142,237,0); } }
.ai-panel{
  position:fixed; z-index:301; right:22px; bottom:90px; width:380px; max-width:calc(100vw - 28px); height:min(560px, calc(100vh - 120px));
  display:flex; flex-direction:column; border-radius:22px; overflow:hidden; background:var(--surface); border:1px solid var(--line);
  box-shadow:0 30px 80px -20px rgba(0,0,0,.65); transform:translateY(20px) scale(.97); opacity:0; pointer-events:none; transition:all .28s cubic-bezier(.2,.9,.3,1.1);
}
body[dir="rtl"] .ai-panel{ right:auto; left:22px; }
.ai-panel.open{ transform:none; opacity:1; pointer-events:auto; }
.ai-head{ display:flex; align-items:center; gap:12px; padding:15px 18px; background:linear-gradient(135deg,#1b3f7a,#3a2a8a); color:#fff; }
.ai-head .orb{ width:38px; height:38px; border-radius:50%; background:radial-gradient(circle at 30% 30%, #fff, #8fc2ff 35%, #3e8eed 70%); box-shadow:0 0 18px #6fb0ff; flex:none; animation:orb 3s ease-in-out infinite; }
@keyframes orb{ 50%{ transform:scale(1.08); box-shadow:0 0 26px #9fd0ff; } }
.ai-head strong{ display:block; font-size:15px; font-family:'Archivo','Tajawal',sans-serif; } .ai-head small{ font-size:12px; opacity:.8; display:flex; align-items:center; gap:6px; }
.ai-head small::before{ content:''; width:7px; height:7px; border-radius:50%; background:#4be08f; }
.ai-close{ margin-inline-start:auto; background:rgba(255,255,255,.14); border:none; color:#fff; width:32px; height:32px; border-radius:50%; cursor:pointer; font-size:16px; }
.ai-msgs{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; scroll-behavior:smooth; }
.msg{ max-width:86%; padding:11px 14px; border-radius:16px; font-size:14px; line-height:1.55; white-space:pre-line; animation:msgin .3s ease; }
@keyframes msgin{ from{ opacity:0; transform:translateY(8px); } }
.msg.bm{ background:var(--surface-2); color:var(--soft); border:1px solid var(--line); border-end-start-radius:4px; align-self:flex-start; }
.msg.me{ background:linear-gradient(135deg,#2a6fd0,#4a4fd0); color:#fff; border-end-end-radius:4px; align-self:flex-end; }
.msg a.go{ display:inline-block; margin-top:8px; padding:6px 12px; border-radius:999px; background:var(--amber); color:#231400; font-weight:700; font-size:12.5px; white-space:normal; }
.typing{ display:flex; gap:4px; padding:14px 16px; } .typing i{ width:7px; height:7px; border-radius:50%; background:var(--text-faint); animation:bounce 1s infinite; } .typing i:nth-child(2){ animation-delay:.15s; } .typing i:nth-child(3){ animation-delay:.3s; }
@keyframes bounce{ 40%{ transform:translateY(-6px); } }
.ai-chips{ display:flex; gap:7px; flex-wrap:wrap; padding:0 16px 10px; }
.ai-chips button{ font-family:inherit; font-size:12.5px; padding:7px 12px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--text-dim); cursor:pointer; transition:all .18s; }
.ai-chips button:hover{ border-color:var(--amber); color:var(--amber); }
.ai-form{ display:flex; gap:8px; padding:12px; border-top:1px solid var(--line); }
.ai-form input{ flex:1; padding:12px 14px; border-radius:999px; border:1px solid var(--line); background:var(--ink); color:var(--white); font-family:inherit; font-size:14px; }
.ai-form input:focus{ outline:none; border-color:var(--blue); }
.ai-form button{ width:44px; height:44px; border-radius:50%; border:none; background:var(--amber); color:#231400; cursor:pointer; font-size:18px; font-weight:800; }
body[dir="rtl"] .ai-form button{ transform:scaleX(-1); }
@media (max-width:620px){ .ai-fab span.t{ display:none; } .ai-fab{ padding:10px; right:14px; bottom:14px; } body[dir="rtl"] .ai-fab{ left:14px; padding:10px; } .ai-panel{ right:14px; bottom:76px; } body[dir="rtl"] .ai-panel{ left:14px; } .ring-wrap{ height:380px; } }

#confetti{ position:fixed; inset:0; pointer-events:none; z-index:400; }

/* ===== phone fixes ===== */
html, body{ overflow-x:clip; max-width:100%; }
@media (max-width:980px){
  .awards-wrap{ grid-template-columns:1fr; gap:40px; }
  .contact-grid > *, .about-grid > *, .procedure > *, .ring-diagram-wrap > *, .rule-cols > *, .awards-wrap > *{ min-width:0; }
}
@media (max-width:760px){
  .nav-cta{ display:none; }
  .nav-inner{ padding:14px 20px; }
  header.site-nav.scrolled .nav-inner{ padding:10px 20px; }
  .brand-text strong{ font-size:15px; } .brand-text span{ font-size:10.5px; }
  .hero h1{ font-size:clamp(32px, 9.5vw, 44px); }
  .hero p.lead{ font-size:16.5px; }
  .hero-actions .btn{ flex:1 1 100%; }
  .hero-meta{ gap:18px 26px; margin-top:32px; }
  .cta-inner{ padding:26px 20px; } .cta-inner h3{ font-size:19px; } .cta-inner .btn{ width:100%; }
  .cta-timer{ width:100%; justify-content:space-between; } .cta-timer div{ flex:1; min-width:0; padding:8px 4px; }
  .section-head{ margin-bottom:36px; }
  .ring-wrap{ height:340px; margin-top:8px; }
  .ring-badge{ font-size:10px; padding:7px 10px; right:0; }
  .tabs-bar{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-inline:-20px; padding-inline:20px; }
  .tabs-bar::-webkit-scrollbar{ display:none; }
  .tab-btn{ white-space:nowrap; flex:none; }
  .spec-table th{ width:auto; }
  .spec-table th, .spec-table td{ padding:11px 4px; font-size:13.5px; }
  .contact-panel, .form-panel{ padding:22px 18px; }
  .email-plate{ flex-wrap:wrap; } .email-plate span{ font-size:12.5px; word-break:break-all; }
  .fees-table th, .fees-table td{ padding:14px 16px; }
  .podium{ gap:8px; } .podium-col{ padding:14px 6px; }
  .special-row span{ font-size:13.5px; } .special-row{ gap:10px; }
  .callout{ font-size:13.5px; }
  .eval-card, .req-card, .platform-card{ padding:20px; }
  .tilt{ transform:none !important; }
  .marquee span{ font-size:13px; padding:11px 0; }
  .footer-col a{ word-break:break-all; }
  .ai-panel{ right:10px; left:10px; width:auto; max-width:none; bottom:76px; height:min(540px, calc(100vh - 100px)); }
  body[dir="rtl"] .ai-panel{ left:10px; right:10px; }
  .ai-fab{ width:54px; height:54px; padding:0; justify-content:center; }
  .ai-fab .orb{ width:34px; height:34px; }
}

/* ===== iPad / tablet nav fixes ===== */
.brand{ flex:none; }
.brand-mark{ flex:none; min-width:38px; }
.brand-text strong, .brand-text span{ white-space:nowrap; }
.nav-cta{ flex:none; }
.nav-cta .btn, .btn-lang{ white-space:nowrap; flex:none; }
@media (max-width:1180px){
  nav.nav-links, .nav-cta .btn-ghost{ display:none; }
  .menu-toggle{ display:flex; flex:none; }
  .nav-inner{ gap:14px; }
  .nav-cta{ margin-inline-start:auto; }
}
@media (min-width:761px) and (max-width:1180px){
  .nav-cta .btn{ padding:10px 18px; }
}
@media (min-width:981px) and (max-width:1180px){
  .hero-grid{ grid-template-columns:1fr 0.9fr; gap:32px; }
  .req-grid{ grid-template-columns:repeat(3,1fr); gap:14px; }
}

/* ===== take part: team registration + judge application (one section, two roles) ===== */
.pt-label{ font-size:13px; font-weight:600; color:var(--text-dim); margin:0 0 12px; }
.pt-roles{ display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:32px; }
.form-panel[hidden], [data-side][hidden]{ display:none; }
.pt-role{
  position:relative; display:flex; flex-direction:column; gap:8px; padding:20px; cursor:pointer;
  border:1px solid var(--line); border-radius:var(--radius-m); background:var(--surface-2);
  transition:border-color .2s ease, background .2s ease, transform .2s ease;
}
.pt-role:hover{ border-color:rgba(255,182,39,.35); transform:translateY(-2px); }
.pt-role input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.pt-role:has(input:focus-visible){ outline:2px solid var(--amber); outline-offset:3px; }
.pt-role-top{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pt-role strong{ font-family:'Archivo','Tajawal',sans-serif; font-weight:800; font-size:20px; line-height:1.1; color:var(--white); }
.pt-role-d{ font-size:13.5px; line-height:1.5; color:var(--text-dim); }
.pt-dot{ flex:none; width:18px; height:18px; border-radius:50%; border:1.5px solid var(--text-faint); transition:border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.pt-role.on{ border-color:var(--amber); background:linear-gradient(180deg, rgba(255,182,39,.12), transparent 75%), var(--surface-2); }
.pt-role.on .pt-dot{ border-color:var(--amber); background:var(--amber); box-shadow:inset 0 0 0 3.5px var(--surface-2); }

.pt-form h4{ font-size:15px; }
.pt-group-head{ display:flex; align-items:baseline; gap:10px; margin:22px 0 18px; padding-top:20px; border-top:1px solid var(--line); }
.pt-q{ border:0; padding:0; margin:0 0 18px; min-width:0; }
.pt-q legend{ padding:0; font-size:13px; font-weight:600; color:var(--text-dim); margin-bottom:9px; }
.pt-q.invalid legend{ color:var(--red); }
.pt-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.pt-chip{ position:relative; display:inline-flex; }
.pt-chip input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.pt-chip span{
  display:inline-flex; align-items:center; min-height:38px; padding:8px 15px; border-radius:999px;
  border:1px solid var(--line); background:var(--ink); color:var(--text-dim); font-size:13.5px; font-weight:600;
  transition:border-color .18s ease, color .18s ease, background .18s ease;
}
.pt-chip:hover span{ border-color:rgba(255,182,39,.45); color:var(--white); }
.pt-chip input:checked + span{ border-color:var(--amber); color:var(--amber); background:rgba(255,182,39,.11); }
.pt-chip input:focus-visible + span{ outline:2px solid var(--amber); outline-offset:2px; }
.pt-form .btn-block{ margin-top:6px; }
html[data-theme="light"] .pt-chip span{ background:#fff; }
html[data-theme="light"] .pt-role.on{ background:linear-gradient(180deg, rgba(255,182,39,.22), transparent 75%), var(--surface-2); }
@media (hover:none){ .pt-chip span{ min-height:44px; } }
@media (max-width:760px){
  .pt-roles{ grid-template-columns:1fr; gap:10px; margin-bottom:26px; }
  .pt-role{ padding:16px 18px; gap:6px; }
}
