/* All motion is progressive enhancement; the approved static page is the fallback. */
:root { --letter-mask: url('/assets/brand/letter-light.webp'); --mosaic-small: url('/assets/brand/mosaic-light.webp'); --mosaic-large: url('/assets/brand/mosaic-intro-light.webp'); }
[data-theme='dark'] { --letter-mask: url('/assets/brand/letter-dark.webp'); --mosaic-small: url('/assets/brand/mosaic-dark.webp'); --mosaic-large: url('/assets/brand/mosaic-intro-dark.webp'); }
body { isolation: isolate; }
.page { position: relative; z-index: 1; }
.header { position: relative; z-index: 4; }
.hero-symbol { perspective: 800px; }
.logo-interaction { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 28%; background: none; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.logo-depth { display: block; position: relative; width: 100%; height: 100%; transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .35s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.main-mark { display: block; width: 100%; height: 100%; filter: drop-shadow(0 14px 18px #1b304f0a); }
.halo { transition: transform .6s ease; }
.logo-shine { position: absolute; inset: 0; overflow: hidden; pointer-events: none; mask-image: var(--letter-mask); mask-size: contain; mask-repeat: no-repeat; mask-position: center; }
.shine-band { display: block; position: absolute; inset: -30%; background: linear-gradient(105deg, transparent 30%, #fff5e0b0 48%, #ffc59b70 53%, transparent 68%); opacity: 0; }
.mosaic-assembly, .surprise-layer { display: block; position: absolute; inset: 0; pointer-events: none; }
.mosaic-piece { position: absolute; inset: 0; display: block; background: var(--mosaic-large) center / contain no-repeat; }
.piece-1 { clip-path: polygon(0 0, 42% 0, 42% 20%, 23% 41%, 0 41%); --from-x: -48px; --from-y: -40px; --from-r: -18deg; --piece-delay: 0ms; }
.piece-2 { clip-path: polygon(58% 0, 100% 0, 100% 41%, 77% 41%, 58% 20%); --from-x: 48px; --from-y: -40px; --from-r: 18deg; --piece-delay: 90ms; }
.piece-3 { clip-path: polygon(41% 20%, 59% 20%, 76% 40%, 59% 56%, 41% 56%, 24% 40%); --from-x: 0px; --from-y: -50px; --from-r: -10deg; --piece-delay: 180ms; }
.piece-4 { clip-path: polygon(0 41%, 23% 40%, 40% 55%, 28% 80%, 0 80%); --from-x: -56px; --from-y: 24px; --from-r: -22deg; --piece-delay: 270ms; }
.piece-5 { clip-path: polygon(77% 40%, 100% 41%, 100% 80%, 71% 80%, 58% 55%); --from-x: 56px; --from-y: 24px; --from-r: 22deg; --piece-delay: 360ms; }
.piece-6 { clip-path: polygon(40% 58%, 59% 58%, 69% 86%, 30% 86%); --from-x: 0px; --from-y: 50px; --from-r: 12deg; --piece-delay: 450ms; }
.intro-pending .main-mark { opacity: 0; animation: fail-open .01s 3s forwards; }
.intro-pending .mosaic-assembly { opacity: 0; }
.intro-playing .mosaic-assembly { opacity: 1; animation: assembly-out .7s 2s both; }
.intro-playing .mosaic-piece { animation: piece-arrive 1.1s var(--piece-delay) cubic-bezier(.16,1,.3,1) both; }
.intro-playing .main-mark { animation: mark-arrive .7s 2.02s cubic-bezier(.2,.8,.2,1) both; }
.intro-playing .status { animation: text-arrive .55s .7s both; }
.intro-playing h1 { animation: text-arrive .55s .82s both; }
.intro-playing .intro { animation: text-arrive .55s .94s both; }
.intro-playing .accent-line { animation: text-arrive .55s 1.06s both; }
.surprise-layer { z-index: 2; }
.burst-ring { position: absolute; inset: 12%; border: 1px solid var(--accent); border-radius: 50%; pointer-events: none; opacity: 0; }
.atmosphere { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.ambient-mosaic { position: absolute; background: var(--mosaic-small) center / contain no-repeat; opacity: .11; animation: drift 24s ease-in-out infinite alternate; }
.ambient-spark { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px 3px #eca16c1a; opacity: 0; animation: glow-breathe 8s ease-in-out infinite; }
.pointer-light { position: absolute; left: -290px; top: -290px; width: 580px; height: 580px; background: radial-gradient(circle, #eca16c14, #eca16c05 42%, transparent 68%); border-radius: 50%; opacity: 0; transition: opacity .5s ease; }
.pointer-light.visible { opacity: 1; }
[data-theme='dark'] .pointer-light { background: radial-gradient(circle, #eca16c11, #eca16c04 40%, transparent 68%); }
[data-theme='light'] .ambient-spark { visibility: hidden; }
.language-control.enhanced { border: 0; background: none; }
.language-control.enhanced > svg, .language-control.enhanced > select { display: none; }
.language-toggle { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 13px; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--control); cursor: pointer; font-size: 14px; font-weight: 700; }
.language-toggle:hover { background: var(--hover); }
.language-flag { object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px #1b304f12; flex: 0 0 24px; }
.menu-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 5px; transition: transform .2s ease; }
[aria-expanded='true'] .menu-chevron { transform: translateY(2px) rotate(225deg); }
.language-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: 222px; max-height: min(400px, calc(100svh - 110px)); overflow-y: auto; overscroll-behavior: contain; padding: 7px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); box-shadow: 0 18px 50px #00102620; transform-origin: top right; animation: menu-arrive .2s ease-out; }
.language-menu[hidden] { display: none; }
.language-option { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 43px; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font-size: 14px; font-weight: 600; }
.language-option:hover, .language-option:focus-visible { background: var(--hover); }
.language-option[aria-selected='true'] { background: var(--hover); font-weight: 800; }
.option-check { margin-inline-start: auto; visibility: hidden; color: var(--ink); }
[aria-selected='true'] .option-check { visibility: visible; }
button { transition: background-color .18s ease, transform .18s ease; }
.theme-toggle:active, .language-toggle:active { transform: scale(.95); }
.theme-toggle svg { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.theme-toggle:hover svg { transform: rotate(14deg); }
.theme-wiping body { transition: none; }
::view-transition-group(root) { animation-duration: .68s; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
.effects-paused .atmosphere * { animation-play-state: paused; }
[data-motion='off'] .atmosphere { display: none; }
[data-motion='off'] .logo-depth, [data-motion='off'] .halo { transform: none !important; }
[data-motion='off'] *, [data-motion='off'] *::before, [data-motion='off'] *::after { animation: none !important; transition: none !important; }
@keyframes piece-arrive { from { opacity: 0; transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-r)) scale(.85); } to { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); } }
@keyframes assembly-out { to { opacity: 0; transform: scale(.96); } }
@keyframes mark-arrive { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes fail-open { to { opacity: 1; } }
@keyframes text-arrive { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes drift { from { transform: translate3d(-8px, 12px, 0) rotate(-10deg); } to { transform: translate3d(14px, -20px, 0) rotate(13deg); } }
@keyframes glow-breathe { 0%, 100% { opacity: .08; transform: scale(.7); } 50% { opacity: .4; transform: scale(1); } }
@keyframes menu-arrive { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 700px) {
  .language-toggle { font-size: 12px; padding: 11px 10px; gap: 7px; }
  .language-flag { width: 22px; height: 16.5px; flex-basis: 22px; }
  .menu-chevron { margin-left: 1px; }
  .ambient-mosaic:nth-child(n+5), .ambient-spark:nth-child(n+13) { display: none; }
  .ambient-mosaic { opacity: .08; }
  .pointer-light { width: 360px; height: 360px; left: -180px; top: -180px; }
  .footer { flex-wrap: wrap; column-gap: 16px; row-gap: 0; padding-block: 12px; }
  .footer > :first-child { order: 1; }
  .footer > :last-child { order: 2; margin-left: auto; }
}
@media (max-width: 390px) { .language-toggle .language-name { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .controls { gap: 6px; } .language-toggle { padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .atmosphere, .mosaic-assembly, .surprise-layer, .logo-shine { display: none; }
  .intro-pending .main-mark { opacity: 1; }
  .logo-depth, .halo { transform: none !important; }
}
/* Compact closed state: the name remains in the accessible label and open list. */
.language-toggle { width: 64px; padding-inline: 10px; gap: 8px; }
.language-toggle .language-name { display: none; }
.language-toggle .menu-chevron { margin-left: 0; }
@media (max-width: 700px) { .language-toggle { width: 60px; gap: 7px; } }
