/* ============ NOCTURNA · Propuesta 3 · Material 3 Expressive ============ */
/* Color dinámico: todo el tema sale de --seed (cámbialo con los círculos de color) */
:root {
  --seed: #7b2ff7;
  --base: #ffffff;
  --on-base: #1b1b1f;
  --primary: color-mix(in oklch, var(--seed) 88%, black);
  --on-primary: #fff;
  --primary-container: color-mix(in oklch, var(--seed) 20%, var(--base));
  --on-primary-container: color-mix(in oklch, var(--seed) 60%, var(--on-base));
  --tertiary-container: color-mix(in oklch, color-mix(in oklch, var(--seed), #ff8a00 55%) 22%, var(--base));
  --surface: color-mix(in oklch, var(--seed) 4%, var(--base));
  --surface-1: color-mix(in oklch, var(--seed) 8%, var(--base));
  --surface-2: color-mix(in oklch, var(--seed) 12%, var(--base));
  --surface-3: color-mix(in oklch, var(--seed) 16%, var(--base));
  --on-surface: var(--on-base);
  --on-surface-var: color-mix(in oklch, var(--on-base) 68%, var(--seed));
  --outline: color-mix(in oklch, var(--on-base) 30%, var(--base));
  --r-xl: 32px; --r-l: 24px; --r-m: 16px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Roboto Flex", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --base: #121216;
  --on-base: #e6e1e9;
  --primary: color-mix(in oklch, var(--seed) 55%, white);
  --on-primary: color-mix(in oklch, var(--seed) 40%, black);
  --primary-container: color-mix(in oklch, var(--seed) 35%, var(--base));
  --on-primary-container: color-mix(in oklch, var(--seed) 30%, white);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --base: #121216; --on-base: #e6e1e9;
    --primary: color-mix(in oklch, var(--seed) 55%, white);
    --on-primary: color-mix(in oklch, var(--seed) 40%, black);
    --primary-container: color-mix(in oklch, var(--seed) 35%, var(--base));
    --on-primary-container: color-mix(in oklch, var(--seed) 30%, white);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--on-surface); font: 400 1rem/1.55 var(--font); transition: background .5s, color .5s; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
.ms { font-family: "Material Symbols Rounded"; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; display: inline-block; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; font-variation-settings: "FILL" 0; user-select: none; }
.ms.big { font-size: 34px; font-variation-settings: "FILL" 1; }

/* ===== Navigation rail ===== */
.rail { position: fixed; inset: 0 auto 0 0; width: 92px; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 0; background: var(--surface-1); }
.rail-logo { margin-bottom: 8px; }
.blob-logo { display: block; width: 44px; height: 44px; background: var(--primary); animation: morph 8s ease-in-out infinite; }
@keyframes morph {
  0%,100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; rotate: 0deg; }
  33% { border-radius: 70% 30% 46% 54% / 30% 29% 71% 70%; }
  66% { border-radius: 30% 70% 70% 30% / 50% 60% 40% 50%; rotate: 180deg; }
}
.fab-small { width: 56px; height: 56px; border-radius: var(--r-m); border: 0; background: var(--tertiary-container); cursor: pointer; margin-bottom: 20px; transition: border-radius .4s var(--spring), transform .3s var(--spring); }
.fab-small:hover { border-radius: 28px; transform: scale(1.05); }
.rail-item { display: grid; justify-items: center; gap: 4px; text-decoration: none; color: var(--on-surface-var); font-size: .75rem; font-weight: 500; }
.rail-item .ms { width: 56px; height: 32px; display: grid; place-items: center; border-radius: 999px; transition: background .3s, width .4s var(--spring); }
.rail-item:hover .ms { background: var(--surface-3); }
.rail-item.is-active { color: var(--on-surface); }
.rail-item.is-active .ms { background: var(--primary-container); color: var(--on-primary-container); font-variation-settings: "FILL" 1; }

.app { margin-left: 92px; padding: 0 clamp(16px, 3vw, 40px) 40px; }

@media (max-width: 760px) {
  .rail { inset: auto 0 0 0; width: 100%; height: 76px; flex-direction: row; justify-content: space-around; padding: 0 4px; gap: 0; box-shadow: 0 -1px 0 var(--outline); }
  .rail-logo, .fab-small { display: none; }
  .rail-item small { font-size: .7rem; }
  .app { margin-left: 0; padding: 0 16px 100px; }
}

/* ===== Top bar ===== */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; position: sticky; top: 0; z-index: 20; background: color-mix(in oklch, var(--surface) 80%, transparent); backdrop-filter: blur(14px); }
.brand { margin: 0; font-size: 1.5rem; font-weight: 800; font-stretch: 130%; letter-spacing: -.02em; }
.brand span { font-weight: 300; color: var(--primary); }
.top-actions { display: flex; align-items: center; gap: 12px; }
.palette { display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: var(--surface-2); }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--s); cursor: pointer; transition: transform .3s var(--spring), border-radius .3s; }
.swatch.is-on { border-radius: 8px; transform: rotate(45deg) scale(.9); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--s); }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; cursor: pointer; transition: background .2s; }
.icon-btn:hover { background: var(--surface-3); }

