/* ===========================================================
   HERO "New York, bottled" (solo la home)
   Tokens tomados del sitio: --ink / --ivory / oro #C9A96E
   =========================================================== */
.hb {
    --hb-ink: #1a1712;
    --hb-ivory: #f7f3ec;
    --hb-gold: #c9a96e;
    --hb-gold-deep: #5f4520;
    --hb-muted: #4a443b;
    --hb-hair: rgba(26, 23, 18, 0.22);
    --hb-gutter: clamp(1.25rem, 5vw, 5.5rem);
    --hb-ease: cubic-bezier(0.16, 1, 0.3, 1);
    /* Márgenes del contenido: a la izquierda cede a la columna del menú y a la
       derecha al botón flotante de WhatsApp */
    --hb-left: var(--hb-gutter);
    --hb-right: max(var(--hb-gutter), 6.5rem);

    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 620px;
    background: var(--ivory, #f7f3ec);
    overflow: clip;
    color: var(--hb-ink);
    font-family: 'Inter', sans-serif;
}

.hb-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--hb-ivory);
    transform-origin: 50% 100%;
    will-change: transform, border-radius;
}

/* Foto: la torre queda justo detrás del frasco */
.hb-photo {
    position: absolute;
    left: -3%;
    bottom: -15%;
    width: 106%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: 50% 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 24%);
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.4s ease, transform 2.4s var(--hb-ease);
}
.hb.is-in .hb-photo { opacity: 1; transform: none; }

.hb-veil {
    position: absolute;
    inset: 0;
    /* Sombras localizadas: protegen el texto sin apagar el horizonte tras el frasco */
    background:
        radial-gradient(52% 44% at 80% 38%, rgba(247, 243, 236, var(--hb-shade, 0.62)) 0%, rgba(247, 243, 236, 0) 100%),
        radial-gradient(44% 40% at 18% 30%, rgba(247, 243, 236, var(--hb-shade, 0.62)) 0%, rgba(247, 243, 236, 0) 100%),
        linear-gradient(180deg,
            rgba(247, 243, 236, 1) 0%,
            rgba(247, 243, 236, 0.74) 13%,
            rgba(247, 243, 236, 0.14) 34%,
            rgba(247, 243, 236, 0) 58%,
            rgba(247, 243, 236, 0.2) 72%,
            rgba(247, 243, 236, 0.9) 83%,
            rgba(247, 243, 236, 1) 100%);
}

.hb-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.7s ease;
}
.hb.has-gl .hb-canvas { opacity: 1; }

/* Frasco estático: pinta primero (LCP) y es el respaldo sin WebGL / movimiento reducido */
.hb-poster {
    position: absolute;
    left: 60%;
    top: 53.5%;
    height: 58%;
    width: auto;
    max-width: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}
.hb.is-in .hb-poster { opacity: 1; }
.hb.has-gl .hb-poster { opacity: 0; }

/* ---------- Titular: la tipografía es la imagen ---------- */
.hb-title-wrap {
    position: absolute;
    left: var(--hb-left);
    right: var(--hb-right);
    top: clamp(5.75rem, 13vh, 8rem);
    will-change: transform;
}
.hb-eyebrow {
    margin: 0 0 clamp(0.5rem, 1.6vh, 1rem);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--hb-gold-deep);
    opacity: 0;
    transition: opacity 0.9s ease 0.5s;
}
.hb.is-in .hb-eyebrow { opacity: 1; }

.hb-title {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: min(7.7vw, 19vh);
    line-height: 0.98;
    letter-spacing: -0.015em;
    color: var(--hb-ink);
    text-shadow: 0 0 40px rgba(247, 243, 236, 0.75);
}
.hb-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.14em;
    margin-bottom: -0.14em;
}
.hb-line--b { text-align: right; font-style: italic; color: var(--hb-gold-deep); }
:lang(es) .hb-line--b { font-size: 0.8em; }
.hb-line__in {
    display: inline-block;
    transform: translateY(112%);
    transition: transform 1.3s var(--hb-ease);
}
.hb-line--a .hb-line__in { transition-delay: 0.55s; }
.hb-line--b .hb-line__in { transition-delay: 0.72s; }
.hb.is-in .hb-line__in { transform: none; }

