:root {
  --bg: #05050a;
  --ink: #f4f4f7;
  --dim: #8a8a95;
  --accent: #c9a5ff;
  --accent2: #ff6b9d;
  --gold: #f7c94b;
  --cyan: #7ce8ff;
  --line: rgba(255,255,255,.08);
  --panel: rgba(15,15,22,.55);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { background: var(--bg); color: var(--ink); overflow-x: hidden; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  position: relative;
  cursor: default;
}
.italic { font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; letter-spacing: -.02em; }

/* ==== Aurora background ==== */
.aurora {
  position: fixed; inset: 0; z-index: -3; overflow: hidden;
  filter: blur(80px) saturate(1.4);
}
.aurora-blob {
  position: absolute; width: 55vw; height: 55vw;
  border-radius: 50%; opacity: .55; mix-blend-mode: screen;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora-blob.b1 { background: radial-gradient(circle, #c9a5ff, transparent 60%); top: -10%; left: -10%; animation-delay: -2s; }
.aurora-blob.b2 { background: radial-gradient(circle, #ff6b9d, transparent 60%); bottom: -15%; right: -10%; animation-delay: -8s; }
.aurora-blob.b3 { background: radial-gradient(circle, #7ce8ff, transparent 60%); top: 40%; left: 40%; animation-delay: -14s; width: 45vw; height: 45vw; }
.aurora-blob.b4 { background: radial-gradient(circle, #f7c94b, transparent 60%); top: 60%; left: -15%; animation-delay: -6s; opacity: .3; }
@keyframes drift {
  0% { transform: translate(0,0) scale(1); }
  50% { transform: translate(8vw,-6vh) scale(1.15); }
  100% { transform: translate(-4vw,4vh) scale(.95); }
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
#starfield { position: fixed; inset: 0; z-index: -2; pointer-events: none; }

/* ==== Floating orbs ==== */
.orbs {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(1px);
  animation: orb-float 18s ease-in-out infinite;
  opacity: .55;
}
.orb.o1 {
  width: 14px; height: 14px; top: 18%; left: 12%;
  background: radial-gradient(circle, #c9a5ff, transparent 70%);
  box-shadow: 0 0 24px rgba(201,165,255,.55);
  animation-duration: 16s;
}
.orb.o2 {
  width: 10px; height: 10px; top: 62%; left: 78%;
  background: radial-gradient(circle, #ff6b9d, transparent 70%);
  box-shadow: 0 0 20px rgba(255,107,157,.55);
  animation-duration: 22s; animation-delay: -4s;
}
.orb.o3 {
  width: 18px; height: 18px; top: 34%; left: 88%;
  background: radial-gradient(circle, #7ce8ff, transparent 70%);
  box-shadow: 0 0 28px rgba(124,232,255,.45);
  animation-duration: 20s; animation-delay: -9s;
}
.orb.o4 {
  width: 8px; height: 8px; top: 78%; left: 22%;
  background: radial-gradient(circle, #f7c94b, transparent 70%);
  box-shadow: 0 0 18px rgba(247,201,75,.5);
  animation-duration: 14s; animation-delay: -2s;
}
.orb.o5 {
  width: 12px; height: 12px; top: 48%; left: 6%;
  background: radial-gradient(circle, #7cffb0, transparent 70%);
  box-shadow: 0 0 22px rgba(124,255,176,.4);
  animation-duration: 24s; animation-delay: -11s;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.25); }
  66% { transform: translate(-24px, 28px) scale(.85); }
}

/* ==== Nav ==== */
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 44px; position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(24px) saturate(1.2);
  background: linear-gradient(180deg, rgba(5,5,10,.75), rgba(5,5,10,.35));
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; font-weight: 900;
  font-size: 22px; letter-spacing: -.5px;
}
.brand > span:not(.brand-mark):not(.brand-text) {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-mark {
  display: inline-block; filter: drop-shadow(0 0 12px rgba(201,165,255,.6));
  animation: mirror-tilt 6s ease-in-out infinite;
}
@keyframes mirror-tilt {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

/* ==== SHIMMERING LOGO ==== */
.brand-text {
  display: inline-flex; font-weight: 900; letter-spacing: -1px;
  font-size: 24px;
}
.brand-text span {
  display: inline-block;
  background: linear-gradient(90deg,
    #ff6b9d 0%, #c9a5ff 20%, #7ce8ff 40%, #7cffb0 60%,
    #f7c94b 80%, #ff6b9d 100%);
  background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation:
    shimmer 4s linear infinite,
    letter-bob 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.35s), calc(var(--i) * 0.12s);
  transition: transform .25s cubic-bezier(.2,.9,.3,1.4);
}
.brand-text span:hover {
  transform: translateY(-4px) scale(1.15) rotate(-4deg);
  filter: drop-shadow(0 4px 16px rgba(255,107,157,.7));
}
.brand-text .dot {
  animation:
    shimmer 4s linear infinite,
    dot-pulse 1.8s ease-in-out infinite;
}
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}
@keyframes letter-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: .6; }
}
.brand-text.small { font-size: 18px; }

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a, .share-btn {
  color: var(--dim); text-decoration: none; font-size: 14px;
  position: relative; transition: color .2s;
  background: none; border: none; cursor: pointer; font-family: inherit;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 1px; background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: right .3s ease;
}
.nav-links a:hover, .share-btn:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }

/* ==== Hero ==== */
.hero {
  max-width: 860px; margin: 80px auto 60px; padding: 0 20px;
  text-align: center; position: relative;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(201,165,255,.35);
  color: var(--accent); background: rgba(201,165,255,.08);
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  margin-bottom: 32px; backdrop-filter: blur(10px);
  animation: pill-glow 4s ease-in-out infinite;
}
@keyframes pill-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(201,165,255,.15); }
  50% { box-shadow: 0 0 40px rgba(255,107,157,.3); }
}
.pill-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent2); box-shadow: 0 0 10px var(--accent2);
  animation: dot-pulse 1.8s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(52px, 9vw, 108px); font-weight: 900;
  letter-spacing: -3.5px; line-height: .92;
}
.hero-title .line {
  display: block;
  background: linear-gradient(180deg, #fff 20%, #6d6d78);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rise-in 1s cubic-bezier(.2,.9,.3,1.1) both;
}
.hero-title .line.italic {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 50%, var(--cyan) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rise-in 1s cubic-bezier(.2,.9,.3,1.1) .18s both, hero-shimmer 6s linear infinite;
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.sub {
  color: var(--dim); font-size: 18px; margin: 26px auto 0;
  max-width: 580px; line-height: 1.55;
  animation: rise-in 1s cubic-bezier(.2,.9,.3,1.1) .34s both;
}

/* ==== Seed form ==== */
.seed-form {
  margin-top: 44px; padding: 22px;
  background: var(--panel); backdrop-filter: blur(30px) saturate(1.2);
  border: 1px solid var(--line); border-radius: 24px;
  text-align: left; position: relative; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset;
  animation: rise-in 1s cubic-bezier(.2,.9,.3,1.1) .48s both;
}
.seed-form::before {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border-radius: 24px;
  background: conic-gradient(from 0deg,
    var(--accent), var(--accent2), var(--cyan), var(--gold), var(--accent));
  animation: rotate-border 8s linear infinite;
  opacity: .4;
  filter: blur(20px);
}
@keyframes rotate-border { to { transform: rotate(360deg); } }
.seed-wrap { position: relative; }
.seed-form textarea {
  width: 100%; background: rgba(0,0,0,.45); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px 18px; color: var(--ink);
  font-size: 16px; font-family: inherit; resize: none; outline: none;
  line-height: 1.5; transition: border-color .25s, box-shadow .25s;
}
.seed-form textarea::placeholder { color: rgba(200,200,220,.35); font-style: italic; }
.seed-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,165,255,.18), 0 0 40px rgba(201,165,255,.15);
}
.seed-form .row { display: flex; gap: 12px; margin-top: 14px; }
.select-wrap { position: relative; }
.select-wrap::after {
  content: '▾'; position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%); color: var(--dim); pointer-events: none;
}
.seed-form select {
  appearance: none;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--ink); padding: 14px 36px 14px 14px; border-radius: 14px;
  font-size: 14px; cursor: pointer; font-family: inherit;
}
.seed-form button {
  flex: 1; padding: 14px 20px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2) 60%, var(--gold));
  background-size: 200% 200%; color: #0a0a10; font-weight: 800; font-size: 15px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: box-shadow .25s;
  animation: btn-gradient 5s ease infinite;
  will-change: transform;
}
.seed-form button .btn-inner {
  transition: transform .12s ease-out;
}
@keyframes btn-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.seed-form button:hover {
  box-shadow: 0 20px 40px rgba(255,107,157,.35), 0 0 60px rgba(201,165,255,.25);
}
.seed-form button:active { transform: scale(.98); }
.seed-form button:disabled { opacity: .5; cursor: wait; animation: none; }
.btn-inner { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }

.hint {
  color: var(--dim); font-size: 12px; margin-top: 14px;
  text-align: center; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hint-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7cffb0; box-shadow: 0 0 10px rgba(124,255,176,.7);
  animation: dot-pulse 2s ease-in-out infinite;
}

/* ==== Marquee ==== */
.marquee {
  margin-top: 56px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  animation: rise-in 1s cubic-bezier(.2,.9,.3,1.1) .62s both;
}
.marquee-track {
  display: flex; gap: 28px; width: max-content;
  animation: marquee 42s linear infinite;
  color: var(--dim); font-size: 14px; letter-spacing: .04em;
  text-transform: lowercase; white-space: nowrap;
}
.marquee-track span:nth-child(odd) {
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==== Scroll reveal ==== */
.reveal {
  opacity: 0; transform: translateY(36px);
  transition: opacity .8s cubic-bezier(.2,.9,.3,1), transform .8s cubic-bezier(.2,.9,.3,1);
}
.reveal.in {
  opacity: 1; transform: translateY(0);
}

/* ==== How ==== */
.how, .gallery, .cta {
  max-width: 1100px; margin: 120px auto; padding: 0 20px;
}
.section-label {
  color: var(--accent); font-size: 12px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; margin-bottom: 14px;
}
.how h2, .gallery h2 {
  font-size: clamp(28px, 4vw, 44px); font-weight: 900;
  letter-spacing: -1.5px; margin-bottom: 40px; max-width: 640px;
  line-height: 1.1;
}
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.step {
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  backdrop-filter: blur(16px);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.step:hover {
  transform: translateY(-6px);
  border-color: rgba(201,165,255,.35);
  box-shadow: 0 20px 50px rgba(0,0,0,.35), 0 0 40px rgba(201,165,255,.08);
}
.step-num {
  display: block; color: var(--accent2); font-weight: 800;
  font-size: 12px; letter-spacing: .2em; margin-bottom: 14px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.3px; }
.step p { color: var(--dim); font-size: 14px; line-height: 1.55; }

/* ==== Gallery ==== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.gallery-card {
  aspect-ratio: 9/16; border-radius: 16px; overflow: hidden;
  position: relative; cursor: pointer; background: #0a0a10;
  border: 1px solid var(--line); display: block; color: inherit; text-decoration: none;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.2), box-shadow .35s ease;
}
.gallery-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 40px rgba(201,165,255,.15);
}
.gallery-card video { width: 100%; height: 100%; object-fit: cover; }
.gallery-card .label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 14px; font-size: 13px; font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.9));
  display: flex; flex-direction: column; gap: 4px;
}
.gallery-card .label-title { line-height: 1.3; }
.gallery-card .label-stats {
  font-size: 11px; font-weight: 500; color: rgba(244,244,247,.65);
  letter-spacing: .02em;
}
.gallery-empty { color: var(--dim); grid-column: 1/-1; text-align: center; padding: 48px; }

/* ==== CTA ==== */
.cta { max-width: 860px; }
.cta-card {
  position: relative; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(10,10,16,.65);
  backdrop-filter: blur(24px);
}
.cta-glow {
  position: absolute; inset: -40%;
  background: conic-gradient(from 120deg, transparent, rgba(201,165,255,.25), transparent 40%, rgba(255,107,157,.2), transparent 70%);
  animation: rotate-border 14s linear infinite;
  pointer-events: none;
}
.cta-inner {
  position: relative; padding: 56px 40px; text-align: center;
}
.cta-inner h3 {
  font-size: clamp(36px, 6vw, 64px); letter-spacing: -1.5px; margin-bottom: 12px;
}
.cta-inner p { color: var(--dim); font-size: 17px; margin-bottom: 28px; }
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 14px; text-decoration: none;
  color: #0a0a10; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent2) 60%, var(--gold));
  background-size: 200% 200%;
  animation: btn-gradient 5s ease infinite;
  transition: transform .2s ease, box-shadow .25s ease;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(255,107,157,.35);
}

/* ==== Footer ==== */
.foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 40px 44px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 13px; flex-wrap: wrap; gap: 16px;
  margin-top: 80px;
}
.foot-brand { display: flex; flex-direction: column; gap: 8px; }
.foot-tag { color: var(--dim); font-size: 12px; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { color: var(--dim); text-decoration: none; transition: color .2s; }
.foot-links a:hover { color: var(--ink); }

/* ==== Viewer (m.html) ==== */
.viewer-main { max-width: 1400px; margin: 40px auto; padding: 0 20px; }
.viewer-status { text-align: center; padding: 80px 20px; }
.spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.1); border-top-color: var(--accent);
  animation: spin 1s linear infinite; margin: 0 auto 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.viewer-status h2 { font-size: 24px; margin-bottom: 8px; }
.viewer-status p { color: var(--dim); }
.progress {
  max-width: 320px; margin: 24px auto 0; height: 6px;
  background: rgba(255,255,255,.06); border-radius: 999px; overflow: hidden;
}
.progress-bar {
  height: 100%; width: 5%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .6s ease;
}
.split-header { margin-bottom: 20px; }
.seed-echo {
  color: var(--dim); font-style: italic; font-size: 15px;
  padding: 14px 18px; border-left: 3px solid var(--accent);
  background: rgba(201,165,255,.05); border-radius: 0 10px 10px 0;
}
.split-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.split-cell {
  background: #0a0a10; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; position: relative;
  aspect-ratio: 9/16;
}
.loading-placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 100%; min-height: 220px; color: var(--dim);
  font-size: 14px; padding: 20px; text-align: center;
}
.split-cell .cell-label {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 14px; font-weight: 700; font-size: 14px;
  background: linear-gradient(180deg, rgba(0,0,0,.75), transparent);
}
.split-controls {
  display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
.split-controls button {
  padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--ink); font-weight: 600;
  cursor: pointer; font-size: 14px; font-family: inherit;
}

@media (max-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { padding: 16px 20px; }
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .seed-form .row { flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .cta-inner { padding: 40px 24px; }
  .foot { padding: 28px 20px; }
  .hero { margin-top: 48px; }
}
