:root {
  /* compliance tokens: Interpret **tanso** *tanso daily rather than dry sustainability metric: each “day chamber” where temperature */
  --apricot: #FF9F5A;
  --pearl: #FFE7C7;
  --chrome: #C97955;
  --espresso: #130B10;
  --coral: #FF5F7E;
  --mint: #70FFD8;
  --violet: #A279FF;
  --display: Jost, Poppins, Futura, Avenir Next, Century Gothic, sans-serif;
  --ui: Outfit, Inter, Poppins, Avenir Next, sans-serif;
  --stamp: Syncopate, Copperplate, Eurostile, var(--ui);
  --design-token-tanso: "**tanso**";
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--pearl);
  background: var(--espresso);
  font-family: var(--ui);
}

button { font: inherit; color: inherit; }

.cockpit {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 159, 90, .24), transparent 34%),
    radial-gradient(circle at 14% 16%, rgba(255, 95, 126, .25), transparent 28%),
    radial-gradient(circle at 84% 75%, rgba(162, 121, 255, .22), transparent 30%),
    linear-gradient(130deg, #130B10 0%, #29110f 46%, #130B10 100%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.7) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 65%, rgba(255,231,199,.6) 0 1px, transparent 1px),
    repeating-linear-gradient(38deg, rgba(255,231,199,.035) 0 1px, transparent 1px 7px);
  background-size: 41px 41px, 53px 53px, 100% 100%;
  mix-blend-mode: screen;
  z-index: 1;
}

.aurora {
  position: absolute;
  width: 78vw;
  height: 26vh;
  border-radius: 50%;
  filter: blur(32px);
  opacity: .58;
  z-index: 0;
  animation: auroraDrift 16s ease-in-out infinite alternate;
}
.aurora-one { top: 8%; left: -18%; background: linear-gradient(135deg, transparent, var(--apricot), var(--coral) 48%, var(--violet) 78%, var(--mint)); transform: rotate(-13deg); }
.aurora-two { right: -26%; bottom: 10%; background: linear-gradient(135deg, transparent, var(--mint), var(--violet), var(--apricot)); transform: rotate(18deg); animation-duration: 19s; }

.chrome-frame {
  position: fixed;
  inset: 18px;
  border: 1px solid rgba(255, 231, 199, .34);
  border-radius: 34px;
  box-shadow: inset 0 0 0 2px rgba(201,121,85,.32), inset 0 0 44px rgba(255,159,90,.22), 0 0 60px rgba(255,95,126,.16);
  z-index: 4;
  pointer-events: none;
}
.chrome-frame:before, .chrome-frame:after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 26px;
  border: 1px solid rgba(112,255,216,.16);
}
.chrome-frame:after { inset: 22px; border-color: rgba(162,121,255,.14); filter: blur(.5px); }
.corner { position: absolute; width: 84px; height: 84px; border: 2px solid var(--chrome); filter: drop-shadow(0 0 14px rgba(255,159,90,.5)); }
.c1 { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-radius: 32px 0 0 0; }
.c2 { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-radius: 0 32px 0 0; }
.c3 { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 32px; }
.c4 { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-radius: 0 0 32px 0; }

.perimeter-tabs {
  position: fixed;
  top: 30px;
  right: 52px;
  display: flex;
  gap: 8px;
  z-index: 8;
}
.tab, .chapter-controls button {
  border: 1px solid rgba(255,231,199,.32);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,231,199,.18), rgba(201,121,85,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 0 16px rgba(201,121,85,.17);
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--stamp);
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.tab.active { color: var(--espresso); background: linear-gradient(135deg, var(--pearl), var(--apricot) 64%, var(--coral)); box-shadow: 0 0 24px rgba(255,159,90,.55); }

.wordmark-panel {
  position: absolute;
  left: 6vw;
  top: 10vh;
  z-index: 3;
}
.eyebrow, .module-kicker, .dial-label {
  margin: 0 0 10px;
  font-family: var(--stamp);
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--mint);
  text-shadow: 0 0 12px rgba(112,255,216,.5);
}
h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(64px, 11vw, 170px);
  line-height: .78;
  letter-spacing: -.055em;
  color: var(--pearl);
  text-shadow: 0 8px 0 rgba(201,121,85,.35), 0 0 32px rgba(255,95,126,.28);
}
.reflection {
  font-family: var(--display);
  font-size: clamp(64px, 11vw, 170px);
  line-height: .75;
  letter-spacing: -.055em;
  transform: scaleY(-1) skewX(-8deg);
  opacity: .14;
  filter: blur(2px);
  background: linear-gradient(var(--pearl), transparent);
  -webkit-background-clip: text;
  color: transparent;
}

