:root {
  --pumpkin: #D95829;
  --pumpkin-dark: #B8431C;
  --ink: #211A12;
  --cream: #FBF3E2;
  --parchment: #F3E6C9;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--pumpkin);
  color: var(--ink);
  font-family: 'Libre Caslon Text', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 1;
}

.hero {
  position: relative;
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
}

.hero-inner { max-width: 480px; margin: 0 auto; position: relative; z-index: 2; }

.flourish {
  position: absolute;
  width: 56px;
  height: 56px;
  color: var(--cream);
  opacity: 0.55;
  z-index: 1;
  pointer-events: none;
}
.corner-tl { top: 14px; left: 14px; }
.corner-tr { top: 14px; right: 14px; transform: scaleX(-1); }
.corner-bl { bottom: 10px; left: 14px; transform: scaleY(-1); }
.corner-br { bottom: 10px; right: 14px; transform: scale(-1, -1); }

.eyebrow {
  font-family: 'Libre Caslon Text', serif;
  font-style: italic;
  color: var(--cream);
  opacity: 0.85;
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.script-accent {
  font-family: 'Yellowtail', cursive;
  color: var(--cream);
  font-size: clamp(2.1rem, 8.5vw, 3rem);
  line-height: 1;
  margin: 0 0 0.1rem;
}

.headline {
  font-family: 'Rye', serif;
  text-transform: uppercase;
  color: var(--cream);
  font-size: clamp(2.1rem, 9vw, 3.4rem);
  line-height: 1;
  margin: 0 0 1rem;
  text-shadow: 4px 4px 0 var(--pumpkin-dark);
  letter-spacing: 0.02em;
}

.ghost {
  width: 220px;
  height: auto;
  margin: 0.5rem 0 0.8rem;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,0.25));
}

.tagline {
  color: var(--cream);
  font-style: italic;
  font-size: 1rem;
  opacity: 0.9;
  margin: 0;
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  position: relative;
  z-index: 2;
}

.ticket {
  background: var(--parchment);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 1.6rem 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: center;
}

.ticket-row-wide { text-align: left; justify-content: flex-start; }

.ticket-field {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ticket-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--pumpkin-dark);
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.ticket-value {
  font-weight: 700;
  font-size: 1.05rem;
}

.ticket-perf {
  border-top: 2px dashed var(--ink);
  opacity: 0.4;
  margin: 1.2rem 0;
}

.ticket-notes p {
  font-style: italic;
  margin: 0 0 0.6rem;
}

.ticket-notes ul {
  margin: 0;
  padding-left: 1.2rem;
}

.ticket-notes li { margin-bottom: 0.3rem; }

.rsvp h2 {
  font-family: 'Rye', serif;
  text-transform: uppercase;
  color: var(--cream);
  font-size: 1.5rem;
  text-align: center;
  margin: 0 0 1.3rem;
  text-shadow: 2px 2px 0 var(--pumpkin-dark);
}

#rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--cream);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.optional {
  font-weight: 400;
  font-style: italic;
  font-size: 0.85rem;
  opacity: 0.75;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  padding: 0.6rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}

input:focus, textarea:focus {
  outline: 3px solid var(--pumpkin-dark);
  outline-offset: 1px;
}

.field-pair {
  display: flex;
  gap: 1rem;
}
.field-pair label { flex: 1; min-width: 0; }

textarea { resize: vertical; }

button[type="submit"] {
  font-family: 'Rye', serif;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 3px;
  padding: 0.9rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

button[type="submit"]:hover { background: var(--pumpkin-dark); }
button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

.form-error {
  color: #7A1E1E;
  font-weight: 700;
  text-align: center;
  margin: 0;
}

.hidden-field {
  position: absolute;
  left: -9999px;
}

footer {
  text-align: center;
  color: var(--cream);
  opacity: 0.8;
  font-size: 0.85rem;
  padding: 0.5rem 1.5rem 2.5rem;
  position: relative;
  z-index: 2;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(33, 26, 18, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 10;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--parchment);
  border: 2px solid var(--ink);
  border-radius: 6px;
  max-width: 340px;
  width: 100%;
  padding: 1.8rem;
  text-align: center;
}

.ghost-small { width: 80px; margin-bottom: 0.5rem; }

.modal h3 {
  font-family: 'Rye', serif;
  text-transform: uppercase;
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}

.btn-secondary {
  display: inline-block;
  margin-top: 1rem;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  border-radius: 3px;
}

.btn-secondary:hover { background: var(--pumpkin-dark); }

.btn-text {
  display: block;
  margin: 0.9rem auto 0;
  background: none;
  border: none;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
}

.host-only {
  color: var(--cream);
  opacity: 0.6;
  font-size: 0.78rem;
}

.host-only:hover { opacity: 0.9; }

@media (max-width: 400px) {
  .ticket-row { flex-direction: column; gap: 0.9rem; text-align: left; }
}
