:root{
  --bg:#02050c;
  --text:#f5f8ff;
  --muted:#9caac6;
  --blue:#6dbdff;
  --blue2:#8b89ff;
  --cyan:#6fffe7;
  --line:rgba(125,190,255,.18);
  --glass:rgba(4,10,22,.46);
  --ease:cubic-bezier(.16,1,.3,1);
}

*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  background:#02050c;
  color:var(--text);
  font-family:Inter,system-ui,sans-serif;
  overflow-x:hidden;
}

button,input{
  font:inherit;
}

button{
  -webkit-tap-highlight-color:transparent;
}

#threeWorld,
#fallbackCanvas{
  position:fixed;
  inset:0;
  width:100%;
  height:100%;
}

#threeWorld{
  z-index:0;
  background:
    radial-gradient(circle at 68% 34%,rgba(70,160,255,.14),transparent 30%),
    radial-gradient(circle at 42% 80%,rgba(50,120,255,.14),transparent 26%),
    #02050c;
}

#fallbackCanvas{
  z-index:0;
  display:none;
}

/* NEW: extra cinematic presence layer */
.presence-aurora{
  position:fixed;
  z-index:1;
  right:-5vw;
  top:7vh;
  width:min(980px,64vw);
  height:min(760px,78vh);
  pointer-events:none;
  opacity:.72;
  mix-blend-mode:screen;
  filter:saturate(1.12);
}

.presence-face-css{
  position:absolute;
  right:10%;
  top:6%;
  width:48%;
  height:70%;
  opacity:.52;
  background:
    radial-gradient(circle at 68% 42%,rgba(255,255,255,.92) 0 1.3%,transparent 1.6%),
    radial-gradient(ellipse at 62% 45%,rgba(147,222,255,.92),rgba(70,158,255,.38) 27%,rgba(18,66,140,.16) 55%,transparent 74%);
  clip-path:path("M 385 2 C 258 24 176 107 155 221 C 134 337 191 447 273 529 C 351 607 458 606 519 540 C 574 480 542 417 501 357 C 462 301 506 255 544 202 C 594 129 542 18 385 2 Z");
  filter:
    drop-shadow(0 0 32px rgba(110,200,255,.58))
    drop-shadow(0 0 110px rgba(70,155,255,.28));
  animation:presenceBreath 8s ease-in-out infinite;
}

.presence-face-css:before,
.presence-face-css:after{
  content:"";
  position:absolute;
  inset:0;
  background:
    repeating-linear-gradient(24deg,transparent 0 18px,rgba(155,225,255,.28) 19px 20px),
    repeating-linear-gradient(-48deg,transparent 0 31px,rgba(72,165,255,.18) 32px 33px);
  mix-blend-mode:screen;
}

.presence-face-css:after{
  filter:blur(16px);
  opacity:.42;
}

.presence-ribbon{
  position:absolute;
  border-radius:50%;
  inset:0;
  background:
    radial-gradient(circle at 76% 34%,rgba(150,230,255,.8) 0 2px,transparent 3px),
    conic-gradient(from 45deg,transparent,rgba(91,180,255,.20),transparent,rgba(130,145,255,.16),transparent);
  opacity:.45;
  animation:presenceFlow 14s ease-in-out infinite;
}

.ribbon-b{
  inset:5% -7% 6% 9%;
  opacity:.32;
  animation-duration:18s;
}

.ribbon-c{
  inset:14% 4% 12% -10%;
  opacity:.25;
  animation-duration:23s;
}

@keyframes presenceBreath{
  50%{
    transform:scale(1.028) translateY(8px);
    opacity:.64;
  }
}

@keyframes presenceFlow{
  50%{
    transform:translate3d(-22px,18px,0) rotate(7deg) scale(1.04);
  }
}

