:root {
    color-scheme: light;
    --pio-orange: #ff9920;
    --pio-ink: #1d1b19;
    --pio-surface: #f8f3ee;
    --pio-white: #ffffff;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    overflow: hidden;
    background: var(--pio-surface);
    opacity: 1;
    transition: opacity .48s ease;
}

.intro-overlay[data-ending="true"] {
    opacity: 0;
    pointer-events: none;
}

.intro-overlay[hidden] {
    display: none;
}

.intro-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--pio-surface);
}

.intro-skip,
.intro-play {
    position: absolute;
    bottom: max(1rem, env(safe-area-inset-bottom));
    min-height: 44px;
    padding: .7rem 1rem;
    border: 1px solid rgba(29, 27, 25, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--pio-ink);
    cursor: pointer;
    font-weight: 700;
}

.intro-skip {
    right: max(1rem, env(safe-area-inset-right));
}

.intro-play {
    left: 50%;
    bottom: 50%;
    min-height: 52px;
    padding-inline: 1.5rem;
    border-color: var(--pio-orange);
    background: var(--pio-orange);
    color: var(--pio-white);
    transform: translate(-50%, 50%);
}

body {
    overflow-x: hidden;
    background: var(--pio-surface);
    color: var(--pio-ink);
    font-family: Arial, Helvetica, sans-serif;
}

a,
button {
    font: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #2057d4;
    outline-offset: 4px;
}

.home,
.desktop-stage {
    min-height: 100svh;
}

.desktop-stage {
    display: grid;
    place-items: center;
    overflow: hidden;
}

.desktop-canvas {
    position: relative;
    width: min(100vw, calc(100svh * 1.776833));
    height: min(100svh, calc(100vw / 1.776833));
    overflow: hidden;
    background: var(--pio-surface);
    transform-origin: 64% 50%;
}

.home-frame {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    user-select: none;
    -webkit-user-drag: none;
}

.home-frame--initial {
    z-index: 1;
}

.home-frame--final {
    z-index: 2;
    opacity: 0;
    clip-path: circle(0 at 66% 50%);
    transform: translate3d(18%, 0, 0) scale(.76);
    transform-origin: 66% 50%;
}

.is-intro-playing .home-frame--final {
    animation: pio-break-through 1.42s cubic-bezier(.18, .8, .18, 1) .12s forwards;
}

.is-intro-playing .desktop-canvas,
.is-intro-playing .mobile-visual {
    animation: pio-impact-shake .34s ease-out .86s both;
}

.is-intro-complete .home-frame--final {
    opacity: 1;
    clip-path: circle(150% at 66% 50%);
    transform: none;
}

@keyframes pio-break-through {
    0% {
        opacity: 0;
        clip-path: circle(0 at 77% 49%);
        transform: translate3d(18%, 0, 0) scale(.76);
    }
    38% {
        opacity: 1;
        clip-path: circle(15% at 70% 50%);
        transform: translate3d(7%, 0, 0) scale(.9);
    }
    67% {
        opacity: 1;
        clip-path: circle(54% at 66% 50%);
        transform: translate3d(-1.2%, 0, 0) scale(1.025);
    }
    100% {
        opacity: 1;
        clip-path: circle(150% at 66% 50%);
        transform: none;
    }
}

@keyframes pio-impact-shake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    20% { transform: translate3d(-7px, 2px, 0) rotate(-.12deg); }
    42% { transform: translate3d(6px, -2px, 0) rotate(.1deg); }
    64% { transform: translate3d(-3px, 1px, 0); }
    82% { transform: translate3d(2px, 0, 0); }
}

.desktop-hotspots {
    position: absolute;
    inset: 0;
    z-index: 4;
}

.desktop-top-nav {
    position: absolute;
    left: 8.5%;
    top: 5.1%;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(10px, 1.55vw, 28px);
    width: 48%;
    min-height: 6.8%;
}

/* Six primary destinations fit the desktop canvas without changing its header height. */
.home .desktop-top-nav { gap: clamp(8px, 1vw, 18px); }
.home .desktop-top-nav a { font-size: clamp(.82rem, .95vw, 1.08rem) !important; }

.desktop-top-nav a,
.desktop-top-nav button {
    flex: 0 0 auto;
    margin: 0;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--pio-orange);
    font-size: clamp(.58rem, .82vw, .92rem);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.desktop-top-nav a:hover,
.desktop-top-nav a:focus-visible {
    color: var(--pio-orange);
}

.desktop-top-nav button[aria-disabled="true"] {
    color: #81766f;
    opacity: .55;
    cursor: default;
}

.hotspot {
    position: absolute;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: transparent;
    cursor: pointer;
}

.hotspot span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.hotspot[aria-disabled="true"] {
    cursor: default;
}

.hotspot--home { left: 22.8%; top: 5.1%; width: 4.4%; height: 8.7%; }
.hotspot--menu { left: 27.4%; top: 5.1%; width: 8%; height: 8.7%; }
.hotspot--orders { left: 35.6%; top: 5.1%; width: 6%; height: 8.7%; }
.hotspot--about { left: 42%; top: 5.1%; width: 8.5%; height: 8.7%; }
.hotspot--contact { left: 50.7%; top: 5.1%; width: 6%; height: 8.7%; }
.hotspot--order-cta { left: 81.7%; top: 5.1%; width: 13.7%; height: 7%; }
.hotspot--menu-cta { left: 4.1%; top: 63.4%; width: 19.3%; height: 8.6%; }

