/* ===========================================================
   Tokens
=========================================================== */
:root{
  --bg: #0a0e18;
  --bg-2: #141b30;
  --panel: rgba(20, 26, 46, 0.55);
  --panel-solid: #171d33; /* fallback sem backdrop-filter */
  --border: rgba(255,255,255,0.08);

  --violet: #7c5cff;
  --cyan: #22e2f5;
  --magenta: #ff3d9a;
  --teal: #22e2c5;

  --violet-rgb: 124,92,255;
  --cyan-rgb: 34,226,245;
  --magenta-rgb: 255,61,154;
  --teal-rgb: 34,226,197;

  --text: #f4f6ff;
  --muted: #9aa3c4;

  --radius: 20px;
  --radius-sm: 13px;
  --ease: cubic-bezier(.22,.9,.32,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}

/* permite animar o ângulo de um conic-gradient com transição suave */
@property --angle{
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

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

html{ color-scheme: dark; }

body{
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,92,255,0.10), transparent 60%),
    radial-gradient(ellipse 70% 60% at 50% 100%, transparent 55%, var(--bg) 92%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection{
  background: rgba(124,92,255,0.35);
  color: #fff;
}

/* barra de rolagem discreta, no tom do site */
::-webkit-scrollbar{ width: 10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-thumb{
  background: linear-gradient(var(--violet), var(--cyan));
  border-radius: 999px;
  border: 2px solid var(--bg);
}

/* grão sutil por cima de tudo, dá uma textura "premium" */
body::after{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===========================================================
   Fundo animado (aurora + canvas de partículas)
=========================================================== */
.aurora{
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora__blob{
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 340px;
  min-height: 340px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora__blob--1{
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, var(--violet), transparent 70%);
  animation: driftA 22s ease-in-out infinite;
}
.aurora__blob--2{
  bottom: -16%;
  right: -10%;
  background: radial-gradient(circle, var(--cyan), transparent 70%);
  animation: driftB 26s ease-in-out infinite;
}
.aurora__blob--3{
  bottom: 8%;
  left: 18%;
  width: 34vw;
  height: 34vw;
  min-width: 260px;
  min-height: 260px;
  background: radial-gradient(circle, var(--magenta), transparent 70%);
  opacity: 0.22;
  animation: driftC 30s ease-in-out infinite;
}

@keyframes driftA{
  0%, 100%{ transform: translate(0, 0) scale(1); }
  50%{ transform: translate(6vw, 8vh) scale(1.15); }
}
@keyframes driftB{
  0%, 100%{ transform: translate(0, 0) scale(1); }
  50%{ transform: translate(-7vw, -6vh) scale(1.1); }
}
@keyframes driftC{
  0%, 100%{ transform: translate(0, 0) scale(1); }
  50%{ transform: translate(4vw, -5vh) scale(0.92); }
}

#bg-canvas{
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* ===========================================================
   Layout
=========================================================== */
.stage{
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 80px;
  perspective: 1200px;
}

.topbar{
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.15s forwards;
}

/* ===========================================================
   Card (glassmorphism)
=========================================================== */
.card{
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 44px 36px 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel-solid);
  text-align: center;
  transform-style: preserve-3d;
  will-change: transform;
  opacity: 0;
  transform: translateY(28px);
  animation: cardIn 0.9s var(--ease) 0.15s forwards;
}

.card--wide{ max-width: 560px; }

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .card{
    background: var(--panel);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
  }
}

.card::before{
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), var(--violet), var(--cyan) 35%, var(--magenta) 65%, var(--violet));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
  animation: spin 9s linear infinite;
}

@keyframes spin{
  to{ --angle: 360deg; }
}

@keyframes cardIn{
  to{ opacity: 1; transform: translateY(0); }
}

.tag{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(34, 226, 245, 0.35);
  background: rgba(34, 226, 245, 0.06);
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.4s forwards;
}

.tag::before{
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(34,226,245,0.6);
  animation: pulseDot 2s ease-out infinite;
}

@keyframes pulseDot{
  0%{ box-shadow: 0 0 0 0 rgba(34,226,245,0.55); }
  70%{ box-shadow: 0 0 0 8px rgba(34,226,245,0); }
  100%{ box-shadow: 0 0 0 0 rgba(34,226,245,0); }
}

.title{
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  line-height: 1;
  margin: 20px 0 8px;
  background: linear-gradient(100deg, #ffffff 20%, var(--cyan) 55%, var(--violet) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.5s forwards;
}

.title--sm{ font-size: clamp(1.7rem, 6vw, 2.2rem); margin: 8px 0 6px; }

.subtitle{
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0 0 34px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 0.6s forwards;
}

@keyframes fadeUp{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* ===========================================================
   Botões de ação (linhas de contato)
=========================================================== */
.actions{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action{
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb, 255,255,255), 0.16);
  background: rgba(255,255,255,0.03);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s var(--ease) forwards;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.22s var(--ease);
  cursor: pointer;
}

.actions .action:nth-child(1){ animation-delay: 0.72s; }
.actions .action:nth-child(2){ animation-delay: 0.82s; }
.actions .action:nth-child(3){ animation-delay: 0.92s; }

.action--whats{ --accent: var(--teal); --accent-rgb: var(--teal-rgb); }
.action--tel{ --accent: var(--cyan); --accent-rgb: var(--cyan-rgb); }
.action--mail{ --accent: var(--magenta); --accent-rgb: var(--magenta-rgb); }

/* camada 1: holofote que segue o cursor (posição via --mx/--my setados em JS) */
.action::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(180px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.20), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

/* camada 2: anel giratório que só "acende" no hover/focus */
.action::after{
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -3;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle), transparent, rgba(var(--accent-rgb),0.9), transparent 28%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  animation: spin 2.6s linear infinite;
  animation-play-state: paused;
  transition: opacity 0.3s var(--ease);
}

.action:hover,
.action:focus-visible{
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 10px 32px -14px rgba(var(--accent-rgb), 0.55);
}
.action:hover::before,
.action:focus-visible::before{ opacity: 1; }
.action:hover::after,
.action:focus-visible::after{ opacity: 1; animation-play-state: running; }

.action:active{
  transform: translateY(0) scale(0.97) !important;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.35);
}

