/* ==========================================================================
   Ofelia Experience · sitio de la clínica (rediseño nov 2026)
   CSS plano: NO pasa por Tailwind (no hay que recompilar output.min.css).
   1. Fuentes self-hosted  2. Base  3. Navegación fija (.oxn)  4. Hero (.oxh)
   Medidas tomadas del Sketch "Hero" / "Hero_with_dropdown_open" (frame 1440).
   ========================================================================== */

/* 1 · Fuentes ------------------------------------------------------------ */
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("/fonts/PlusJakartaSans-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("/fonts/PlusJakartaSans-Italic-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Roboto Mono";
    src: url("/fonts/RobotoMono-Variable.woff2") format("woff2");
    font-weight: 100 700;
    font-style: normal;
    font-display: swap;
}
/* Respaldo con las métricas de Plus Jakarta: el cambio de fuente no mueve el texto */
@font-face {
    font-family: "Plus Jakarta Fallback";
    src: local("Arial");
    size-adjust: 105%;
    ascent-override: 99%;
    descent-override: 21%;
    line-gap-override: 0%;
}

/* 2 · Base --------------------------------------------------------------- */
:root {
    --ox-ink: #111827;
    --ox-ink-2: #272f40;
    --ox-lime: #def1bd;
    --ox-font: "Plus Jakarta Sans", "Plus Jakarta Fallback", system-ui, -apple-system, sans-serif;
    --ox-mono: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
}
body.ox-site { font-family: var(--ox-font); }
/* Familias retiradas (Cormorant SC, Source Serif): heredan Plus Jakarta */
.ox-site .cormorant-sc-light,
.ox-site .source-serif { font-family: inherit; }

