/* SYLORA Lumen — FINAL champagne-glass landing (boards 01 / 14 / 17) */
:root {
  --ivory: #fff7ee;
  --ivory-soft: #f6eadf;
  --pearl: #fffcf8;
  --ink: #0f1720;
  --ink-soft: #4a5560;
  --ink-mute: #7a8490;
  --champagne: #e6c88b;
  --champagne-deep: #c9a45c;
  --champagne-light: #f5deb3;
  --sky: #dceeff;
  --sky-deep: #8eb8d8;
  --coral: #ff8f7a;
  --frost: #f2f6fa;
  --glass: rgba(242, 246, 250, 0.72);
  --glass-stroke: rgba(255, 255, 255, 0.55);
  --font-display: "Aelys Display", "Cormorant Garamond", "Instrument Serif", Georgia, serif;
  --font-body: "Liora UI", "Instrument Sans", "Segoe UI", sans-serif;
  --radius: 1.5rem;
  --safe-x: max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body.sylora-aether-active { overflow: hidden; }

body.sylora-aether-active flt-glass-pane,
body.sylora-aether-active flutter-view,
body.sylora-aether-active flt-scene-host {
  opacity: 0 !important;
  pointer-events: none !important;
}

#sylora-aether {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 18% 18%, rgba(230, 200, 139, 0.28), transparent 62%),
    radial-gradient(60% 50% at 86% 16%, rgba(220, 238, 255, 0.55), transparent 60%),
    radial-gradient(80% 60% at 55% 92%, rgba(255, 143, 122, 0.12), transparent 58%),
    linear-gradient(165deg, #fffbf5 0%, #fff7ee 38%, #f3e6d4 72%, #e8f2fa 100%);
}

body.sylora-aether-active #sylora-aether { display: block; }

#sylora-aether canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  z-index: 0;
}

.aether-wave {
  position: absolute;
  inset: -10% -5%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(40% 28% at 28% 42%, rgba(230, 200, 139, 0.18), transparent 70%),
    radial-gradient(36% 26% at 72% 55%, rgba(220, 238, 255, 0.22), transparent 70%);
  filter: blur(10px);
  animation: waveDrift 16s ease-in-out infinite alternate;
  will-change: transform;
}

.aether-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 247, 238, 0.2) 0%, transparent 30%, transparent 64%, rgba(255, 247, 238, 0.62) 100%);
}

.aether-scroll {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.aether-hud {
  width: min(100%, 72rem);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding:
    max(0.85rem, env(safe-area-inset-top))
    var(--safe-x)
    max(1.1rem, env(safe-area-inset-bottom))
    var(--safe-x);
}

.aether-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  opacity: 0;
  transform: translateY(12px);
}

.aether-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.aether-mark {
  width: clamp(1.7rem, 5vw, 2.15rem);
  height: clamp(1.7rem, 5vw, 2.15rem);
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: visible;
  display: grid;
  place-items: center;
}

.aether-mark svg {
  width: 86%;
  height: 86%;
  display: block;
}

.aether-brand-mini {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  letter-spacing: 0.08em;
  color: var(--ink);
  white-space: nowrap;
}