/* NEW: world depth rings */
.world-depth{
  position:fixed;
  z-index:1;
  left:50%;
  bottom:-18vh;
  width:120vw;
  height:58vh;
  transform:translateX(-50%);
  pointer-events:none;
  perspective:900px;
  opacity:.78;
}

.depth-ring{
  position:absolute;
  left:50%;
  top:50%;
  border-radius:50%;
  border:1px solid rgba(100,190,255,.22);
  transform:translate(-50%,-50%) rotateX(68deg);
  filter:drop-shadow(0 0 20px rgba(80,170,255,.20));
}

.ring-a{
  width:92%;
  height:72%;
  animation:ringDrift 18s linear infinite;
}

.ring-b{
  width:72%;
  height:54%;
  opacity:.62;
  animation:ringDrift 24s linear reverse infinite;
}

.ring-c{
  width:52%;
  height:38%;
  opacity:.46;
  animation:ringDrift 32s linear infinite;
}

@keyframes ringDrift{
  to{
    transform:translate(-50%,-50%) rotateX(68deg) rotateZ(360deg);
  }
}

.veil{
  position:fixed;
  inset:0;
  z-index:2;
  pointer-events:none;
  background:
    radial-gradient(circle at 64% 34%,transparent 0 24%,rgba(0,0,0,.04) 46%,rgba(0,0,0,.60) 100%),
    radial-gradient(circle at 50% 82%,rgba(70,160,255,.11),transparent 32%),
    linear-gradient(90deg,rgba(0,0,0,.62),rgba(0,0,0,.10) 38%,rgba(0,0,0,.46));
}

.scan{
  position:fixed;
  inset:0;
  z-index:3;
  pointer-events:none;
  opacity:.035;
  background-image:linear-gradient(rgba(255,255,255,.36) 1px, transparent 1px);
  background-size:100% 4px;
  mix-blend-mode:screen;
}

body.world-pulse .veil{
  animation:worldPulse .9s ease both;
}

@keyframes worldPulse{
  0%{
    opacity:1;
    filter:brightness(1);
  }
  35%{
    opacity:.78;
    filter:brightness(1.45) saturate(1.35);
  }
  100%{
    opacity:1;
    filter:brightness(1);
  }
}

.boot{
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  gap:18px;
  background:#02050c;
  transition:opacity .8s var(--ease), visibility .8s var(--ease);
}

.boot.hidden{
  opacity:0;
  visibility:hidden;
}

.boot-core{
  width:88px;
  height:88px;
  border-radius:50%;
  border:1px dashed rgba(120,200,255,.55);
  box-shadow:0 0 80px rgba(84,170,255,.34), inset 0 0 40px rgba(90,170,255,.14);
  animation:spin 3s linear infinite;
}

.boot-core:before{
  content:"";
  display:block;
  width:14px;
  height:14px;
  margin:8px;
  border-radius:50%;
  background:#a8e1ff;
  box-shadow:0 0 24px #a8e1ff;
}

.boot b,
.boot span{
  display:block;
  text-align:center;
  text-transform:uppercase;
  letter-spacing:.18em;
}

.boot span{
  margin-top:8px;
  color:var(--muted);
  font-size:12px;
}

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

/* NAV */
.nav{
  position:fixed;
  top:26px;
  left:50%;
  transform:translateX(-50%);
  z-index:60;
  width:min(1500px, calc(100% - 48px));
  height:76px;
  padding:0 22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:
    linear-gradient(180deg,rgba(6,12,26,.72),rgba(3,8,18,.48));
  border:1px solid rgba(130,190,255,.18);
  box-shadow:
    0 22px 90px rgba(0,0,0,.34),
    inset 0 0 44px rgba(83,160,255,.045);
  backdrop-filter:blur(20px);
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  color:#fff;
  text-decoration:none;
  font-family:"Cormorant Garamond",serif;
  font-size:34px;
  letter-spacing:-.03em;
}