/* 3 · Navegación fija ---------------------------------------------------- */
.oxn {
    position: fixed;
    z-index: 200;
    top: 50px;
    left: 0;
    right: 0;
    height: 48px;
    padding: 0 44px 0 57px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none; /* solo sus piezas reciben clics */
    font-family: var(--ox-font);
    font-size: 12px;
    font-weight: 500;
    line-height: 15px;
    color: #fff;
}
.oxn > * { pointer-events: auto; }
.oxn ul { list-style: none; margin: 0; padding: 0; }
.oxn a { color: inherit; text-decoration: none; }
.oxn button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Logo: blanco sobre fondo oscuro, oscuro sobre fondo claro */
.oxn .oxn__logo {
    display: block;
    width: 104px;
    transform: translateY(6px);
    color: var(--ox-ink);
    transition: color .3s ease;
}
.oxn[data-theme="dark"] .oxn__logo,
.oxn.is-open .oxn__logo { color: #fff; }
.oxn__logo-svg { display: block; width: 100%; height: auto; }

/* Menú central (píldora de vidrio) */
.oxn__menu {
    position: absolute;
    left: 50%;
    top: 0;
    width: 670px;
    height: 48px;
    transform: translateX(-50%);
    border-radius: 7px;
    background: rgba(17, 24, 39, .55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.oxn__list {
    height: 100%;
    padding: 0 33px 0 26px !important;
    display: flex;
    align-items: center;
}
.oxn__item { height: 100%; display: flex; align-items: center; }
/* Separaciones del Sketch (no son uniformes) */
.oxn__item:nth-child(2) { margin-left: 64px; }
.oxn__item:nth-child(3) { margin-left: 83px; }
.oxn__item:nth-child(4) { margin-left: 60px; }
.oxn__item:nth-child(5) { margin-left: 61px; }
.oxn__item:not(:first-child) { position: relative; }
.oxn__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 100%;
    white-space: nowrap;
    transition: opacity .2s ease;
}
.oxn__list:hover .oxn__link { opacity: .6; }
.oxn__list .oxn__item:hover .oxn__link,
.oxn__list .oxn__item.is-open .oxn__link,
.oxn__link:focus-visible { opacity: 1; }
.oxn__chev { transition: transform .25s ease; }
.oxn__item.is-open .oxn__chev { transform: rotate(180deg); }
.oxn :focus-visible { outline: 1.5px solid var(--ox-lime); outline-offset: 3px; border-radius: 3px; }

/* Paneles desplegables: crecen de pequeño a grande desde arriba */
.oxn__panel {
    position: absolute;
    top: calc(100% + 20px);
    left: -20px;
    min-width: 200px;
    padding: 14px 16px 16px;
    border-radius: 7px;
    background: var(--ox-ink);
    font-size: 14px; /* el Sketch marca 10px; se subió a pedido (legibilidad) */
    font-weight: 400;
    line-height: 30px;
    opacity: 0;
    visibility: hidden;
    transform: scale(.9);
    transform-origin: 40px 0;
    transition: opacity .18s ease, transform .28s cubic-bezier(.2, .9, .25, 1), visibility 0s linear .28s;
}
.oxn__panel::before { /* puente para no perder el hover en el hueco de 20px */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -20px;
    height: 20px;
}
.oxn__item.is-open > .oxn__panel {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition-delay: 0s;
}
.oxn__panel--mega {
    left: 50%;
    width: 940px;
    min-height: 300px;
    margin-left: -470px;
    padding: 20px 22px 22px 20px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    transform-origin: 50% 0;
}
.oxn__cols { display: flex; gap: 14px; }
.oxn__col { min-width: 170px; }
.oxn__heading {
    min-height: 26px;
    margin: 0 0 6px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    font-size: 12px;
    line-height: 14px;
    color: rgba(255, 255, 255, .6);
}
.oxn__sub {
    display: block;
    margin: 2px 0;
    padding: 0 10px;
    border-radius: 4px;
    line-height: 30px;
    white-space: nowrap;
    transition: background-color .15s ease;
}
.oxn__sub:hover,
.oxn__sub:focus-visible { background: var(--ox-ink-2); }
.oxn__ext { display: inline-block; margin-left: 2px; vertical-align: -1px; }
.oxn__thumb {
    flex: none;
    width: 208px;
    height: 260px;
    border-radius: 4px;
    overflow: hidden;
    background: var(--ox-ink-2);
}
.oxn__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .2s ease;
}
.oxn__thumb img.is-ready { opacity: 1; }

/* Agendar cita */
.oxn__end { display: flex; align-items: center; gap: 8px; transform: translateY(3px); }
.oxn__cta {
    display: inline-flex;
    align-items: center;
    height: 41.5px;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--ox-ink);
    white-space: nowrap;
    transition: background-color .2s ease;
}
.oxn__cta:hover { background: var(--ox-ink-2); }
.oxn__burger { display: none; }
.oxn__mobile { display: none; }

/* Hueco que deja la navegación fija en las páginas que la incluyen vía _partials/navbar */
.oxn-spacer { height: 112px; }

