/* Distriplinios — landing «el pueblo»
   Tokens: una fuente (Nunito), paleta pastel del mundo, una acción. */

:root {
  --surface: #FAF3E7;        /* crema */
  --surface-deep: #241B14;   /* noche del final */
  --ink: #3E2F23;            /* marrón tinta */
  --ink-soft: #7A6A58;
  /* Marca (logo Distriplinios: carrito ROJO + letras negras), 10-nov-2026.
     El coral #D32F2F no es de la marca y con texto blanco daba 2,5:1.
     #D32F2F: 5,0:1 con texto blanco y 4,5:1 sobre la crema. */
  --accent: #D32F2F;
  --accent-deep: #B71C1C;
  --sage: #A8BFA0;
  --honey: #F2C879;
  --glass: rgba(250, 243, 231, 0.55);
  --glass-border: rgba(62, 47, 35, 0.12);
  --radius: 18px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: "Nunito", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--ink);
  overflow-x: hidden;
}

/* ───────── Nav isla ───────── */
#glassNav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; align-items: center; gap: 22px;
  /* Sin ancho propio la isla se encogía a media pantalla y el CTA se partía
     en dos líneas en el móvil (mismo arreglo que MIIGO y CHH). */
  width: max-content; max-width: calc(100vw - 24px);
  padding: 10px 12px 10px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(36, 27, 20, 0.12);
}
.brand {
  display: grid; place-items: center;
  border-radius: 12px; overflow: hidden;
  transition: transform .25s var(--ease);
}
.brand:hover { transform: scale(1.05); }
.brand img { display: block; height: 34px; width: auto; }

/* ───────── Botones ───────── */
.cta {
  display: inline-block;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 14px;
  padding: 10px 18px; border-radius: 999px;
  text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(183, 28, 28, .4);
  transition: transform .25s var(--ease), background .25s;
}
.cta:hover { transform: translateY(-2px) scale(1.03); background: var(--accent-deep); }
.ghost {
  display: inline-block;
  border: 1.5px solid rgba(62,47,35,.35); color: var(--ink);
  font-weight: 700; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; text-decoration: none;
  transition: background .25s, border-color .25s;
}
.ghost:hover { background: rgba(62,47,35,.06); border-color: var(--ink); }

/* ───────── El pueblo (portada) ───────── */
#pueblo { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto;
  background: var(--surface-deep); color: #fff; overflow: hidden; }
.escenario { position: relative; overflow: hidden; }
.portada, .bucle { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bucle { opacity: 0; transition: opacity 1.2s var(--ease); }
.bucle.lista { opacity: 1; }
/* Unión con lo de abajo: el pueblo se desenfoca y se disuelve en el color del final,
   sin borde. El desenfoque crece hacia abajo (máscara sobre el backdrop-filter). */
.escenario::after { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none;
  background: linear-gradient(to bottom, rgba(36, 27, 20, 0) 0%, rgba(36, 27, 20, .55) 55%, var(--surface-deep) 100%);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 70%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 70%); }