/* ===== Botones ===== */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 600; font-size: 1rem; text-decoration: none; transition: border-radius .35s var(--spring), transform .35s var(--spring), box-shadow .3s; }
.btn:active { border-radius: 14px; transform: scale(.97); }
.btn.filled { background: var(--primary); color: var(--on-primary); }
.btn.filled:hover { box-shadow: 0 6px 20px -6px var(--primary); }
.btn.tonal { background: var(--primary-container); color: var(--on-primary-container); }
.btn.text { background: transparent; color: var(--primary); }
.btn.sm { height: 40px; padding: 0 18px; font-size: .9rem; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .25; transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ===== Bento hero ===== */
/* La primera pantalla cabe exacta: alto de ventana menos la barra superior (84px) */
.bento { --first: calc(100svh - 84px - 16px); display: grid; gap: 12px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; height: var(--first); min-height: 480px; }
.tile { border-radius: var(--r-xl); overflow: hidden; position: relative; background: var(--surface-2); min-height: 0; }
.tile-hero { grid-row: span 2; padding: clamp(20px, min(4vw, 5vh), 56px); display: flex; flex-direction: column; justify-content: flex-end; background: var(--primary-container); color: var(--on-primary-container); }
.tile-hero h1 { font-size: clamp(2.2rem, min(5.6vw, 10vh), 5.6rem); line-height: .95; font-weight: 900; font-stretch: 115%; letter-spacing: -.035em; margin: clamp(8px, 2vh, 16px) 0; overflow-wrap: anywhere; }
.morph-word { font-weight: 300; font-style: italic; font-stretch: 80%; animation: flex 4s ease-in-out infinite; display: inline-block; }
@keyframes flex { 50% { font-weight: 900; font-stretch: 100%; } }
.tile-hero p { max-width: 44ch; font-size: clamp(.95rem, 1.9vh, 1.1rem); opacity: .85; margin: 0 0 clamp(14px, 3vh, 28px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tile-hero .btn.tonal { background: var(--base); color: var(--on-base); }
.badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--base); color: var(--on-base); font-size: .85rem; font-weight: 600; }
.badge.open .ms { color: #18a058; }
.badge.closed .ms { color: #d93025; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--spring); }
.tile-img:hover img { transform: scale(1.08); }
.shape-a { border-radius: 200px 200px var(--r-xl) var(--r-xl); }
.shape-b { border-radius: var(--r-xl) var(--r-xl) 200px var(--r-xl); }
.tile-stat { padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--tertiary-container); }
.tile-stat.alt { background: var(--surface-3); }
.tile-stat b { font-size: clamp(2rem, 5vh, 3rem); font-weight: 900; font-stretch: 130%; line-height: 1; }
.tile-stat small { color: var(--on-surface-var); }
.bento > * { animation: pop .8s var(--spring) both; }
.bento > *:nth-child(2) { animation-delay: .08s; } .bento > *:nth-child(3) { animation-delay: .16s; }
.bento > *:nth-child(4) { animation-delay: .24s; } .bento > *:nth-child(5) { animation-delay: .32s; }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.94); } }
/* Tablet / celular: el bloque principal llena la primera pantalla y el resto queda debajo */
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: auto; min-height: 0; }
  .tile-hero { grid-column: 1 / -1; grid-row: auto; height: var(--first); min-height: 440px; }
  .tile-img { aspect-ratio: 1; }
}
@media (max-width: 760px) {
  .bento { --first: calc(100svh - 84px - 76px - 16px); } /* descuenta la barra de navegación inferior */
  .tile-hero h1 { font-size: clamp(2rem, min(8.5vw, 8vh), 3.6rem); }
}
@media (max-height: 560px) { .tile-hero p { display: none; } }

/* ===== Bloques ===== */
.block { padding: clamp(56px, 8vw, 100px) 0 0; }
.block-head { margin-bottom: 24px; }
.block-head h2, .contact h2 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; font-stretch: 115%; letter-spacing: -.03em; margin: 0 0 6px; }
.block-head p { margin: 0; color: var(--on-surface-var); }
.block { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
@keyframes rise { from { opacity: 0; translate: 0 50px; } }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 0; height: 40px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--outline); background: transparent; cursor: pointer; font-weight: 500; transition: background .2s, gap .3s var(--spring), border-radius .3s; }
.chip .ms { width: 0; overflow: hidden; font-size: 18px; transition: width .3s var(--spring); }
.chip.is-on { background: var(--primary-container); color: var(--on-primary-container); border-color: transparent; gap: 6px; border-radius: 20px; }
.chip.is-on .ms { width: 18px; }