/* Tablet y móvil: logo + cita + hamburguesa */
@media (max-width: 1099px) {
    .oxn { top: 24px; padding: 0 28px; }
    .oxn-spacer { height: 84px; }
    .oxn__menu { display: none; }
    .oxn__logo { position: relative; z-index: 2; transform: none; }
    .oxn__end { position: relative; z-index: 2; transform: none; }
    .oxn__burger {
        position: relative;
        display: block;
        width: 41.5px;
        height: 41.5px;
        border-radius: 999px;
        background: var(--ox-ink) !important;
    }
    .oxn__burger span {
        position: absolute;
        left: 13px;
        right: 13px;
        top: 50%;
        height: 1px;
        background: #fff;
        transition: transform .25s ease;
    }
    .oxn__burger span:first-child { transform: translateY(-3.5px); }
    .oxn__burger span:last-child { transform: translateY(3.5px); }
    .oxn.is-open .oxn__burger span:first-child { transform: rotate(45deg); }
    .oxn.is-open .oxn__burger span:last-child { transform: rotate(-45deg); }
    .oxn.is-open .oxn__burger,
    .oxn.is-open .oxn__cta { background: var(--ox-ink-2) !important; }

    .oxn__mobile {
        position: fixed;
        inset: 0;
        z-index: 1;
        display: flex;
        flex-direction: column;
        padding: 104px 28px 28px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: var(--ox-ink);
        font-size: 22px;
        font-weight: 400;
        line-height: 1.3;
        opacity: 0;
        transform: scale(.97);
        transform-origin: 50% 0;
        transition: opacity .2s ease, transform .3s cubic-bezier(.2, .9, .25, 1);
    }
    .oxn__mobile[hidden] { display: none; }
    .oxn.is-open .oxn__mobile { opacity: 1; transform: none; }
    .oxn__m-list > li { border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .oxn__m-list > li > a,
    .oxn__m-list summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0;
        cursor: pointer;
        list-style: none;
    }
    .oxn__m-list summary::-webkit-details-marker { display: none; }
    .oxn__m-list details[open] .oxn__chev { transform: rotate(180deg); }
    .oxn__m-list details ul { padding-bottom: 14px; font-size: 16px; }
    .oxn__m-list details li a { display: block; padding: 8px 0; }
    .oxn__m-list .oxn__heading {
        padding: 0;
        margin: 6px 0 2px;
        font-family: var(--ox-mono);
        font-size: 11px;
        letter-spacing: .04em;
        text-transform: uppercase;
    }
    .oxn__m-list .oxn__chev { width: 18px; height: 18px; }
    .oxn__m-cta {
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 52px;
        border-radius: 999px;
        background: #fff;
        color: var(--ox-ink) !important;
        font-size: 15px;
        font-weight: 500;
    }
    .oxn__m-list + .oxn__m-cta { margin-top: 28px; }
}
@media (max-width: 767px) {
    .oxn { top: 22px; padding: 0 24px; }
    .oxn__logo { width: 92px; }
}

/* 4 · Hero del home ------------------------------------------------------ */
.oxh { padding: 21px 20px 0; }
.oxh__card {
    position: relative;
    isolation: isolate;
    height: clamp(620px, calc(100svh - 42px), 936px);
    border-radius: 12px;
    overflow: hidden;
    background: #91a1b5; /* color medio de la foto: se ve mientras carga */
    color: #fff;
    font-family: var(--ox-font);
}
.oxh__media,
.oxh__media img,
.oxh__media video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0; /* anclada arriba: el cabello queda rozando la navegación en cualquier ancho */
}
.oxh__body {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 143px;
    padding: 0 50px 15px clamp(40px, 6.95vw, 100px);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}
.oxh__titles { margin-bottom: 36px; }
.oxh__kicker { /* H1 */
    margin: 0 0 -8px;
    font-family: var(--ox-mono);
    font-size: 16px;
    font-weight: 400;
    line-height: 47px;
    letter-spacing: 0;
    text-transform: uppercase;
}
.oxh__kicker span { color: #384259; }
.oxh__title { /* H2 */
    margin: 0;
    font-size: clamp(34px, 3.125vw, 45px);
    font-weight: 400;
    line-height: 1.045;
    letter-spacing: 0;
}
.oxh__aside { flex: none; width: 457px; padding-left: 14px; }
.oxh__text {
    position: relative;
    margin: 0;
    font-size: 16px;
    line-height: 21px;
    color: rgba(255, 255, 255, .8);
}
.oxh__text::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 10px;
    width: 5px;
    height: 5px;
    background: var(--ox-lime);
}
.oxh__actions { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 25px; }
.oxh__btn {
    display: inline-flex;
    align-items: center;
    gap: 17px;
    height: 36px;
    padding: 0 13px 0 20px;
    border: .5px solid rgba(255, 255, 255, .8);
    border-radius: 999px;
    font-size: 14px;
    line-height: 18px;
    color: #fff;
    text-decoration: none;
    transition: background-color .25s ease, color .25s ease;
}
.oxh__btn svg { transition: transform .25s ease; }
.oxh__btn:hover { background: #fff; color: var(--ox-ink); }
.oxh__btn:hover svg { transform: translateX(3px); }
.oxh__btn:focus-visible { outline: 1.5px solid var(--ox-lime); outline-offset: 3px; }

/* Marcas: carrusel infinito bajo la línea */
.oxh__brands {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;
    height: 143px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, .2);
}
.oxh__track {
    display: flex;
    flex: none;
    animation: oxh-marquee 45s linear infinite;
    will-change: transform;
}
.oxh__group { display: flex; flex: none; align-items: center; gap: 64px; padding-right: 64px; margin: 0; list-style: none; }
.oxh__group img {
    display: block;
    width: 127px;
    height: 68px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* logos oscuros con transparencia → blancos */
}
@keyframes oxh-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
    .oxh__track { animation: none; }
    .oxn__panel, .oxn__mobile { transition: none; }
}

