/* Home page: night sky over Seoni, 3D phone, words in orbit, bento, exploded Salla Gangra.
   Endless motion runs only under html.fx (capable device, motion allowed, no data saver). */

:root {
  --night: #0E0A14;
  --night-2: #1A1226;
  --night-3: #251935;
  --sun: #F28C28;
  --mint: #3DDBB0;
  --violet: #9B7BFF;
  --cream-dim: rgba(255, 246, 229, .78);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

body.home { background: var(--cream); overflow-x: hidden; }
.home .wrap { width: min(1200px, 100% - 32px); }
.home em { font-style: normal; }

/* Header: dark glass over the night hero, light glass after */
.home .top.glass { background: rgba(14, 10, 20, .55); border-bottom: 1px solid rgba(255, 255, 255, .08); transition: background .3s, border-color .3s; }
.home .top.glass .brand b { color: #fff; }
.home .top.glass .brand small, .home .top.glass .nav a { color: var(--cream-dim); }
.home .top.glass .nav a:hover { color: var(--ochre); }
.home .top.glass .lang { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.home .top.glass .lang button { color: var(--cream-dim); }
.home .top.glass .lang button[aria-pressed="true"] { background: var(--ochre); color: var(--ink); }
.home.scrolled .top.glass { background: rgba(255, 246, 229, .82); border-bottom-color: var(--line); }
.home.scrolled .top.glass .brand b { color: var(--forest); }
.home.scrolled .top.glass .brand small, .home.scrolled .top.glass .nav a { color: var(--ink); }
.home.scrolled .top.glass .lang { background: var(--paper); border-color: var(--line); }
.home.scrolled .top.glass .lang button { color: var(--soft); }
.home.scrolled .top.glass .lang button[aria-pressed="true"] { background: var(--forest); color: #fff; }

.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 30; pointer-events: none; }
.scroll-progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--ochre), var(--sun), var(--clay), var(--violet)); }

/* ---------- Reveal on scroll ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
html.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero3d { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 90% at 80% 0%, #3A1E2E 0%, var(--night-2) 38%, var(--night) 70%); color: #fff;
  padding: 108px 0 72px; margin-top: -68px; }
.aurora { position: absolute; inset: -20%; z-index: -2; filter: blur(70px); opacity: .85; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.aurora .b1 { width: 46vmax; height: 46vmax; left: 52%; top: -6%; background: radial-gradient(circle, rgba(244, 180, 0, .75), transparent 62%); }
.aurora .b2 { width: 38vmax; height: 38vmax; left: 70%; top: 30%; background: radial-gradient(circle, rgba(214, 58, 30, .7), transparent 62%); }
.aurora .b3 { width: 40vmax; height: 40vmax; left: 8%; top: 46%; background: radial-gradient(circle, rgba(31, 138, 112, .55), transparent 62%); }
.aurora .b4 { width: 30vmax; height: 30vmax; left: 30%; top: -10%; background: radial-gradient(circle, rgba(155, 123, 255, .45), transparent 62%); }
.fx .aurora .b1 { animation: blob-a 22s ease-in-out infinite alternate; }
.fx .aurora .b2 { animation: blob-b 26s ease-in-out infinite alternate; }
.fx .aurora .b3 { animation: blob-c 30s ease-in-out infinite alternate; }
.fx .aurora .b4 { animation: blob-b 34s ease-in-out infinite alternate-reverse; }
@keyframes blob-a { to { transform: translate(-12vmax, 8vmax) scale(1.15); } }
@keyframes blob-b { to { transform: translate(-16vmax, -10vmax) scale(.9); } }
@keyframes blob-c { to { transform: translate(14vmax, -12vmax) scale(1.2); } }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; font-size: .9rem; font-weight: 700;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(10px); color: var(--cream-dim); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(61, 219, 176, .7); }
.fx .chip .dot { animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(61, 219, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 219, 176, 0); } }

.kinetic { font-size: clamp(2.9rem, 7.4vw, 6.4rem); line-height: 1.06; letter-spacing: -.02em; margin: 22px 0 18px; }
.kinetic .line { display: block; }
.glow-text { background: linear-gradient(100deg, var(--ochre) 0%, var(--sun) 30%, #FF6A3D 55%, var(--ochre) 80%, var(--sun) 100%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(242, 140, 40, .35)); }
.fx .glow-text { animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: -220% 0; } }
html.js .kinetic .line { transform: translateY(40%); opacity: 0; transition: transform 1s var(--ease-out), opacity 1s var(--ease-out); }
html.js .kinetic.in .line { transform: none; opacity: 1; }
html.js .kinetic.in .line + .line { transition-delay: .12s; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--cream-dim); max-width: 34em; }

.btn.glow { background: linear-gradient(135deg, var(--ochre), var(--sun)); color: var(--ink); box-shadow: 0 5px 0 var(--ochre-dark), 0 18px 50px -12px rgba(244, 180, 0, .7); }
.btn.glow b { transition: transform .3s var(--ease-out); }
.btn.glow:hover b { transform: translateX(5px); }
.btn.ghost-dark { background: rgba(255, 255, 255, .06); color: #fff; border: 1.5px solid rgba(255, 255, 255, .25); box-shadow: none; backdrop-filter: blur(8px); }
.btn.ghost-dark:hover { background: rgba(255, 255, 255, .14); }
.btn.magnet { transition: transform .25s var(--ease-out), box-shadow .2s; }
.cta.center { justify-content: center; }

.trust { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.trust li { display: flex; align-items: baseline; gap: 8px; color: var(--cream-dim); font-size: .95rem; }
.trust b { font-size: 1.6rem; color: #fff; }

/* 3D stage: phone + orbiting words */
.stage { position: relative; height: min(640px, 78vh); perspective: 1100px; display: grid; place-items: center; }
.stage-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; display: grid; place-items: center;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease-out); }
.phone3d { position: relative; width: min(270px, 62vw); transform-style: preserve-3d; transform: translateZ(60px) rotateY(-14deg) rotateX(6deg); }
.fx .phone3d { animation: hover-phone 7s ease-in-out infinite; }
@keyframes hover-phone { 50% { transform: translateZ(60px) rotateY(-8deg) rotateX(3deg) translateY(-14px); } }
.phone-shell { position: relative; border-radius: 44px; padding: 10px; background: linear-gradient(145deg, #2a2430, #0b090e);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08), 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 80px -10px rgba(244, 180, 0, .35); }
.phone-shell img { border-radius: 34px; width: 100%; height: auto; aspect-ratio: 10 / 18; object-fit: cover; object-position: top; }
.phone-glare { position: absolute; inset: 10px; border-radius: 34px; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, .08) 100%);
  transform: translateX(var(--gx, 0%)); }
