:root {
  --void: #050814;
  --ink: #eef6ff;
  --muted: rgba(200, 220, 255, 0.62);
  --cyan: #5ee7ff;
  --cyan-deep: #2bb8e6;
  --amber: #f0c27a;
  --glass: rgba(10, 18, 40, 0.55);
  --line: rgba(120, 190, 255, 0.18);
  --font: "Outfit", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

body.speaking .core {
  filter: saturate(1.15) brightness(1.08);
}

body.speaking .core-ring {
  animation-duration: 2.2s;
  opacity: 0.95;
}

body.speaking .wave i {
  animation-play-state: running;
}

.stage {
  position: relative;
  min-height: 100dvh;
  padding: calc(14px + var(--safe-t)) 14px calc(24px + var(--safe-b));
  overflow-x: hidden;
  overflow-y: auto;
}

.stage-photo {
  position: absolute;
  inset: 0;
  background:
    url("./assets/luna-orbit-ref.png") center 40% / cover no-repeat;
  opacity: 0.72;
  filter: saturate(1.15) contrast(1.08) brightness(0.95);
  transform: scale(1.05);
  animation: photoDrift 32s ease-in-out infinite alternate;
}

.stage-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 48% at 50% 40%, rgba(30, 100, 180, 0.12), transparent 58%),
    linear-gradient(180deg, rgba(5, 8, 20, 0.35) 0%, rgba(5, 8, 20, 0.55) 42%, rgba(5, 8, 20, 0.9) 100%);
  pointer-events: none;
}

#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.55;
}

@keyframes photoDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(0, -1.5%, 0); }
}

.top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 8px;
}

.brand-lock {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-mark {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.brand-name {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.top-nav {
  display: none;
  gap: 6px;
}

.top-nav button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.top-nav button:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.top-cta {
  text-decoration: none;
  color: #061018;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  font-size: 0.78rem;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 10px 30px rgba(46, 180, 230, 0.25);
}

.orbit {
  position: relative;
  z-index: 3;
  max-width: min(1200px, 100%);
  margin: 0 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
}

.core-wrap {
  order: -1;
  text-align: center;
  padding: 8px 0 4px;
}

.core-eyebrow {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.core-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
  background: linear-gradient(180deg, #fff 20%, #b8e8ff 70%, #7ec8f0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 36px rgba(0, 0, 0, 0.5));
}

.core-line {
  margin: 12px auto 18px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.45;
}

.core-line em {
  font-style: normal;
  color: var(--ink);
  font-weight: 600;
}

.core {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  overflow: visible;
}

#orbCanvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  /* sem drop-shadow: ele derrete os raios em blob */
}

.core-halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, rgba(150, 220, 255, 0.18), transparent 45%),
    radial-gradient(circle, rgba(50, 130, 220, 0.14), transparent 70%);
  pointer-events: none;
  animation: haloBreathe 5.5s ease-in-out infinite;
  opacity: 0.75;
}

body.speaking .core-halo {
  opacity: 1;
  animation-duration: 2.4s;
}

@keyframes haloBreathe {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 0.95; transform: scale(1.04); }
}

.core-ring {
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  border: 1px solid rgba(120, 220, 255, 0.28);
  animation: ringPulse 5.5s ease-in-out infinite;
  pointer-events: none;
}

.core-ring.delay {
  inset: -16%;
  animation-delay: 1.2s;
  opacity: 0.55;
}

.core-ring.delay2 {
  inset: -24%;
  animation-delay: 2.1s;
  opacity: 0.35;
  border-style: dashed;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(0.96); opacity: 0.35; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

.core-status {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(220, 240, 255, 0.72);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.core-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}

.btn-fire,
.btn-ghost,
.btn-fire.mini {
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
}

.btn-fire {
  color: #061018;
  background: linear-gradient(135deg, var(--cyan), #3ec4f0);
  box-shadow: 0 12px 28px rgba(50, 180, 230, 0.28);
}

.btn-fire.mini { padding: 10px 14px; font-size: 0.85rem; }

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.2);
  padding: 16px 16px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  outline: none;
}