.action:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.action__sheen{
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(75deg, transparent 40%, rgba(255,255,255,0.16) 50%, transparent 60%);
  transform: translateX(-120%);
  pointer-events: none;
}
.action:hover .action__sheen{
  animation: sheenSweep 0.9s var(--ease);
}
@keyframes sheenSweep{
  to{ transform: translateX(120%); }
}

.action__icon{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(var(--accent-rgb), 0.10);
  color: var(--accent);
  transition: transform 0.35s var(--spring), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.action:hover .action__icon,
.action:focus-visible .action__icon{
  transform: scale(1.1) rotate(-6deg);
  background: rgba(var(--accent-rgb), 0.20);
  box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0.08);
}

.action__text{
  display: flex;
  flex-direction: column;
  text-align: left;
  min-width: 0;
}

.action__label{
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: block;
  transition: color 0.3s var(--ease);
}

.action__value{
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action:hover .action__label{ color: var(--accent); }

.action__arrow{
  display: flex;
  align-items: center;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.action:hover .action__arrow,
.action:focus-visible .action__arrow{
  opacity: 1;
  transform: translateX(0);
}

/* ripple de clique, ativado via JS */
.ripple{
  position: absolute;
  border-radius: 50%;
  background: rgba(var(--accent-rgb, 255,255,255), 0.35);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes rippleAnim{
  to{ transform: scale(3.2); opacity: 0; }
}

/* ===========================================================
   Botões genéricos (.btn) - usados fora da lista de contatos
=========================================================== */
.btn{
  --accent: var(--violet);
  --accent-rgb: var(--violet-rgb);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(140px circle at var(--mx,50%) var(--my,50%), rgba(var(--accent-rgb),0.28), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.btn:hover, .btn:focus-visible{
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow: 0 8px 26px -12px rgba(var(--accent-rgb), 0.6);
  background: rgba(var(--accent-rgb), 0.14);
}
.btn:hover::before, .btn:focus-visible::before{ opacity: 1; }

.btn:active{ transform: scale(0.96) !important; }

.btn:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn svg{ width: 16px; height: 16px; flex-shrink: 0; }

.btn--ghost{
  --accent: var(--cyan);
  --accent-rgb: var(--cyan-rgb);
  background: rgba(255,255,255,0.03);
  border-color: var(--border);
}
.btn--ghost:hover{ border-color: rgba(var(--cyan-rgb), 0.55); }

.btn--sm{ padding: 8px 14px; font-size: 0.78rem; }

.btn--block{ width: 100%; }

.btn[disabled]{
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* par de botões (ex.: dificuldade) */
.btn-group{
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 3px;
  background: rgba(255,255,255,0.03);
}
.btn-group .btn{
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 7px 14px;
  font-size: 0.76rem;
}
.btn-group .btn::before{ display: none; }
.btn-group .btn[aria-pressed="true"]{
  background: linear-gradient(120deg, var(--violet), var(--cyan));
  color: #0a0e18;
  font-weight: 700;
}

/* ===========================================================
   Feature tile (CTA para o jogo)
=========================================================== */
.feature{
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,92,255,0.10), rgba(34,226,245,0.05));
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.6s var(--ease) 1.0s forwards;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.25s var(--ease);
}

.feature::before{
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(200px circle at var(--mx,50%) var(--my,50%), rgba(124,92,255,0.22), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.feature:hover, .feature:focus-visible{
  transform: translateY(-3px);
  border-color: rgba(124,92,255,0.5);
  box-shadow: 0 14px 36px -16px rgba(124,92,255,0.55);
}
.feature:hover::before, .feature:focus-visible::before{ opacity: 1; }
.feature:active{ transform: translateY(-1px) scale(0.98) !important; }
.feature:focus-visible{ outline: 2px solid var(--violet); outline-offset: 2px; }

.feature__preview{
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  padding: 6px;
}
.feature__preview .cell{
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 3px;
  background: rgba(255,255,255,0.03);
  color: transparent;
}
.feature__preview .cell.x{ color: var(--cyan); animation: ghostBlink 4.5s ease-in-out infinite; }
.feature__preview .cell.o{ color: var(--magenta); animation: ghostBlink 4.5s ease-in-out infinite; }
.feature__preview .cell.delayed{ animation-delay: 2.2s; }

@keyframes ghostBlink{
  0%, 100%{ opacity: 0; }
  15%, 45%{ opacity: 1; }
  60%{ opacity: 0; }
}

.feature__text{ display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0; }
.feature__eyebrow{
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
}
.feature__title{ font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.05rem; }
.feature__desc{ font-size: 0.82rem; color: var(--muted); }

.feature__arrow{
  color: var(--violet);
  opacity: 0.6;
  transform: translateX(0);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.feature:hover .feature__arrow{ opacity: 1; transform: translateX(4px); }

/* ===========================================================
   Rodapé
=========================================================== */
.foot{
  position: relative;
  z-index: 2;
  margin-top: 40px;
  font-size: 0.78rem;
  color: rgba(154,163,196,0.6);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.7s var(--ease) 1.15s forwards;
}

.foot__dot{
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--violet);
}

/* ===========================================================
   Acessibilidade / preferências do usuário
=========================================================== */
@media (prefers-reduced-motion: reduce){
  .card, .tag, .title, .subtitle, .action, .foot, .feature, .topbar{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .card::before, .card::after,
  .action::after,
  .aurora__blob,
  .tag::before,
  .feature__preview .cell{
    animation: none !important;
  }
}

@media (max-width: 380px){
  .card{ padding: 36px 22px 28px; }
  .feature{ grid-template-columns: 52px 1fr auto; padding: 14px; }
  .feature__preview{ width: 52px; height: 52px; }
}
