@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&family=Press+Start+2P&family=VT323&display=swap');

:root {
  --cream: #FDF6EC;
  --blush: #FADDE1;
  --blush-strong: #F6C6CE;
  --navy: #1B2A4A;
  --pokemon-red: #EE1515;
  --pokemon-red-dark: #C10F0F;
  --pokemon-red-darker: #8E0B0B;
  --pokemon-yellow: #FFCB05;
  --pokemon-blue: #3B4CCA;
  --pokemon-green: #2ECC71;
  --white: #FFFFFF;
  --shadow: 0 10px 25px rgba(27, 42, 74, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'VT323', monospace;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  height: 100%;
  font-family: 'Nunito', sans-serif;
  background: var(--navy);
  color: var(--navy);
  line-height: 1.5;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .boot-overlay,
  .boot-flash,
  .lens,
  .tiny-lights .light,
  .pokedex-screen {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

h1, h2, h3 {
  font-family: 'Fredoka', sans-serif;
  margin: 0 0 0.4em;
  line-height: 1.15;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--pokemon-blue);
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 56px 0;
  position: relative;
}

/* ---------- Pokeball motif (pure CSS) ---------- */
.pokeball {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  position: relative;
  display: inline-block;
  background: linear-gradient(to bottom, var(--pokemon-red) 0%, var(--pokemon-red) 48%, var(--navy) 48%, var(--navy) 52%, var(--white) 52%, var(--white) 100%);
  border: 0.08em solid var(--navy);
  box-shadow: inset 0 0 0 0.02em rgba(0,0,0,0.1);
  flex: none;
}
.pokeball::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.34em;
  height: 0.34em;
  background: var(--white);
  border: 0.06em solid var(--navy);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pokeball-watermark {
  position: absolute;
  border-radius: 50%;
  background: var(--blush);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

/* ---------- Sparkles ---------- */
.sparkle {
  position: absolute;
  width: 18px;
  height: 18px;
  pointer-events: none;
  animation: twinkle 2.6s ease-in-out infinite;
  opacity: 0.85;
  z-index: 2;
}
.sparkle svg { width: 100%; height: 100%; }
@keyframes twinkle {
  0%, 100% { transform: scale(0.7) rotate(0deg); opacity: 0.4; }
  50% { transform: scale(1.15) rotate(20deg); opacity: 1; }
}

/* =====================================================
   POKÉDEX DEVICE SHELL
   ===================================================== */
body {
  padding: 0;
}
.pokedex {
  max-width: 920px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--pokemon-red) 0%, var(--pokemon-red-dark) 100%);
  box-shadow: 0 0 0 4px var(--pokemon-red-darker), 0 30px 60px rgba(0,0,0,0.45);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
@media (min-width: 640px) {
  .pokedex {
    margin: 24px auto;
    border-radius: 34px;
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
  }
}

/* ---- Top bar: lens + lights + title ---- */
.pokedex-top-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  position: relative;
}
.lens {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #4A5568;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--navy);
  flex: none;
  position: relative;
  transition: background 0.5s ease 0.15s, box-shadow 0.5s ease 0.15s;
}
.pokedex.is-on .lens {
  background: radial-gradient(circle at 35% 30%, #EAF3FF 0%, #7FA8FF 22%, var(--pokemon-blue) 55%, #1E2A8A 100%);
  box-shadow: 0 0 0 3px var(--navy), 0 0 14px 3px rgba(59, 76, 202, 0.85);
  animation: lens-pulse 2.8s ease-in-out infinite 0.65s;
}
.lens::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 22%;
  width: 32%;
  height: 32%;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  filter: blur(1px);
}
@keyframes lens-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--navy), 0 0 10px 2px rgba(59, 76, 202, 0.7); }
  50% { box-shadow: 0 0 0 3px var(--navy), 0 0 20px 6px rgba(59, 76, 202, 1); }
}
.tiny-lights {
  display: flex;
  gap: 7px;
  flex: none;
}
.tiny-lights .light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  opacity: 0.2;
  transition: opacity 0.4s ease 0.3s;
}
.pokedex.is-on .tiny-lights .light { opacity: 1; }
.tiny-lights .light.yellow { background: var(--pokemon-yellow); }
.tiny-lights .light.green { background: var(--pokemon-green); }
.pokedex.is-on .tiny-lights .light.green { animation: blink-light 1.6s step-end infinite 0.7s; }
.tiny-lights .light.blue { background: var(--pokemon-blue); }
@keyframes blink-light {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.25; }
}
.pokedex-title {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1.4;
  flex: 1;
}
.pokedex-title small {
  display: block;
  font-size: 0.85em;
  opacity: 0.8;
}
.entry-badge {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--pokemon-red-darker);
  background: var(--pokemon-yellow);
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 6px 8px;
  flex: none;
  white-space: nowrap;
}

