/* ===== Portal de Dinâmicas · Rotaract Brasil ===== */
:root {
  --cranberry: #d41367;
  --cranberry-soft: #ff4f96;
  --gold: #f7a81b;
  --azure: #19a6ff;
  --bg: #0a0c1c;
  --bg-2: #11142b;
  --card: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f2f3fb;
  --text-dim: #a8adce;
  --radius: 20px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: radial-gradient(1200px 800px at 80% -10%, #241338 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, .brand-name { font-family: 'Sora', 'Inter', sans-serif; }

/* fundo animado */
#cosmos {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.aurora {
  position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(35% 30% at 20% 30%, rgba(212, 19, 103, 0.16), transparent 70%),
    radial-gradient(30% 30% at 80% 20%, rgba(25, 166, 255, 0.12), transparent 70%),
    radial-gradient(30% 35% at 60% 80%, rgba(247, 168, 27, 0.08), transparent 70%);
  filter: blur(40px);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.02); }
}

.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 5vw, 56px);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark { font-size: 1.6rem; animation: spin-slow 14s linear infinite; display: inline-block; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.brand-name { font-weight: 800; font-size: 1.05rem; letter-spacing: 0.2px; }
.brand-sub {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--cranberry-soft); font-weight: 600;
}

/* ===== HERO ===== */
.hero {
  position: relative; z-index: 2;
  min-height: 82vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px 20px 60px;
}
.portal-ring { position: relative; width: 190px; height: 190px; margin-bottom: 34px; }
.ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
}
.ring.r1 {
  border-top-color: var(--cranberry); border-right-color: var(--cranberry);
  animation: ring-spin 3.2s linear infinite;
}
.ring.r2 {
  inset: 16px;
  border-bottom-color: var(--azure); border-left-color: var(--azure);
  animation: ring-spin 4.4s linear infinite reverse;
}
.ring.r3 {
  inset: 32px;
  border-top-color: var(--gold);
  animation: ring-spin 6s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }
.portal-core {
  position: absolute; inset: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.2rem;
  background: radial-gradient(circle at 35% 30%, rgba(255, 79, 150, 0.5), rgba(212, 19, 103, 0.15) 60%, transparent);
  box-shadow: 0 0 60px rgba(212, 19, 103, 0.45), inset 0 0 30px rgba(212, 19, 103, 0.35);
  animation: core-pulse 2.6s ease-in-out infinite;
}
@keyframes core-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.hero-title {
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  font-weight: 800; line-height: 1.12; margin-bottom: 18px;
}
.grad-text {
  background: linear-gradient(92deg, var(--cranberry-soft), var(--gold) 60%, var(--azure));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  color: var(--text-dim); font-size: clamp(0.95rem, 2vw, 1.12rem);
  line-height: 1.65; margin-bottom: 34px; max-width: 640px;
}
.hero-status { margin-top: 22px; font-size: 0.82rem; color: var(--text-dim); opacity: 0.8; }

/* botões */
.cta-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 34px; border: none; border-radius: 999px;
  font-family: 'Sora', sans-serif; font-size: 1.02rem; font-weight: 700;
  color: #fff; cursor: pointer;
  background: linear-gradient(120deg, var(--cranberry), #a10d4d);
  box-shadow: 0 10px 34px rgba(212, 19, 103, 0.45);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s;
}
.cta-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 44px rgba(212, 19, 103, 0.6); }
.cta-btn:active { transform: translateY(0) scale(0.98); }
.cta-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine { 12% { transform: translateX(120%); } 100% { transform: translateX(120%); } }
.cta-arrow { transition: transform 0.2s; }
.cta-btn:hover .cta-arrow { transform: translateX(4px); }
.cta-btn.big { font-size: 1.1rem; padding: 18px 40px; }