.device {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 5;
  transition: transform .8s ease;
}
.compact-shell {
  position: relative;
  width: min(46vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255,231,199,.9), rgba(255,159,90,.14) 22%, rgba(19,11,16,.88) 55%, rgba(201,121,85,.32));
  border: 2px solid rgba(255,231,199,.48);
  box-shadow: inset 0 0 45px rgba(255,231,199,.22), inset 0 -30px 60px rgba(19,11,16,.8), 0 0 70px rgba(255,95,126,.28);
  display: grid;
  place-items: center;
}
.dial {
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: conic-gradient(from var(--angle, 20deg), var(--apricot), var(--coral), var(--violet), var(--mint), var(--apricot));
  box-shadow: inset 0 0 0 18px rgba(19,11,16,.76), inset 0 0 0 22px rgba(255,231,199,.26);
  transition: transform .9s cubic-bezier(.2,.8,.2,1), filter .6s ease;
}
.dial:before { content: ""; position: absolute; inset: 32px; border-radius: 50%; background: radial-gradient(circle at 36% 28%, rgba(255,231,199,.72), rgba(255,159,90,.22) 38%, rgba(19,11,16,.86)); }
.dial-content { position: relative; z-index: 2; width: 66%; text-align: center; transition: opacity .36s ease, transform .36s ease, filter .36s ease; }
.dial h2 { margin: 0; font-family: var(--display); text-transform: uppercase; font-size: clamp(30px, 4.8vw, 64px); line-height: .88; letter-spacing: -.035em; }
.dial p { color: var(--pearl); }
#statePoem { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 18px; color: rgba(255,231,199,.86); }
.meter { height: 7px; border-radius: 9px; background: rgba(255,231,199,.18); overflow: hidden; margin-top: 20px; }
.meter b { display: block; height: 100%; width: 40%; border-radius: inherit; background: linear-gradient(90deg, var(--apricot), var(--coral), var(--mint)); transition: width .8s ease; }

.orbit { position: absolute; inset: -22px; border-radius: 50%; animation: spin 18s linear infinite; }
.orbit-b { inset: 18px; animation-direction: reverse; animation-duration: 24s; }
.orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--pearl); box-shadow: 0 0 14px var(--apricot), 0 0 28px var(--coral); }
.orbit i:nth-child(1) { top: 8%; left: 48%; } .orbit i:nth-child(2) { top: 62%; right: 4%; background: var(--mint); } .orbit i:nth-child(3) { bottom: 11%; left: 18%; background: var(--violet); }

.glass-module {
  position: absolute;
  z-index: 6;
  width: min(30vw, 390px);
  min-height: 176px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,231,199,.36);
  background: linear-gradient(145deg, rgba(255,231,199,.19), rgba(255,159,90,.10) 48%, rgba(19,11,16,.55));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 -22px 40px rgba(19,11,16,.3), 0 24px 70px rgba(0,0,0,.35), 0 0 24px rgba(201,121,85,.2);
  backdrop-filter: blur(18px);
  transition: transform .8s ease, opacity .6s ease, filter .5s ease;
}
.module-left { left: 7vw; bottom: 14vh; transform: rotate(-4deg); }
.module-right { right: 7vw; top: 27vh; transform: rotate(3deg); }
.module-bottom { left: 50%; bottom: 5vh; transform: translateX(-50%) rotate(1deg); width: min(42vw, 560px); }
.glass-module h3 { margin: 0 0 10px; font-family: var(--display); font-size: 28px; letter-spacing: -.02em; }
.glass-module p:not(.module-kicker) { margin: 0; color: rgba(255,231,199,.78); line-height: 1.55; }

.skeleton-stack, .loading-ribs { position: absolute; inset: 24px; display: grid; gap: 12px; opacity: 0; pointer-events: none; transition: opacity .22s ease; }
.skeleton-stack span, .loading-ribs span, .dial-skeleton span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(100deg, rgba(255,231,199,.1), rgba(255,231,199,.72), rgba(201,121,85,.2));
  background-size: 220% 100%;
  animation: shimmer 1s linear infinite;
}
.skeleton-stack span:nth-child(2) { width: 72%; } .skeleton-stack span:nth-child(3) { width: 48%; }
.loading-ribs { grid-template-columns: repeat(5, 1fr); }
.dial-skeleton { position: absolute; inset: 24%; z-index: 3; opacity: 0; display: grid; align-content: center; gap: 13px; }
.dial-skeleton span { height: 15px; }
.polishing .module-content, .polishing .dial-content { opacity: .12; filter: blur(8px); transform: translateY(8px); }
.polishing .skeleton-stack, .polishing .loading-ribs, .polishing .dial-skeleton { opacity: 1; }

.chapter-controls { position: fixed; left: 52px; bottom: 36px; display: flex; gap: 10px; z-index: 8; }

.cockpit[data-state="1"] .device { transform: translate(5vw, -2vh) scale(.95); }
.cockpit[data-state="1"] .module-left { transform: translate(10vw, -6vh) rotate(2deg); }
.cockpit[data-state="1"] .module-right { transform: translate(-5vw, 10vh) rotate(-5deg); }
.cockpit[data-state="2"] .device { transform: translate(-7vw, 6vh) scale(.9); }
.cockpit[data-state="2"] .module-left { transform: translate(58vw, -20vh) rotate(6deg); }
.cockpit[data-state="2"] .module-right { transform: translate(-54vw, 28vh) rotate(-6deg); }
.cockpit[data-state="3"] .device { transform: scale(1.06); }
.cockpit[data-state="3"] { background: radial-gradient(circle at 50% 45%, rgba(112,255,216,.18), transparent 34%), radial-gradient(circle at 20% 20%, rgba(162,121,255,.28), transparent 31%), linear-gradient(130deg, #130B10, #21112a 55%, #130B10); }

@keyframes auroraDrift { from { transform: translateX(-4vw) rotate(-13deg) scale(1); } to { transform: translateX(12vw) translateY(4vh) rotate(8deg) scale(1.18); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -220% 0; } }

@media (max-width: 900px) {
  .perimeter-tabs { left: 28px; right: 28px; top: 28px; flex-wrap: wrap; }
  .wordmark-panel { left: 8vw; top: 17vh; }
  .compact-shell { width: 78vw; }
  .glass-module { width: 82vw; min-height: 130px; padding: 18px; }
  .module-left { left: 8vw; bottom: 24vh; }
  .module-right { right: 8vw; top: auto; bottom: 10vh; }
  .module-bottom { display: none; }
  .chapter-controls { left: 28px; bottom: 28px; }
}
