:root {
  --eazo-safe-area-top: max(56px, env(safe-area-inset-top, 0px));
  --eazo-safe-area-bottom: max(34px, env(safe-area-inset-bottom, 0px));
  --gold: #d8bd82;
  --ink: #0E1430;
  --cyan: #1BC2C2;
  --blue: #3A6BFF;
  --orange: #FF7A3C;
  --violet: #7A4DFF;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #0A0E22;
  color: #fff;
  font-family: Inter, 'Noto Sans SC', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.serif { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; }
.annot { font-family: 'IBM Plex Mono', ui-monospace, monospace; }

/* ---------- Surface (aurora collage) ---------- */
.surface {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(58vw 52vh at 25% 16%, rgba(27,194,194,.82), rgba(27,194,194,.17) 42%, transparent 68%),
    radial-gradient(52vw 60vh at 76% 18%, rgba(58,107,255,.95), rgba(58,107,255,.18) 48%, transparent 72%),
    radial-gradient(54vw 58vh at 18% 82%, rgba(255,122,60,.86), transparent 55%),
    radial-gradient(56vw 60vh at 90% 72%, rgba(122,77,255,.78), transparent 58%),
    linear-gradient(155deg, #172765 0%, #0E1430 46%, #070a18 100%);
  background-attachment: fixed;
}
.surface::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: .32; mix-blend-mode: soft-light;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 48%, rgba(216,189,130,.13) 49% 50%, transparent 51% 100%);
  background-size: 32px 32px, 32px 32px, 260px 260px;
  mask-image: radial-gradient(circle at 52% 24%, black, transparent 82%);
}
.surface::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.56'/%3E%3C/svg%3E");
}