.panel:hover,
.panel:focus-visible,
.panel.on {
  transform: translateY(-3px);
  border-color: rgba(120, 220, 255, 0.4);
  box-shadow: 0 22px 60px rgba(20, 80, 140, 0.35);
}

.panel-media {
  height: 128px;
  margin: -16px -16px 14px;
  background-image:
    linear-gradient(180deg, rgba(5, 8, 20, 0.05) 10%, rgba(5, 8, 20, 0.78)),
    var(--img);
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.panel-media.tall { height: 168px; }

.panel-kicker {
  margin: 0 0 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.panel h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.zap-thread {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.bubble {
  max-width: 92%;
  padding: 8px 11px;
  border-radius: 14px;
  font-size: 0.78rem;
  line-height: 1.3;
}

.bubble.in {
  justify-self: start;
  background: rgba(255, 255, 255, 0.08);
}

.bubble.out {
  justify-self: end;
  background: rgba(60, 180, 230, 0.22);
  border: 1px solid rgba(120, 220, 255, 0.25);
}

.feat {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.feat li {
  font-size: 0.82rem;
  color: rgba(230, 240, 255, 0.85);
  padding-left: 14px;
  position: relative;
}

.feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(94, 231, 255, 0.6);
}

.agenda-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.agenda-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
}

.agenda-list span { color: var(--amber); font-weight: 700; }

.wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 54px;
  margin: 16px 0 8px;
}

.wave i {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), transparent);
  animation: wave 1.1s ease-in-out infinite;
  animation-play-state: paused;
}

.wave i:nth-child(odd) { animation-duration: 0.9s; }
.wave i:nth-child(3n) { animation-duration: 1.25s; }
.wave i:nth-child(1) { animation-delay: 0.05s; }
.wave i:nth-child(2) { animation-delay: 0.12s; }
.wave i:nth-child(3) { animation-delay: 0.18s; }
.wave i:nth-child(4) { animation-delay: 0.08s; }
.wave i:nth-child(5) { animation-delay: 0.22s; }
.wave i:nth-child(6) { animation-delay: 0.14s; }
.wave i:nth-child(7) { animation-delay: 0.28s; }
.wave i:nth-child(8) { animation-delay: 0.1s; }
.wave i:nth-child(9) { animation-delay: 0.2s; }
.wave i:nth-child(10) { animation-delay: 0.16s; }
.wave i:nth-child(11) { animation-delay: 0.24s; }
.wave i:nth-child(12) { animation-delay: 0.06s; }

@keyframes wave {
  0%, 100% { height: 10px; opacity: 0.45; }
  50% { height: 46px; opacity: 1; }
}

.voice-timer {
  margin: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.floor {
  position: relative;
  z-index: 4;
  max-width: 1200px;
  margin: 18px auto 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.floor a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
}

.pitch {
  position: relative;
  z-index: 4;
  max-width: 1200px;
  margin: 28px auto 8px;
}

.pitch-inner {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(12, 28, 56, 0.72), rgba(6, 12, 28, 0.85));
  backdrop-filter: blur(14px);
  padding: 22px 20px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.pitch-inner h2 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
}

.pitch-inner > p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 62ch;
}

.pitch-inner strong { color: var(--ink); font-weight: 700; }

.pitch-grid {
  display: grid;
  gap: 12px;
}

.pitch-grid article {
  padding: 14px 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pitch-grid h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
}

.pitch-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

@media (min-width: 800px) {
  .pitch-grid { grid-template-columns: repeat(3, 1fr); }
}

.btn-ghost.block {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
}