/* Laptop angosta / tablet: columnas apiladas */
@media (max-width: 1199px) {
    .oxh__body { flex-direction: column; align-items: flex-start; gap: 20px; padding: 0 40px 28px; }
    .oxh__titles { margin-bottom: 0; }
    .oxh__aside { width: auto; max-width: 520px; }
}
@media (max-width: 767px) {
    .oxh { padding: 12px 12px 0; }
    .oxh__card { height: clamp(600px, calc(100svh - 24px), 860px); }
    /* Móvil: la foto (recorte 4:5) ocupa la parte alta y se funde hacia el azul noche,
       así el texto no cae sobre la cara. */
    .oxh__card { background: var(--ox-ink); }
    /* La foto se desvanece sola (máscara): no queda costura sea cual sea el alto de la tarjeta */
    .oxh__media {
        bottom: auto; height: auto; aspect-ratio: 4 / 5;
        -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
    }
    .oxh__media img, .oxh__media video { object-position: 50% 0; }
    .oxh__card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(17, 24, 39, 0) 34%, rgba(17, 24, 39, .78) 56%, var(--ox-ink) 68%);
    }
    .oxh__body { bottom: 96px; padding: 0 20px 22px; gap: 16px; }
    .oxh__kicker { margin: 0 0 8px; font-size: 12px; line-height: 18px; }
    .oxh__kicker span { color: inherit; opacity: .75; }
    .oxh__title { font-size: 30px; line-height: 1.1; }
    .oxh__title br { display: none; }
    .oxh__text { font-size: 14px; line-height: 20px; }
    .oxh__text::before { top: 8px; }
    .oxh__actions { gap: 10px; margin-top: 18px; }
    .oxh__btn { gap: 10px; padding: 0 11px 0 16px; }
    .oxh__brands { height: 96px; }
    .oxh__group { gap: 40px; padding-right: 40px; }
    .oxh__group img { width: 97px; height: 52px; }
}

/* Tablet en vertical: la tarjeta es más alta que ancha y el encuadre "cover" agranda la cara
   hasta meterla bajo el texto. La foto ocupa la parte alta y se funde al azul noche. */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: portrait) {
    .oxh__card { background: var(--ox-ink); }
    .oxh__media {
        bottom: auto; height: 68%;
        -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
    }
}

/* Tablet en horizontal: el texto apilado ocupa la izquierda; la foto se corre a la derecha
   y su borde izquierdo se funde con el fondo de la tarjeta (mismo azul del estudio). */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
    .oxh__media {
        left: 24%; right: -24%; width: 100%;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%);
        mask-image: linear-gradient(to right, transparent 0, #000 22%);
    }
}

/* 5 · Convivencia con la navegación fija --------------------------------- */
/* Índice del blog (toc.css): se pega DEBAJO de la navegación, no bajo ella */
.ox-site .toc { top: 74px; }
.ox-site .toc-layout h2[id] { scroll-margin-top: calc(74px + var(--toc-bar) + 1rem); }
@media (min-width: 1100px) {
    .ox-site .toc { top: 108px; }
    .ox-site .toc-layout h2[id] { scroll-margin-top: calc(108px + var(--toc-bar) + 1rem); }
}
@media (min-width: 1280px) {
    .ox-site .toc { top: 128px; max-height: calc(100vh - 160px); }
    .ox-site .toc-layout h2[id] { scroll-margin-top: 128px; }
}