/* ---------- Shared tokens ---------- */
.issue { color: var(--gold); font-weight: 800; font-size: 10px; letter-spacing: .23em; text-transform: uppercase; }
.vlabel { color: rgba(255,255,255,.66); font-weight: 800; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; border-left: 1px solid rgba(255,255,255,.18); padding-left: 8px; white-space: nowrap; }
.sec-label { font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .16em; color: rgba(255,255,255,.55); }
.rule { height: 1px; background: rgba(255,255,255,.14); margin: 14px 0; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
  border: 1px solid rgba(216,189,130,.42); border-radius: 999px;
  color: var(--gold); font-weight: 800; font-size: 10px; background: rgba(14,20,48,.34);
}
.glass {
  border: 1px solid rgba(216,189,130,.46); border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
  backdrop-filter: blur(18px); box-shadow: 0 18px 50px rgba(0,0,0,.3);
  padding: 13px 15px;
}
.glass.tilt { transform: rotate(-1deg); }
.uc { font-size: 12px; line-height: 1.55; color: rgba(255,255,255,.78); margin: 0 0 10px; }
.uc b { color: var(--gold); }
.cta {
  min-height: 48px; width: 100%; border: 0; border-radius: 999px; color: var(--ink);
  background: linear-gradient(135deg, #fff, var(--gold));
  font-weight: 900; font-size: 14px; letter-spacing: -.02em; cursor: pointer;
  box-shadow: 0 14px 34px rgba(216,189,130,.3);
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
}
.cta:active { transform: scale(.96); }
.cursor-dot {
  position: absolute; z-index: 6; display: grid; place-items: center;
  min-width: 52px; height: 52px; padding: 0 8px; border-radius: 999px;
  background: rgba(255,255,255,.94); color: var(--ink); font-weight: 900; font-size: 9px;
  letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 10px 30px rgba(0,0,0,.35);
  pointer-events: none; animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge { 0%,100%{ transform: translate(var(--tx,0), var(--ty,0)); } 50%{ transform: translate(var(--tx,0), calc(var(--ty,0px) - 6px)); } }

/* ---------- Top bar (owns top safe area) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: var(--eazo-safe-area-top) 16px 12px;
  background: linear-gradient(180deg, rgba(10,14,34,.86), rgba(10,14,34,.3) 70%, transparent);
  backdrop-filter: blur(8px);
}
.topbar-brand { flex: 1; min-width: 0; }
.backbtn {
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.06); color: #fff;
  border-radius: 999px; padding: 7px 13px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.backbtn::before { content: "‹ "; }
.lang { display: inline-flex; align-items: center; gap: 6px; }
.lang-ico { font-size: 11px; color: var(--gold); font-weight: 800; }
.lang select {
  appearance: none; -webkit-appearance: none;
  background: rgba(14,20,48,.5); color: #fff; border: 1px solid rgba(216,189,130,.42);
  border-radius: 999px; padding: 6px 26px 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23d8bd82' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}

/* ---------- Views ---------- */
.view { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; padding: 8px 18px var(--eazo-safe-area-bottom); }
.view[hidden] { display: none; }
.view.entering { animation: viewIn .42s cubic-bezier(.22,1,.36,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Home ---------- */
.home-head { padding: 10px 0 4px; }
.hero-title { margin: 6px 0 0; font-size: 44px; line-height: .82; letter-spacing: -.04em; transform: rotate(-3deg); transform-origin: left top; text-shadow: 0 16px 50px rgba(14,20,48,.56); }
.hero-title em { display: inline-block; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.86); font-style: italic; transform: translate(.06em,.05em) rotate(4deg); }
.hero-sub { margin: 22px 0 0; font-size: 14px; line-height: 1.7; color: #C6CCE0; max-width: 40ch; }
.gallery-meta { margin: 26px 0 18px; }
.gallery-heading { font-size: 22px; margin-top: 6px; }
.gallery-lead { font-size: 13px; line-height: 1.65; color: #A9B0C8; margin: 8px 0 0; }

.cards { display: flex; flex-direction: column; gap: 14px; padding-bottom: 20px; }
.card {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  border: 1px solid rgba(216,189,130,.28); border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  backdrop-filter: blur(14px); box-shadow: 0 16px 44px rgba(0,0,0,.28);
  padding: 16px 16px 16px 78px; color: #fff; min-height: 92px;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), border-color .2s, box-shadow .2s;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); border-color: rgba(216,189,130,.6); box-shadow: 0 22px 54px rgba(0,0,0,.4); outline: none; }
.card:active { transform: scale(.985); }
.card-thumb {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px; border-radius: 12px; border: 1px solid rgba(255,255,255,.3);
  filter: saturate(1.1);
}
.card-num { position: absolute; right: 14px; top: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: rgba(255,255,255,.4); }
.card-nav { font-size: 15px; font-weight: 700; }
.card-desc { font-size: 12px; line-height: 1.5; color: #A9B0C8; margin-top: 5px; }
.card-arrow { position: absolute; right: 16px; bottom: 14px; color: var(--gold); font-weight: 900; }

.thumb-1 { background: radial-gradient(circle at 42% 32%, #101319 0 9%, transparent 10%), radial-gradient(ellipse at 50% 35%, #1334d8 0 25%, rgba(58,107,255,.36) 37%, transparent 54%), radial-gradient(circle at 22% 78%, #FF7A3C 0 15%, transparent 38%), linear-gradient(180deg, #1BC2C2, #0E1430 74%); }
.thumb-2 { background: linear-gradient(115deg, transparent 0 42%, rgba(216,189,130,.72) 43% 45%, transparent 46%), radial-gradient(circle at 42% 58%, #7A4DFF, transparent 39%), linear-gradient(150deg, #101735, #3A6BFF 50%, #0E1430); }
.thumb-3 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.1) 0 1px, transparent 1px 12px), radial-gradient(circle at 50% 42%, #1BC2C2, transparent 40%), linear-gradient(180deg, #0E1430, #060713); }
.thumb-4 { background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.92) 0 8%, transparent 12%), conic-gradient(from 120deg at 50% 52%, #3A6BFF, #1BC2C2, #FF7A3C, #7A4DFF, #3A6BFF); }
.thumb-5 { background: linear-gradient(90deg, #172765 0 33%, #F3E9D8 33% 66%, #050608 66%); }

/* ---------- Capability shell ---------- */
.cap-inner { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.cap-head { display: flex; flex-direction: column; gap: 8px; }
.cap-headrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.title { margin: 4px 0 0; font-size: 40px; line-height: .82; letter-spacing: -.04em; transform: rotate(-3deg); transform-origin: left top; text-shadow: 0 16px 50px rgba(14,20,48,.56); }
.title em { display: inline-block; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.86); font-style: italic; transform: translate(.06em,.05em) rotate(4deg); }
.float-tl { position: absolute; left: 12px; top: 12px; }
.float-bl { position: absolute; left: 12px; bottom: 10px; font-size: 9px; color: rgba(255,255,255,.6); }
.block { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 3D ---------- */
.stage3d {
  position: relative; height: 300px; border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: radial-gradient(circle at 50% 45%, rgba(58,107,255,.35), transparent 60%);
  touch-action: none;
}
#glcanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
#glcanvas:active { cursor: grabbing; }
#dragHint { --tx: 0; --ty: 0; right: 16%; top: 34%; }
.mat-row { display: flex; align-items: center; gap: 10px; }
.swatches { display: flex; gap: 10px; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(255,255,255,.4); cursor: pointer; transition: transform .15s, outline-color .15s; }
.swatch:active { transform: scale(.92); }
.swatch.on { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Scrollytelling ---------- */
.scroll-stage { position: relative; height: 62vh; max-height: 520px; min-height: 360px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); }
.scroll-track { position: absolute; inset: 0; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.scroll-track::-webkit-scrollbar { display: none; }
.scene { position: relative; height: 100%; scroll-snap-align: start; display: grid; place-items: center; overflow: hidden; }
.art { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.art-1 { background: radial-gradient(circle at 42% 32%, #101319 0 9%, transparent 10%), radial-gradient(ellipse at 50% 35%, #1334d8 0 25%, rgba(58,107,255,.36) 37%, transparent 54%), radial-gradient(circle at 22% 78%, #FF7A3C 0 15%, transparent 38%), linear-gradient(180deg, #1BC2C2, #0E1430 74%); }
.art-2 { background: linear-gradient(115deg, transparent 0 42%, rgba(216,189,130,.72) 43% 45%, transparent 46%), radial-gradient(circle at 74% 21%, rgba(255,255,255,.78), transparent 13%), radial-gradient(circle at 42% 58%, #7A4DFF, transparent 39%), linear-gradient(150deg, #101735, #3A6BFF 50%, #0E1430); }
.art-3 { background: repeating-linear-gradient(90deg, rgba(255,255,255,.08) 0 1px, transparent 1px 21px), radial-gradient(circle at 50% 42%, #1BC2C2, transparent 29%), radial-gradient(circle at 25% 82%, #FF7A3C, transparent 25%), linear-gradient(180deg, #0E1430, #060713); }
.scene-copy { position: relative; z-index: 2; text-align: center; padding: 0 20px; will-change: transform; }
.parallax-tag { display: block; font-family: 'Playfair Display', serif; color: rgba(255,255,255,.95); text-shadow: 0 8px 24px rgba(0,0,0,.5); }
.parallax-tag.big { font-size: 44px; font-style: italic; transform: rotate(-3deg); }
.parallax-tag.sub { margin-top: 12px; font-size: 13px; font-style: normal; color: rgba(255,255,255,.82); }
.scroll-rail { position: absolute; right: 8px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: rgba(255,255,255,.14); z-index: 5; }
.scroll-thumb { position: absolute; left: 0; right: 0; top: 0; height: 33%; border-radius: 2px; background: linear-gradient(var(--gold), var(--orange)); transition: top .2s ease; }
.bottomc { --tx: -50%; --ty: 0; left: 50%; bottom: 14px; transform: translateX(-50%); transition: opacity .3s; }
.bottomc::before { content: "↑ "; }

/* ---------- Micro-interactions ---------- */
.micro-btn {
  min-height: 52px; width: 100%; border-radius: 14px; border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.06); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), background .18s, border-color .18s, box-shadow .18s, color .18s;
  position: relative; overflow: hidden;
}
.micro-btn.is-hover { background: rgba(216,189,130,.16); border-color: rgba(216,189,130,.6); color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(216,189,130,.22); }
.micro-btn.is-press { background: linear-gradient(135deg,#fff,var(--gold)); color: var(--ink); transform: scale(.96); }
.micro-btn.is-done { background: rgba(27,194,194,.18); border-color: rgba(27,194,194,.7); color: #8ff0f0; }
.ripple { position: absolute; border-radius: 999px; background: rgba(216,189,130,.5); transform: translate(-50%,-50%) scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: translate(-50%,-50%) scale(9); opacity: 0; } }
.state-track { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.state-dot { text-align: center; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.14); border-radius: 8px; padding: 6px 2px; transition: all .2s; }
.state-dot.active { color: var(--gold); border-color: rgba(216,189,130,.6); background: rgba(216,189,130,.12); }

.flip { perspective: 900px; height: 130px; cursor: pointer; outline: none; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.34,1.4,.5,1); transform-style: preserve-3d; }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; border-radius: 16px; display: grid; place-items: center; backface-visibility: hidden; border: 1px solid rgba(216,189,130,.4); }
.flip-front { background: linear-gradient(135deg, rgba(122,77,255,.5), rgba(58,107,255,.35)); }
.flip-back { background: linear-gradient(135deg, rgba(27,194,194,.4), rgba(14,20,48,.7)); transform: rotateY(180deg); }
.flip:focus-visible { box-shadow: 0 0 0 2px var(--gold); border-radius: 16px; }

/* ---------- Motion ---------- */
.motion-frame { position: relative; height: 260px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(27,194,194,.25), transparent 65%); }
.breath { width: 96px; height: 96px; border-radius: 999px; background: radial-gradient(circle at 40% 35%, #8ff0f0, #1BC2C2 45%, #3A6BFF 90%); box-shadow: 0 0 60px rgba(27,194,194,.55); animation: breathe 2.4s ease-in-out infinite; }
.breath-ring { position: absolute; border-radius: 999px; border: 1px solid rgba(216,189,130,.4); animation: breathe 2.4s ease-in-out infinite; }
.breath-ring.r1 { width: 150px; height: 150px; }
.breath-ring.r2 { width: 200px; height: 200px; opacity: .5; animation-delay: .3s; }
@keyframes breathe { 0%,100% { transform: scale(.85); } 50% { transform: scale(1.15); } }
.motion-frame.paused .breath, .motion-frame.paused .breath-ring { animation-play-state: paused; }
.motion-controls { display: flex; align-items: center; gap: 12px; }
.playbtn { width: 40px; height: 40px; flex: none; border-radius: 999px; border: 0; background: linear-gradient(135deg,#fff,var(--gold)); color: var(--ink); font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.timeline { flex: 1; display: flex; gap: 3px; align-items: center; }
.kf { flex: 1; height: 8px; border-radius: 2px; background: rgba(255,255,255,.2); transition: background .1s; }
.kf.on { background: var(--gold); }
.time { font-size: 11px; color: var(--gold); min-width: 40px; text-align: right; }

/* ---------- Style switch ---------- */
.tabs { display: flex; gap: 8px; }
.tab { flex: 1; padding: 9px 6px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.05); color: rgba(255,255,255,.86); font-size: 12px; font-weight: 700; cursor: pointer; transition: all .2s; }
.tab.active { background: linear-gradient(135deg,#fff,var(--gold)); color: var(--ink); border-color: transparent; }
.style-preview { border-radius: 18px; }
.style-card { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid rgba(216,189,130,.6); min-height: 168px; padding: 18px; transition: background .4s, color .4s, border-color .4s; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
.style-glow { position: absolute; inset: 0; opacity: 1; transition: opacity .4s, background .4s; }
.style-body { position: relative; z-index: 2; }
.style-kicker { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; font-weight: 800; }
.style-title { font-size: 26px; margin-top: 6px; }
.style-title em { font-style: italic; }
.style-desc { font-size: 11px; margin-top: 8px; }
/* aurora */
.style-card.s-aurora { background: linear-gradient(155deg,#172765,#0E1430); color: #fff; }
.style-card.s-aurora .style-glow { background: radial-gradient(circle at 78% 20%, rgba(58,107,255,.55), transparent 55%); }
.style-card.s-aurora .style-kicker { color: var(--gold); }
.style-card.s-aurora .style-title em { color: #8FB4FF; }
.style-card.s-aurora .style-desc { color: rgba(255,255,255,.72); }
/* letterpress */
.style-card.s-letter { background: #F3E9D8; color: #2A2118; border-color: rgba(154,123,63,.5); }
.style-card.s-letter .style-glow { background: repeating-linear-gradient(45deg, rgba(154,123,63,.06) 0 2px, transparent 2px 10px); }
.style-card.s-letter .style-kicker { color: #9A7B3F; }
.style-card.s-letter .style-title { color: #2A2118; }
.style-card.s-letter .style-title em { color: #B5442E; }
.style-card.s-letter .style-desc { color: #6B5B3E; }
/* minimal */
.style-card.s-minimal { background: #050608; color: #EDE9DF; border-color: rgba(124,132,166,.5); }
.style-card.s-minimal .style-glow { background: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 22px 22px; }
.style-card.s-minimal .style-kicker { color: #7C84A6; }
.style-card.s-minimal .style-title em { color: #8ff0f0; }
.style-card.s-minimal .style-desc { color: rgba(237,233,223,.6); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--eazo-safe-area-bottom) + 16px); transform: translate(-50%, 20px);
  z-index: 40; max-width: 88vw; padding: 12px 18px; border-radius: 14px;
  background: rgba(14,20,48,.92); border: 1px solid rgba(216,189,130,.5); color: #fff;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(10px); box-shadow: 0 16px 44px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .28s, transform .28s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 720px) {
  .view { padding-left: 32px; padding-right: 32px; }
  .cards { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