.sigil{
  width:42px;
  height:42px;
  border-radius:50%;
  position:relative;
  border:1px dashed rgba(118,205,255,.65);
  box-shadow:0 0 30px rgba(90,185,255,.28);
}

.sigil:before{
  content:"";
  position:absolute;
  inset:12px;
  border-radius:50%;
  background:radial-gradient(circle,#ddf7ff,#67aeff 45%,transparent 70%);
  box-shadow:0 0 25px rgba(100,190,255,.8);
}

.sigil:after{
  content:"";
  position:absolute;
  inset:-5px;
  border-radius:50%;
  background:conic-gradient(transparent,rgba(90,175,255,.32),transparent);
  animation:spin 10s linear infinite;
}

.nav nav{
  display:flex;
  gap:14px;
}

.nav nav a{
  color:#e7efff;
  text-decoration:none;
  padding:12px 20px;
  border-radius:999px;
  font-size:15px;
  transition:.28s var(--ease);
}

.nav nav a:hover,
.nav nav a.active{
  background:rgba(87,155,255,.11);
  box-shadow:
    inset 0 0 0 1px rgba(130,190,255,.18),
    0 0 26px rgba(80,150,255,.16);
}

.presence-status{
  display:flex;
  align-items:center;
  gap:10px;
  color:#e9f5ff;
  border:1px solid rgba(130,190,255,.14);
  background:rgba(255,255,255,.035);
  padding:12px 16px;
  border-radius:999px;
  cursor:pointer;
}

.presence-status i{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#7dffcf;
  box-shadow:0 0 18px #7dffcf;
}

.app{
  position:relative;
  z-index:10;
}

/* HERO */
.hero{
  position:relative;
  width:min(1500px,calc(100% - 58px));
  min-height:100vh;
  margin:0 auto;
  padding-top:152px;
}

.hero-copy{
  position:relative;
  z-index:20;
  width:min(720px,47vw);
}

.kicker{
  margin:0 0 22px;
  color:#7bc8ff;
  font-size:12px;
  font-weight:800;
  letter-spacing:.22em;
  text-transform:uppercase;
  text-shadow:0 0 24px rgba(90,180,255,.38);
}

h1,h2,h3{
  font-family:"Cormorant Garamond",serif;
  font-weight:600;
  letter-spacing:-.055em;
  margin:0;
}

h1{
  font-size:clamp(74px,7.1vw,124px);
  line-height:.88;
  text-shadow:
    0 4px 40px rgba(0,0,0,.58),
    0 0 60px rgba(90,160,255,.12);
}

.subtitle{
  max-width:620px;
  margin:26px 0 0;
  color:#d3def0;
  font-size:18px;
  line-height:1.56;
}

/* COMMAND INPUT */
.command{
  position:relative;
  width:min(710px,100%);
  height:76px;
  margin-top:32px;
  border-radius:999px;
  background:rgba(1,7,18,.70);
  border:1px solid rgba(120,196,255,.44);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 44px rgba(72,165,255,.45),
    0 26px 90px rgba(0,0,0,.45);
  overflow:hidden;
}

.command:before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:inherit;
  background:linear-gradient(90deg,transparent,var(--blue),var(--blue2),transparent);
  filter:blur(12px);
  opacity:.52;
  transform:translateX(-100%);
  animation:scanInput 3s linear infinite;
}

@keyframes scanInput{
  to{transform:translateX(100%)}
}

.command input{
  position:absolute;
  inset:0 84px 0 0;
  z-index:2;
  width:calc(100% - 84px);
  border:0;
  outline:0;
  color:#fff;
  background:transparent;
  padding:0 33px;
  font-size:18px;
}

