/* ==========================================================================
   BILBAINITA — base editorial Arcadea (Jost). La página de participación usa
   el tema "gala" oscuro (body.gala); bases.php usa la base clara por defecto.
   ========================================================================== */

:root {
  --bg: #f7f3ee;
  --bg-soft: #fdf8f0;
  --ink: #2a2622;
  --ink-soft: #3d3730;
  --muted: #7a6f63;
  --gold: #c8a672;
  --gold-deep: #a08964;
  --line: #e8dfd1;
  --white: #ffffff;
  --danger: #c84a4a;
  --success: #5a8a4a;
  --warn: #d4942f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; line-height: 1.55; font-size: 16px; }

a { color: var(--gold-deep); text-decoration: none; border-bottom: 1px solid currentColor; }
a:hover { color: var(--ink); }

h1, h2, h3 { font-weight: 300; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 16px; }
h1 { font-size: 36px; }
h2 { font-size: 26px; }
h3 { font-size: 20px; }

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  font-weight: 500;
  margin-bottom: 8px;
}

/* ==========================================================================
   TEMA GALA (oscuro + oro) — solo en la página de participación
   ========================================================================== */

body.gala {
  color-scheme: dark;
  color: #ece0cb;
  background: radial-gradient(ellipse 110% 80% at 50% 22%, #2c2117 0%, #17130f 60%, #0d0a07 100%);
  background-attachment: fixed;
}

/* Grano fílmico sutil */
body.gala::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.gala #confetti {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.participate-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
}

body.gala .participate-card {
  background: rgba(38, 30, 21, 0.55);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(212, 175, 106, 0.24);
  border-radius: 22px;
  max-width: 460px;
  width: 100%;
  padding: 38px 30px 30px;
  box-shadow:
    0 0 90px rgba(212, 175, 106, 0.10),
    0 30px 70px rgba(0, 0, 0, 0.55);
}

body.gala .participate-card .header { text-align: center; margin-bottom: 30px; }
.brand-logo { display: block; height: 64px; width: auto; margin: 0 auto 20px; }
.success-screen .brand-logo { height: 56px; }
body.gala .eyebrow { color: #d4af6a; letter-spacing: 0.26em; }

.gold-grad {
  background: linear-gradient(135deg, #f4e0aa 0%, #d4af6a 50%, #a8884f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.gala .participate-card h1 {
  font-size: 38px;
  font-weight: 300;
  margin: 10px 0 12px;
  letter-spacing: 0;
}
body.gala .participate-card .lead { color: #9a8a72; font-size: 15px; }

body.gala .field { margin-bottom: 16px; }
body.gala .field label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #b8a079;
  margin-bottom: 7px;
}

body.gala .field input[type="text"],
body.gala .field input[type="email"],
body.gala .field input[type="tel"],
body.gala .field select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(212, 175, 106, 0.22);
  border-radius: 11px;
  font-family: inherit;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #ece0cb;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
body.gala .field input::placeholder { color: #7d7059; }
body.gala .field input:focus,
body.gala .field select:focus {
  outline: none;
  border-color: #d4af6a;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.16);
}

.field-row { display: flex; gap: 8px; }
.field-row > * { flex: 1; }
.field-row .narrow { flex: 0 0 104px; }

.dob-grid { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; }

body.gala .checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #9a8a72;
  margin: 22px 0;
}
body.gala .checkbox-row input { margin-top: 3px; accent-color: #d4af6a; }
body.gala .checkbox-row a { color: #d4af6a; border-bottom-color: rgba(212,175,106,0.4); }
body.gala .checkbox-row a:hover { color: #f4e0aa; }

body.gala .btn-primary {
  display: block;
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #f4e0aa 0%, #d4af6a 52%, #c2a05f 100%);
  color: #17130f;
  border: 0;
  border-radius: 13px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(212, 175, 106, 0.28);
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
}
body.gala .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(212, 175, 106, 0.40); filter: brightness(1.05); }
body.gala .btn-primary:active { transform: translateY(0); }
body.gala .btn-primary:disabled { filter: grayscale(0.4) brightness(0.8); cursor: not-allowed; transform: none; box-shadow: none; }

/* Alertas (base clara) */
.alert {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  border-left: 3px solid;
}
.alert.error { background: #fdecec; border-color: var(--danger); color: #6e2222; }
.alert.warn { background: #fff8ec; border-color: var(--warn); color: #6c4d1c; }
.alert.success { background: #ebf5e8; border-color: var(--success); color: #2c4a25; }

/* Alertas en tema gala */
body.gala .alert { border-left: 0; border: 1px solid; border-radius: 11px; }
body.gala .alert.error { background: rgba(200,74,74,0.12); border-color: rgba(200,74,74,0.45); color: #f0b9b9; }
body.gala .alert.warn { background: rgba(212,175,106,0.12); border-color: rgba(212,175,106,0.45); color: #f4e0aa; }
body.gala .alert.success { background: rgba(110,160,90,0.14); border-color: rgba(110,160,90,0.45); color: #c5e0b5; }

/* Pantalla de éxito */
.success-screen { text-align: center; padding: 28px 0; }
.success-screen h1 { font-size: 38px; margin: 0 0 12px; font-weight: 300; }
.success-screen .lead { color: #9a8a72; }

body.gala .success-screen .check {
  width: 92px; height: 92px; margin: 0 auto 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; line-height: 1;
  color: #17130f;
  background: linear-gradient(135deg, #f4e0aa 0%, #d4af6a 55%, #c2a05f 100%);
  box-shadow: 0 0 60px rgba(212,175,106,0.45);
  animation: checkpop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes checkpop {
  0% { opacity: 0; transform: scale(0.4); }
  60% { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

.brand-footer {
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  margin-top: 26px;
}
body.gala .brand-footer { color: #a8884f; }

/* ==========================================================================
   Bases legales (base clara — bases.php)
   ========================================================================== */

.legal-page { max-width: 720px; margin: 0 auto; padding: 56px 24px 80px; }
.legal-page h1 { font-size: 40px; }
.legal-page h2 { margin-top: 36px; }
.legal-page p, .legal-page li { color: var(--ink-soft); }

/* Card clara (fallback si se usara sin tema gala) */
.participate-card {
  background: var(--white);
  border-radius: 16px;
  max-width: 460px;
  width: 100%;
  padding: 40px 32px 32px;
  box-shadow: 0 6px 30px rgba(40, 30, 20, 0.06);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 16px; background: #fafafa; color: var(--ink); }
.btn-primary { display: block; width: 100%; padding: 14px 20px; background: var(--ink); color: var(--white); border: 0; border-radius: 10px; font-family: inherit; font-size: 16px; font-weight: 500; cursor: pointer; }
