/* ═══════════════════════════════════════════════════════
   AYRAA — Cinematic Ad · CSS
   Tone: Apple-minimal · Ultra-dark · Luxury tech
   Palette: Pure black + ice blue + soft violet
═══════════════════════════════════════════════════════ */

:root {
  --black:        #000000;
  --near-black:   #050507;
  --deep:         #08090D;
  --surface:      #0E1018;
  --card:         rgba(255,255,255,0.04);
  --card-border:  rgba(255,255,255,0.08);
  --card-border-bright: rgba(255,255,255,0.14);
  --blue:         #60A5FA;
  --blue-dim:     rgba(96,165,250,0.15);
  --blue-glow:    rgba(96,165,250,0.3);
  --violet:       #A78BFA;
  --violet-dim:   rgba(167,139,250,0.12);
  --green:        #34D399;
  --green-dim:    rgba(52,211,153,0.15);
  --white:        #FFFFFF;
  --white-90:     rgba(255,255,255,0.9);
  --white-60:     rgba(255,255,255,0.6);
  --white-30:     rgba(255,255,255,0.3);
  --white-10:     rgba(255,255,255,0.1);
  --white-05:     rgba(255,255,255,0.05);
  --font:         'Outfit', 'DM Sans', -apple-system, sans-serif;
  --w: 860px;
  --h: 484px;
  --r: 20px;
}

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

body {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  font-family: var(--font);
}

/* ── STAGE ── */
.cinema-stage {
  position: relative;
  width: var(--w);
  height: var(--h);
  background: var(--black);
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    0 0 0 1px rgba(96,165,250,0.04),
    0 60px 120px rgba(0,0,0,0.9),
    0 0 200px rgba(96,165,250,0.03);
  cursor: pointer;
  user-select: none;
}

/* Particle canvas */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}

/* ── SCENES ── */
.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}
.scene.active {
  opacity: 1;
  pointer-events: auto;
}

.scene-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ── VOICEOVER LINE ── */
.vo-line {
  position: absolute;
  bottom: 72px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
  padding: 0 60px;
}
.vo-text {
  font-size: 15px;
  font-weight: 300;
  color: var(--white-60);
  letter-spacing: 0.3px;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   SCENE 1 — HOOK
═══════════════════════════════════════════════════════ */
.s1-bg {
  background: radial-gradient(ellipse 60% 50% at 50% 50%,
    rgba(96,165,250,0.06) 0%,
    transparent 70%),
    var(--black);
}

.s1-content {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.waveform-container {
  position: relative;
  width: 600px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 1.2s ease, transform 1.4s cubic-bezier(0.16,1,0.3,1);
}
.waveform-container.reveal {
  opacity: 1;
  transform: scale(1);
}

.waveform-canvas {
  width: 600px;
  height: 120px;
  display: block;
}

.waveform-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse 80% 60% at 50% 50%,
    rgba(96,165,250,0.18) 0%,
    transparent 70%);
  pointer-events: none;
  filter: blur(12px);
}

/* ═══════════════════════════════════════════════════════
   SCENE 2 — PROBLEM
═══════════════════════════════════════════════════════ */
.s2-bg {
  background:
    radial-gradient(ellipse 50% 60% at 50% 40%,
      rgba(96,165,250,0.05) 0%, transparent 65%),
    var(--black);
}