/* ---------- Atomizador ---------- */
.hb-spray {
    position: absolute;
    left: 0;
    top: 0;
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: none;
    z-index: 3;
}
.hb.has-gl .hb-spray { display: block; }
.hb-spray:focus-visible { outline: 2px solid var(--hb-ink); outline-offset: 2px; }

.hb-hint {
    position: absolute;
    left: 0;
    top: 0;
    display: none;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hb-ink);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    text-shadow: 0 0 10px rgba(247, 243, 236, 0.95);
}
.hb-hint::before {
    content: "";
    width: 1px;
    height: 1.25rem;
    background: var(--hb-gold-deep);
}
.hb.has-gl .hb-hint { display: flex; }
.hb.has-gl.is-settled .hb-hint { opacity: 1; }
.hb.has-gl.has-sprayed .hb-hint { opacity: 0; }

/* ---------- Pie del hero ---------- */
.hb-bar {
    position: absolute;
    left: var(--hb-left);
    right: var(--hb-right);
    bottom: clamp(1.25rem, 4.5vh, 2.75rem);
    display: grid;
    grid-template-columns: minmax(0, 24rem) auto;
    justify-content: space-between;
    align-items: end;
    gap: 2rem;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.9s ease 1.05s, transform 1.1s var(--hb-ease) 1.05s;
}
.hb.is-in .hb-bar { opacity: 1; transform: none; }

.hb-sub {
    margin: 0 0 1.25rem;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--hb-muted);
}
.hb-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }

/* Primaria única: píldora con punto circular */
.hb-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    min-height: 3.25rem;
    padding: 0.375rem 0.375rem 0.375rem 1.5rem;
    border-radius: 999px;
    background: var(--hb-ink);
    color: var(--hb-ivory);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: background-color 0.12s ease-out;
}
.hb-cta__dot {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--hb-ivory);
    color: var(--hb-ink);
    font-size: 0.8125rem;
    transition: transform 0.2s ease-out;
}
.hb-cta:hover { background: #3a3226; }
.hb-cta:hover .hb-cta__dot { transform: translateX(2px); }

.hb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    color: var(--hb-ink);
    font-size: 0.9375rem;
    border-bottom: 1px solid transparent;
    transition: color 0.12s ease-out;
}
.hb-link:hover { color: var(--hb-gold-deep); }

.hb-cta:focus-visible,
.hb-link:focus-visible,
.hb-chip:focus-visible,
.hb-scent__link:focus-visible {
    outline: 2px solid var(--hb-ink);
    outline-offset: 3px;
}

/* Selector de familia */
.hb-scent { text-align: right; }
.hb-scent__label {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--hb-gold-deep);
}
.hb-chips { display: flex; justify-content: flex-end; gap: 0.5rem; }
.hb-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0 1rem;
    border: 1px solid var(--hb-hair);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    color: var(--hb-ink);
    font: 400 0.875rem 'Inter', sans-serif;
    cursor: pointer;
    transition: border-color 0.12s ease-out, background-color 0.12s ease-out;
}
.hb-chip::before {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--hb-chip);
}
.hb-chip:hover { border-color: var(--hb-gold-deep); }
.hb-chip[aria-checked="true"] {
    border-color: var(--hb-gold-deep);
    background: #ffffff;
}
.hb-scent__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    margin-top: 0.25rem;
    color: var(--hb-ink);
    font-size: 0.875rem;
    transition: color 0.12s ease-out;
}
.hb-scent__link i { font-size: 0.75rem; color: var(--hb-gold-deep); }
.hb-scent__link:hover { color: var(--hb-gold-deep); }

