/* --aura é a cor ativa do orbe; registrada como <color> para poder animar. */
@property --aura {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff5d62;
}

:root {
  --bg: #0b0a14;
  --ink: #f4efe6;
  --ink-soft: rgba(244, 239, 230, 0.68);
  --ink-faint: rgba(244, 239, 230, 0.42);
  --line: rgba(244, 239, 230, 0.14);
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --aura: #ff5d62;
  transition: --aura 1.4s ease-in-out;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* Sem isto, qualquer display: flex/grid nosso anularia o atributo hidden. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip; /* o halo do orbe passa da largura da tela no celular */
  background-color: var(--bg);
  background-image: radial-gradient(
    130% 70% at 50% 0%,
    color-mix(in oklab, var(--aura) 16%, transparent),
    transparent 62%
  );
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Poeira de estrelas bem discreta ao fundo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 82% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 24% 46%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 58%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 46% 86%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 92%, #fff 50%, transparent 51%);
}

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.topbar {
  height: 24px;
  flex: none;
}

/* ---------- Hero ---------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 3dvh, 28px);
  text-align: center;
}

.hero__title {
  margin: 0;
  max-width: 13ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 9.2vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__title em {
  font-style: italic;
  color: var(--aura);
}

.hero__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

/* ---------- Orbe ---------- */

.orb {
  position: relative;
  width: min(80vw, 39dvh, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.orb__halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in oklab, var(--aura) 55%, transparent) 0%,
    color-mix(in oklab, var(--aura) 18%, transparent) 42%,
    transparent 68%
  );
  filter: blur(22px);
  animation: breathe 5.5s ease-in-out infinite;
}

.orb__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in oklab, var(--aura) 50%, transparent);
}

.orb__ring--outer {
  inset: 0;
  opacity: 0.35;
  animation: ripple 5.5s ease-in-out infinite;
}

.orb__ring--inner {
  inset: 7%;
  opacity: 0.6;
  animation: ripple 5.5s ease-in-out -2.75s infinite;
}

/* Camadas dentro da esfera, de baixo para cima (z-index):
   1 manchas de cor · 2 espectro (só no neutro) · 3 brilho giratório
   4 reflexo · 5 faíscas · 6 símbolo · 7 borda de vidro */
/* Brilho em volta da esfera. Fica fora dela porque o clip-path da esfera cortaria uma sombra
   externa; respira no mesmo ritmo. */
.orb::before {
  content: "";
  position: absolute;
  inset: 14%;
  border-radius: 50%;
  box-shadow: 0 0 64px color-mix(in oklab, var(--aura) 65%, transparent);
  animation: breathe-core 5.5s ease-in-out infinite;
  pointer-events: none;
}

/* O Safari (iPhone) ignora o canto arredondado do overflow quando os filhos são animados e a
   esfera aparece como um quadrado; o clip-path corta em círculo de verdade. */
.orb__core {
  position: relative;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50%);
  isolation: isolate;
  background: radial-gradient(
    circle,
    color-mix(in oklab, var(--aura) 60%, #fff) 0%,
    var(--aura) 55%,
    color-mix(in oklab, var(--aura) 55%, var(--bg)) 100%
  );
  animation: breathe-core 5.5s ease-in-out infinite;
}

.orb__core::before,
.orb__core::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.orb__core::before {
  z-index: 4;
  background: radial-gradient(
    circle at 30% 24%,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.16) 22%,
    transparent 42%
  );
}

.orb__core::after {
  z-index: 7;
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.4),
    inset 0 0 26px rgba(255, 255, 255, 0.3),
    inset 0 -18px 36px rgba(11, 10, 20, 0.26);
}

.orb__blob {
  position: absolute;
  z-index: 1;
  width: 75%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(20px);
  transition: opacity 1s ease;
}

.orb__blob--a {
  top: -18%;
  left: -12%;
  background: color-mix(in oklab, var(--aura) 55%, #fff);
  animation: drift-a 8s ease-in-out infinite alternate;
}

/* As outras duas manchas são a cor da aura com o matiz deslocado;
   a primeira declaração é o fallback para quem não suporta oklch(from …). */
.orb__blob--b {
  right: -15%;
  bottom: -20%;
  background: color-mix(in oklab, var(--aura) 65%, #ff8fc7);
  background: oklch(from var(--aura) calc(l + 0.03) c calc(h + 28));
  animation: drift-b 10s ease-in-out infinite alternate;
}

.orb__blob--c {
  left: -20%;
  bottom: -10%;
  width: 65%;
  background: color-mix(in oklab, var(--aura) 65%, #4b3cff);
  background: oklch(from var(--aura) calc(l - 0.06) c calc(h - 26));
  animation: drift-c 12s ease-in-out infinite alternate;
}

.orb__spectrum {
  position: absolute;
  z-index: 2;
  inset: -12%;
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.34) 0%, transparent 58%),
    conic-gradient(from 0deg, #ff5d62, #ff9d42, #ffd84d, #4fd68e, #4fa9ff, #8583ff, #bb80ff, #ff5d62);
  filter: blur(14px);
  transition: opacity 1.1s ease;
  animation: spin 18s linear infinite;
}

.orb.is-neutral .orb__spectrum {
  opacity: 1;
}

.orb.is-neutral .orb__blob {
  opacity: 0;
}

.orb__swirl {
  position: absolute;
  z-index: 3;
  inset: -30%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 18%,
    transparent 40%,
    rgba(255, 255, 255, 0.25) 62%,
    transparent 80%
  );
  filter: blur(16px);
  mix-blend-mode: soft-light;
  animation: spin 14s linear infinite;
}

.orb__spark {
  position: absolute;
  z-index: 5;
  width: 5%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.8);
  opacity: 0;
  animation: twinkle 6s ease-in-out infinite;
}

