:root {
  --zenith: #0A3C87;
  --sky: #2F7FD1;
  --cloud: #F6FAFF;
  --sun: #FFD59A;
  --glow: #E6DCFF;
  --gold: #C9922F;
  --chaos-red: #C0203A;
  --chaos-bg: #1a0508;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--zenith);
  color: var(--cloud);
  font-family: "Manrope", "Segoe UI", sans-serif;
  overflow-x: hidden;
  cursor: none;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: none; }
a { color: inherit; cursor: none; }

@media (pointer: coarse) {
  body, button, a { cursor: auto; }
  .cloud-cursor { display: none; }
}

.canary {
  position: fixed; top: 8px; left: 8px; z-index: 9999;
  font: 11px "Space Mono", monospace; color: rgba(255,255,255,.35);
  pointer-events: none;
}

/* ============ cursor ============ */
.cloud-cursor {
  position: fixed; top: 0; left: 0; width: 34px; height: 20px;
  pointer-events: none; z-index: 9998; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at 40% 60%, #fff 0%, rgba(255,255,255,.9) 40%, rgba(255,255,255,0) 75%);
  filter: blur(.3px);
  transition: transform .04s linear;
}
.cloud-cursor::after {
  content: ""; position: absolute; left: -14px; top: 6px; width: 16px; height: 8px;
  background: radial-gradient(ellipse, rgba(255,255,255,.5), rgba(255,255,255,0) 70%);
  opacity: .7;
}

/* ============ chaos screen ============ */
.chaos {
  position: relative; min-height: 100vh; width: 100%;
  background: radial-gradient(ellipse at 50% 20%, #2b070c 0%, var(--chaos-bg) 60%, #050101 100%);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  animation: chaos-shake 0.35s infinite;
}
.chaos.risen { animation: none; }
@keyframes chaos-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 1px); }
  75% { transform: translate(1px, 1px); }
}
@media (prefers-reduced-motion: reduce) {
  .chaos { animation: none; }
}

.chaos-chart { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }

.chaos-pops { position: absolute; inset: 0; pointer-events: none; }
.chaos-pop {
  position: absolute; padding: 8px 14px; border-radius: 3px;
  background: #2a0a0f; border: 1px solid var(--chaos-red); color: #ffdde3;
  font: 700 13px/1.2 "Space Mono", monospace; letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
  animation: pop-in .35s ease both, pop-out .4s ease 2.6s forwards;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(-8px) scale(.95); } }

.chaos-ticker {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 34px;
  background: #200509; border-top: 1px solid rgba(192,32,58,.5); overflow: hidden;
}
.chaos-ticker-track {
  display: flex; gap: 40px; white-space: nowrap; padding: 8px 0;
  font: 700 13px "Space Mono", monospace; color: var(--chaos-red);
  animation: ticker-scroll 14s linear infinite;
}
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.chaos-core { position: relative; z-index: 2; text-align: center; }
.chaos-label {
  font: 700 12px "Space Mono", monospace; letter-spacing: .12em; text-transform: uppercase;
  color: #ff8fa2; margin: 0 0 18px;
}
.rise-btn {
  background: rgba(255,255,255,.92); color: var(--zenith); border: none; border-radius: 999px;
  padding: 18px 40px; font: 600 17px "Manrope", sans-serif; letter-spacing: .01em;
  box-shadow: 0 0 40px rgba(255,255,255,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rise-btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 60px rgba(255,255,255,.4); }

/* ============ cloud punch transition ============ */
.cloud-punch {
  position: fixed; inset: 0; z-index: 500; pointer-events: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0; transition: none;
}
.cloud-punch.active { opacity: 1; }
.punch-layer { width: 100%; position: absolute; bottom: -10%; left: 0; }
.punch-3 { transform: translateY(0); transition: transform .9s cubic-bezier(.6,0,.2,1); }
.punch-2 { transform: translateY(0); transition: transform 1.05s cubic-bezier(.6,0,.2,1); }
.punch-1 { transform: translateY(0); transition: transform 1.2s cubic-bezier(.6,0,.2,1); }
.cloud-punch.punching .punch-3 { transform: translateY(60%); }
.cloud-punch.punching .punch-2 { transform: translateY(80%); }
.cloud-punch.punching .punch-1 { transform: translateY(110%); }

/* ============ calm site ============ */
.calm {
  position: relative; z-index: 1; background: linear-gradient(180deg, var(--zenith) 0%, var(--sky) 100%);
  display: none;
}
.calm.visible { display: block; }

.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; padding: 16px 22px;
  font-family: "Space Mono", monospace; pointer-events: none;
  mix-blend-mode: normal;
}
.hud-left, .hud-right { display: flex; align-items: baseline; gap: 6px; text-align: right; }
.hud-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; }
.hud-value { font-size: 20px; font-weight: 700; color: var(--sun); }
.hud-unit { font-size: 11px; opacity: .7; }

.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; overflow: hidden;
  padding: 100px 20px 60px;
}
.hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: .9; }
.hero-sage {
  position: relative; z-index: 1; width: min(60vw, 420px); margin-bottom: 10px;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.35));
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@media (prefers-reduced-motion: reduce) { .hero-sage { animation: none; } }

.sun {
  position: absolute; top: 6%; left: 6%; width: 90px; height: 90px; z-index: 1;
  border-radius: 50%; background: radial-gradient(circle, var(--sun) 0%, rgba(255,213,154,0) 70%);
  opacity: .35; filter: blur(2px); transition: opacity 1.5s ease, transform 1.5s ease, filter 1.5s ease;
}
.sun.bright { opacity: 1; transform: scale(1.6); filter: blur(6px) drop-shadow(0 0 60px var(--sun)); }

