/* =========================================================
   Variáveis e reset
   ========================================================= */
:root {
  --red:     #C0392B;
  --red-dk:  #962d22;
  --yellow:  #F4B400;
  --yellow-lt: #FFF3CD;
  --green:   #27AE60;
  --blue:    #2471A3;
  --orange:  #E67E22;
  --bg:      #FDF6E3;
  --card-bg: #FFFDF5;
  --text:    #2C2C2C;
  --text-lt: #666;
  --border:  #E5D5A0;
  --radius:  14px;
  --shadow:  0 4px 24px rgba(0,0,0,.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 15% 85%, rgba(244,180,0,.18) 0%, transparent 50%),
    radial-gradient(circle at 85% 10%, rgba(192,57,43,.12) 0%, transparent 50%);
}

/* =========================================================
   Bandeirinhas
   ========================================================= */
.bunting {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  pointer-events: none;
}

.bunting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  position: relative;
  padding: 0 8px;
}

/* Barbante */
.bunting-row::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 2px;
  background: #555;
}

.flag {
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-top: 36px solid;
  position: relative;
  top: 6px;
  flex-shrink: 0;
}

.flag-red    { border-top-color: #C0392B; }
.flag-yellow { border-top-color: #F4B400; }
.flag-green  { border-top-color: #27AE60; }
.flag-blue   { border-top-color: #2471A3; }
.flag-orange { border-top-color: #E67E22; }

/* =========================================================
   Layout principal
   ========================================================= */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 20px 40px;
}

/* =========================================================
   Cabeçalho / Hero
   ========================================================= */
.hero {
  text-align: center;
  margin-bottom: 32px;
}

.stars-row {
  color: var(--yellow);
  font-size: 1.4rem;
  letter-spacing: 6px;
  margin-bottom: 8px;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
}

.title {
  font-family: 'Pacifico', cursive;
  font-size: clamp(2rem, 8vw, 3.2rem);
  color: var(--red);
  text-shadow: 3px 3px 0 var(--yellow), 5px 5px 0 rgba(0,0,0,.12);
  line-height: 1.15;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.event-details {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  background: var(--yellow-lt);
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  padding: 14px 24px;
  margin-bottom: 24px;
  text-align: left;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .97rem;
  font-weight: 700;
  color: var(--text);
}

.detail-icon { font-size: 1.1rem; }

/* Countdown */
.countdown {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--red);
  color: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 72px;
}

.countdown-block span {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.countdown-block small {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .9;
  margin-top: 2px;
}

.countdown-sep {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--red);
  align-self: flex-start;
  margin-top: 10px;
}

/* =========================================================
   Card
   ========================================================= */
.card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

/* Faixa decorativa no topo do card */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--red)    0px,
    var(--red)    20px,
    var(--yellow) 20px,
    var(--yellow) 40px,
    var(--green)  40px,
    var(--green)  60px,
    var(--blue)   60px,
    var(--blue)   80px
  );
}

.card-title {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  color: var(--red);
  margin-bottom: 24px;
  padding-top: 8px;
}

/* =========================================================
   Formulário
   ========================================================= */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 6px;
  color: var(--text);
}

.required { color: var(--red); }

.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}

.field input.error { border-color: var(--red); }

.field-error {
  display: block;
  font-size: .82rem;
  color: var(--red);
  margin-top: 4px;
  min-height: 18px;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: .97rem;
}

.radio-label input[type="radio"] {
  accent-color: var(--red);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Acompanhantes */
.companions-section { margin-bottom: 20px; }

.companions-label {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 10px;
}

.companion-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.companion-row input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: 'Nunito', sans-serif;
  font-size: .97rem;
  outline: none;
  transition: border-color .2s;
}

.companion-row input:focus { border-color: var(--red); }

.btn-remove {
  background: none;
  border: 2px solid #ddd;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-lt);
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}

.btn-remove:hover { border-color: var(--red); color: var(--red); }

/* Botões */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 8px;
  letter-spacing: .5px;
}

.btn-primary:hover  { background: var(--red-dk); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.btn-secondary {
  background: var(--yellow-lt);
  color: var(--text);
  border: 2px solid var(--yellow);
  border-radius: 10px;
  padding: 9px 16px;
  font-family: 'Nunito', sans-serif;
  font-size: .93rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}

.btn-secondary:hover { background: #fde99a; }

/* =========================================================
   Sucesso
   ========================================================= */
.success-card { text-align: center; }

.success-icon { font-size: 4rem; margin-bottom: 12px; }

.success-title {
  font-family: 'Pacifico', cursive;
  font-size: 1.6rem;
  color: var(--green);
  margin-bottom: 16px;
}

.success-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 10px;
}

/* =========================================================
   Utilitários
   ========================================================= */
.hidden { display: none !important; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  text-align: center;
  padding: 24px 20px;
  color: var(--text-lt);
  font-size: .85rem;
}

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 480px) {
  .card { padding: 24px 18px; }
  .countdown-block { min-width: 58px; padding: 8px 10px; }
  .countdown-block span { font-size: 1.4rem; }
}