.orb__spark--a {
  top: 30%;
  left: 20%;
  --dx: 380%;
  --dy: -320%;
}

.orb__spark--b {
  top: 62%;
  left: 72%;
  --dx: -300%;
  --dy: -420%;
  animation-duration: 7.5s;
  animation-delay: -2.5s;
}

.orb__spark--c {
  top: 76%;
  left: 32%;
  width: 3.5%;
  --dx: 460%;
  --dy: -260%;
  animation-duration: 9s;
  animation-delay: -5s;
}

.orb__icon {
  position: absolute;
  z-index: 6;
  inset: 0;
  margin: auto;
  width: 46%;
  height: 46%;
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.8);
  filter: drop-shadow(0 1px 5px color-mix(in oklab, var(--aura) 50%, #000));
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.orb__icon.is-active {
  opacity: 1;
  transform: none;
}

.orb__icon--question {
  width: 58%;
  height: 58%;
  stroke-width: 2.1;
  filter: drop-shadow(0 1px 7px rgba(44, 22, 96, 0.55));
}

/* ---------- Etiqueta da cor ---------- */

.aura-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(244, 239, 230, 0.06);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.aura-chip.is-swapping {
  opacity: 0;
  transform: translateY(4px);
}

.aura-chip strong {
  font-weight: 600;
  color: var(--aura);
}

.aura-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aura);
  box-shadow: 0 0 10px var(--aura);
}

.aura-chip.is-neutral .aura-chip__dot {
  background: conic-gradient(#ff5d62, #ffd84d, #4fd68e, #4fa9ff, #bb80ff, #ff5d62);
}

.aura-chip.is-neutral .aura-chip__sep,
.aura-chip.is-neutral [data-aura-meaning] {
  display: none;
}

/* ---------- Prova social ---------- */

.stats {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink-soft);
}

.stats li {
  display: flex;
  flex-direction: column;
}

.stats li + li {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.stats strong {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
}

/* ---------- Botão principal ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 360px;
  min-height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #14121f;
  font: 700 1.0625rem/1 var(--font-body);
  cursor: pointer;
  box-shadow: 0 12px 44px color-mix(in oklab, var(--aura) 40%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 52px color-mix(in oklab, var(--aura) 55%, transparent);
}

.cta:hover svg {
  transform: translateX(3px);
}

.cta:active {
  transform: translateY(0) scale(0.98);
}

:focus-visible {
  outline: 2px solid var(--aura);
  outline-offset: 3px;
}

/* ---------- Rodapé legal ---------- */

.legal {
  flex: none;
  max-width: 420px;
  margin: 20px auto 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.legal p {
  margin: 0;
}

.legal a {
  color: var(--ink-soft);
  text-underline-offset: 2px;
}

.legal__note {
  margin-top: 8px !important;
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Entrada ---------- */

.hero > * {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.24s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
}

@keyframes breathe {
  50% { transform: scale(1.08); opacity: 0.8; }
}

@keyframes breathe-core {
  50% { transform: scale(1.04); }
}

@keyframes ripple {
  50% { transform: scale(1.06); opacity: 0.15; }
}

@keyframes drift-a {
  to { transform: translate(38%, 30%) scale(1.15); }
}

@keyframes drift-b {
  to { transform: translate(-42%, -30%) scale(0.9); }
}

@keyframes drift-c {
  to { transform: translate(45%, -35%) scale(1.2); }
}

@keyframes twinkle {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  25% { opacity: 0.95; }
  70% { opacity: 0.6; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Desktop ---------- */

@media (min-width: 960px) {
  .screen {
    padding: 0 48px 32px;
  }

  .topbar {
    height: 72px;
  }

  .hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "title  visual"
      "stats  visual"
      "cta    visual";
    grid-template-rows: auto auto auto;
    align-content: center;
    justify-items: start;
    column-gap: 56px;
    row-gap: 28px;
    text-align: left;
  }

  .hero__title {
    grid-area: title;
    max-width: 12ch;
    font-size: clamp(3.4rem, 5.4vw, 4.6rem);
  }

  .hero__visual {
    grid-area: visual;
    justify-self: center;
    gap: 20px;
  }

  .orb {
    width: min(40vw, 62dvh, 480px);
  }

  .stats {
    grid-area: stats;
    font-size: 0.9375rem;
  }

  .cta {
    grid-area: cta;
    max-width: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    transition: none;
  }

  .hero > *,
  .orb::before,
  .orb__halo,
  .orb__ring,
  .orb__core,
  .orb__blob,
  .orb__spectrum,
  .orb__swirl,
  .orb__spark {
    animation: none;
  }

  .aura-chip,
  .orb__blob,
  .orb__spectrum,
  .orb__icon,
  .cta,
  .cta svg {
    transition: none;
  }
}
