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

:root {
  --accent: #6b21a8;
  --accent-dark: #4c1480;
  --accent-soft: #f4f0fc;
  --bg: #edecf8;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #5f6368;
  --line: #dad8ea;
  --error: #b3261e;
  --error-bg: #fce8e6;
  --radius: 14px;
}

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -100px, #ffffff 0%, rgba(255, 255, 255, 0) 60%),
    var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.page { max-width: 720px; margin: 0 auto; padding: 22px 14px 56px; }

/* ---------- Portada ---------- */

.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: clamp(380px, 58vh, 520px);
  display: flex;
  align-items: flex-end;
  background: #16203a url("img/portada.webp") center / cover no-repeat;
  box-shadow: 0 18px 44px rgba(24, 16, 60, 0.3);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 15, 35, 0.05) 0%, rgba(10, 15, 35, 0.28) 40%, rgba(10, 15, 35, 0.8) 100%),
    linear-gradient(115deg, rgba(45, 15, 75, 0.35) 0%, rgba(45, 15, 75, 0) 55%);
}

.hero-inner {
  position: relative;
  padding: 30px 30px 104px;
  color: #fff;
  max-width: 640px;
}

.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 0.76rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #ecd9ff;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-eyebrow::after {
  content: "";
  height: 1px;
  flex: 0 0 110px;
  background: rgba(255, 255, 255, 0.4);
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.45);
}

.hero-place { font-style: italic; font-weight: 400; color: #f5e9ff; }

.hero-sub {
  margin: 14px 0 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 36ch;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

.intro.overlap {
  position: relative;
  z-index: 2;
  margin: -58px 16px 14px;
  box-shadow: 0 12px 34px rgba(24, 16, 60, 0.14);
}

/* ---------- Tarjetas ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(27, 16, 66, 0.06);
  margin-bottom: 14px;
}

.intro-body { padding: 22px 24px 12px; }
.intro p { margin: 0 0 12px; }

.requirement { color: var(--muted); font-size: 0.9rem; margin: 4px 2px 12px; }

.req { color: var(--error); }

/* ---------- Campos ---------- */

.field { padding: 18px 22px 16px; }

.q { display: block; margin: 0 0 10px; font-size: 0.98rem; }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="date"],
.field select {
  width: 100%;
  padding: 9px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-bottom: 2px solid var(--accent);
}

.field input.invalid,
.field select.invalid { border-bottom: 2px solid var(--error); }

.field.invalid > .q,
.field.invalid .q { color: var(--error); }

input[type="date"] { min-height: 40px; }

.options { display: flex; flex-direction: column; gap: 12px; }

.options.inline { flex-direction: row; flex-wrap: wrap; gap: 10px 26px; }

.option { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.hint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Huéspedes ---------- */

.guest { overflow: hidden; }

.guest-head {
  padding: 14px 22px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  font-weight: 600;
  color: var(--accent-dark);
}

.guest-body { padding: 2px 22px 12px; }
.guest .field { padding: 14px 0 10px; }

/* ---------- Errores ---------- */

.form-errors {
  background: var(--error-bg);
  border: 1px solid #f2b8b5;
  color: #5c0f0a;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.form-errors p { margin: 0 0 6px; font-weight: 600; }
.form-errors ul { margin: 0; padding-left: 20px; }
.form-errors li { margin: 3px 0; }

/* ---------- Botones ---------- */

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 11px 24px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, transform 0.05s;
}

.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }

.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--accent-soft); }

.link-btn {
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 8px;
}

/* ---------- Final ---------- */

.done { padding: 34px 26px; text-align: center; }
.done h2 { margin: 0 0 10px; color: var(--accent-dark); font-weight: 600; }
.done p { margin: 0; }

/* ---------- Móvil ---------- */

@media (max-width: 520px) {
  .page { padding: 12px 10px 44px; }
  .hero { min-height: 400px; border-radius: 16px; }
  .hero-inner { padding: 22px 20px 82px; }
  .hero-eyebrow::after { flex: 1; max-width: none; }
  .intro.overlap { margin: -46px 8px 14px; }
  .intro-body, .field { padding-left: 18px; padding-right: 18px; }
  .guest-head { padding: 13px 18px; }
  .guest-body { padding: 2px 18px 10px; }
  .actions { flex-direction: row-reverse; justify-content: space-between; }
}