.s2-content {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Phone UI */
.phone-ui {
  position: relative;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.phone-ui.reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.phone-frame {
  width: 220px;
  height: 320px;
  background: linear-gradient(160deg, #141820 0%, #0A0C12 100%);
  border-radius: 32px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 40px 80px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.07);
  overflow: hidden;
  position: relative;
}

.phone-inner {
  padding: 16px 14px 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.phone-time-s2 {
  font-size: 11px;
  font-weight: 500;
  color: var(--white-90);
  letter-spacing: 0.3px;
}

/* Incoming call */
.incoming-call {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.4s ease;
}
.incoming-call.hidden { opacity: 0; pointer-events: none; }

.ic-label {
  font-size: 10px;
  color: var(--white-30);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.ic-name {
  font-size: 18px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.3px;
}
.ic-number {
  font-size: 10px;
  color: var(--white-60);
  font-weight: 300;
}
.ic-actions {
  display: flex;
  gap: 32px;
  margin-top: 16px;
}
.ic-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ic-btn svg { width: 20px; height: 20px; }
.ic-decline {
  background: rgba(255,59,48,0.2);
  color: #FF3B30;
  border: 1px solid rgba(255,59,48,0.3);
}
.ic-accept {
  background: rgba(52,211,153,0.2);
  color: var(--green);
  border: 1px solid rgba(52,211,153,0.3);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.ic-accept.pulse {
  background: rgba(52,211,153,0.35);
  box-shadow: 0 0 0 8px rgba(52,211,153,0.12), 0 0 0 16px rgba(52,211,153,0.05);
}

/* AI answered */
.ai-answered {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.ai-answered.visible { opacity: 1; }

.aa-pulse-ring {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(96,165,250,0.3);
  animation: aa-pulse 2s ease-out infinite;
}
.aa-ring-2 { animation-delay: 0.7s; }

@keyframes aa-pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.aa-center {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(167,139,250,0.2));
  border: 1px solid rgba(96,165,250,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.aa-icon { color: var(--blue); }
.aa-icon svg { width: 24px; height: 24px; }

.aa-label {
  font-size: 10px;
  color: var(--blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  z-index: 2;
}

.phone-reflection {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.03) 0%,
    transparent 100%);
  border-radius: 32px 32px 0 0;
  pointer-events: none;
}

.phone-glow-halo {
  position: absolute;
  inset: -40px;
  background: radial-gradient(ellipse 60% 60% at 50% 50%,
    rgba(96,165,250,0.12) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(20px);
  z-index: -1;
}

/* ═══════════════════════════════════════════════════════
   SCENE 3 — SOLUTION
═══════════════════════════════════════════════════════ */
.s3-bg {
  background:
    radial-gradient(ellipse 70% 50% at 30% 50%,
      rgba(96,165,250,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 75% 50%,
      rgba(52,211,153,0.04) 0%, transparent 60%),
    var(--black);
}

.s3-content {
  position: relative;
  z-index: 5;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-top: 20px;
}

/* Glass panels */
.glass-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.panel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.panel-dot.blue { background: var(--blue); box-shadow: 0 0 6px var(--blue-glow); }
.panel-dot.green { background: var(--green); box-shadow: 0 0 6px rgba(52,211,153,0.4); }
.panel-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--white-90);
  letter-spacing: 0.3px;
  flex: 1;
}
.panel-badge {
  font-size: 9px;
  color: var(--blue);
  background: var(--blue-dim);
  border: 1px solid rgba(96,165,250,0.2);
  padding: 2px 7px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}
.panel-status-live {
  font-size: 9px;
  color: var(--green);
  letter-spacing: 0.5px;
}

/* Calendar panel */
.calendar-panel {
  width: 220px;
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.calendar-panel.reveal {
  opacity: 1;
  transform: translateX(0);
}

.cal-grid {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cal-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: border-color 0.3s ease, background 0.3s ease;
}
.cal-slot.filling {
  border-color: rgba(96,165,250,0.3);
  background: rgba(96,165,250,0.05);
}
.cal-time {
  font-size: 9px;
  color: var(--white-30);
  font-weight: 400;
  min-width: 44px;
  font-variant-numeric: tabular-nums;
}
.cal-event {
  font-size: 10px;
  color: var(--white-60);
  font-weight: 400;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}

/* Chat panel */
.chat-panel {
  width: 240px;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s cubic-bezier(0.16,1,0.3,1) 0.15s;
}
.chat-panel.reveal {
  opacity: 1;
  transform: translateX(0);
}

.chat-messages {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.chat-msg {
  max-width: 85%;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.chat-msg.visible {
  opacity: 1;
  transform: translateY(0);
}
.chat-msg.caller {
  background: rgba(255,255,255,0.07);
  color: var(--white-60);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.chat-msg.ayraa {
  background: linear-gradient(135deg, rgba(96,165,250,0.15), rgba(167,139,250,0.12));
  border: 1px solid rgba(96,165,250,0.2);
  color: var(--white-90);
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}

.chat-input-bar {
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.chat-input-pill {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 9px;
  color: var(--white-30);
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════
   SCENE 4 — HERO
═══════════════════════════════════════════════════════ */
.s4-bg {
  background:
    radial-gradient(ellipse 80% 80% at 50% 50%,
      rgba(96,165,250,0.07) 0%,
      rgba(167,139,250,0.04) 40%,
      transparent 70%),
    var(--black);
}

/* Halo rings */
.halo-system {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}
.halo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(96,165,250,0.08);
  opacity: 0;
  transition: opacity 0.8s ease;
}
.halo-ring.visible { opacity: 1; }
.h-ring-1 { width: 200px; height: 200px; animation: halo-spin 20s linear infinite; }
.h-ring-2 { width: 320px; height: 320px; animation: halo-spin 30s linear infinite reverse; border-color: rgba(167,139,250,0.06); }
.h-ring-3 { width: 440px; height: 440px; animation: halo-spin 45s linear infinite; border-color: rgba(96,165,250,0.04); }

@keyframes halo-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.s4-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

/* Logo */
.ayraa-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.9s ease, transform 1s cubic-bezier(0.16,1,0.3,1);
}
.ayraa-logo.reveal {
  opacity: 1;
  transform: scale(1);
}

.logo-orb {
  position: relative;
  width: 72px;
  height: 72px;
}
.orb-inner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg,
    rgba(96,165,250,0.15) 0%,
    rgba(167,139,250,0.1) 100%);
  border: 1px solid rgba(96,165,250,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: orb-breathe 3s ease-in-out infinite;
}
.orb-svg { width: 40px; height: 40px; }

@keyframes orb-breathe {
  0%, 100% { box-shadow: 0 0 20px rgba(96,165,250,0.2), 0 0 40px rgba(96,165,250,0.08); }
  50% { box-shadow: 0 0 40px rgba(96,165,250,0.35), 0 0 80px rgba(96,165,250,0.15); }
}

.orb-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(96,165,250,0.2) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  animation: orb-breathe 3s ease-in-out infinite;
}

.logo-wordmark {
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 8px;
  text-transform: uppercase;
}
.logo-tagline {
  font-size: 11px;
  font-weight: 300;
  color: var(--white-30);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Hero text */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-headline {
  font-size: 38px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.5px;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16,1,0.3,1);
  min-height: 46px;
}
.hero-headline.reveal {
  opacity: 1;
  transform: translateY(0);
}
.hero-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--white-60);
  letter-spacing: 0.3px;
  opacity: 0;
  transition: opacity 0.6s ease 0.2s;
  min-height: 18px;
}
.hero-sub.reveal { opacity: 1; }

/* CTA */
.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}
.cta-block.reveal {
  opacity: 1;
  transform: translateY(0);
}

.cta-pill {
  font-size: 10px;
  font-weight: 400;
  color: var(--white-60);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.cta-email {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cta-email-label {
  font-size: 10px;
  color: var(--white-30);
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.cta-email-addr {
  font-size: 11px;
  color: var(--blue);
  font-weight: 400;
  letter-spacing: 0.3px;
  border-bottom: 1px solid rgba(96,165,250,0.3);
  padding-bottom: 1px;
}

/* ═══════════════════════════════════════════════════════
   PLAYER BAR
═══════════════════════════════════════════════════════ */
.player-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 16px 10px;
  background: linear-gradient(0deg,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.6) 70%,
    transparent 100%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pb-progress-track {
  position: relative;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  cursor: pointer;
  transition: height 0.2s ease;
}
.pb-progress-track:hover { height: 5px; }

.pb-progress-fill {
  position: absolute;
  left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  pointer-events: none;
}
.pb-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px; height: 10px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.2s ease, left 0.1s linear;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(96,165,250,0.5);
}
.pb-progress-track:hover .pb-thumb { transform: translate(-50%, -50%) scale(1); }

.pb-scene-pip {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px; height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  pointer-events: none;
}

.pb-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pb-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  flex-shrink: 0;
}
.pb-btn:hover { color: var(--white-90); }
.pb-btn svg { width: 15px; height: 15px; }
.pb-playpause svg { width: 17px; height: 17px; }
.pb-loop.active { color: var(--blue); }

.pb-time {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.pb-scene-name {
  flex: 1;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  text-align: center;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── PAUSE OVERLAY ── */
.pause-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: var(--r);
}
.pause-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.pause-play-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(96,165,250,0.12);
  border: 1.5px solid rgba(96,165,250,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  transition: transform 0.2s ease, background 0.2s ease;
}
.pause-play-btn:hover {
  transform: scale(1.1);
  background: rgba(96,165,250,0.22);
}
.pause-play-btn svg { width: 26px; height: 26px; margin-left: 3px; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root {
    --w: calc(100vw - 24px);
    --h: calc((100vw - 24px) * 0.5628);
  }
  .hero-headline { font-size: 28px; }
  .logo-wordmark { font-size: 22px; }
  .s3-content { gap: 12px; }
  .calendar-panel { width: 180px; }
  .chat-panel { width: 200px; }
  .waveform-canvas { width: 100%; }
}