.hero-title {
  position: relative; z-index: 2; font-family: "Give You Glory", cursive; font-weight: 400;
  font-size: clamp(48px, 9vw, 96px); margin: 0; color: var(--cloud);
  text-shadow: 0 0 24px var(--glow), 0 0 50px rgba(230,220,255,.5);
}
.hero-sub { position: relative; z-index: 2; font-size: 15px; opacity: .8; margin: 8px 0 0; letter-spacing: .02em; }

.stillness-caption {
  position: relative; z-index: 2; margin-top: 18px; font-family: "Give You Glory", cursive;
  font-size: 20px; color: var(--sun); opacity: 0; transition: opacity 1.2s ease;
}
.stillness-caption.show { opacity: 1; }

.section-title {
  font-family: "Give You Glory", cursive; font-weight: 400; font-size: clamp(32px, 5vw, 48px);
  text-align: center; margin: 0 0 6px; color: var(--cloud);
  text-shadow: 0 0 16px var(--glow);
}
.section-sub { text-align: center; opacity: .75; font-size: 14px; margin: 0 0 34px; }

/* ============ fud wall ============ */
.fudwall { padding: 90px 20px 60px; max-width: 720px; margin: 0 auto; position: relative; }
.fud-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.fud-input {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  padding: 12px 18px; color: var(--cloud); font-size: 14px; width: 280px; max-width: 70vw;
}
.fud-input::placeholder { color: rgba(255,255,255,.5); }
.fud-submit {
  background: var(--gold); color: #2a1c05; border: none; border-radius: 999px; padding: 12px 20px;
  font-weight: 700; font-size: 13px;
}
.fud-sky {
  position: relative; height: 320px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.12));
  border: 1px solid rgba(255,255,255,.15);
}
.fud-bubble {
  position: absolute; bottom: -40px; left: var(--x, 50%); transform: translateX(-50%);
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); border-radius: 999px;
  padding: 7px 14px; font-size: 12px; white-space: nowrap; max-width: 240px;
  overflow: hidden; text-overflow: ellipsis;
  animation: rise-pop var(--dur, 6s) ease-in forwards;
}
@keyframes rise-pop {
  0% { bottom: -40px; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { bottom: 92%; opacity: 0; transform: translateX(-50%) scale(.6); }
}
.fud-counter { text-align: center; font-family: "Space Mono", monospace; font-size: 12px; opacity: .7; margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.fud-counter-mine { color: var(--sun); opacity: .95; }

/* ============ listening ============ */
.listening { padding: 60px 20px; text-align: center; }
.headphones-btn {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
  width: 96px; height: 96px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--cloud); margin: 0 auto; transition: transform .2s ease, background .2s ease;
}
.headphones-btn:hover { transform: scale(1.06); background: rgba(255,255,255,.18); }
.now-playing {
  margin: 22px auto 0; max-width: 320px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 18px;
}
.np-label { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; opacity: .6; margin: 0; }
.np-track { font-family: "Space Mono", monospace; font-size: 16px; margin: 6px 0 0; color: var(--sun); }
.np-time { font-family: "Space Mono", monospace; font-size: 12px; opacity: .7; margin: 2px 0 0; }
.np-controls { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.np-btn {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: var(--cloud);
  border-radius: 999px; padding: 6px 14px; font-size: 12px;
}

/* ============ teachings ============ */
.teachings { padding: 120px 20px; max-width: 620px; margin: 0 auto; }
.teaching {
  font-family: "Give You Glory", cursive; font-size: clamp(22px, 4vw, 32px); text-align: center;
  color: var(--glow); text-shadow: 0 0 18px rgba(230,220,255,.6);
  opacity: 0; transform: translateY(18px); transition: opacity 1s ease, transform 1s ease;
  margin: 0 0 90px;
}
.teaching.show { opacity: 1; transform: translateY(0); }

/* ============ cloud layer parallax ============ */
.cloudlayer { padding: 60px 0 0; }
.cloud-parallax {
  position: relative; height: 46vh; min-height: 260px; overflow: hidden;
}
.cloud-peek {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(192,32,58,.35), rgba(192,32,58,0) 40%),
              repeating-linear-gradient(90deg, rgba(255,80,100,.15) 0 6px, transparent 6px 20px);
  opacity: 0; transition: opacity .4s ease;
}
.cloud-parallax:hover .cloud-peek { opacity: 1; }
.parallax-layer {
  position: absolute; bottom: 0; left: -5%; width: 110%; transition: transform .25s ease-out;
}
.cloud-parallax:hover .parallax-3 { transform: translateY(-14px); }
.cloud-parallax:hover .parallax-2 { transform: translateY(-24px) translateX(6px); }
.cloud-parallax:hover .parallax-1 { transform: translateY(-38px) translateX(-6px); }

/* ============ footer ============ */
.site-footer { padding: 50px 20px 60px; text-align: center; }
.footer-chrome {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.footer-ticker { font-family: "Space Mono", monospace; font-weight: 700; color: var(--sun); }
.footer-ca, .footer-link {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  padding: 8px 16px; font-size: 12px; color: var(--cloud); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; font-family: "Space Mono", monospace;
}
.footer-note { font-size: 12px; opacity: .55; max-width: 360px; margin: 0 auto; }

/* ============ toast ============ */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(10,20,40,.9); border: 1px solid rgba(255,255,255,.2); color: var(--cloud);
  padding: 10px 20px; border-radius: 999px; font-size: 13px; z-index: 9997;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 480px) {
  .fud-input { width: 100%; }
  .hud { padding: 12px 14px; }
  .hud-value { font-size: 16px; }
}