.aether-link {
  appearance: none;
  border: 1px solid rgba(15, 23, 32, 0.1);
  background: rgba(255, 252, 248, 0.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  transition: transform 0.25s var(--ease),
    box-shadow 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.aether-link:hover,
.aether-link:focus-visible {
  color: var(--ink);
  border-color: rgba(201, 164, 92, 0.55);
  box-shadow: 0 0 0 4px rgba(230, 200, 139, 0.16), 0 10px 24px rgba(201, 164, 92, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.aether-hero {
  flex: 1;
  min-height: calc(100svh - 7.5rem);
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: clamp(1.1rem, 3vh, 1.75rem);
  padding: clamp(0.5rem, 2vh, 1.5rem) 0 clamp(1.5rem, 4vh, 2.5rem);
  width: 100%;
  max-width: 100%;
}

.aether-wordmark,
.aether-line,
.aether-cta-wrap,
.aether-sigil {
  opacity: 0;
  max-width: 100%;
}

.aether-wordmark,
.aether-line,
.aether-cta-wrap {
  transform: translateY(18px);
}

/* Lumen Gate — hero brand mark (not text) */
.aether-sigil {
  position: relative;
  width: min(26rem, 82vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0 auto;
  filter: drop-shadow(0 28px 56px rgba(201, 164, 92, 0.38));
}

.aether-sigil-wave {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  border: 1px solid rgba(230, 200, 139, 0.28);
  pointer-events: none;
}

.aether-sigil-wave--a { animation: sigilWave 5.6s ease-out infinite; }
.aether-sigil-wave--b { animation: sigilWave 5.6s 2.4s ease-out infinite; }

.aether-sigil-aura {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 238, 0.78) 0%, rgba(230, 200, 139, 0.22) 46%, transparent 72%);
  animation: sigilAuraBreath 4.2s ease-in-out infinite;
  pointer-events: none;
}

.aether-sigil-svg {
  position: relative;
  z-index: 1;
  width: 82%;
  height: 82%;
  display: block;
  overflow: visible;
}

.aether-gate-arc--l {
  transform-box: fill-box;
  transform-origin: 70% 50%;
  animation: gateArcPulse 4.8s ease-in-out infinite, gateArcOpenL 6.4s ease-in-out infinite;
}
.aether-gate-arc--r {
  transform-box: fill-box;
  transform-origin: 30% 50%;
  animation: gateArcPulse 4.8s 0.6s ease-in-out infinite, gateArcOpenR 6.4s ease-in-out infinite;
}

.aether-gate-fil {
  animation: gateFilamentGlow 3.2s ease-in-out infinite;
}

.aether-gate-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: gateCoreBreath 3.4s ease-in-out infinite;
}

.aether-sigil-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.36rem;
  height: 0.36rem;
  margin: -0.18rem 0 0 -0.18rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(230, 200, 139, 0.9);
  pointer-events: none;
  z-index: 2;
}

.aether-sigil-particle--1 { animation: sigilParticle 8s linear infinite; }
.aether-sigil-particle--2 { animation: sigilParticle 10s -2.2s linear infinite; }
.aether-sigil-particle--3 { animation: sigilParticle 9s -4.5s linear infinite; }
.aether-sigil-particle--4 { animation: sigilParticle 11s -1.2s linear infinite; }

.aether-wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.92rem, 2.6vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.48em;
  text-indent: 0.48em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.aether-kicker,
.aether-brand,
.aether-scroll-hint { display: none; }

.aether-line {
  margin: 0.75rem auto 0;
  max-width: min(26rem, 100%);
  padding: 0 0.25rem;
  font-size: clamp(0.98rem, 2.5vw, 1.12rem);
  line-height: 1.5;
  font-weight: 450;
  color: var(--ink-soft);
}

.aether-cta-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(22rem, 100%);
  margin-top: 0.35rem;
}

.aether-portal {
  position: relative;
  appearance: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  font-family: var(--font-body);
  font-weight: 650;
  font-size: clamp(0.92rem, 2.5vw, 1.02rem);
  letter-spacing: 0.02em;
  text-transform: none;
  padding: 0.95rem 1.7rem;
  border-radius: 1.15rem;
  background: linear-gradient(105deg, var(--champagne-light), var(--champagne) 48%, var(--champagne-deep));
  box-shadow:
    0 12px 28px rgba(201, 164, 92, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  transition: transform 0.3s var(--ease), box-shadow 0.3s ease;
  flex: 1 1 auto;
  min-width: min(12rem, 100%);
}

.aether-portal::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(245, 222, 179, 0.65), rgba(201, 164, 92, 0.4));
  z-index: -1;
  filter: blur(12px);
  opacity: 0.55;
  transition: opacity 0.3s ease;
}

.aether-portal:hover,
.aether-portal:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 16px 36px rgba(201, 164, 92, 0.38),
    0 0 24px rgba(230, 200, 139, 0.35);
  outline: none;
}

.aether-portal:hover::before,
.aether-portal:focus-visible::before { opacity: 0.9; }

.aether-portal:active { transform: translateY(0) scale(0.99); }

.aether-top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.aether-lang {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.55);
  border: 1px solid rgba(201, 164, 92, 0.28);
}

.aether-lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
}