/* ---- Screen (recessed inner display) ---- */
.pokedex-screen {
  background: var(--cream);
  border-top: 6px solid var(--pokemon-red-darker);
  border-bottom: 6px solid var(--pokemon-red-darker);
  border-left: 10px solid var(--pokemon-red-darker);
  border-right: 10px solid var(--pokemon-red-darker);
  box-shadow: inset 0 0 0 3px var(--navy), inset 0 12px 30px rgba(27,42,74,0.18);
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
@media (min-width: 640px) {
  .pokedex-screen { border-radius: 18px; margin: 0 10px; }
}
.pokedex-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(27,42,74,0.035) 0px,
    rgba(27,42,74,0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
  opacity: 0.5;
}

/* ---- Boot sequence: screen starts off, powers on once loaded ---- */
.boot-overlay {
  position: absolute;
  inset: 0;
  background: #05070a;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.7s ease 0.05s;
  pointer-events: none;
}
.pokedex.is-on .boot-overlay {
  opacity: 0;
}
.boot-flash {
  position: absolute;
  inset: 0;
  background: #eaf3ff;
  z-index: 21;
  opacity: 0;
  pointer-events: none;
}
.pokedex.is-on .boot-flash {
  animation: boot-flash-pulse 0.6s ease 0.05s 1;
}
@keyframes boot-flash-pulse {
  0% { opacity: 0; }
  30% { opacity: 0.85; }
  100% { opacity: 0; }
}

/* ---- Bottom bar: speaker grille + confirm button ---- */
.pokedex-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px 20px;
}
.speaker-grille {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  flex: none;
}
.speaker-grille span {
  width: 4px;
  background: var(--pokemon-red-darker);
  border-radius: 2px;
}
.speaker-grille span:nth-child(1) { height: 10px; }
.speaker-grille span:nth-child(2) { height: 16px; }
.speaker-grille span:nth-child(3) { height: 10px; }
.speaker-grille span:nth-child(4) { height: 14px; }
.speaker-grille span:nth-child(5) { height: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--pokemon-red);
  color: var(--white);
  box-shadow: 0 6px 16px rgba(238, 21, 21, 0.35);
}
.btn-primary:hover { background: var(--pokemon-red-dark); }
.btn-ghost {
  background: var(--white);
  color: var(--pokemon-red-darker);
  border: 2px solid var(--navy);
}

/* ---------- Screen panel (section) treatment ---------- */
.screen-panel {
  position: relative;
  z-index: 1;
}
.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--pokemon-blue);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.panel-tag .rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pokemon-red);
  animation: blink-light 1.4s step-end infinite;
  flex: none;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 36px;
  overflow: hidden;
}
.hero .container {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 720px) {
  .hero .container {
    grid-template-columns: 1fr 1fr;
  }
  .hero-copy { order: 1; }
  .hero-image { order: 2; }
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pokemon-yellow);
  color: var(--navy);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  border: 2px solid var(--navy);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--navy);
}
.hero h1 .highlight {
  color: var(--pokemon-red);
}
.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.hero-image {
  position: relative;
  text-align: center;
}
.hero-image .frame {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 4px solid var(--navy);
  overflow: hidden;
}
.hero-image img {
  margin: 0 auto;
  max-height: 460px;
  width: auto;
  object-fit: cover;
  display: block;
}
.hero-image .scan-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(59,76,202,0.06) 0px,
    rgba(59,76,202,0.06) 2px,
    transparent 2px,
    transparent 4px
  );
  pointer-events: none;
}

/* ---------- Detalhes cards (data readouts) ---------- */
.detalhes {
  background: var(--blush);
}
.section-heading {
  text-align: center;
  margin-bottom: 36px;
}
.section-heading h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}
.section-heading .panel-tag {
  justify-content: center;
  width: 100%;
}

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}
.trainer-card {
  background: var(--navy);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 3px solid var(--navy);
  position: relative;
}
.trainer-card .icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: var(--pokemon-yellow);
}
.trainer-card .icon svg { width: 100%; height: 100%; }
.trainer-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9FB3E0;
  margin-bottom: 4px;
  font-weight: 400;
}
.trainer-card p {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  margin: 0;
  color: var(--pokemon-green);
  text-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}
.trainer-card p::after {
  content: "_";
  animation: blink-light 1s step-end infinite;
  opacity: 0.8;
}

/* ---------- Local / mapa ---------- */
.local .map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid var(--navy);
  margin-bottom: 18px;
}
.local iframe {
  width: 100%;
  height: 280px;
  border: 0;
  display: block;
}
@media (min-width: 720px) {
  .local iframe { height: 380px; }
}
.local-address {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
}
.local-actions {
  text-align: center;
  margin-top: 14px;
}

/* ---------- RSVP ---------- */
.rsvp {
  background: var(--navy);
  color: var(--cream);
}
.rsvp .panel-tag { color: var(--pokemon-yellow); }
.rsvp .section-heading h2 { color: var(--white); }
.rsvp .section-heading .lead { color: var(--blush); }