.casas { position: absolute; inset: 0; z-index: 2; }
.casa { position: absolute; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(36, 27, 20, .55); color: #fff; font: 800 14px var(--font); cursor: pointer;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .25s var(--ease), background .25s; }
.casa:hover, .casa:focus-visible { transform: translate(-50%, -50%) scale(1.06); background: var(--accent); outline: none; }
.casa:focus-visible { box-shadow: 0 0 0 3px #fff, 0 6px 20px rgba(0,0,0,.25); }
.punto { width: 12px; height: 12px; border-radius: 50%; background: var(--honey);
  box-shadow: 0 0 0 0 rgba(242, 200, 121, .7); animation: latido 2.2s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 12px rgba(242, 200, 121, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 200, 121, 0); } }

.portada-copy { position: relative; z-index: 3; padding: 0 20px 40px; text-align: center; margin-top: -26vh; }
.portada-copy h1 { font-size: clamp(30px, 5vw, 60px); font-weight: 900; line-height: 1.04;
  text-shadow: 0 4px 24px rgba(0,0,0,.45); }
.sub { font-size: clamp(15px, 1.6vw, 19px); font-weight: 700; margin-top: 12px; line-height: 1.5; }
.portada-copy .sub { color: rgba(255,255,255,.9); text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.acciones { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.acciones .ghost, .ghost.claro { color: #fff; border-color: rgba(255,255,255,.55); background: rgba(36,27,20,.25); }
.acciones .ghost:hover, .ghost.claro:hover { background: rgba(255,255,255,.14); border-color: #fff; }
.pista { margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.7); font-weight: 700; }
button.cta, button.ghost { font-family: var(--font); cursor: pointer; }

/* ───────── Reproductor de escenas ───────── */
#escena { position: fixed; inset: 0; z-index: 70; background: #120d0a; opacity: 0;
  transition: opacity .35s var(--ease), filter .9s var(--ease); }
#escena.visible { opacity: 1; }
#escena.fundido { opacity: 0; filter: blur(14px) brightness(1.4); }
#reproductor { width: 100%; height: 100%; object-fit: cover; }
.escena-copy { position: absolute; left: 50%; bottom: clamp(60px, 12vh, 120px); transform: translateX(-50%);
  width: min(640px, calc(100% - 32px)); text-align: center; padding: 22px 22px 24px;
  border-radius: var(--radius); background: rgba(250, 243, 231, .88); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: subir .5s var(--ease); }
.escena-copy h2 { font-size: clamp(24px, 3.6vw, 40px); font-weight: 900; line-height: 1.08; }
.escena-copy .sub { color: var(--ink); margin: 8px 0 18px; }
@keyframes subir { from { opacity: 0; transform: translate(-50%, 16px); } }
.escena-controles { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
body.con-escena { overflow: hidden; }

/* ───────── Final ───────── */
#final {
  position: relative; z-index: 5;
  min-height: 80vh; display: grid; place-content: center; text-align: center;
  background: var(--surface-deep); color: #fff;
  padding: 90px 20px 60px;
}
#final .kicker { color: var(--honey); }
.final-logo { margin-bottom: 18px; filter: drop-shadow(0 6px 24px rgba(0,0,0,.45)); }
#final h2 { font-size: clamp(28px, 4.6vw, 52px); margin-bottom: 34px; }
.final-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.cta.big { font-size: 16px; padding: 15px 30px; }
#final .fine { font-size: 13px; color: rgba(255,255,255,.55); }

footer {
  background: var(--surface-deep); color: rgba(255,255,255,.62);
  text-align: center; padding: 18px; font-size: 12px;
}

.sedes { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 auto 30px; max-width: 900px; }
.sede { display: grid; gap: 2px; min-width: 150px; padding: 12px 16px; border-radius: 14px; text-decoration: none;
  color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); text-align: left; }
.sede:hover { background: rgba(255,255,255,.16); }
.sede b { color: var(--honey); font-size: 14px; }
.sede span { font-weight: 800; font-size: 14px; }
.sede small { font-size: 12px; color: rgba(255,255,255,.7); }

/* ───────── Reducción de movimiento ───────── */
@media (prefers-reduced-motion: reduce) {
  .punto { animation: none; }
  .bucle { display: none; }
  #escena, .escena-copy { transition: none; animation: none; }
}

/* ───────── Contraste en panel final ───────── */
#final .ghost { color: #fff; border-color: rgba(255,255,255,.45); }
#final .ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }

/* ───────── Móvil: el pueblo en vertical, casas siempre tocables ───────── */
@media (max-width: 700px) {
  #pueblo { grid-template-rows: 62svh auto; min-height: 0; }
  .portada-copy { margin-top: -10svh; padding-bottom: 30px; }
  .casa { font-size: 13px; padding: 8px 12px 8px 9px; min-height: 40px; }
  .acciones { flex-direction: column; align-items: stretch; max-width: 340px; margin-inline: auto; }
  .acciones .cta, .acciones .ghost { text-align: center; }
  #glassNav { gap: 10px; padding: 7px 8px 7px 12px; }
  .brand img { height: 28px; }
  #glassNav .cta { font-size: 12.5px; padding: 8px 13px; }
  #final { min-height: 0; padding: 24px 16px 40px; }
  .final-ctas { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin: 0 auto 34px; }
  .final-ctas a { width: 100%; text-align: center; }
  .final-logo { height: 110px !important; width: auto; }
  .sede { min-width: 0; flex: 1 1 140px; }
}
