:root {
  --bg: #f7f4ef;
  --bg-card: #ffffff;
  --ink: #1c1a2e;
  --ink-soft: #5a5670;
  --ink-mute: #8a869e;
  --line: #e6e0d5;
  --line-soft: #f0ebe1;
  --primary: #2f2649;
  --primary-hover: #221a37;
  --accent: #b8965a;
  --accent-soft: #f2ead9;
  --success: #2e7d5c;
  --success-bg: #e6f4ee;
  --error: #b23a48;
  --error-bg: #fbe9ec;
  --warn: #a4741a;
  --warn-bg: #fcf3e0;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(28, 26, 46, 0.06), 0 2px 8px rgba(28, 26, 46, 0.04);
  --shadow-md: 0 4px 12px rgba(28, 26, 46, 0.08), 0 12px 32px rgba(28, 26, 46, 0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.hero {
  text-align: center;
  padding: 40px 12px 28px;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 6vw, 40px);
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.hero p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
}

.event-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 28px auto 32px;
  max-width: 640px;
}
.event-info .chip {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.event-info .chip-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.event-info .chip-value {
  margin-top: 4px;
  font-family: var(--font-serif);
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
}
@media (max-width: 500px) {
  .event-info { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-md);
}
@media (max-width: 500px) {
  .card { padding: 22px 18px; border-radius: 12px; }
}

.section {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}
.section:last-of-type { border-bottom: 0; padding-bottom: 0; margin-bottom: 8px; }
.section h2 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.section .hint {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 16px;
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field label .req { color: var(--error); margin-left: 2px; }
.field .desc {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin: -2px 0 8px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg-card);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 38, 73, 0.12);
}
.field.invalid input, .field.invalid textarea, .field.invalid select {
  border-color: var(--error);
  background: #fff8f9;
}
.field .err {
  color: var(--error);
  font-size: 12.5px;
  margin-top: 6px;
  display: none;
}
.field.invalid .err { display: block; }

.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-card);
}
.option:hover { border-color: var(--accent); background: var(--accent-soft); }
.option input { margin: 3px 0 0 0; accent-color: var(--primary); flex-shrink: 0; }
.option .opt-text { font-size: 14.5px; color: var(--ink); }
.option input:checked ~ .opt-text { font-weight: 600; color: var(--primary); }
.option:has(input:checked) { border-color: var(--primary); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(47,38,73,0.06); }

.checkbox-authorization {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.checkbox-authorization input { margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.checkbox-authorization label { font-size: 13.5px; color: var(--ink); line-height: 1.5; }

.hidden { display: none !important; }

.subgroup {
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  margin-top: 14px;
}
.subgroup .subtitle {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
  margin: 0 0 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: var(--radius-sm);
  font-size: 15.5px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.05s, background 0.15s, box-shadow 0.15s;
  min-height: 52px;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(47, 38, 73, 0.25);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.7; cursor: wait; }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--primary); }

.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #b9dfcd; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #f0c9cf; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f0dbb0; }

/* Success screen */
.thankyou {
  text-align: center;
  padding: 24px 12px;
}
.thankyou .icon {
  width: 76px; height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  border: 3px solid #b9dfcd;
}
.thankyou h2 {
  font-family: var(--font-serif);
  color: var(--primary);
  font-size: 26px;
  margin: 0 0 12px;
}
.thankyou p {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 460px;
  margin: 0 auto 24px;
}

/* Footer */
.footer {
  text-align: center;
  padding: 32px 20px 0;
  font-size: 12px;
  color: var(--ink-mute);
}

/* Modal simples */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28, 26, 46, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h3 {
  font-family: var(--font-serif);
  color: var(--primary);
  margin: 0 0 10px;
  font-size: 22px;
}
.modal p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 20px; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; min-height: 46px; padding: 12px 16px; font-size: 14.5px; }