/* grid portafolio */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 45%), 1fr)); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 12px; }
.card-img { position: relative; border: 0; padding: 0; border-radius: var(--r-l); overflow: hidden; cursor: zoom-in; background: var(--surface-2); transition: border-radius .5s var(--spring); }
.card-img:nth-child(5n+1) { grid-row: span 2; }
.card-img:nth-child(7n+3) { grid-column: span 2; }
.card-img:hover { border-radius: 60px 12px 60px 12px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--spring); }
.card-img:hover img { transform: scale(1.06); }
.card-img span { position: absolute; left: 10px; bottom: 10px; padding: 6px 12px; border-radius: 999px; background: var(--base); color: var(--on-base); font-size: .8rem; font-weight: 600; }
.card-img.is-hidden { display: none; }
@media (max-width: 560px) { .grid { grid-auto-rows: 160px; } .card-img:nth-child(7n+3) { grid-column: auto; } }

/* carrusel M3 multi-browse */
.carousel { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.c-item { flex: 0 0 clamp(240px, 30vw, 360px); scroll-snap-align: start; position: relative; height: 460px; border-radius: var(--r-xl); overflow: hidden; }
.c-item img { width: 100%; height: 100%; object-fit: cover; }
.c-info { position: absolute; inset: auto 10px 10px; padding: 18px; border-radius: var(--r-l); background: color-mix(in oklch, var(--base) 82%, transparent); backdrop-filter: blur(12px); }
.c-info h3 { margin: 0; font-size: 1.3rem; font-weight: 800; font-stretch: 115%; }
.c-info p { margin: 2px 0 12px; color: var(--on-surface-var); }

/* precios */
.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.price-card { padding: 28px; border-radius: var(--r-xl); background: var(--surface-2); transition: border-radius .5s var(--spring), transform .4s var(--spring); }
.price-card:hover { border-radius: 60px; transform: translateY(-4px); }
.price-card h3 { margin: 16px 0 4px; font-weight: 600; }
.price-card b { font-size: 2.2rem; font-weight: 900; font-stretch: 125%; }
.price-card p { margin: 6px 0 0; color: var(--on-surface-var); }
.price-card.primary { background: var(--primary); color: var(--on-primary); }
.price-card.primary p { color: inherit; opacity: .8; }

/* timeline */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.timeline li { display: flex; gap: 14px; padding: 22px; border-radius: var(--r-l); background: var(--surface-1); }
.timeline li > .ms { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; background: var(--primary-container); color: var(--on-primary-container); font-variation-settings: "FILL" 1; }
.timeline h3 { margin: 0 0 4px; font-size: 1.05rem; }
.timeline p { margin: 0; color: var(--on-surface-var); font-size: .95rem; }

/* reseñas + faq */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.reviews { display: grid; gap: 12px; }
.review { margin: 0; padding: 22px; border-radius: var(--r-l); background: var(--surface-1); }
.review blockquote { margin: 0 0 14px; font-size: 1.15rem; }
.review figcaption { display: flex; align-items: center; gap: 10px; color: var(--on-surface-var); font-size: .9rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tertiary-container); color: var(--on-surface); font-weight: 700; }
.faq { display: grid; gap: 8px; }
.faq details { border-radius: var(--r-m); background: var(--surface-1); padding: 0 20px; transition: background .3s; }
.faq details[open] { background: var(--primary-container); color: var(--on-primary-container); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 18px 0; font-weight: 600; }
.faq summary .ms { transition: rotate .4s var(--spring); }
.faq details[open] summary .ms { rotate: 180deg; }
.faq details p { margin: 0 0 18px; }

/* contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: clamp(24px, 4vw, 48px); border-radius: var(--r-xl); background: var(--surface-2); }
.contact-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-xl) 200px var(--r-xl) var(--r-xl); }
.list { list-style: none; padding: 0; margin: 16px 0 28px; display: grid; gap: 12px; }
.list li { display: flex; align-items: center; gap: 12px; }
.list .ms { color: var(--primary); }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }
.footer { text-align: center; padding: 48px 0 0; color: var(--on-surface-var); font-size: .85rem; }

/* FAB extendido */
.fab { position: fixed; right: 24px; bottom: 24px; z-index: 40; height: 64px; padding: 0 22px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 20px; cursor: pointer;
  background: var(--primary-container); color: var(--on-primary-container); font-weight: 700; box-shadow: 0 8px 24px -8px rgb(0 0 0 / .35); transition: border-radius .4s var(--spring), padding .4s var(--spring), transform .3s var(--spring); }
