*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  background: #000;
}

body {
  font-family: var(--font-main);
  font-optical-sizing: auto;
  background: #000;
  color: rgba(255, 255, 255, 0.85);
  overflow-x: hidden;
  width: 100%;
  max-width: var(--site-max-w);
  margin-inline: auto;
}

:root {
  --font-main: "Rubik", sans-serif;
  --font-title: "Meera Inimai", sans-serif;
  --font-radio: "DM Mono", monospace;
  --site-max-w: 1600px;
  --hero-pre-inset: 20px;
  --hero-radio-right: var(--hero-pre-inset);
  --hero-align-top: var(--hero-pre-inset);
  --hero-viewer-margin-bottom: calc(var(--hero-pre-inset) * 2);
}

/* ── Radio entry / back button ────────────────────────────── */
.radio-entry-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10010;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  padding: 7px 16px;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.radio-entry-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* ── Copy inside sticky 3D viewer (paragraph bottom) ── */
.hero-viewer-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
  pointer-events: none;
  will-change: opacity;
}

.hero-viewer-lead {
  gap: 0;
  width: 100%;
  text-align: center;
}

.hero-intro-lead {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  font-size: clamp(20px, 2.4vw, 21px);
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  padding: 0;
  text-wrap: balance;
}

.hero-viewer-bottom .hero-intro-lead {
  margin: 0 0 calc(var(--hero-viewer-margin-bottom) * 3);
}

/* ── Hero section ──────────────────────────────────────── */
.hero {
  position: relative;
  height: auto;
  background: transparent;
}


.hero-canvas-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  isolation: isolate;
}

.hero-canvas-wrap--static {
  position: relative;
  top: auto;
  height: auto;
  background: transparent;
}

.hero-viewer-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(38vh, 360px);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  will-change: opacity;
  background: linear-gradient(to bottom, transparent, #000);
}

#three-canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
  filter: blur(0.6px);
}

/* ── Radio pill: fixed top-right across the page ── */
.hero-radio-pill {
  font-family: var(--font-radio);
  position: fixed;
  top: var(--hero-align-top);
  right: var(--hero-radio-right);
  left: auto;
  z-index: 10010;
  width: auto;
  max-width: min(420px, calc(100vw - var(--hero-pre-inset) * 2));
  height: 52px;
  background: #000000;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  pointer-events: all;
  transform: scale(0.8);
  transform-origin: top right;
  padding-left: 7px;
}

.hero-radio-pill .radio-pill-circle {
  width: 38px;
  height: 38px;
  background: #000000;
  border-radius: 0;
}

.hero-radio-pill .radio-pill-circle canvas {
  width: 38px;
  height: 38px;
  background-color: var(--site-bg);
  border-radius: 0;
}


.hero-pill-scenes {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px 0 10px;
  flex-shrink: 0;
}

.hero-pill-dot {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-pill-dot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-pill-dot:hover {
  opacity: 0.75;
  transform: scale(1.15);
}

.hero-pill-dot--active {
  opacity: 1;
}

/* ── Content section ────────────────────────────────────── */
.content {
  background: #000;
  padding: 100px 24px 160px;
  position: relative;
  z-index: 2;
}

.content-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}

.content-heading {
  font-size: clamp(28px, 4.2vw, 48px);
  font-style: normal;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: #fff;
  text-wrap: balance;
  overflow-wrap: break-word;
  margin-top: clamp(48px, 8vw, 100px);
  padding-top: 0;
  position: relative;
  z-index: 1;
}

.content-lead {
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  max-width: 750px;
}

.content-body {
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.45);
  max-width: 750px;
}

.content-image {
  width: 100%;
  align-self: stretch;
  overflow: hidden;
  border-radius: 12px;
}

.content-image img {
  width: 100%;
  height: auto;
  display: block;
}

.content-image--large {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100vw - 48px);
  max-width: 1200px;
  border-radius: 4px;
}