.zap-sheet .zap-lead {
  margin: 0 18px 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.zap-form {
  display: grid;
  gap: 10px;
  padding: 0 18px calc(16px + var(--safe-b));
}

.zap-form label {
  display: grid;
  gap: 5px;
}

.zap-form label span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.zap-form input {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.tiny {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Chat sheet */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 12px;
  background: rgba(3, 6, 16, 0.55);
  backdrop-filter: blur(8px);
}

.sheet[hidden] { display: none !important; }

.sheet-panel {
  width: min(520px, 100%);
  max-height: min(82dvh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 18px 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 22, 48, 0.96), rgba(6, 10, 24, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 18px 18px 10px;
}

.sheet-top h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.4rem;
}

.sheet-x {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.3rem;
  cursor: pointer;
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 8px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
  animation: msgIn 0.45s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.msg.luna {
  align-self: flex-start;
  background: rgba(80, 160, 220, 0.12);
  border: 1px solid rgba(120, 200, 255, 0.18);
}

.msg.user {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.08);
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 18px 10px;
}

.chat-quick button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 18px calc(14px + var(--safe-b));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-form input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
}

@media (min-width: 900px) {
  .top-nav { display: flex; }

  .orbit {
    grid-template-columns: minmax(200px, 0.95fr) minmax(280px, 1.1fr) minmax(200px, 0.95fr);
    grid-template-rows: auto auto;
    gap: clamp(10px, 1.6vh, 18px) clamp(12px, 1.5vw, 20px);
    padding-top: 4px;
    padding-bottom: 8px;
    align-content: center;
    min-height: calc(100dvh - 110px);
  }

  .panel-zap { grid-column: 1; grid-row: 1; }
  .panel-voice { grid-column: 1; grid-row: 2; }
  .core-wrap {
    order: 0;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding: 0;
  }
  .panel-comensal { grid-column: 3; grid-row: 1; }
  .panel-agenda { grid-column: 3; grid-row: 2; }

  .core { width: min(300px, 28vw, 42vh); }

  .panel {
    animation: floatSoft 7s ease-in-out infinite;
    min-height: 0;
  }
  .panel-media {
    height: clamp(72px, 11vh, 118px);
  }
  .panel-media.tall {
    height: clamp(84px, 13vh, 140px);
  }
  .panel h2 { font-size: clamp(1.05rem, 1.5vw, 1.3rem); }
  .panel-copy { font-size: 0.84rem; }
  .zap-thread { margin-top: 10px; gap: 5px; }
  .bubble { font-size: 0.74rem; padding: 7px 10px; }

  .panel-voice { animation-delay: 1.1s; }
  .panel-comensal { animation-delay: 0.5s; }
  .panel-agenda { animation-delay: 1.6s; }
}

/* Telas mais baixas: compacta sem cortar */
@media (min-width: 900px) and (max-height: 860px) {
  .orbit {
    min-height: 0;
    align-content: start;
  }
  .core { width: min(240px, 26vw, 36vh); }
  .core-title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
  .core-line { margin: 8px auto 12px; font-size: 0.92rem; }
  .core-actions { margin-top: 10px; gap: 8px; }
  .panel { padding: 12px 12px 14px; }
  .panel-media { height: 64px; margin: -12px -12px 10px; }
  .panel-media.tall { height: 76px; }
  .zap-thread .bubble:nth-child(n + 3) { display: none; }
  .agenda-list div:nth-child(n + 3) { display: none; }
}

@media (min-width: 900px) and (max-height: 720px) {
  .core { width: min(200px, 22vw, 32vh); }
  .core-status { font-size: 0.6rem; bottom: 8%; }
  .panel-copy { font-size: 0.78rem; line-height: 1.35; }
  .feat li { font-size: 0.76rem; }
}

@media (max-width: 899px) {
  .top {
    margin-bottom: 4px;
  }
  .core-wrap {
    padding: 2px 0 6px;
  }
  .core {
    width: min(220px, 58vw, 38vh);
  }
  .core-title {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
  }
  .core-line {
    margin: 8px auto 10px;
    font-size: 0.92rem;
  }
  .core-actions {
    margin-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 4;
  }
  .panel-media {
    height: 96px;
  }
  .panel-media.tall {
    height: 112px;
  }
  .btn-fire,
  .btn-ghost {
    padding: 11px 16px;
    font-size: 0.9rem;
  }
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .stage-photo { animation: none; }
}
