/* ==========================================================================
   PhotonCode · Sitios de muestra (Brasa, Vitalis, Habitat Prime)
   Base compartida al estilo de navaja-co: video a pantalla completa, titulares
   editoriales, secciones alternadas, galería horizontal y footer gigante.
   Cada sitio define su paleta y tipografías con variables en su <style>.
   Solo frontend: los botones no reservan ni envían nada.
   ========================================================================== */

:root {
    --bg: #0d0b09;
    --bg-2: #15110d;
    --paper: #f4efe7;
    --ink: #f4efe7;
    --ink-dark: #17130f;
    --muted: rgba(244, 239, 231, 0.66);
    --accent: #e2a14a;
    --line: rgba(244, 239, 231, 0.14);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Manrope', 'Inter', sans-serif;
    --script: 'Pinyon Script', cursive;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --wrap: min(1320px, calc(100% - 48px));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
html.lenis { scroll-behavior: auto; }
body { overflow-x: hidden; overflow-x: clip; line-height: 1.6; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: var(--wrap); margin: 0 auto; }

/* ---------- Loader con el nombre en letra script ---------- */
.loader {
    position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
    background: var(--bg); color: var(--ink);
}
.loader-name { font-family: var(--script); font-size: clamp(3rem, 9vw, 7rem); line-height: 1; overflow: hidden; padding: 0.2em 0.3em; }
.loader-name span { display: inline-block; }
.loader-line { position: absolute; bottom: 12vh; width: 140px; height: 1px; background: var(--line); overflow: hidden; }
.loader-line i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Navegación ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    padding: 22px clamp(18px, 3vw, 40px);
    transition: background 0.5s ease, padding 0.5s var(--ease), transform 0.6s var(--ease);
}
.nav.is-solid { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: 14px; padding-bottom: 14px; }
.nav.is-hidden { transform: translateY(-100%); }
.nav-links { display: flex; gap: clamp(16px, 2.4vw, 34px); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.nav-links a { position: relative; opacity: 0.85; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-links.right { justify-content: flex-end; align-items: center; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.78rem; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 600; }
.brand svg { width: 34px; height: 34px; }
.nav-cta { padding: 12px 18px; border: 1px solid currentColor; letter-spacing: 0.2em; }
.nav-cta:hover { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; justify-self: end; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; }

/* Pestaña lateral fija (como "Agenda tu cita" en navaja-co) */
.side-tab {
    position: fixed; right: 0; top: 50%; z-index: 40; transform: translateY(-50%);
    writing-mode: vertical-rl; padding: 22px 12px; background: var(--accent); color: var(--ink-dark);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase;
    transition: padding 0.4s var(--ease);
}
.side-tab:hover { padding-right: 18px; }

/* ---------- Portada con video ---------- */
.hero { position: relative; height: 100vh; min-height: 640px; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero-media, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.75) 100%); }
.hero-content { position: relative; z-index: 2; padding: 0 20px; }
.hero-ornament { width: 54px; margin: 0 auto 18px; opacity: 0.85; }
.hero-title { font-family: var(--serif); font-weight: 500; font-size: clamp(3.4rem, 10vw, 9rem); line-height: 0.95; letter-spacing: -0.01em; }
.hero-title em { font-family: var(--script); font-style: normal; font-weight: 400; color: var(--accent); }
.hero-sub { margin: 22px auto 0; max-width: 620px; font-family: var(--serif); font-style: italic; font-size: clamp(1.15rem, 2vw, 1.6rem); color: rgba(255,255,255,0.86); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; }
.scroll-hint i { width: 1px; height: 54px; background: linear-gradient(currentColor, transparent); animation: drip 2.2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 17px 30px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; transition: background 0.4s ease, color 0.4s ease, transform 0.5s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--paper); color: var(--ink-dark); }
.btn-solid:hover { background: var(--accent); }
.btn-accent { background: var(--accent); color: var(--ink-dark); }
.btn-accent:hover { background: var(--paper); }
.btn-line { border: 1px solid currentColor; }
.btn-line:hover { background: var(--ink); color: var(--bg); }

