/* VOICE: confident, warm, event-floor energy
   IDEA: the audience as one living planet that becomes a real hall
   PICTURE: a 3D dotted Earth with language arcs (home), product consoles, real-room photos
   COLOUR and TYPE: deep navy night / clean white, coral voice, signal cyan; Space Grotesk + Inter
   LAYOUT: sticky nav with product menu, full-bleed bands, 1240px content */
* { min-width: 0 }
html { scroll-behavior: smooth; scroll-padding-top: 84px }
body { overflow-x: clip }

/* photos (gradient shows until the image loads) */
.photo { background-size: cover; background-position: center; transition: transform .8s cubic-bezier(.2,.7,.2,1) }
.ph-hero { background-image: url(../img/hero.jpg), linear-gradient(135deg, #1b2a60, #0b1736 60%, #3a1a14) }
.ph-conf { background-image: url(../img/conference.jpg), linear-gradient(160deg, #2b3a80, #13234d) }
.ph-town { background-image: url(../img/townhall.jpg), linear-gradient(160deg, #5a2a20, #13234d) }
.ph-uni { background-image: url(../img/university.jpg), linear-gradient(160deg, #0f4c5c, #13234d) }
.ph-pub { background-image: url(../img/public.jpg), linear-gradient(160deg, #4a3d10, #13234d) }
.ph-speak { background-image: url(../img/speaker.jpg), linear-gradient(160deg, #3a1a14, #13234d 70%) }
.ph-trans { background-image: url(../img/translation.jpg), linear-gradient(160deg, #0f3b5c, #13234d 70%) }
.ph-about { background-image: url(../img/about.jpg), linear-gradient(160deg, #2a1f4a, #13234d 70%) }
.ph-vote { background-image: url(../img/vote.jpg), linear-gradient(160deg, #3a2a50, #13234d 70%) }
a:hover > .photo, .zoom:hover .photo { transform: scale(1.05) }

/* console + tabs */
.panel { transition: opacity .35s, box-shadow .35s, transform .35s }
.dim .panel { opacity: .38 }
.dim .panel.on { opacity: 1; box-shadow: 0 0 0 2px #FF6B4A, 0 20px 50px -20px rgba(255,107,74,.5); transform: translateY(-2px) }
.tab { transition: background .25s, border-color .25s, transform .25s }
.tab:hover { transform: translateX(3px) }
.tab[aria-selected=true] { background: rgba(255,107,74,.1); border-color: #FF6B4A }
.cap { transition: opacity .45s, transform .45s }
.cap:not(.on) { opacity: 0; transform: translateY(14px); pointer-events: none }
.menu { display: none }
.menu.open { display: block; animation: drop .22s ease-out }
@keyframes drop { from { opacity: 0 } to { opacity: 1 } }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1) }
.reveal.in { opacity: 1; transform: none }

/* cards: lift + cursor spotlight */
.spot { position: relative; isolation: isolate; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(76,201,240,.16), transparent 60%) }
.spot:hover::before { opacity: 1 }
.spot:hover { transform: translateY(-4px); box-shadow: 0 24px 60px -28px rgba(11,23,54,.45) }
.dark .spot:hover { box-shadow: 0 24px 60px -24px rgba(0,0,0,.7), 0 0 0 1px rgba(76,201,240,.25) }

/* primary buttons: light sweep */
a.bg-coral, button.bg-coral { position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s, background .25s }
a.bg-coral::after, button.bg-coral::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-20deg); transition: left .6s }
a.bg-coral:hover::after, button.bg-coral:hover::after { left: 130% }
a.bg-coral:hover, button.bg-coral:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(255,107,74,.7) }

/* glows behind hero areas */
.glow-bg { position: relative }
.glow-bg::before { content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 400px at 85% 20%, rgba(76,201,240,.14), transparent 70%), radial-gradient(500px 360px at 10% 60%, rgba(255,107,74,.10), transparent 70%) }

/* language marquee */
.marquee { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent) }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 38s linear infinite }
.marquee:hover .marquee-track { animation-play-state: paused }
@keyframes marquee { to { transform: translateX(-50%) } }

/* floating chips + pings */
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-10px) } }
.float { animation: float 6s ease-in-out infinite }
.float-2 { animation: float 7s ease-in-out -2s infinite }
.float-3 { animation: float 8s ease-in-out -4s infinite }
@keyframes ping { 0% { transform: scale(1); opacity: .8 } 100% { transform: scale(2.4); opacity: 0 } }
.ping { animation: ping 1.6s ease-out infinite }
@keyframes rise { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
.rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both }

/* page scroll progress + nav state */
#pageProgress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: linear-gradient(90deg, #4CC9F0, #FF6B4A); z-index: 60 }
header.scrolled { box-shadow: 0 10px 30px -18px rgba(11,23,54,.35) }

/* legal text */
.legal h2 { font-family: "Space Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 1.5rem; margin: 2.5rem 0 .75rem }
.legal h3 { font-weight: 600; font-size: 1.1rem; margin: 1.5rem 0 .5rem }
.legal p, .legal li { line-height: 1.75 }
.legal ul { list-style: disc; padding-left: 1.4rem; margin: .5rem 0 }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .ping, .rise, .float, .float-2, .float-3, .marquee-track { animation: none }
  .reveal { opacity: 1; transform: none; transition: none }
  .spot:hover, a.bg-coral:hover { transform: none }
}

.legal a { color: #D9431F; font-weight: 600 }
.dark .legal a { color: #FF6B4A }
.legal strong { color: inherit; font-weight: 600 }
/* globe speech bubbles */
.bubble { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .45s; will-change: transform }
.bubble.on { opacity: 1 }
.bubble > div { transform: translate(-50%, calc(-100% - 22px)) scale(.9); transition: transform .5s cubic-bezier(.2,.8,.2,1.2) }
.bubble.on > div { transform: translate(-50%, calc(-100% - 22px)) scale(1) }
.bubble > div::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg);
  background: inherit; border-right: 1px solid rgba(38,56,107,.35); border-bottom: 1px solid rgba(38,56,107,.35) }

/* ---------- connect flow ---------- */
.cf-path { transition: stroke .4s, opacity .4s; opacity: .45 }
.cf-path.on { stroke: #FF6B4A; opacity: 1; animation: dash 1s linear infinite }
@keyframes dash { to { stroke-dashoffset: -26 } }
.cf-pk { opacity: 0; transition: opacity .4s }
.cf-pk.on { opacity: 1 }
.cf-node .cf-box { transition: stroke .4s, filter .4s }
.cf-node.on .cf-box { stroke: #FF6B4A; stroke-width: 2.5; filter: drop-shadow(0 8px 18px rgba(255,107,74,.35)) }
.cf-ring { transform-origin: 500px 220px; animation: hubring 2.4s ease-out infinite }
@keyframes hubring { 0% { transform: scale(1); opacity: .9 } 100% { transform: scale(1.35); opacity: 0 } }
.cf-step.active { border-color: #FF6B4A; background: rgba(255,107,74,.07) }
.cf-still .cf-pk, .cf-still .cf-ring { display: none }

/* ---------- product hero animations ---------- */
.qa-row { transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .35s, box-shadow .4s; will-change: transform }
.qa-row.leave { opacity: 0 }
.qa-row.enter { animation: qaIn .6s ease-out }
@keyframes qaIn { from { opacity: 0 } }
.qa-row.bump { animation: bump .9s ease-out }
@keyframes bump { 0% { box-shadow: 0 0 0 0 rgba(255,107,74,.55) } 100% { box-shadow: 0 0 0 10px rgba(255,107,74,0) } }
.topic.flash, [data-onair].flash { animation: flash 1s ease-out }
@keyframes flash { 0% { background-color: rgba(255,107,74,.45) } }
.feed-note { animation: noteIn .45s ease-out }
@keyframes noteIn { from { opacity: 0; transform: translateY(-6px) } }
.wave { height: 30%; animation: wave 1.1s ease-in-out infinite alternate }
@keyframes wave { 0% { height: 15% } 50% { height: 95% } 100% { height: 40% } }
.caret { display: inline-block; margin-left: 2px; color: #FF6B4A; animation: blink 1s steps(1) infinite }
@keyframes blink { 50% { opacity: 0 } }
.bar { transition: width 1.2s cubic-bezier(.2,.8,.2,1) }
.meter { transition: left 1.4s cubic-bezier(.3,.9,.3,1.1) }
.chip { opacity: 0; transform: translateY(8px) scale(.95); transition: opacity .45s, transform .45s }
.chip.in { opacity: 1; transform: none }

/* ---------- console → product page morph ---------- */
.morph { position: fixed; z-index: 100; border-radius: 16px; background: #0B1736; color: #fff; overflow: hidden;
  transition: top .55s cubic-bezier(.7,0,.2,1), left .55s cubic-bezier(.7,0,.2,1), width .55s cubic-bezier(.7,0,.2,1), height .55s cubic-bezier(.7,0,.2,1), border-radius .55s; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6) }
.morph-label { position: absolute; inset: 0; display: grid; place-items: center; font: 700 clamp(28px, 5vw, 56px)/1.1 "Space Grotesk", sans-serif; opacity: 0; transition: opacity .35s .25s }
.morph.full .morph-label { opacity: 1 }
.morph::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 70% 20%, rgba(76,201,240,.25), transparent 70%), radial-gradient(500px 360px at 20% 80%, rgba(255,107,74,.25), transparent 70%) }
@keyframes pageIn { from { opacity: 0; transform: translateY(18px) scale(.985) } }
.page-in main { animation: pageIn .7s cubic-bezier(.2,.8,.2,1) both }
.hero-mock { animation: mockIn .9s .15s cubic-bezier(.2,.8,.2,1) both }
@keyframes mockIn { from { opacity: 0; transform: translateY(30px) scale(.96) } }
@view-transition { navigation: auto }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s }

@media (prefers-reduced-motion: reduce) {
  .cf-path.on, .cf-ring, .wave, .caret, .qa-row.bump, .hero-mock, .page-in main { animation: none }
  .morph { transition: none }
}

/* ---------- menus ---------- */
.dd-panel.open { display: grid }
.dd.is-open .dd-btn svg, .mob-acc[open] summary svg { transform: rotate(180deg) }
.mob-acc summary::-webkit-details-marker { display: none }

/* ---------- mixed languages ---------- */
.mx-word { display: inline-block; border-bottom: 3px solid var(--c); padding-bottom: 1px; animation: wordIn .35s ease-out both }
@keyframes wordIn { from { opacity: 0; transform: translateY(8px) } }
.mx-chip { opacity: .45; transition: opacity .2s, transform .2s }
.mx-chip.lit { opacity: 1; transform: scale(1.08) }

/* ---------- two-way translation ---------- */
.tw-bg { background: radial-gradient(700px 360px at 15% 30%, rgba(76,201,240,.14), transparent 70%), radial-gradient(700px 360px at 85% 70%, rgba(255,107,74,.14), transparent 70%) }
.tw-card { transition: border-color .4s, box-shadow .4s, transform .4s }
.tw-card .tw-live { opacity: 0; transition: opacity .3s }
.tw-card.speaking { border-color: #FF6B4A; box-shadow: 0 0 0 1px #FF6B4A, 0 24px 60px -20px rgba(255,107,74,.5); transform: translateY(-3px) }
.tw-card.speaking .tw-live { opacity: 1 }
.tw-card.receiving { border-color: #4CC9F0; box-shadow: 0 0 0 1px #4CC9F0, 0 24px 60px -20px rgba(76,201,240,.45) }
.tw-said { transition: opacity .3s }
.tw-said.dim-text { opacity: .35 }
.tw-flow { background: rgba(255,255,255,.12); background-size: 200% 100% }
[data-tw].flowing .tw-flow { background-image: linear-gradient(90deg, transparent, #4CC9F0, #FF6B4A, transparent); animation: flowLtr .9s linear infinite }
[data-tw][data-dir=rtl].flowing .tw-flow { animation-name: flowRtl }
@keyframes flowLtr { from { background-position: 200% 0 } to { background-position: -200% 0 } }
@keyframes flowRtl { from { background-position: -200% 0 } to { background-position: 200% 0 } }
.tw-ring { animation: hub 2s ease-out infinite }
@keyframes hub { 0% { transform: scale(1); opacity: .9 } 100% { transform: scale(1.5); opacity: 0 } }
[data-tw].flowing .tw-core { animation: corePulse .6s ease-in-out infinite alternate }
@keyframes corePulse { to { box-shadow: 0 0 40px rgba(255,107,74,.6) } }
.tw-l { transition: background .3s, border-color .3s, color .3s }
.tw-l.lit { background: rgba(76,201,240,.18); border-color: #4CC9F0 }

/* ---------- before / during / after ---------- */
.bda-fill { transition: width 2.2s cubic-bezier(.4,0,.2,1) }
.bda.go .bda-fill { width: 100% }
.bda-step { opacity: .35; transform: translateY(16px); transition: opacity .6s, transform .6s; transition-delay: calc(var(--d) * .7s) }
.bda.go .bda-step { opacity: 1; transform: none }

/* ---------- responsive polish ---------- */
@media (max-width: 640px) {
  .bubble > div { max-width: 230px }
  .marquee-track { gap: 1.75rem }
}
@media (prefers-reduced-motion: reduce) {
  .mx-word, .tw-ring, [data-tw].flowing .tw-flow, [data-tw].flowing .tw-core { animation: none }
  .bda-step { opacity: 1; transform: none }
}
/* join button: always visible, gently pulsing */
.join-btn { position: relative; box-shadow: 0 0 0 0 rgba(76,201,240,.6); animation: joinPulse 2.6s ease-out infinite; transition: transform .2s }
.join-btn:hover { transform: translateY(-1px) }
@keyframes joinPulse { 0% { box-shadow: 0 0 0 0 rgba(76,201,240,.55) } 70% { box-shadow: 0 0 0 12px rgba(76,201,240,0) } 100% { box-shadow: 0 0 0 0 rgba(76,201,240,0) } }
@media (prefers-reduced-motion: reduce) { .join-btn { animation: none } }