.aether-lang-btn.is-active {
  background: rgba(201, 164, 92, 0.28);
  color: var(--ink);
}

.aether-revealed .aether-top { animation: rise 0.9s 0.05s var(--ease) forwards; }
.aether-revealed .aether-sigil {
  animation:
    sigilFade 1.1s 0.08s var(--ease) forwards,
    sigilFloatY 7s 1.3s ease-in-out infinite;
}
.aether-revealed .aether-wordmark { animation: rise 1s 0.36s var(--ease) forwards; }
.aether-revealed .aether-line { animation: rise 1s 0.46s var(--ease) forwards; }
.aether-revealed .aether-cta-wrap { animation: rise 1s 0.56s var(--ease) forwards; }
.aether-revealed .aether-portal {
  animation: portalHeartbeat 3.2s 1.5s ease-in-out infinite;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes sigilFade {
  to { opacity: 1; }
}

@keyframes sigilFloatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes sigilAuraBreath {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 0.95; }
}

@keyframes gateArcPulse {
  0%, 100% { opacity: 0.82; }
  50% { opacity: 1; }
}

@keyframes gateArcOpenL {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(-1.6%) scale(1.015, 1); }
}

@keyframes gateArcOpenR {
  0%, 100% { transform: translateX(0) scale(1); }
  50% { transform: translateX(1.6%) scale(1.015, 1); }
}

@keyframes gateFilamentGlow {
  0%, 100% { opacity: 0.78; filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  50% { opacity: 1; filter: drop-shadow(0 0 6px rgba(255, 247, 238, 0.85)); }
}

@keyframes gateCoreBreath {
  0%, 100% { transform: scale(0.94) rotate(0deg); }
  50% { transform: scale(1.1) rotate(8deg); }
}

@keyframes gateSparkTravel {
  0% { transform: translateY(-34px); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 0.8; }
  100% { transform: translateY(38px); opacity: 0; }
}

.aether-gate-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: gateSparkTravel 3.8s linear infinite;
}

@keyframes sigilWave {
  0% { transform: scale(0.7); opacity: 0.5; }
  70% { opacity: 0.1; }
  100% { transform: scale(1.28); opacity: 0; }
}

@keyframes sigilParticle {
  0% { transform: rotate(0deg) translateX(min(8.2rem, 36vw)) scale(0.65); opacity: 0; }
  14% { opacity: 0.9; }
  60% { opacity: 0.55; }
  100% { transform: rotate(360deg) translateX(min(8.2rem, 36vw)) scale(1); opacity: 0; }
}

@keyframes portalHeartbeat {
  0%, 100% {
    box-shadow:
      0 12px 28px rgba(201, 164, 92, 0.3),
      0 0 0 0 rgba(230, 200, 139, 0.35);
    transform: translateY(0) scale(1);
  }
  50% {
    box-shadow:
      0 16px 36px rgba(201, 164, 92, 0.4),
      0 0 0 12px rgba(230, 200, 139, 0);
    transform: translateY(-2px) scale(1.02);
  }
}

@keyframes waveDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to { transform: translate3d(2%, 2%, 0) scale(1.04); }
}

@media (min-width: 900px) {
  .aether-hero {
    grid-template-columns: 1fr;
    align-content: center;
    text-align: center;
    justify-items: center;
    gap: 1.75rem;
  }
  .aether-sigil {
    width: min(28rem, 40vw);
  }
  .aether-line { margin-left: auto; margin-right: auto; }
  .aether-cta-wrap { justify-content: center; }
}