.ghost-btn, .mini-btn {
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--card-border); border-radius: 999px;
  padding: 10px 20px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.ghost-btn:hover, .mini-btn:hover {
  color: var(--text); border-color: var(--cranberry-soft);
  background: rgba(212, 19, 103, 0.1); transform: translateY(-1px);
}
.mini-btn { padding: 8px 16px; font-size: 0.8rem; }

/* ===== WIZARD ===== */
.wizard, .results {
  position: relative; z-index: 2;
  max-width: 980px; margin: 0 auto; padding: 40px 20px 90px;
}
.hidden { display: none !important; }

.wizard-progress {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 44px;
}
.wp-step { display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0.4; transition: opacity 0.3s, transform 0.3s; }
.wp-step.active { opacity: 1; transform: scale(1.08); }
.wp-dot {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.3rem;
  background: var(--card); border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}
.wp-step.active .wp-dot {
  border-color: var(--cranberry-soft);
  box-shadow: 0 0 26px rgba(212, 19, 103, 0.5);
}
.wp-label { font-size: 0.74rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.wp-line { width: clamp(30px, 8vw, 90px); height: 2px; background: var(--card-border); border-radius: 2px; margin-bottom: 20px; }

.step { display: none; animation: step-in 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.step.active { display: block; }
@keyframes step-in {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.step-title { font-size: clamp(1.5rem, 3.6vw, 2.2rem); font-weight: 800; text-align: center; margin-bottom: 10px; }
.step-sub { color: var(--text-dim); text-align: center; line-height: 1.6; margin-bottom: 30px; }
.group-label {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--gold); margin: 26px 0 12px; text-align: center;
}
.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; gap: 14px; flex-wrap: wrap; }

/* passo pessoas */
.people-stage {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 30px clamp(16px, 4vw, 44px) 34px;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.people-crowd {
  min-height: 96px; display: flex; flex-wrap: wrap; gap: 4px;
  align-content: center; justify-content: center; margin-bottom: 20px;
  font-size: 1.5rem;
}
.people-crowd span { animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards; }
@keyframes pop-in { from { transform: scale(0) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.crowd-more { font-size: 1rem; font-weight: 700; color: var(--gold); align-self: center; }

.people-counter { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 18px; }
.count-btn {
  width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  font-size: 1.6rem; cursor: pointer; transition: all 0.2s;
}
.count-btn:hover { background: rgba(212, 19, 103, 0.25); border-color: var(--cranberry-soft); transform: scale(1.08); }
#people-input {
  width: 130px; text-align: center; font-size: 3rem; font-weight: 800;
  font-family: 'Sora', sans-serif;
  background: transparent; border: none; color: var(--text); outline: none;
  -moz-appearance: textfield; appearance: textfield;
}
#people-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.people-range {
  width: 100%; accent-color: var(--cranberry); height: 6px; cursor: pointer;
}
.people-vibe { text-align: center; margin-top: 16px; color: var(--gold); font-weight: 600; min-height: 1.4em; }

/* chips */
.chips-toolbar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.mat-count { font-size: 0.8rem; color: var(--text-dim); }
.chips-grid {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
}
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text-dim); font-size: 0.9rem; font-weight: 500;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
.chip:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.3); color: var(--text); }
.chip.on {
  background: linear-gradient(120deg, rgba(212, 19, 103, 0.35), rgba(212, 19, 103, 0.15));
  border-color: var(--cranberry-soft); color: #fff;
  box-shadow: 0 6px 20px rgba(212, 19, 103, 0.3);
}
.chip.on .chip-check { transform: scale(1); }
.chip-check {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cranberry); font-size: 0.65rem;
  transform: scale(0); transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chips-grid.small .chip { font-size: 0.82rem; padding: 9px 15px; }

/* ===== RESULTADOS ===== */
.results-head { text-align: center; margin-bottom: 36px; }
.results-head .ghost-btn { margin-top: 14px; }

