/* Gran Hotel Lomichi — mapa de llegada
   Marca: chocolate + rosa + crema, serif clásica del logo. Un solo color de acción: el rosa. */
:root {
  --choco: #421f19;
  --choco-deep: #2e1511;
  --rosa: #e98aa8;          /* marca: bordes, ruta, detalles */
  --accent: #b8375f;        /* acción: botones y estado activo (AA con blanco) */
  --accent-hover: #9e2c50;
  --crema: #fbf1ec;
  --crema-2: #f5e2da;
  --fg: #2e1511;
  --fg-muted: #6b4a44;
  --border: rgb(66 31 25 / .14);
  --white: #fff;

  --f-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --f-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 10px; --r-md: 16px; --r-lg: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1); --dur: 160ms;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 980px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--crema); color: var(--fg);
  font-family: var(--f-body); font-size: 15px; line-height: 1.55;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2 { font-family: var(--f-display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0; }
b { font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 2000; padding: 10px 14px; border-radius: 10px; background: var(--choco); color: var(--crema); }
.skip:focus { top: 12px; }

/* ---------- Encabezado ---------- */
.top {
  position: relative; background: var(--choco); color: var(--crema);
  padding: calc(20px + env(safe-area-inset-top)) var(--gutter) 44px;
  display: grid; grid-template-columns: auto 1fr; gap: 16px 22px; align-items: center;
}
.top__logo { width: clamp(108px, 22vw, 150px); height: auto; animation: rise .8s var(--ease) both; }
.top__copy { animation: rise .8s var(--ease) .12s both; }
.top h1 { font-size: clamp(34px, 8vw, 54px); }
.top p { margin-top: 6px; color: rgb(251 241 236 / .82); max-width: 34ch; }
.top__wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 26px; fill: var(--crema); }
@media (min-width: 760px) { .top { padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); } }
@keyframes rise { from { opacity: 0; translate: 0 14px; } }

main { width: min(100% - var(--gutter) * 2, var(--max)); margin: 0 auto; }

/* ---------- Origen ---------- */
.origins { margin: 4px 0 16px; }
.origins__track { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; scroll-snap-type: x proximity; }
.origins__track::-webkit-scrollbar { display: none; }
.origin {
  flex: none; scroll-snap-align: start; display: grid; gap: 1px; text-align: left;
  min-height: 52px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--white); color: var(--fg);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.origin:hover { border-color: var(--rosa); }
.origin:active { transform: scale(.98); }
.origin__name { font-weight: 600; font-size: 14px; line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.origin__sub { font-size: 12px; color: var(--fg-muted); }
.origin svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.origin[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--white); }
.origin[aria-selected="true"] .origin__sub { color: rgb(255 255 255 / .85); }
.origin[aria-busy="true"] { cursor: progress; opacity: .8; }

/* ---------- Resumen ---------- */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--white); border-radius: var(--r-md); padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--border); }
.stat__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--fg-muted); }
.stat__value { display: block; font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }

/* ---------- Mapa ---------- */
.mapwrap { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 0 0 3px var(--rosa), 0 14px 30px -18px rgb(46 21 17 / .5); }
.map { height: clamp(340px, 56svh, 560px); background: var(--crema-2); }
/* Tono cálido de la marca sobre el mapa base */
.map .leaflet-tile-pane { filter: sepia(.35) saturate(.8) hue-rotate(-14deg) brightness(1.03) contrast(.95); }
.leaflet-container { font-family: var(--f-body); }
.leaflet-control-attribution { font-size: 10px; background: rgb(251 241 236 / .85) !important; }
.leaflet-bar a { color: var(--choco) !important; }
.map__status {
  position: absolute; inset: auto 12px 12px 12px; z-index: 600; padding: 10px 14px; border-radius: var(--r-md);
  background: var(--white); box-shadow: 0 6px 18px -8px rgb(46 21 17 / .4); font-size: 13px; display: flex; gap: 10px; align-items: center;
}
.map__status.is-error { box-shadow: inset 0 0 0 1.5px var(--accent), 0 6px 18px -8px rgb(46 21 17 / .4); }
.map__status .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--crema-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { rotate: 360deg; } }
.map__tools { position: absolute; top: 12px; right: 12px; z-index: 600; display: grid; gap: 8px; }
.tool {
  width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--white); color: var(--choco);
  display: grid; place-items: center; box-shadow: 0 4px 12px -4px rgb(46 21 17 / .35);
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.tool:hover { background: var(--crema); }
.tool:active { transform: scale(.96); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Ruta y marcadores */
.route-casing { stroke: var(--choco); }
.route-line { stroke: var(--rosa); }
.pin-hotel { filter: drop-shadow(0 6px 8px rgb(46 21 17 / .35)); }
.pin-hotel__body {
  width: 64px; height: 64px; border-radius: 50% 50% 50% 6px; rotate: -45deg; background: var(--choco);
  display: grid; place-items: center; box-shadow: 0 0 0 4px var(--rosa);
  animation: pin-pulse 2.2s var(--ease) infinite;
}
.leaflet-container .pin-hotel__body img { width: 44px; height: auto; rotate: 45deg; }
@keyframes pin-pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--rosa), 0 0 0 4px rgb(233 138 168 / .5); } 50% { box-shadow: 0 0 0 4px var(--rosa), 0 0 0 16px rgb(233 138 168 / 0); } }
.pin-origin { width: 22px; height: 22px; border-radius: 50%; background: var(--white); border: 5px solid var(--choco); box-shadow: 0 2px 6px rgb(46 21 17 / .4); }
.pin-step {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--white); color: var(--choco); border: 2.5px solid var(--choco);
  font: 600 12px/1 var(--f-body); box-shadow: 0 2px 6px rgb(46 21 17 / .3);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), scale var(--dur) var(--ease);
}
.pin-step.is-active { background: var(--accent); border-color: var(--accent); color: var(--white); scale: 1.2; }
.runner { transition: none; }
.leaflet-container .runner img { width: 58px; height: auto; filter: drop-shadow(0 3px 3px rgb(255 255 255 / .9)) drop-shadow(0 2px 4px rgb(46 21 17 / .35)); }
.leaflet-container .runner.is-west img { transform: scaleX(-1); }
.leaflet-container .runner.is-done img { animation: hop .7s var(--ease) 3; }
@keyframes hop { 50% { translate: 0 -8px; } }

