/* ===== Tipografías reales de marca (Camino del duelo · JGL) ===== */
@font-face {
  font-family: Queens;
  src: url("fonts/queens-regular.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: Queens;
  src: url("fonts/queens-italic.woff2") format("woff2");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("fonts/inter-variable.woff2") format("woff2");
  font-style: normal; font-weight: 400 600; font-display: swap;
}

:root {
  --off-white: #FBF7EE;
  --deep-blue: #0F1E6A;
  --navy-deep: #22307a;
  --mostaza:   #F7BE00;
  --kraft:     #C8A380;
  --pastel:    #FFE17E;
  --ink: var(--deep-blue);
  --muted: rgba(15, 30, 106, .62);
  --line: rgba(15, 30, 106, .16);
  --font-display: Queens, "PT Serif", Georgia, serif;
  --font-ui: Inter, Arial, sans-serif;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100%;
}

/* ===== Header ===== */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; position: relative; z-index: 3;
}
.site-header .brand-mark { height: 30px; display: block; }
.site-header .brand-mark img { height: 100%; width: auto; display: block; }
.eyebrow-tag { font-family: var(--font-display); font-size: 15px; color: var(--ink); display: inline-flex; align-items: center; }
.eyebrow-tag .dot { display: inline-block; width: 7px; height: 7px; background: var(--mostaza); transform: rotate(45deg); margin: 0 10px; flex: none; }

/* ===== Stage con fondo de piedras (imagen generada para Ecos) ===== */
.stage {
  position: relative; flex: 1 0 auto;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px 60px; overflow: hidden;
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("images/ecos-stones.jpg?v=12") no-repeat center bottom;
  background-size: cover;
}
/* viñeta: centro brillante, orillas más oscuras (profundidad) + velo tras el texto */
.stage::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 46% 38% at 50% 36%,
      rgba(255,253,247,.5) 0%, rgba(251,247,238,.1) 55%, rgba(251,247,238,0) 100%),
    radial-gradient(ellipse 85% 80% at 50% 46%,
      rgba(90,70,40,0) 52%, rgba(74,56,30,.1) 78%, rgba(55,42,22,.22) 100%);
}

/* Piedras como elementos propios (no se recortan en ningún tamaño) */
.corner-stone { position: absolute; z-index: 0; top: -22px; width: 230px; height: auto; pointer-events: none; opacity: .96; }
.corner-stone.tl { left: -26px; }
.corner-stone.tr { right: -26px; transform: scaleX(-1); }

/* Pirámide (cairn) abajo-derecha y cúmulo abajo-izquierda */
.stone-cairn, .stone-cluster {
  position: absolute; bottom: 0; z-index: 0; height: auto; pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(15,30,106,.16));
}
.stone-cairn { right: 7%; width: clamp(120px, 15vw, 265px); }
.stone-cluster { left: 8%; width: clamp(150px, 18vw, 330px); }

/* ===== Paneles de paso ===== */
.step-panel {
  position: relative; z-index: 2; width: 100%; max-width: 620px;
  text-align: center; animation: fade-up .5s ease both;
}
.step-panel[hidden] { display: none; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Bienvenida: cada elemento aparece en cascada (párrafo por párrafo) */
.welcome { animation: none; }
.welcome > * { animation: fade-up .6s ease both; }
.welcome > *:nth-child(1) { animation-delay: .08s; }
.welcome > *:nth-child(2) { animation-delay: .26s; }
.welcome > *:nth-child(3) { animation-delay: .44s; }
.welcome > *:nth-child(4) { animation-delay: .62s; }
.welcome > *:nth-child(5) { animation-delay: .80s; }
.welcome > *:nth-child(6) { animation-delay: .98s; }
.welcome > *:nth-child(7) { animation-delay: 1.16s; }

/* ===== Paso 1 · Bienvenida ===== */
.welcome .eyebrow {
  font-family: var(--font-ui); font-size: 1.05rem; letter-spacing: normal; text-transform: none;
  color: var(--deep-blue); font-weight: 400; margin: 0 0 10px;
}
.welcome h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 9vw, 5rem); line-height: .97; letter-spacing: -.01em;
  margin: 0 0 14px; color: var(--deep-blue);
}
.welcome h1 em { font-style: italic; }
.welcome .tagline {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.15rem, 2.8vw, 1.5rem); color: var(--deep-blue);
  margin: 0 auto 24px; max-width: 32ch;
}
.welcome p.body { color: var(--deep-blue); font-size: 1.05rem; margin: 0 auto 10px; max-width: 46ch; }
/* palabras especiales en itálica serif (Queens), como la invitación */
.welcome .body em, .welcome .note em { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.welcome .note { margin: 18px auto 30px; color: var(--deep-blue); font-weight: 500; font-size: 1rem; max-width: 42ch; }
.welcome .note strong { color: var(--deep-blue); font-weight: 600; }

/* ===== Botón ===== */
.btn-primary {
  display: inline-block; font-family: var(--font-ui); font-weight: 600; font-size: 1rem;
  cursor: pointer; border: none; border-radius: 999px; padding: 16px 48px;
  background: var(--deep-blue); color: var(--off-white);
  text-decoration: none; transition: transform .06s, background .15s;
}
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .55; cursor: default; }