.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; perspective: 1400px;
}
.card {
  position: relative;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 24px;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
  cursor: pointer; transform-style: preserve-3d;
  transition: border-color 0.25s, box-shadow 0.25s;
  animation: card-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: var(--delay, 0s);
  will-change: transform;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(40px) rotateX(12deg); }
  to { opacity: 1; transform: none; }
}
.card:hover { border-color: rgba(255, 79, 150, 0.5); box-shadow: 0 24px 60px rgba(212, 19, 103, 0.25); }
.card.top-match::before {
  content: '⭐ match perfeito';
  position: absolute; top: -11px; left: 18px;
  background: linear-gradient(120deg, var(--gold), #ffca5f);
  color: #3a2600; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(247, 168, 27, 0.4);
}

.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.card-title { font-family: 'Sora', sans-serif; font-size: 1.08rem; font-weight: 700; line-height: 1.3; }

.match-ring { position: relative; width: 62px; height: 62px; flex-shrink: 0; }
.match-ring svg { transform: rotate(-90deg); }
.match-ring .bg { stroke: rgba(255, 255, 255, 0.1); }
.match-ring .fg {
  stroke: url(#ringGrad); stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.match-pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.82rem; font-weight: 800; font-family: 'Sora', sans-serif;
}

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.3px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(25, 166, 255, 0.12); color: #7cc9ff;
  border: 1px solid rgba(25, 166, 255, 0.25);
}
.tag.obj { background: rgba(247, 168, 27, 0.12); color: #ffc964; border-color: rgba(247, 168, 27, 0.25); }

.card-mats { font-size: 0.83rem; color: var(--text-dim); line-height: 1.7; }
.card-mats .ok { color: #6ee7a0; }
.card-mats .miss { color: #ff8888; }
.card-mats .free { color: var(--gold); font-weight: 600; }
.card-people { margin-top: 10px; font-size: 0.8rem; color: var(--text-dim); }
.card-cta {
  margin-top: 16px; font-size: 0.85rem; font-weight: 700; color: var(--cranberry-soft);
  display: inline-flex; align-items: center; gap: 6px;
}

.no-results {
  grid-column: 1 / -1; text-align: center; padding: 60px 20px;
  color: var(--text-dim); font-size: 1.05rem; line-height: 1.8;
}
.no-results .big-emoji { font-size: 3rem; display: block; margin-bottom: 12px; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(5, 6, 16, 0.75);
  backdrop-filter: blur(6px); animation: fade-in 0.25s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.modal-card {
  position: relative; max-width: 720px; width: 100%; max-height: 86vh; overflow-y: auto;
  background: linear-gradient(160deg, #1a1d3a, #12142a);
  border: 1px solid var(--card-border); border-radius: 24px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  animation: modal-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(34px) scale(0.96); } }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--card-border); background: rgba(255, 255, 255, 0.06);
  color: var(--text); font-size: 1rem; cursor: pointer; transition: all 0.2s;
}
.modal-close:hover { background: rgba(212, 19, 103, 0.3); transform: rotate(90deg); }
.modal-card h2 { font-size: 1.5rem; margin-bottom: 6px; padding-right: 40px; }
.modal-match { font-size: 0.9rem; color: var(--gold); font-weight: 700; margin-bottom: 18px; }
.modal-section { margin-top: 22px; }
.modal-section h3 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--cranberry-soft); margin-bottom: 8px;
}
.modal-section p, .modal-section li { color: #cdd1e8; line-height: 1.75; font-size: 0.94rem; white-space: pre-wrap; }
.modal-section a { color: var(--azure); word-break: break-all; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }

/* footer */
.footer {
  position: relative; z-index: 2; text-align: center;
  padding: 30px 20px 40px; color: var(--text-dim); font-size: 0.82rem; line-height: 1.8;
}
#footer-fonte { color: var(--gold); }
.footer-updated { opacity: 0.65; font-size: 0.72rem; }

#confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

@media (max-width: 640px) {
  .topbar { flex-direction: column; gap: 12px; }
  .step-nav { justify-content: center; }
  .wp-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