.fab:hover { border-radius: 32px; transform: translateY(-2px); }
.fab-label { max-width: 120px; overflow: hidden; white-space: nowrap; transition: max-width .4s var(--spring); }
.fab.is-compact .fab-label { max-width: 0; }
.fab.is-compact { gap: 0; }
@media (max-width: 760px) { .fab { bottom: 92px; right: 16px; } }

/* ===== Bottom sheet de reserva ===== */
.sheet { border: 0; padding: 0; width: min(560px, 100%); max-height: 92svh; border-radius: 28px; background: var(--surface-1); color: var(--on-surface); overflow: auto; }
.sheet::backdrop { background: rgb(0 0 0 / .45); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheetIn .5s var(--spring); }
@keyframes sheetIn { from { transform: translateY(60px) scale(.96); opacity: 0; } }
@media (max-width: 600px) { .sheet { margin: auto 0 0; max-width: 100%; border-radius: 28px 28px 0 0; } }
.sheet-inner { padding: 12px 24px 24px; }
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: var(--outline); margin: 0 auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head h2 { margin: 0; font-size: 1.6rem; font-weight: 800; font-stretch: 115%; }
.stepper { display: flex; align-items: center; gap: 8px; margin: 16px 0 24px; }
.stepper span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: .9rem; transition: .4s var(--spring); }
.stepper span.is-on { background: var(--primary); color: var(--on-primary); border-radius: 10px; }
.stepper i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); position: relative; overflow: hidden; }
.stepper i.is-on::after { content: ""; position: absolute; inset: 0; background: var(--primary); animation: fill .5s ease forwards; }
@keyframes fill { from { transform: translateX(-100%); } }
.step { display: none; }
.step.is-on { display: grid; gap: 16px; animation: stepIn .45s var(--spring); }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px); } }
.step h3 { margin: 0; font-size: 1.15rem; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 420px) { .choice-grid { grid-template-columns: 1fr 1fr; } }
.choice-grid label { position: relative; }
.choice-grid input { position: absolute; opacity: 0; }
.choice-grid label > span { display: grid; justify-items: center; gap: 6px; padding: 16px 8px; border-radius: var(--r-m); background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: .9rem; transition: .35s var(--spring); }
.choice-grid input:checked + span { background: var(--primary-container); color: var(--on-primary-container); border-radius: 28px; }
.choice-grid input:checked + span .ms { font-variation-settings: "FILL" 1; }
.choice-grid input:focus-visible + span { outline: 2px solid var(--primary); }
.field { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--on-surface-var); }
.field input:not([type=range]), .field select, .field textarea { font: 400 1rem var(--font); color: var(--on-surface); background: var(--surface-2); border: 0; border-bottom: 2px solid var(--outline); border-radius: 8px 8px 0 0; padding: 14px 16px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field output { color: var(--primary); }
input[type=range] { accent-color: var(--primary); width: 100%; }
.switch { display: flex; align-items: center; gap: 12px; font-size: .95rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch > span { flex: none; width: 52px; height: 32px; border-radius: 999px; background: var(--surface-3); border: 2px solid var(--outline); position: relative; transition: .3s; }
.switch > span::after { content: ""; position: absolute; top: 6px; left: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--outline); transition: .35s var(--spring); }
.switch input:checked + span { background: var(--primary); border-color: var(--primary); }
.switch input:checked + span::after { left: 24px; top: 2px; width: 24px; height: 24px; background: var(--on-primary); }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }

/* viewer */
.viewer { border: 0; padding: 0; background: transparent; overflow: visible; }
.viewer::backdrop { background: rgb(0 0 0 / .85); }
.viewer img { max-width: 92vw; max-height: 88vh; border-radius: var(--r-xl); }
.viewer .icon-btn { position: fixed; top: 16px; right: 16px; background: var(--base); color: var(--on-base); }
.viewer[open] img { animation: pop .5s var(--spring); }

/* snackbar */
.snackbar { position: fixed; left: 50%; bottom: 24px; translate: -50% 150%; z-index: 60; padding: 14px 20px; border-radius: 8px; background: var(--on-base); color: var(--base); font-weight: 500; transition: translate .5s var(--spring); max-width: calc(100% - 32px); }
.snackbar.is-on { translate: -50% 0; }

/* transiciones de tema con View Transitions */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: reveal-theme .7s ease-in-out; }
@keyframes reveal-theme { from { clip-path: circle(0 at var(--x, 90%) var(--y, 5%)); } to { clip-path: circle(150% at var(--x, 90%) var(--y, 5%)); } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