.command button{
  position:absolute;
  right:10px;
  top:10px;
  z-index:3;
  width:56px;
  height:56px;
  border:0;
  border-radius:50%;
  background:linear-gradient(180deg,#f0fbff,#9dcbff);
  cursor:pointer;
  box-shadow:0 0 34px rgba(120,205,255,.78);
}

.command svg{
  width:28px;
  height:28px;
  fill:none;
  stroke:#07111d;
  stroke-width:2.3;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.command-wave{
  position:absolute;
  left:33px;
  right:98px;
  bottom:12px;
  height:9px;
  opacity:.55;
  background:repeating-linear-gradient(90deg,transparent 0 10px,rgba(91,192,255,.78) 10px 12px);
  mask-image:linear-gradient(90deg,transparent,#000 18%,#000 82%,transparent);
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:11px;
  margin-top:17px;
}

.chips button{
  color:#aab7ce;
  border:1px solid rgba(120,185,255,.13);
  background:rgba(4,10,21,.34);
  border-radius:999px;
  padding:10px 20px;
  cursor:pointer;
  transition:.3s var(--ease);
  backdrop-filter:blur(8px);
}

.chips button:hover,
.chips button.active{
  color:#fff;
  border-color:rgba(108,188,255,.48);
  box-shadow:0 0 28px rgba(80,160,255,.22);
}

/* GLASS PANELS */
.glass{
  background:
    linear-gradient(180deg,rgba(5,12,26,.42),rgba(2,6,15,.30));
  border:1px solid rgba(130,190,255,.13);
  backdrop-filter:blur(18px);
  box-shadow:
    0 22px 90px rgba(0,0,0,.30),
    inset 0 0 42px rgba(86,160,255,.030);
}

.right-stack{
  position:absolute;
  z-index:30;
  right:0;
  top:176px;
  width:318px;
  display:grid;
  gap:14px;
}

.panel{
  border-radius:24px;
  padding:22px;
}

.panel p{
  margin:0 0 13px;
  color:#7cc7ff;
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.16em;
}

.panel h3{
  font-size:32px;
  margin-bottom:17px;
}

.metric{
  display:flex;
  justify-content:space-between;
  color:#c9d8ef;
  font-size:14px;
}

.meter{
  margin-top:12px;
  height:42px;
  border-bottom:1px solid rgba(130,190,255,.16);
  position:relative;
  overflow:hidden;
}

.meter i{
  position:absolute;
  left:0;
  bottom:11px;
  width:82%;
  height:2px;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--blue2));
  box-shadow:0 0 24px var(--blue);
  transition:width .8s var(--ease);
}

.guide div{
  color:#c7d4ea;
  line-height:1.6;
}

.guide button{
  width:100%;
  margin-top:18px;
  height:46px;
  border-radius:999px;
  border:1px solid rgba(125,190,255,.16);
  background:rgba(255,255,255,.03);
  color:#e8f3ff;
  cursor:pointer;
}

.path ol{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:13px;
}

.path li{
  display:grid;
  grid-template-columns:32px 1fr auto;
  align-items:center;
  gap:10px;
}

.path .thumb{
  width:32px;
  height:32px;
  border-radius:9px;
  background:
    radial-gradient(circle at 30% 20%,rgba(160,220,255,.8),rgba(50,90,150,.7) 44%,rgba(2,8,17,.9));
  box-shadow:0 0 18px rgba(92,180,255,.16);
}

.path b{
  display:block;
  font-size:13px;
}

.path span{
  color:#95a5bf;
  font-size:11px;
}

.path em{
  font-style:normal;
  color:#dceaff;
  opacity:.72;
}

/* CARD ORBIT */
.card-layer{
  position:absolute;
  left:0;
  right:0;
  bottom:118px;
  height:430px;
  z-index:24;
  pointer-events:none;
}

.world-card{
  position:absolute;
  width:218px;
  height:304px;
  border-radius:24px;
  padding:18px;
  pointer-events:auto;
  overflow:hidden;
  background:
    radial-gradient(circle at 48% 25%,rgba(135,205,255,.33),transparent 34%),
    linear-gradient(160deg,rgba(10,22,43,.82),rgba(3,7,17,.86));
  border:1px solid rgba(135,205,255,.30);
  box-shadow:
    0 24px 80px rgba(0,0,0,.46),
    0 0 34px rgba(77,165,255,.25);
  transition:
    left 1s var(--ease),
    top 1s var(--ease),
    transform 1s var(--ease),
    opacity .7s var(--ease);
}

.world-card:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(180deg,transparent 30%,rgba(0,0,0,.74)),
    repeating-linear-gradient(45deg,transparent 0 18px,rgba(150,220,255,.06) 18px 19px);
  z-index:0;
}