.mobile-stage {
    display: none;
}

/* The desktop canvas also shrinks with viewport height; keep both stages in sync. */
@media (max-width: 899px), (max-height: 480px) {
    .desktop-stage {
        display: none;
    }

    .mobile-stage {
        display: block;
        min-height: 100svh;
        padding: 18px 16px 24px;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        min-height: 72px;
        padding: 12px 14px;
        border-radius: 24px;
        background: rgba(255, 255, 255, .76);
        box-shadow: 0 12px 38px rgba(87, 52, 25, .08);
    }

    .mobile-address {
        margin: 0;
        font-size: .76rem;
        font-weight: 700;
        line-height: 1.25;
    }

    .mobile-order,
    .mobile-menu-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 0 18px;
        border-radius: 999px;
        background: var(--pio-orange);
        color: var(--pio-white);
        font-weight: 700;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-nav {
        display: flex;
        gap: 18px;
        margin: 14px -16px 0;
        padding: 10px 16px 12px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-nav a,
    .mobile-nav button {
        flex: 0 0 auto;
        padding: 6px 0;
        border: 0;
        background: transparent;
        color: #4d4946;
        font-size: .9rem;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-nav .is-current {
        border-bottom: 3px solid var(--pio-orange);
        color: var(--pio-ink);
        font-weight: 700;
    }

    .mobile-nav button[aria-disabled="true"] {
        opacity: .62;
    }

    .mobile-visual {
        position: relative;
        height: clamp(330px, 105vw, 470px);
        margin: 6px -16px 0;
        overflow: hidden;
    }

    .mobile-visual .home-frame {
        inset: auto;
        top: -55px;
        left: 0;
        width: 210%;
        height: auto;
        max-width: none;
        object-fit: contain;
        transform-origin: 66% 50%;
        translate: -46.5% 0;
    }

    .mobile-visual .home-frame--final {
        transform: translate3d(18%, 0, 0) scale(.76);
    }

    .is-intro-complete .mobile-visual .home-frame--final {
        transform: none;
    }

    .mobile-copy {
        position: relative;
        z-index: 5;
        margin-top: -92px;
        padding: 22px;
        border-radius: 26px;
        background: rgba(255, 255, 255, .94);
        box-shadow: 0 18px 44px rgba(87, 52, 25, .14);
    }

    .mobile-copy h1 {
        margin: 0 0 18px;
        color: var(--pio-orange);
        font-size: clamp(2.3rem, 13vw, 4rem);
        font-weight: 500;
        line-height: .9;
        letter-spacing: -.06em;
    }

    .mobile-copy h1 strong {
        display: block;
        font-weight: 900;
        letter-spacing: -.04em;
    }

    .mobile-menu-cta {
        width: 100%;
        min-height: 54px;
        font-size: 1.05rem;
    }

    .mobile-features {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
        padding: 16px 10px;
        border-radius: 24px;
        background: rgba(255, 255, 255, .7);
    }

    .mobile-features p {
        margin: 0;
        text-align: center;
    }

    .mobile-features strong,
    .mobile-features span {
        display: block;
    }

    .mobile-features strong {
        font-size: .76rem;
        line-height: 1.2;
    }

    .mobile-features span {
        margin-top: 4px;
        color: #6a625d;
        font-size: .68rem;
        line-height: 1.2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intro-overlay {
        display: none;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* New visible text styles for homenuevapiov5 overlay */
.hotspot .visible-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    clip: auto;
    overflow: visible;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--pio-white);
    font-size: clamp(0.9rem, 1.2vw, 1.2rem);
    font-weight: 700;
}

.hotspot--menu-cta .visible-text svg,
.hotspot--order-cta .visible-text svg {
    width: 1.2em;
    height: 1.2em;
}

.desktop-info-box {
    position: absolute;
    left: 4.1%;
    top: 75.4%;
    width: 38%;
    height: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.8rem;
    color: var(--pio-ink);
    font-size: clamp(0.85rem, 1.1vw, 1.15rem);
    line-height: 1.3;
}
.desktop-info-box p {
    margin: 0;
}

/* Override old hotspot positions for homenuevapiov5 */
.hotspot--order-cta {
    left: 84%;
    top: 5.1%;
    width: 12%;
    height: 7%;
}
.hotspot--order-cta .visible-text {
    justify-content: center;
    padding: 0;
    font-size: clamp(0.75rem, 1vw, 1rem);
}

.hotspot--menu-cta {
    left: 4.1%;
    top: 64.5%;
    width: 13.5%;
    height: 8.6%;
}
.hotspot--menu-cta .visible-text {
    justify-content: center;
    padding: 0;
    font-size: clamp(0.85rem, 1.1vw, 1.1rem);
}


/* Accesibilidad y semántica SEO sin alterar el diseño */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