/* ---------- Bloques editoriales ---------- */
.section { position: relative; padding: clamp(90px, 12vw, 170px) 0; }
.section.paper { background: var(--paper); color: var(--ink-dark); --muted: rgba(23,19,15,0.66); --line: rgba(23,19,15,0.12); }
.kicker { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.paper .kicker { color: color-mix(in srgb, var(--accent) 70%, #000); }
.display { font-family: var(--serif); font-weight: 500; font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1.02; letter-spacing: -0.01em; }
.display em { font-style: italic; color: var(--accent); }
.paper .display em { color: color-mix(in srgb, var(--accent) 75%, #000); }
.lead { font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 560px; }
.signature { margin-top: 30px; font-family: var(--script); font-size: 2.6rem; color: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.frame video, .frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.frame-tag { position: absolute; left: 0; bottom: 0; padding: 16px 22px; background: var(--bg); color: var(--ink); font-family: var(--serif); font-size: 2.2rem; line-height: 1; }

/* Cifras */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(50px, 7vw, 90px); }
.stat { padding: 34px 26px; background: var(--bg); }
.paper .stat { background: var(--paper); }
.stat b { display: block; font-family: var(--serif); font-size: clamp(2.6rem, 4.6vw, 4.2rem); font-weight: 500; line-height: 1; color: var(--accent); }
.paper .stat b { color: color-mix(in srgb, var(--accent) 75%, #000); }
.stat span { display: block; margin-top: 10px; font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* Carta / lista de precios */
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 70px; margin-top: 56px; }
.menu-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.menu-item h4 { font-family: var(--serif); font-size: 1.7rem; font-weight: 500; line-height: 1.1; }
.menu-item b { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--accent); }
.paper .menu-item b { color: color-mix(in srgb, var(--accent) 75%, #000); }
.menu-item p { grid-column: 1 / -1; font-size: 0.95rem; color: var(--muted); }

/* Tarjetas con video */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 60px; }
.card { position: relative; overflow: hidden; aspect-ratio: 3 / 4; background: var(--bg-2); color: #fff; }
.card video, .card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.82) 100%); }
.card:hover video, .card:hover img { transform: scale(1.06); }
.card-body { position: absolute; left: 26px; right: 26px; bottom: 26px; z-index: 2; }
.card-num { font-size: 0.72rem; letter-spacing: 0.26em; opacity: 0.75; }
.card h3 { margin: 8px 0 6px; font-family: var(--serif); font-size: 2.1rem; font-weight: 500; line-height: 1.05; }
.card p { font-size: 0.92rem; opacity: 0.82; }
.card .price { position: absolute; top: 22px; right: 22px; z-index: 2; padding: 6px 12px; background: var(--accent); color: var(--ink-dark); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; }

/* Galería horizontal fijada */
.hscroll { position: relative; overflow: hidden; }
.hscroll-track { display: flex; gap: 24px; width: max-content; padding: 0 max(24px, calc((100vw - 1320px) / 2)); }
.hpanel { position: relative; width: min(560px, 78vw); height: min(620px, 70vh); overflow: hidden; flex: none; background: var(--bg-2); }
.hpanel.wide { width: min(880px, 86vw); }
.hpanel video, .hpanel img { width: 100%; height: 100%; object-fit: cover; }
.hpanel figcaption { position: absolute; left: 24px; bottom: 22px; z-index: 2; font-family: var(--serif); font-size: 1.8rem; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.hpanel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.6) 100%); }

/* Banda en movimiento */
.band { overflow: hidden; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--accent); color: var(--ink-dark); }
.band-track { display: flex; gap: 40px; width: max-content; animation: band 30s linear infinite; font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.6rem); font-style: italic; white-space: nowrap; }
.band-track span::after { content: "✦"; margin-left: 40px; font-style: normal; font-size: 0.6em; vertical-align: middle; }
@keyframes band { to { transform: translateX(-50%); } }

/* Video a pantalla completa con texto */
.feature { position: relative; min-height: 90vh; display: grid; align-items: end; overflow: hidden; color: #fff; }
.feature video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.2) 70%); }
.feature .wrap { position: relative; z-index: 2; padding: 0 0 clamp(60px, 9vw, 120px); }
.feature .display { max-width: 760px; }
.feature .lead { color: rgba(255,255,255,0.8); margin-top: 20px; }

/* Testimonios */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.quote { padding: 34px; border: 1px solid var(--line); }
.quote .stars { color: var(--accent); letter-spacing: 4px; }
.quote p { margin: 16px 0 22px; font-family: var(--serif); font-size: 1.4rem; line-height: 1.35; }
.quote cite { font-style: normal; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* Ubicación / horarios */
.info { display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 560px; }
.info-media { position: relative; overflow: hidden; }
.info-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.info-body { padding: clamp(50px, 7vw, 100px); background: var(--bg-2); }
.hours { margin: 30px 0; display: grid; gap: 12px; }
.hours div { display: flex; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.hours b { font-weight: 600; }

/* CTA final */
.final { text-align: center; padding: clamp(110px, 14vw, 200px) 24px; }
.final .display { max-width: 900px; margin: 0 auto; }
.final .lead { margin: 22px auto 36px; }

/* Footer con el nombre gigante */
.footer { padding: 70px 0 30px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer h5 { margin-bottom: 16px; font-size: 0.72rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; display: grid; gap: 10px; font-size: 0.95rem; }
.footer ul a:hover { color: var(--accent); }
.footer-word { margin: 60px 0 20px; font-family: var(--script); font-size: clamp(4rem, 17vw, 16rem); line-height: 0.9; text-align: center; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px var(--line); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.8rem; color: var(--muted); }
.footer-bottom a { color: var(--accent); }

/* Aviso de demo hecho por PhotonCode */
.made-by { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(255,255,255,0.92); color: #0d0c22; font: 600 12px/1 'Inter', sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.made-by svg { width: 18px; height: 18px; }

/* Revelados (site.js) */
[data-fade] { opacity: 0; transform: translateY(40px); }
.no-motion [data-fade] { opacity: 1; transform: none; }
.split-line { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav { grid-template-columns: auto 1fr auto; }
    .nav-links { display: none; }
    .brand { flex-direction: row; justify-self: start; }
    .menu-btn { display: grid; place-items: center; grid-column: 3; }
    .split, .info { grid-template-columns: 1fr; }
    .split.reverse > :first-child { order: 0; }
    .cards, .quotes { grid-template-columns: 1fr; }
    .card { aspect-ratio: 4 / 5; }
    .menu-grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > :first-child { grid-column: span 2; }
    .side-tab { display: none; }
    .hscroll-track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .hpanel { scroll-snap-align: center; height: 62vh; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    [data-fade] { opacity: 1; transform: none; }
    .loader { display: none; }
}
