/* ============================================================
   Lead Form — Salón de Eventos
   Design system: champán dorado + marfil cálido, serif premium
   ============================================================ */

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

:root {
  /* === Color === */
  --ink:         #1a1814;
  --ink-2:       #3a3733;
  --muted:       #75716a;
  --line:        #e7e1d4;
  --line-strong: #d8d0bd;
  --bg:          #f6f1e7;
  --surface:     #fffdf7;
  --surface-2:   #f1ebdd;

  --gold:        #a67c2e;
  --gold-deep:   #87621f;
  --gold-soft:   #f4ead0;
  --gold-ring:   rgba(166, 124, 46, .18);

  --emerald:       #1f7a55;
  --emerald-soft:  #e2efe7;
  --emerald-deep:  #15573b;

  --crimson:       #b04a3c;
  --crimson-soft:  #f5e5e1;
  --crimson-deep:  #7d3328;

  --amber:         #b8761e;
  --amber-soft:    #f8eed6;

  --slate:         #6b6b78;
  --slate-soft:    #ececec;

  /* === Tipografía === */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --fs-display: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem);
  --fs-h2:      clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --fs-body:    1rem;
  --fs-sm:      .875rem;
  --fs-xs:      .75rem;

  --lh-tight: 1.2;
  --lh-snug:  1.35;
  --lh-body:  1.55;

  /* === Espaciado === */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-14: 56px;

  /* === Radios === */
  --r-xs: 8px;
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* === Sombras (tinte cálido) === */
  --shadow-sm: 0 1px 2px rgba(60, 45, 20, .06);
  --shadow:    0 2px 8px rgba(60, 45, 20, .08), 0 1px 2px rgba(60, 45, 20, .05);
  --shadow-lg: 0 18px 48px rgba(60, 45, 20, .14), 0 4px 12px rgba(60, 45, 20, .07);
  --shadow-gold: 0 4px 14px rgba(166, 124, 46, .28);

  /* === Movimiento === */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t-fast: .15s var(--ease);
  --t:      .25s var(--ease);
  --t-slow: .4s var(--ease);

  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 0%, rgba(166, 124, 46, .06), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(31, 122, 85, .05), transparent 40%);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--s-4);
  line-height: var(--lh-body);
}

.app {
  max-width: 480px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Franja dorada sutil en el tope */
.app::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep), var(--gold));
  z-index: 2;
}

/* ========== BRAND HEADER ========== */

.brand {
  padding: var(--s-6) var(--s-6) var(--s-2);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.brand-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto var(--s-3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.brand-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 auto var(--s-3);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
}
.brand-mark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.brand-mark .sep {
  display: inline-block;
  margin: 0 .5em;
  color: var(--gold);
  transform: translateY(-2px);
}
.brand-sub {
  font-size: var(--fs-xs);
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ========== PROGRESS ========== */

.progress-wrap {
  padding: var(--s-5) var(--s-6) var(--s-3);
}

.progress-track {
  height: 3px;
  background: var(--line);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: var(--s-3);
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: var(--r-pill);
  transition: width var(--t-slow);
}

.step-dots {
  display: flex;
  justify-content: space-between;
}

.dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: var(--font-sans);
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all var(--t);
  flex-shrink: 0;
}

.dot.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 4px var(--gold-ring);
}

.dot.done {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald-deep);
}
.dot.done::after { content: '✓'; }
.dot.done { font-size: 0; }
.dot.done::after { font-size: var(--fs-xs); }

/* ========== SLIDES ========== */

.slides {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.slide {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: var(--s-4) var(--s-6) 0;
  animation: fadeSlideIn var(--t-slow);
}

.slide.active { display: flex; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-5) 0;
}

.step-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.slide-title {
  font-family: var(--font-serif);
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: var(--s-1);
}

.slide-hint {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-snug);
}

/* ========== INPUTS ========== */

.input-lg {
  width: 100%;
  padding: 16px 14px;
  font-size: 16px; /* evita zoom iOS en mobile */
  font-family: var(--font-sans);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
  appearance: none;
}

@media (min-width: 480px) {
  .input-lg { font-size: 1.0625rem; }
}

.input-lg:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-ring);
}

.input-lg::placeholder { color: #b8b1a3; }

/* number arrows hidden */
.input-lg[type="number"]::-webkit-outer-spin-button,
.input-lg[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-lg[type="number"] { -moz-appearance: textfield; }

/* date/time inputs: alinear icono */
.input-lg[type="date"],
.input-lg[type="time"] {
  font-family: var(--font-sans);
}

/* ========== DIVIDER ========== */

.divider {
  text-align: center;
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  position: relative;
  margin: var(--s-1) 0;
}
.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--line);
}
.divider::before { left: 0; }
.divider::after  { right: 0; }

/* ========== LANGUAGE CARDS ========== */

.lang-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-top: var(--s-2);
}

.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-6) var(--s-3);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.lang-card:active { transform: scale(.97); }

.lang-card.active {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: var(--shadow-gold);
}

.lang-flag {
  font-size: 2.2rem;
  line-height: 1;
}

.lang-name {
  font-weight: 600;
  font-size: var(--fs-body);
  color: var(--ink);
}