/* ---------- Pasos ---------- */
.route { margin-top: 26px; }
.route h2 { font-size: 32px; color: var(--choco); }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: paso; }
.step {
  counter-increment: paso; position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start;
  width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 0; text-align: left;
  background: var(--white); box-shadow: inset 0 0 0 1px var(--border);
  transition: box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.step:hover { box-shadow: inset 0 0 0 1.5px var(--rosa); }
.step:active { transform: scale(.99); }
.step::before {
  content: counter(paso); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--crema-2); color: var(--choco); font: 700 20px/1 var(--f-display);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.step.is-active { background: #fff6f9; box-shadow: inset 0 0 0 2px var(--accent); }
.step.is-active::before { background-color: var(--accent); color: var(--white); }
.step.is-done::before { background-color: var(--choco); color: var(--crema); }
.step__text { padding-top: 8px; }
.step--hotel::before { content: ''; background: var(--choco) url('/perro-crema.png') center / 30px auto no-repeat; }
.note { margin-top: 12px; font-size: 12px; color: var(--fg-muted); }

/* ---------- Lugar ---------- */
.place { margin: 26px 0 8px; padding: 16px; border-radius: var(--r-lg); background: var(--crema-2); display: grid; grid-template-columns: 64px 1fr; gap: 6px 14px; align-items: center; }
.place img { width: 64px; }
.place h2 { font-size: 24px; color: var(--choco); }
.place p { color: var(--fg-muted); font-size: 13px; }
.link { grid-column: 2; justify-self: start; border: 0; background: none; padding: 6px 0; min-height: 44px; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.link:hover { color: var(--accent-hover); }

/* ---------- Acciones fijas ---------- */
.cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgb(251 241 236 / .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -1px 0 var(--border);
}
@media (min-width: 760px) { .cta { padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 20px;
  border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: var(--white); color: var(--choco); box-shadow: inset 0 0 0 1.5px var(--border); }
.btn--secondary:hover { background: var(--crema-2); }

/* ---------- Llegada ---------- */
.arrive { margin-top: 28px; padding: 22px 18px; border-radius: var(--r-lg); background: var(--choco); color: var(--crema); --ll-paper: #f7e9e1; }
.arrive__kicker { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--rosa); }
.arrive h2 { font-size: clamp(30px, 6vw, 40px); margin-top: 6px; }
.arrive__lead { margin-top: 8px; color: rgb(251 241 236 / .85); }
.arrive__lead b { color: var(--crema); }
.views { display: inline-flex; gap: 4px; padding: 4px; margin: 16px 0 12px; border-radius: 999px; background: rgb(255 255 255 / .08); }
.views button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--crema); font-weight: 600; transition: background-color var(--dur) var(--ease); }
.views button[aria-selected="true"] { background: var(--accent); color: var(--white); }
.arrive__map { border-radius: var(--r-md); overflow: hidden; box-shadow: 0 0 0 3px var(--rosa); background: var(--crema-2); }
.view .ll-svg { cursor: pointer; }
.sat { height: clamp(320px, 62svh, 560px); }
.view iframe { display: block; width: 100%; height: clamp(320px, 62svh, 560px); border: 0; }
.steps--arrive { margin-top: 16px; }
.steps--arrive .step { background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(251 241 236 / .14); color: rgb(251 241 236 / .9); }
.steps--arrive .step b { color: var(--crema); }
.steps--arrive .step::before { background: var(--rosa); color: var(--choco-deep); }
.steps--arrive .step--hotel::before { background: var(--crema) url('/perro-chocolate.png') center / 30px auto no-repeat; }
.sat { background: #3b3a33; }
.steps--arrive .step--mc::before { content: ''; background: var(--rosa) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24' fill='none' stroke='%232e1511' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M-8-10v8a3 3 0 0 0 6 0v-8M-5-10v20M6-10c-3 2-4 6-4 10h4v10'/%3E%3C/svg%3E") center / 22px no-repeat; }
.arrive__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.arrive__links .btn { flex: 1 1 auto; font-size: 14px; }
.arrive .btn--secondary { background: rgb(255 255 255 / .08); color: var(--crema); box-shadow: inset 0 0 0 1.5px rgb(251 241 236 / .2); }
.arrive .btn--secondary:hover { background: rgb(255 255 255 / .14); }
.pin-mc { width: 34px; height: 34px; border-radius: 10px; background: var(--choco); border: 3px solid #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgb(46 21 17 / .4); }
.pin-mc svg { width: 18px; height: 18px; fill: none; stroke: #f9d36b; stroke-width: 2.4; stroke-linecap: round; }
.sat-label { background: rgb(46 21 17 / .85); color: #fff; border: 0; border-radius: 8px; padding: 3px 8px; font: 600 12px var(--f-body); box-shadow: none; }
.sat-label::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