.world-card:after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:
    linear-gradient(145deg,rgba(255,255,255,.11),transparent 28%,rgba(82,180,255,.12));
  opacity:.65;
  pointer-events:none;
}

.world-card>*{
  position:relative;
  z-index:1;
}

.world-card small{
  color:#8ed3ff;
  letter-spacing:.16em;
  text-transform:uppercase;
  font-size:10px;
  font-weight:800;
}

.world-card h3{
  margin:165px 0 7px;
  font-family:Inter,system-ui,sans-serif;
  font-size:19px;
  line-height:1.06;
  text-transform:uppercase;
  font-weight:700;
  letter-spacing:-.03em;
}

.world-card p{
  margin:0;
  color:#aebdd4;
  font-size:12px;
}

.world-card.main{
  width:258px;
  height:338px;
  border-color:rgba(160,220,255,.52);
  box-shadow:
    0 30px 100px rgba(0,0,0,.52),
    0 0 58px rgba(95,185,255,.44);
}

.world-card.main h3{
  margin-top:190px;
  font-size:23px;
}

.card-energy{
  position:absolute;
  inset:auto 18px 18px 18px;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--blue),var(--cyan),transparent);
  box-shadow:0 0 18px var(--blue);
  opacity:.75;
}

/* WORLD MAP */
.world-map{
  position:absolute;
  z-index:25;
  left:50%;
  bottom:24px;
  transform:translateX(-50%);
  display:flex;
  align-items:flex-end;
  gap:48px;
}

.world-map:before{
  content:"";
  position:absolute;
  left:8%;
  right:8%;
  top:30px;
  border-top:1px dashed rgba(125,190,255,.36);
  z-index:-1;
}

.world-map button{
  width:142px;
  border:0;
  background:transparent;
  color:#93a4bf;
  display:grid;
  justify-items:center;
  gap:6px;
  cursor:pointer;
}

.world-map i{
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#9cddff;
  background:rgba(7,14,28,.45);
  border:1px solid rgba(120,190,255,.28);
  box-shadow:0 0 30px rgba(85,165,255,.17);
  font-style:normal;
}