/* ===== Paso 2 · Formulario (dos columnas sobre el mismo fondo) ===== */
.step-panel.form-step { max-width: 940px; }
.form-head { margin-bottom: 22px; }
.form-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 5vw, 2.4rem); margin: 0 0 4px; color: var(--deep-blue); }
.form-head p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Dos recuadros lado a lado (formación tipo Camino) */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.form-grid .panel { margin-bottom: 0; }

.panel {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: none;
  padding: 24px 22px; text-align: left; margin-bottom: 16px; color: var(--deep-blue);
}
.panel h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; margin: 0 0 18px; padding-bottom: 10px; color: var(--deep-blue); position: relative; }
.panel h3 .opt-note { font-family: var(--font-ui); font-size: .8rem; color: var(--muted); font-weight: 400; }
.panel h3::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 3px; border-radius: 3px; background: var(--mostaza); }

/* Recuadro de acompañante + casilla "Voy sin acompañante" */
.panel.companion { margin-bottom: 0; transition: background .2s; }
.alone {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  margin: 0 0 18px; padding: 10px 12px; border-radius: 10px;
  background: var(--off-white); border: 1px solid var(--line);
  font-weight: 600; font-size: .92rem; color: var(--deep-blue);
}
.alone input { width: 17px; height: 17px; accent-color: var(--deep-blue); flex: none; }
.companion-fields { transition: opacity .2s; }
/* estado deshabilitado: se oscurece */
.panel.companion.is-disabled { background: rgba(236,231,219,.92); }
.companion-fields.is-off { opacity: .4; pointer-events: none; }
input:disabled { background: #efece4; color: #9a9a9a; cursor: not-allowed; }

/* Consentimientos + botón adentro del segmento */
.consents-panel { margin-top: 18px; }
.consents-panel .submit { margin-top: 18px; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
/* etiquetas con el formato de Camino: serif Queens, deep blue */
label.lbl { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; line-height: 1.3; color: var(--deep-blue); margin-bottom: 9px; }
.field .opt { font-family: var(--font-ui); font-size: .8rem; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="tel"], input[type="email"] {
  font-family: var(--font-ui); font-size: 15px; width: 100%; padding: 13px 15px;
  border: 1px solid #e0dccf; border-radius: 10px;
  background: #fff; color: var(--deep-blue);
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: #9a9a9a; }
input:focus { outline: none; border-color: var(--deep-blue); box-shadow: 0 0 0 3px rgba(15,30,106,.12); }

.checkbox { display: flex; align-items: flex-start; gap: 11px; font-size: .95rem; color: var(--deep-blue); margin-bottom: 12px; cursor: pointer; line-height: 1.45; }
.checkbox:last-of-type { margin-bottom: 0; }
.checkbox input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--deep-blue); flex: none; }
.aviso { font-size: .84rem; margin: 14px 0 0; color: var(--muted); }
.aviso a, .checkbox a { color: var(--deep-blue); }

.form-error { background: #fdecef; color: #a3233f; border: 1px solid #f3c6d0; border-radius: 10px; padding: 11px 14px; font-size: .92rem; margin: 0 0 14px; text-align: left; }
.btn-primary.submit { width: 100%; text-align: center; }
.btn-back { display: inline-block; margin-top: 16px; background: none; border: none; cursor: pointer; color: var(--muted); font: inherit; font-size: .9rem; text-decoration: underline; }

/* ===== Gracias ===== */
.gracias { text-align: center; max-width: 560px; }
.gracias .diamond { display: block; color: var(--mostaza); font-size: 16px; margin-bottom: 20px; }
.gracias h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; margin: 0 0 18px; color: var(--deep-blue); }
.gracias p { color: var(--deep-blue); font-size: 1.08rem; margin: 0 0 14px; }
.gracias p.muted { color: var(--muted); }
/* Nota informativa (no es botón): ícono + texto, sin fondo sólido */
.gracias .wa { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px; color: var(--deep-blue); font-weight: 500; font-size: 1rem; }
.gracias .wa svg { width: 22px; height: 22px; color: #25D366; flex: none; }

/* ===== Panel interno ===== */
.panel-wrap { max-width: 1120px; margin: 0 auto; padding: 32px 20px 80px; width: 100%; }
.panel-wrap h1 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; margin: 0 0 4px; }
.panel-wrap .muted { color: var(--muted); margin: 0 0 24px; }
.login { max-width: 380px; display: flex; gap: 10px; margin-bottom: 18px; }
.login input { flex: 1; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(15,30,106,.08); overflow: hidden; }
.table-head { display:flex; justify-content: space-between; align-items:center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.table-head h2 { margin: 0; font-size: 1.1rem; font-family: var(--font-display); font-weight: 400; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: top; }
th { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tbody tr:hover { background: var(--off-white); }
.yes { color: #2f8f5b; font-weight: 600; }
.no { color: var(--muted); }
.empty { padding: 44px; text-align:center; color: var(--muted); }
.btn-export { font: inherit; font-weight: 600; cursor: pointer; border: none; border-radius: 999px; padding: 9px 20px; background: var(--mostaza); color: var(--deep-blue); font-size: .9rem; }

/* Accesibilidad */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--mostaza); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .step-panel, .welcome > * { animation: none; } }

@media (max-width: 760px) {
  .form-grid { grid-template-columns: 1fr; }
  .corner-stone { width: 128px; top: -12px; }
  .stone-cairn { width: 104px; right: -4px; }
  .stone-cluster { width: 132px; left: -14px; }
}
@media (max-width: 560px) {
  .site-header { padding: 14px 18px; }
  .panel { padding: 22px 18px; }
}