.content-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
  width: 80%;
  margin: 0 auto;
}

.content-duo {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-block: 60px;
}

.content-duo-img {
  position: absolute;
  width: 55%;
  overflow: hidden;
  border-radius: 4px;
}

.content-duo-img img {
  width: 100%;
  height: auto;
  display: block;
}

.content-duo-img--a {
  left: 0;
  bottom: 0;
  z-index: 1;
}

.content-duo-img--b {
  right: 0;
  top: 0;
  z-index: 2;
}

.split-canvas-wrap {
  height: 500px;
  background: transparent;
  overflow: hidden;
}

#split-canvas {
  display: block;
}

.content-cta {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.content-cta:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ── Radio agent: Gemini text → scenario + 8×8 grid (/api/*) ── */
.agent-block {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  text-align: left;
  min-width: 0;
}


.agent-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.agent-prompt {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 120px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  overflow-wrap: break-word;
  word-break: break-word;
}

.agent-prompt::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.agent-prompt:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.agent-prompt-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.agent-prompt-row .agent-prompt {
  flex: 1;
  min-width: 0;
}

.agent-generate {
  flex-shrink: 0;
  width: 72px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  line-height: 1.4;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.agent-generate:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.agent-generate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.agent-scenario-btn {
  padding: 0;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}

.agent-scenario-btn:hover:not(:disabled) {
  color: rgba(255, 255, 255, 0.75);
}

.agent-scenario-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.agent-arrow {
  display: flex;
  justify-content: center;
  color: #fff;
  margin: 4px 0;
}

.agent-output {
  width: 100%;
  min-height: 120px;
  padding: 20px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.agent-status {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  min-height: 1.5em;
}

.agent-status:empty {
  display: none;
}

.sim-canvas {
  display: block;
  width: min(480px, 100%);
  aspect-ratio: 1;
  border-radius: 12px;
  background: #0c0e14;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.sim-canvas--hidden {
  display: none;
}

/* ── Radio pill ──────────────────────────────────────────── */
.radio-pill {
  width: 100%;
  max-width: 420px;
  align-self: center;
  height: 64px;
  background: #2a2a2a;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  flex-shrink: 0;
}

.radio-pill-circle {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px #2a2a2a;
}

.radio-pill-circle canvas {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
}

.radio-pill-ticker-wrap {
  flex: 0 1 120px;
  min-width: 0;
  max-width: 120px;
  overflow: hidden;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 12px), transparent);
}

.radio-pill-ticker-track {
  display: flex;
  white-space: nowrap;
  animation: pill-marquee 9s linear infinite;
  will-change: transform;
}

.radio-pill-ticker {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-radio);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.035em;
  color: rgba(255, 255, 255, 0.88);
  flex-shrink: 0;
}

@keyframes pill-marquee {
  from { transform: translateX(0%); }
  to   { transform: translateX(-50%); }
}

.radio-pill-ticker--marquee {
  animation: pill-marquee 9s linear infinite;
}

.radio-pill-audio {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 10px 0 18px;
}

.radio-pill-speaker-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.radio-pill-speaker-btn:hover {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
}

.radio-pill-speaker-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.radio-pill-speaker-svg {
  display: block;
}

.radio-pill-speaker-svg--muted {
  display: none;
}

.radio-pill-speaker-btn--muted .radio-pill-speaker-svg--on {
  display: none;
}

.radio-pill-speaker-btn--muted .radio-pill-speaker-svg--muted {
  display: block;
}

.radio-pill-audio--muted .pill-bar {
  height: 3px !important;
  opacity: 0.32;
}

.radio-pill-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}

@keyframes pill-bar-bounce {
  0%, 100% { height: 3px; }
  50%       { height: var(--bar-peak, 14px); }
}

.pill-bar {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.7);
  height: 5px;
  transform-origin: bottom center;
  animation: pill-bar-bounce var(--bar-dur, 0.9s) ease-in-out infinite;
  animation-delay: var(--bar-delay, 0s);
}

