/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --accent: #0f7a5a;          /* single brand accent — deep emerald */
  --accent-dark: #0a5d44;
  --accent-soft: #e6f4ef;
  --accent-tint: #f4faf7;
  --ink: #1a1f1c;
  --ink-soft: #475049;
  --ink-mute: #7a847e;
  --line: #e4e7e5;
  --line-strong: #c9d1cd;
  --bg: #f7f6f2;
  --card: #ffffff;
  --error: #c0392b;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 22, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 30, 22, 0.06), 0 1px 3px rgba(15, 30, 22, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(15, 30, 22, 0.18), 0 8px 20px -8px rgba(15, 30, 22, 0.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 20px 72px;
  color: #fff;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 35, 25, 0.55) 0%, rgba(10, 35, 25, 0.78) 100%),
    linear-gradient(135deg, rgba(15, 122, 90, 0.35), rgba(10, 35, 25, 0.4));
  z-index: -1;
}

.hero-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  margin-bottom: 18px;
}

.event-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.92);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.meta-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* ---------- Form Wrap ---------- */
.form-wrap {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: -40px auto 0;
  padding: 0 16px 48px;
  position: relative;
  z-index: 1;
}

.form-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 22px;
  border-top: 6px solid var(--accent);
}

.form-intro {
  padding-bottom: 22px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.form-intro h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.9rem;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.form-intro p {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.required-note {
  font-size: 0.82rem !important;
  color: var(--ink-mute) !important;
  margin-top: 10px !important;
}

.req {
  color: var(--accent);
  font-weight: 600;
  margin-left: 2px;
}

/* ---------- Questions ---------- */
.question {
  padding: 22px 0;
  border: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.question:last-of-type { border-bottom: 0; }

fieldset.question { padding: 22px 0; }

.q-label {
  display: block;
  font-size: 1.0rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 0;
  line-height: 1.4;
}

.q-hint {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin: -6px 0 12px;
}

/* ---------- Short answer / long answer ---------- */
.short-answer,
.long-answer {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  padding: 8px 2px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0;
}

.short-answer::placeholder,
.long-answer::placeholder {
  color: var(--ink-mute);
}

.short-answer:focus,
.long-answer:focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.long-answer {
  resize: vertical;
  min-height: 90px;
  line-height: 1.55;
}

.short-answer:invalid:not(:placeholder-shown) {
  border-bottom-color: #e5b5b0;
}

/* ---------- Select ---------- */
.select-input {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 40px 12px 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a847e' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.select-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 122, 90, 0.12);
}

/* ---------- Radio & Checkbox Options ---------- */
.options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  user-select: none;
  font-size: 0.97rem;
  color: var(--ink);
}

.option-row:hover {
  background: var(--accent-tint);
}

.option-row input[type="radio"],
.option-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-mark,
.check-mark {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1.8px solid var(--line-strong);
  background: #fff;
  transition: all 0.15s ease;
  position: relative;
}

.radio-mark {
  border-radius: 50%;
}

.check-mark {
  border-radius: 5px;
}

.option-row:hover .radio-mark,
.option-row:hover .check-mark {
  border-color: var(--accent);
}

/* Radio - selected */
.option-row input[type="radio"]:checked ~ .radio-mark {
  border-color: var(--accent);
  border-width: 6px;
}

/* Checkbox - selected */
.option-row input[type="checkbox"]:checked ~ .check-mark {
  background: var(--accent);
  border-color: var(--accent);
}

.option-row input[type="checkbox"]:checked ~ .check-mark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Focus ring on options */
.option-row input[type="radio"]:focus-visible ~ .radio-mark,
.option-row input[type="checkbox"]:focus-visible ~ .check-mark {
  box-shadow: 0 0 0 3px rgba(15, 122, 90, 0.18);
}

.option-text {
  flex: 1;
  line-height: 1.4;
}

/* ---------- Submit ---------- */
.form-actions {
  padding-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.submit-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 0;
  border-radius: 12px;
  padding: 15px 28px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 16px -4px rgba(15, 122, 90, 0.45);
  width: 100%;
}

.submit-btn:hover:not(:disabled) {
  background: var(--accent-dark);
  box-shadow: 0 10px 22px -6px rgba(15, 122, 90, 0.55);
}

.submit-btn:active:not(:disabled) { transform: translateY(1px); }

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.privacy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-mute);
  margin: 0;
}

/* ---------- Errors ---------- */
.form-error {
  margin-top: 18px;
  padding: 12px 16px;
  background: #fdecea;
  border-left: 3px solid var(--error);
  border-radius: 8px;
  color: #7a1f15;
  font-size: 0.9rem;
}

/* ---------- Thank You ---------- */
.thank-you {
  text-align: center;
  padding: 48px 24px;
}

.thank-you h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 2rem;
  margin: 0 0 14px;
  color: var(--ink);
}

.thank-you p {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 auto 12px;
  max-width: 460px;
}

.ty-lead {
  font-size: 1.08rem !important;
  color: var(--ink) !important;
}

.ty-footer {
  font-size: 0.88rem !important;
  color: var(--ink-mute) !important;
  margin-top: 18px !important;
}

.ty-summary {
  margin: 22px auto 4px;
  max-width: 420px;
  text-align: left;
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 0.92rem;
}

.ty-summary:empty { display: none; }

.ty-summary .row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(15, 122, 90, 0.15);
}
.ty-summary .row:last-child { border-bottom: 0; }
.ty-summary .row .k { color: var(--ink-mute); font-weight: 500; }
.ty-summary .row .v { color: var(--ink); font-weight: 600; text-align: right; }

.checkmark-circle {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
}

.checkmark-circle svg {
  width: 100%;
  height: 100%;
}

.checkmark-circle circle {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: drawCircle 0.7s ease-out forwards;
}

.checkmark-circle path {
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: drawCheck 0.4s 0.5s ease-out forwards;
}

@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

.status-card {
  text-align: center;
  padding: 48px 24px;
}
.status-card h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0 0 12px;
}
.status-card p {
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 460px;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 24px 20px 40px;
  font-size: 0.85rem;
  color: var(--ink-mute);
}

.footer p { margin: 0 0 12px; }

#wbx-powered-by-slot {
  display: flex;
  justify-content: center;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .hero {
    padding: 80px 24px 100px;
  }
  .event-meta {
    flex-direction: row;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .form-wrap {
    margin-top: -60px;
    padding: 0 24px 64px;
  }
  .form-card {
    padding: 44px 48px;
  }
  .form-intro h2 {
    font-size: 2.2rem;
  }
  .submit-btn {
    width: auto;
    align-self: flex-start;
    min-width: 200px;
  }
  .form-actions {
    align-items: flex-start;
  }
  .privacy {
    text-align: left;
  }
}

@media (min-width: 900px) {
  .hero { padding: 100px 24px 130px; }
  .form-wrap { margin-top: -80px; }
}