.card {
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  max-width: 560px;
  margin: 0 auto;
  border: 3px solid var(--navy);
}

.field {
  margin-bottom: 20px;
}
.field label,
.field legend {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.98rem;
}
.field input[type="text"],
.field textarea {
  width: 100%;
  border: 2px solid var(--blush-strong);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--navy);
  background: var(--cream);
  transition: border-color 0.15s ease;
}
.field input[type="text"]:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--pokemon-blue);
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}

/* ---- Console-button style attend toggle (Pokédex control pad flavor) ---- */
.attend-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.dpad {
  width: 42px;
  height: 42px;
  flex: none;
  position: relative;
  opacity: 0.9;
}
.dpad::before,
.dpad::after {
  content: "";
  position: absolute;
  background: var(--navy);
  border-radius: 3px;
}
.dpad::before { width: 100%; height: 34%; top: 33%; left: 0; }
.dpad::after { height: 100%; width: 34%; left: 33%; top: 0; }
.attend-toggle {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}
.attend-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.attend-toggle label {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  border: 3px solid var(--navy);
  background: var(--cream);
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  min-height: 44px;
  transition: all 0.15s ease;
  opacity: 0.75;
}
.attend-toggle .check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--navy);
  background: var(--white);
  flex: none;
  position: relative;
}
.attend-toggle input:checked + label .check-dot {
  background: var(--pokemon-green);
}
.attend-toggle input:checked + label .check-dot::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--navy);
}
.attend-toggle input:checked + label {
  background: var(--blush);
  border-color: var(--pokemon-blue);
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--pokemon-blue);
}
.attend-toggle input:focus-visible + label {
  outline: 3px solid var(--pokemon-blue);
}
.legend-hint {
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.7;
}
.form-step-hint {
  font-size: 0.85rem;
  background: #FFF7DA;
  border: 2px dashed var(--pokemon-yellow);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 0 0 20px;
  color: var(--navy);
}

.companions-block {
  border-top: 2px dashed var(--blush-strong);
  padding-top: 18px;
  margin-top: 4px;
}
.companions-block[hidden] { display: none; }
.companion-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.companion-row input {
  flex: 1;
}
.companion-remove {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--blush-strong);
  background: var(--cream);
  color: var(--pokemon-red);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.companion-add {
  background: transparent;
  border: 2px dashed var(--pokemon-blue);
  color: var(--pokemon-blue);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
}

/* Honeypot: visually hidden but not display:none/removed from AT tree in a bot-detectable way */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-error {
  background: #FFF0F0;
  border: 2px solid var(--pokemon-red);
  color: var(--pokemon-red-dark);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 0.95rem;
}
.form-error[hidden] { display: none; }

.rsvp-submit {
  width: 100%;
  font-size: 1.05rem;
  padding: 14px 22px;
}

/* ---------- Thank you panel (scan sequence) ---------- */
.thanks-panel {
  text-align: center;
  padding: 20px 10px;
  position: relative;
  overflow: hidden;
}
.thanks-panel[hidden] { display: none; }
.thanks-pokeball {
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--pokemon-red) 0%, var(--pokemon-red) 48%, var(--navy) 48%, var(--navy) 52%, var(--white) 52%, var(--white) 100%);
  border: 4px solid var(--navy);
  position: relative;
  animation: catch-pop 0.6s ease;
}
.thanks-pokeball::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 26px; height: 26px;
  background: var(--white);
  border: 3px solid var(--navy);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
@keyframes catch-pop {
  0% { transform: scale(0.4) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.1) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}
.thanks-panel h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
.thanks-status {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--pokemon-blue);
  letter-spacing: 0.03em;
}
.scan-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 40px;
  top: -40px;
  background: linear-gradient(to bottom, transparent, rgba(59,76,202,0.35), transparent);
  animation: scan-sweep 1.1s ease-in-out 1;
  pointer-events: none;
}
@keyframes scan-sweep {
  0% { top: -40px; }
  100% { top: 100%; }
}

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 32px 20px 40px;
  font-size: 0.8rem;
  color: var(--navy);
  opacity: 0.8;
}
.site-footer p { margin: 0 0 6px; }

/* ---------- Calendar modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 42, 74, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: modal-fade-in 0.2s ease;
}
.modal-overlay[hidden] { display: none; }
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-card {
  background: var(--cream);
  border: 4px solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  max-width: 380px;
  width: 100%;
  padding: 30px 26px 26px;
  text-align: center;
  position: relative;
  animation: catch-pop 0.35s ease;
}
.modal-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--navy);
  cursor: pointer;
  padding: 6px;
}
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions .btn { width: 100%; }
.modal-skip {
  background: transparent;
  border: none;
  color: var(--pokemon-blue);
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 14px;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
}

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