.world-map .active i{
  background:radial-gradient(circle,#a9eeff,#497dff 58%,rgba(2,8,18,.4));
  box-shadow:0 0 52px rgba(105,200,255,.72);
}

.world-map b{
  color:#dceaff;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.world-map span{
  font-size:12px;
}

/* LOWER SECTIONS */
.scene-block,
.round-block{
  position:relative;
  z-index:20;
  width:min(1320px,calc(100% - 56px));
  min-height:88vh;
  margin:0 auto;
  padding:130px 0;
}

.scene-block h2{
  font-size:clamp(52px,5vw,86px);
  line-height:.96;
  max-width:880px;
}

.journey-grid,
.ranking-grid{
  margin-top:42px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.journey-card,
.rank-card{
  min-height:250px;
  border-radius:28px;
  padding:24px;
  background:rgba(5,12,26,.58);
  border:1px solid rgba(130,190,255,.14);
  backdrop-filter:blur(18px);
}

.journey-card b,
.rank-card b{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:50%;
  background:rgba(120,190,255,.1);
  border:1px solid rgba(120,190,255,.22);
  margin-bottom:32px;
}

.journey-card h3,
.rank-card h3{
  font-size:32px;
  margin-bottom:10px;
}

.journey-card p,
.rank-card p{
  color:#aebed7;
  line-height:1.6;
}

.round-block{
  display:grid;
  place-items:center;
}

.round-card{
  max-width:850px;
  padding:54px;
  border-radius:34px;
  text-align:center;
}

.round-card h2{
  font-size:clamp(60px,6vw,96px);
  line-height:.92;
}

.round-card>p:not(.kicker){
  color:#cbd8ee;
  font-size:20px;
  line-height:1.65;
}

.round-actions{
  display:flex;
  gap:14px;
  justify-content:center;
  margin-top:24px;
}

.round-actions button{
  height:48px;
  border-radius:999px;
  border:1px solid rgba(125,190,255,.18);
  background:rgba(255,255,255,.035);
  color:#e9f4ff;
  padding:0 24px;
  cursor:pointer;
}

/* FOOTER OS */
.os-strip{
  position:fixed;
  left:28px;
  bottom:26px;
  z-index:60;
  display:flex;
  align-items:center;
  gap:18px;
  min-width:304px;
  height:58px;
  padding:0 18px;
  border-radius:999px;
  background:rgba(5,10,20,.52);
  border:1px solid rgba(130,190,255,.13);
  backdrop-filter:blur(18px);
}

.os-strip b{
  display:block;
  color:#7fc6ff;
  font-size:11px;
  letter-spacing:.13em;
}

.os-strip span{
  color:#9eacc8;
  font-size:12px;
}

.os-strip em{
  margin-left:auto;
  display:flex;
  align-items:flex-end;
  gap:4px;
  height:18px;
}

.os-strip i{
  width:2px;
  background:#77c7ff;
  animation:eq 1.2s ease-in-out infinite;
}

.os-strip i:nth-child(1){height:7px}
.os-strip i:nth-child(2){height:14px;animation-delay:.1s}
.os-strip i:nth-child(3){height:9px;animation-delay:.2s}
.os-strip i:nth-child(4){height:17px;animation-delay:.3s}
.os-strip i:nth-child(5){height:10px;animation-delay:.4s}
.os-strip i:nth-child(6){height:13px;animation-delay:.5s}

@keyframes eq{
  50%{
    height:3px;
    opacity:.42;
  }
}

/* RESPONSIVE */
@media(max-width:1180px){
  .nav nav{
    display:none;
  }

  .hero{
    width:calc(100% - 28px);
    padding-top:122px;
  }

  .hero-copy{
    width:100%;
  }

  .presence-aurora{
    opacity:.35;
    right:-28vw;
    width:120vw;
  }

  .right-stack{
    position:relative;
    top:auto;
    right:auto;
    width:100%;
    margin-top:26px;
  }

  .card-layer{
    position:relative;
    bottom:auto;
    height:980px;
    margin-top:34px;
  }

  .world-map{
    position:relative;
    left:auto;
    bottom:auto;
    transform:none;
    flex-wrap:wrap;
    justify-content:center;
    gap:14px;
    margin-top:20px;
  }

  .world-map:before{
    display:none;
  }

  .journey-grid,
  .ranking-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:720px){
  .nav{
    top:12px;
    width:calc(100% - 20px);
    height:64px;
  }

  .brand{
    font-size:27px;
  }

  .presence-status{
    display:none;
  }

  h1{
    font-size:64px;
  }

  .subtitle{
    font-size:16px;
  }

  .command{
    height:68px;
  }

  .command input{
    font-size:16px;
    padding-left:22px;
  }

  .presence-aurora{
    display:none;
  }

  .world-depth{
    opacity:.42;
  }

  .card-layer{
    height:1500px;
  }

  .world-card,
  .world-card.main{
    width:calc(100% - 24px);
    height:260px;
    left:12px!important;
    transform:none!important;
  }

  .world-card h3,
  .world-card.main h3{
    margin-top:138px;
  }

  .os-strip{
    display:none;
  }
}