.phone-shadow { position: absolute; left: 10%; right: 10%; bottom: -46px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(18px); transform: translateZ(-80px); }

.ring { position: absolute; inset: 0; margin: auto; width: 1px; height: 1px; transform-style: preserve-3d; transform: rotateX(-8deg) rotateY(var(--spin, 0deg)); }
.word-card { position: absolute; left: 0; top: 0; transform-style: preserve-3d; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  translate: -50% -50%; padding: 12px 16px; min-width: 112px; border-radius: 18px; cursor: pointer; text-align: center;
  background: rgba(20, 14, 28, .66); border: 1px solid rgba(255, 255, 255, .26); color: #fff; backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7); font: inherit; transition: background .2s, border-color .2s; }
.word-card:hover, .word-card:focus-visible { background: rgba(244, 180, 0, .25); border-color: var(--ochre); outline: none; }
.word-card b { display: block; font-size: 1.25rem; line-height: 1.2; }
.word-card small { display: block; color: var(--cream-dim); font-size: .8rem; }
.word-card .mean { display: block; margin-top: 4px; font-size: .78rem; color: var(--ochre); font-weight: 700; }
.word-card.playing { background: rgba(61, 219, 176, .3); border-color: var(--mint); }
.stage-hint { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: .82rem; color: rgba(255, 246, 229, .55); margin: 0; }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 14px; }
.scroll-cue i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; }
.fx .scroll-cue i { animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- RIBBON ---------- */
.ribbon { position: relative; padding: 26px 0; background: linear-gradient(180deg, var(--night) 0%, #241629 100%); overflow: hidden; display: grid; gap: 14px;
  transform: skewY(-2deg); margin: -20px 0 -10px; z-index: 2; border-block: 1px solid rgba(255, 255, 255, .08); }
.ribbon-row { display: flex; width: max-content; gap: 14px; }
.fx .ribbon-row { animation: marquee 60s linear infinite; }
.fx .ribbon-row.rev { animation-direction: reverse; animation-duration: 70s; }
.fx .ribbon:hover .ribbon-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.rchip { display: inline-flex; align-items: baseline; gap: 10px; padding: 10px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; font: inherit;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: #fff; transform: skewY(2deg); }
.rchip b { font-size: 1.15rem; }
.rchip span { color: var(--cream-dim); font-size: .85rem; }
.rchip:hover, .rchip:focus-visible { background: var(--ochre); color: var(--ink); outline: none; }
.rchip:hover span, .rchip:focus-visible span { color: var(--ink); }
.rchip.playing { background: var(--mint); color: var(--ink); }

/* ---------- Section type ---------- */
.big { font-size: clamp(2.2rem, 5.2vw, 4rem); line-height: 1.08; letter-spacing: -.02em; }
.big em, .mega em { background: linear-gradient(100deg, var(--clay), var(--sun), var(--ochre)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home .eyebrow { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(214, 58, 30, .1); color: var(--clay); }

/* ---------- TRY ---------- */
.try-band { padding-top: 110px; }
.try-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: center; font-weight: 700; }
.ticks li::before { content: "✓"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--forest); color: #fff; font-size: .9rem; flex: none; }
.game { position: relative; border-radius: 34px; padding: 3px; isolation: isolate;
  background: conic-gradient(from var(--ang, 0deg), var(--ochre), var(--clay), var(--violet), var(--mint), var(--ochre)); box-shadow: 0 40px 80px -40px rgba(40, 33, 28, .6); }
.fx .game { animation: spin-border 8s linear infinite; }
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-border { to { --ang: 360deg; } }
.game .trybox { max-width: none; border: 0; border-radius: 31px; box-shadow: none; background: var(--paper); }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; border-radius: 34px; }

/* ---------- BENTO ---------- */
.bento-band { background: var(--paper); border-block: 1px solid var(--line); }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(190px, auto); gap: 18px; }
.tile { position: relative; overflow: hidden; border-radius: 30px; padding: 26px; color: #fff; isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s var(--ease-out), box-shadow .3s;
  box-shadow: 0 30px 60px -40px rgba(40, 33, 28, .6); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 45%); }
.tile:hover::after { opacity: 1; }
.tile h3 { font-size: 1.45rem; margin: 14px 0 6px; }
.tile p { margin: 0; opacity: .85; }
.t-ear { grid-column: span 3; grid-row: span 2; background: radial-gradient(120% 100% at 0% 0%, #3A2050, var(--night)); }
.t-script { grid-column: span 3; background: linear-gradient(135deg, var(--ochre), #FFCF3D); color: var(--ink); }
.t-mic { grid-column: span 3; background: linear-gradient(135deg, var(--clay), #FF6A3D); }
.t-path { grid-column: span 2; background: linear-gradient(135deg, var(--forest), #2BB58F); }
.t-offline { grid-column: span 2; background: linear-gradient(135deg, var(--sky), #5B9BE0); }
.t-safe { grid-column: span 2; background: #fff; color: var(--ink); border: 2px solid var(--line); }
.big-ico svg { width: 46px; height: 46px; }
.t-safe .big-ico { color: var(--forest); }

.eq { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 6px; }
.eq i { flex: 1; border-radius: 6px; background: linear-gradient(180deg, var(--mint), var(--violet)); height: 30%; transform-origin: bottom; }
.eq i:nth-child(3n) { height: 70%; } .eq i:nth-child(4n) { height: 50%; } .eq i:nth-child(5n) { height: 90%; }
.fx .eq i { animation: eqb 1.1s ease-in-out infinite alternate; }
.fx .eq i:nth-child(2n) { animation-duration: .8s; } .fx .eq i:nth-child(3n) { animation-duration: 1.4s; } .fx .eq i:nth-child(5n) { animation-delay: -.4s; }
@keyframes eqb { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.small-btn { margin-top: 16px; padding: 10px 18px; font-size: .95rem; background: var(--mint); color: var(--ink); box-shadow: 0 4px 0 #1f9c7b; }
.heard { margin-top: 12px; min-height: 2.2em; font-size: 1.1rem; }
.heard b { font-size: 1.5rem; color: var(--ochre); }

.flip { position: relative; height: 92px; perspective: 600px; }
.flip span { position: absolute; inset: 0; display: grid; align-content: center; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; backface-visibility: hidden; transition: transform .7s var(--ease-out); }
.flip .f-roman { transform: rotateX(-180deg); }
.flip.r .f-deva { transform: rotateX(180deg); }
.flip.r .f-roman { transform: none; }

.mic { position: relative; width: 74px; height: 74px; display: grid; place-items: center; }
.mic svg { width: 36px; height: 36px; position: relative; z-index: 1; }
.mic i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); }
.fx .mic i { animation: mic-ring 2.4s ease-out infinite; }
.fx .mic i:nth-child(2) { animation-delay: .8s; } .fx .mic i:nth-child(3) { animation-delay: 1.6s; }
@keyframes mic-ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }

.mini-path { display: flex; gap: 10px; align-items: center; height: 56px; }
.mini-path i { width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .25); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); }
.mini-path i:nth-child(2n) { transform: translateY(14px); }
.mini-path i.done { background: var(--ochre); }
.mini-path i.now { background: #fff; box-shadow: 0 0 0 6px rgba(255, 255, 255, .3); }
.fx .mini-path i.now { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- PHRASEBOOK ---------- */
.words-band .card { transition: transform .3s var(--ease-out), box-shadow .3s, border-color .3s; }
.words-band .card:hover { transform: translateY(-6px); border-color: var(--ochre); box-shadow: 0 24px 40px -24px rgba(40, 33, 28, .45); }

/* ---------- STORY: exploded Salla Gangra ---------- */
.story-band { background: radial-gradient(120% 120% at 20% 0%, #2A1A34, var(--night)); color: #fff; overflow: hidden; }
.story-band p { color: var(--cream-dim); }
.story-band .eyebrow { background: rgba(244, 180, 0, .14); color: var(--ochre); }
.story-band .honest { background: rgba(155, 123, 255, .12); border-color: rgba(155, 123, 255, .4); color: #fff; }
.mark-stage { display: grid; place-items: center; min-height: 480px; perspective: 1200px; padding-top: 40px; }
.mark3d { position: relative; width: min(340px, 74vw); aspect-ratio: 1; transform-style: preserve-3d; cursor: pointer;
  transform: rotateX(0deg) rotateZ(0deg); transition: transform 1.2s var(--ease-out); }
.mark3d .m-layer { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.2s var(--ease-out), filter .6s; overflow: visible; }
.mark3d.open { transform: translateY(16%) rotateX(52deg) rotateZ(-38deg); }
.mark3d.open .m-crescent { transform: translateZ(0); filter: drop-shadow(0 0 22px rgba(242, 140, 40, .55)); }
.mark3d.open .m-base { transform: translateZ(20px); }
.mark3d.open .m-pillar { transform: translateZ(62px); }
.mark3d.open .m-sphere { transform: translateZ(112px); }
.mark3d.open .m-sun { transform: translateZ(162px); filter: drop-shadow(0 0 18px rgba(242, 140, 40, .9)); }
.m-label { position: absolute; right: -8%; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); color: #fff; opacity: 0; transition: opacity .6s .5s;
  transform-style: preserve-3d; }
.mark3d.open .m-label { opacity: 1; }
.m-label-sun { top: 2%; transform: translateZ(162px) rotateZ(38deg) rotateX(-52deg); }
.m-label-sphere { top: 26%; transform: translateZ(112px) rotateZ(38deg) rotateX(-52deg); }
.m-label-pillar { top: 50%; transform: translateZ(62px) rotateZ(38deg) rotateX(-52deg); }
.m-label-crescent { top: 74%; transform: translateZ(0) rotateZ(38deg) rotateX(-52deg); }
.fx .mark3d:not(.open) { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-10px) rotateY(10deg); } }
.mark-hint { text-align: center; font-size: .82rem; color: rgba(255, 246, 229, .55); margin-top: 14px; }

/* ---------- FINAL ---------- */
.final3d { position: relative; overflow: hidden; isolation: isolate; padding: 120px 0; background: var(--night); color: #fff; text-align: center; }
.final3d .aurora { opacity: .7; }
.mega { font-size: clamp(2.6rem, 8vw, 6.4rem); line-height: 1.04; letter-spacing: -.03em; margin-bottom: 18px; }
.final-inner .hero-sub { margin: 0 auto 26px; }
.home .site-foot { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .try-grid, .story { grid-template-columns: 1fr; }
  .stage { height: 520px; }
  .hero3d { padding-top: 100px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .t-ear, .t-script, .t-mic { grid-column: span 2; }
  .t-ear { grid-row: span 1; }
  .t-path, .t-offline, .t-safe { grid-column: span 1; }
}
@media (max-width: 600px) {
  .stage { height: 460px; }
  .bento { grid-template-columns: 1fr; }
  .t-path, .t-offline, .t-safe { grid-column: span 1; }
  .word-card { min-width: 92px; padding: 9px 12px; }
  .word-card b { font-size: 1.05rem; }
  .trust b { font-size: 1.3rem; }
  .mark-stage { min-height: 360px; }
  .m-label { right: -14%; font-size: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal], html.js .kinetic .line { opacity: 1 !important; transform: none !important; }
}

.home .honest a.btn, .honest a.btn { color: #fff; }