.hero-radio-pill .pill-bar:nth-child(1) { --bar-dur: 0.75s; --bar-delay: 0.00s; --bar-peak: 16px; }
.hero-radio-pill .pill-bar:nth-child(2) { --bar-dur: 0.60s; --bar-delay: 0.18s; --bar-peak: 11px; }
.hero-radio-pill .pill-bar:nth-child(3) { --bar-dur: 0.85s; --bar-delay: 0.35s; --bar-peak: 18px; }
.hero-radio-pill .pill-bar:nth-child(4) { --bar-dur: 0.65s; --bar-delay: 0.08s; --bar-peak: 13px; }
.hero-radio-pill .pill-bar:nth-child(5) { --bar-dur: 0.95s; --bar-delay: 0.25s; --bar-peak: 10px; }

.radio-page {
  font-family: var(--font-radio);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.radio-page .content-inner {
  flex: 1;
  justify-content: center;
  width: 100%;
  max-width: 640px;
  min-width: 0;
  overflow-x: hidden;
  gap: 172px;
}

.radio-page .agent-block {
  max-width: 480px;
}

/* ── Objects side panel ──────────────────────────────────── */
.obj-panel {
  position: fixed;
  top: 0;
  right: max(0px, calc(50vw - var(--site-max-w) / 2));
  width: 268px;
  height: 100vh;
  background: #111317;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  z-index: 5000;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.obj-panel:not([hidden]) {
  display: flex;
}

.obj-panel.open {
  transform: translateX(0);
}

.obj-panel-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.obj-panel-title {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.obj-panel-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 13px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}

.obj-panel-close:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.07);
}

.obj-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.obj-panel-body::-webkit-scrollbar { width: 4px; }
.obj-panel-body::-webkit-scrollbar-track { background: transparent; }
.obj-panel-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 2px; }

.obj-panel-empty {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  text-align: center;
  padding: 28px 0;
  letter-spacing: 0.04em;
}

/* Toggle tab ──────────────────────────────────────────── */
.obj-panel-toggle {
  position: fixed;
  right: max(0px, calc(50vw - var(--site-max-w) / 2));
  top: 50%;
  transform: translateY(-50%);
  z-index: 5001;
  background: #1c1f25;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-right: none;
  border-radius: 7px 0 0 7px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 10px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: right 0.26s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s, background 0.15s;
}

.obj-panel-toggle:hover {
  background: #252830;
  color: rgba(255, 255, 255, 0.8);
}

.obj-panel-toggle.panel-open {
  right: 268px;
}

.obj-panel-toggle-label {
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: inherit;
}

/* Object cards ────────────────────────────────────────── */
.obj-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.obj-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.obj-card-preview {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #0c0e14;
  display: block;
}

.obj-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obj-card-name {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.obj-card-color-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.obj-card-count {
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
}

.obj-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.obj-tag {
  font-size: 9px;
  letter-spacing: 0.05em;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.42);
  text-transform: lowercase;
  white-space: nowrap;
}

.obj-tag--motion {
  background: rgba(82, 136, 224, 0.15);
  color: rgba(82, 136, 224, 0.85);
}

.obj-tag--conv {
  background: rgba(155, 110, 224, 0.15);
  color: rgba(155, 110, 224, 0.85);
}

.obj-tag--talking {
  background: rgba(82, 201, 122, 0.18);
  color: rgba(82, 201, 122, 0.9);
  animation: obj-blink 1.6s ease-in-out infinite;
}

@keyframes obj-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Timer ───────────────────────────────────────────────── */
.obj-timer {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.obj-timer-bar-track {
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 1px;
  overflow: hidden;
}

.obj-timer-bar-fill {
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 1px;
  transition: width 0.5s linear;
}

.obj-timer-bar-fill--low {
  background: rgba(232, 98, 58, 0.7);
}

.obj-timer-meta {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.04em;
}