.lang-card.active .lang-name { color: var(--gold-deep); }

/* ========== EVENT CARDS ========== */

.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}

.event-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 76px;
  padding: var(--s-4) var(--s-2);
  font-size: var(--fs-body);
  font-weight: 500;
  font-family: var(--font-sans);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.event-card:active { transform: scale(.97); }

.event-card.selected {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-weight: 600;
  box-shadow: var(--shadow-gold);
}

/* ========== CONTACT CARDS ========== */

.contact-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
  padding: var(--s-5) var(--s-2);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  text-align: center;
}

.contact-card:active { transform: scale(.97); }

.contact-card.active {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: var(--shadow-gold);
}

.contact-icon {
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  margin-bottom: var(--s-1);
}
.contact-card.active .contact-icon {
  background: #fff;
}

.contact-label {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.contact-desc {
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: var(--lh-snug);
}
.contact-card.active .contact-label { color: var(--gold-deep); }

/* ========== SCHEDULE PICKER ========== */

.schedule-picker {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-top: var(--s-2);
  padding: var(--s-4);
  background: var(--surface-2);
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.schedule-picker.hidden { display: none; }

.schedule-row label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--s-1);
}

/* ========== BUTTONS ========== */

.slide-footer {
  display: flex;
  gap: var(--s-2);
  padding: var(--s-3) 0 var(--s-6);
}

.btn {
  flex: 1;
  padding: 16px 14px;
  font-size: var(--fs-body);
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t);
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}

.btn:active { transform: scale(.98); }

.btn-next,
.btn-submit {
  background: var(--gold);
  color: #fff;
  box-shadow: var(--shadow-gold);
}

.btn-next:hover,
.btn-submit:hover {
  background: var(--gold-deep);
}

.btn-back {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
}
.btn-back:hover {
  background: var(--line);
  color: var(--ink-2);
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit {
  background: var(--emerald);
  box-shadow: 0 4px 14px rgba(31, 122, 85, .28);
}
.btn-submit:hover {
  background: var(--emerald-deep);
}

/* ========== CALENDAR ========== */

.calendar {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  overflow: hidden;
  user-select: none;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.calendar-header h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}

.calendar-nav {
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: var(--s-1) var(--s-3);
  color: var(--gold-deep);
  border-radius: var(--r-xs);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast);
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar-nav:hover { background: var(--gold-soft); }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  padding: var(--s-2) 0 var(--s-1);
  border-bottom: 1px solid var(--line);
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: var(--s-2);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1.5px solid transparent;
  -webkit-tap-highlight-color: transparent;
}

.calendar-day.other-month { visibility: hidden; }

.calendar-day.available {
  background: var(--emerald-soft);
  color: var(--emerald-deep);
  font-weight: 600;
}
.calendar-day.available:active { transform: scale(.9); }
.calendar-day.available:hover { background: #d4e7dc; }

.calendar-day.taken {
  background: var(--crimson-soft);
  color: var(--crimson-deep);
  font-weight: 500;
  cursor: not-allowed;
  opacity: .55;
  text-decoration: line-through;
}

.calendar-day.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-ring);
  background: var(--gold-soft);
  color: var(--gold-deep);
  font-weight: 700;
}

.calendar-day.today {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold);
}

.selected-date {
  margin-top: var(--s-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold-deep);
  text-align: center;
  padding: var(--s-2) var(--s-3);
  background: var(--gold-soft);
  border-radius: var(--r-xs);
}

.selected-date:empty { display: none; }

/* ========== MODAL ========== */

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: var(--s-5);
}

.modal.hidden { display: none; }

.hidden { display: none !important; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 24, 20, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-body {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--s-10) var(--s-6) var(--s-8);
  text-align: center;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: fadeSlideIn var(--t);
}

.modal-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--s-4);
  border-radius: 50%;
  background: var(--emerald-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-icon {
  font-size: 2rem;
  line-height: 1;
}

.modal-body h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  font-weight: 600;
  margin-bottom: var(--s-2);
  color: var(--ink);
}
.modal-body p {
  color: var(--muted);
  margin-bottom: var(--s-6);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

/* ========== RESPONSIVE ========== */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@media (max-width: 440px) {
  body { padding: 0; align-items: stretch; }
  .app {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
  }
  .app::before { border-radius: 0; }
  .slide { padding: var(--s-4) var(--s-5) 0; }
  .progress-wrap { padding: var(--s-4) var(--s-5) var(--s-3); }
  .brand { padding: var(--s-5) var(--s-5) var(--s-2); }
  .event-grid { gap: var(--s-2); }
  .event-card { min-height: 68px; padding: var(--s-3) var(--s-2); }
  .contact-card { padding: var(--s-4) var(--s-2); }
  .lang-card { padding: var(--s-4) var(--s-2); }
  .lang-flag { font-size: 1.8rem; }
  .calendar-day { font-size: .8rem; }
}

@media (min-width: 768px) {
  body { padding: var(--s-8); }
  .app { max-width: 520px; }
}

/* ========== ACCESSIBILITY ========== */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .slide { animation: none; }
  .btn:active, .event-card:active, .contact-card:active,
  .calendar-day:active { transform: none; }
}