@media (max-width: 360px) {
  .aether-cta-wrap { flex-direction: column; }
  .aether-portal { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .aether-sigil-wave,
  .aether-sigil-aura,
  .aether-sigil-particle,
  .aether-gate-arc--l,
  .aether-gate-arc--r,
  .aether-gate-fil,
  .aether-gate-core,
  .aether-gate-spark,
  .aether-revealed .aether-sigil,
  .aether-revealed .aether-portal {
    animation: none !important;
  }
  .aether-sigil,
  .aether-wordmark,
  .aether-line,
  .aether-cta-wrap,
  .aether-top {
    opacity: 1;
    transform: none;
  }
}

.aether-loading {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 247, 238, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.aether-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 28px;
  border-radius: 24px;
  background: rgba(255, 252, 248, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(15, 23, 32, 0.1);
  min-width: min(280px, 86vw);
}

.aether-loading-spin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid rgba(201, 164, 92, 0.22);
  border-top-color: var(--champagne-deep);
  animation: aether-spin 0.8s linear infinite;
}

.aether-loading-card p,
.aether-enter-error {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

.aether-enter-error {
  position: relative;
  z-index: 30;
  margin: 12px auto 0;
  max-width: 28rem;
  color: #9b2c4a;
}

@keyframes aether-spin {
  to { transform: rotate(360deg); }
}

/* —— Cinematic ecosystem chapters (below-the-fold) —— */
.aether-beams {
  position: absolute;
  inset: -20% -10%;
  z-index: 1;
  pointer-events: none;
  background:
    conic-gradient(from 210deg at 70% 20%, rgba(230, 200, 139, 0.14), transparent 28%, rgba(142, 184, 216, 0.12) 46%, transparent 62%),
    radial-gradient(28% 22% at 18% 78%, rgba(255, 143, 122, 0.1), transparent 70%);
  filter: blur(28px);
  animation: beamSweep 22s ease-in-out infinite alternate;
  opacity: 0.85;
  will-change: transform, opacity;
}

@keyframes beamSweep {
  from { transform: translate3d(-2%, 1%, 0) rotate(-2deg); opacity: 0.55; }
  to { transform: translate3d(3%, -2%, 0) rotate(3deg); opacity: 0.95; }
}

.aether-hero-copy {
  width: min(36rem, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.aether-scroll-hint {
  margin: 1.1rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0;
  transform: translateY(10px);
  animation: hintPulse 2.8s 1.4s var(--ease) infinite;
}

.aether-revealed .aether-scroll-hint {
  opacity: 1;
  transform: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(4px); }
}

.aether-chapters {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.35rem);
  width: 100%;
  padding: 0 0 clamp(2.5rem, 6vh, 4rem);
}

.aether-chapter {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 3vw, 1.85rem) clamp(1.2rem, 3vw, 1.7rem);
  border-radius: calc(var(--radius) + 0.15rem);
  background: linear-gradient(145deg, rgba(255, 252, 248, 0.55), rgba(242, 246, 250, 0.38));
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(15, 23, 32, 0.06);
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.aether-chapter.is-visible {
  opacity: 1;
  transform: none;
}

.aether-chapter-glow {
  position: absolute;
  inset: auto -10% -40% 35%;
  height: 70%;
  pointer-events: none;
  filter: blur(28px);
  opacity: 0.7;
}

.aether-chapter-glow--live {
  background: radial-gradient(circle, rgba(255, 143, 122, 0.35), transparent 70%);
}
.aether-chapter-glow--creator {
  background: radial-gradient(circle, rgba(230, 200, 139, 0.4), transparent 70%);
}
.aether-chapter-glow--business {
  background: radial-gradient(circle, rgba(142, 184, 216, 0.4), transparent 70%);
}
.aether-chapter-glow--edu {
  background: radial-gradient(circle, rgba(126, 200, 184, 0.35), transparent 70%);
}
.aether-chapter-glow--eco {
  background: radial-gradient(circle, rgba(230, 200, 139, 0.28), transparent 65%),
    radial-gradient(circle at 20% 40%, rgba(220, 238, 255, 0.4), transparent 60%);
}

.aether-chapter-index {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champagne-deep);
  font-weight: 700;
}

.aether-chapter h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.aether-chapter p[data-chapter-body] {
  margin: 0.65rem 0 0;
  max-width: 38rem;
  font-size: clamp(0.95rem, 2.4vw, 1.05rem);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 450;
}

@media (min-width: 820px) {
  .aether-chapters {
    grid-template-columns: 1fr 1fr;
  }
  .aether-chapter--wide {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aether-wave,
  .aether-beams,
  .aether-scroll-hint,
  .aether-revealed .aether-top,
  .aether-revealed .aether-wordmark,
  .aether-revealed .aether-line,
  .aether-revealed .aether-cta-wrap,
  .aether-revealed .aether-portal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .aether-chapter {
    opacity: 1 !important;
    transform: none !important;
  }
}