/* Grano: evita el aspecto de plantilla y disimula bandas en los degradados */
.hb-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- Tablet / móvil ---------- */
@media (max-width: 900px) {
    .hb { min-height: 560px; --hb-right: var(--hb-gutter); }
    .hb-veil {
        background:
            linear-gradient(180deg,
                rgba(247, 243, 236, 1) 0%,
                rgba(247, 243, 236, 0.84) 22%,
                rgba(247, 243, 236, 0.1) 40%,
                rgba(247, 243, 236, 0) 58%,
                rgba(247, 243, 236, 0.94) 76%,
                rgba(247, 243, 236, 1) 100%);
    }
    .hb-title-wrap { top: 5.75rem; }
    .hb-eyebrow { font-size: 0.6875rem; letter-spacing: 0.08em; }
    .hb-title { font-size: min(16.5vw, 13vh); }
    .hb-poster { top: 53.5%; left: 50%; height: 36%; }
    .hb-bar { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
    .hb-sub { font-size: 0.9375rem; margin-bottom: 0.75rem; }
    .hb-scent { order: -1; text-align: left; }
    .hb-scent__label { display: none; }
    /* Las cuatro familias siempre a la vista: reparten el ancho, nunca se cortan */
    .hb-chips { justify-content: stretch; gap: 0.25rem; }
    .hb-chip {
        flex: 1 1 auto;
        justify-content: center;
        gap: 0.3125rem;
        min-width: 0;
        padding: 0 0.25rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }
    .hb-chip::before { width: 0.5rem; height: 0.5rem; flex: 0 0 auto; }
    .hb-scent__link { min-height: 2.25rem; margin-top: 0.125rem; font-size: 0.8125rem; }
    .hb-actions { flex-wrap: nowrap; gap: 1rem; }
    .hb-cta { flex: 1 1 auto; justify-content: space-between; white-space: nowrap; }
    .hb-link { flex: 0 0 auto; }
    .hb-hint { display: none !important; }
}

/* Columna del menú presente: el titular arranca a su derecha */
@media (min-width: 1024px) {
    .hb { --hb-left: calc(var(--nav-rail) + 2.5rem); }
}
@media (min-width: 901px) and (max-width: 1199px) {
    .hb-chip { padding: 0 0.75rem; }
    .hb-sub { font-size: 0.9375rem; }
    .hb-hint { display: none !important; }
}

/* Escritorio bajo: el skyline llega hasta el pie, el texto necesita su propio fondo */
@media (min-width: 901px) and (max-height: 720px), (min-width: 901px) and (max-width: 1199px) {
    .hb-pitch,
    .hb-scent {
        background: rgba(247, 243, 236, 0.78);
        box-shadow: 0 0 36px 22px rgba(247, 243, 236, 0.78);
        border-radius: 12px;
    }
}

/* En pantallas panorámicas el horizonte sube y queda detrás del titular */
@media (min-aspect-ratio: 16/10) and (min-width: 901px) {
    .hb-veil { --hb-shade: 0.82; }
}
@media (min-aspect-ratio: 19/10) and (min-width: 901px) {
    .hb-veil { --hb-shade: 0.94; }
}

/* Móviles bajos: se prioriza el frasco y la acción */
@media (max-width: 900px) and (max-height: 760px) {
    .hb-sub { display: none; }
    .hb-poster { top: 54%; height: 32%; }
}
@media (max-width: 900px) and (max-height: 680px) {
    .hb-scent__link { display: none; }
}
/* El botón de WhatsApp del hero sustituye al flotante mientras se ve el hero */
@media (max-width: 900px) {
    body.hb-visible #wa-float { display: none; }
}
/* Pantallas muy estrechas: el punto de color cede el sitio al nombre */
@media (max-width: 345px) {
    .hb-chip::before { display: none; }
}
@media (max-width: 400px) {
    .hb-eyebrow { font-size: 0.625rem; letter-spacing: 0.04em; white-space: nowrap; }
    .hb-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .hb-link { justify-content: center; min-width: 2.75rem; font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hb *, .hb-stage { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
    .hb-line__in, .hb-photo { transform: none; }
}
