/* ==========================================================================
   NADA — Phase 6: Jouri, the falling petals, the opening shutter.
   Design: Jouri Storefront.dc.html SF:81 (back petals), SF:1779-1805 (Jouri
   layer, front petals), SF:1849-1867 (opening). Engine: assets/js/jouri.js.

   Stacking, as the design's stage: watermark -1 · back petals -1 (later in the
   DOM, so above it) · header 30 · bloom 33 · Jouri 35 · front petals 40 ·
   toast 45 · sheet 50 · opening 60. All fixed to the viewport and moved under
   <body> by the engine, so no contained wrapper can trap them.
   ========================================================================== */

.nada-petals {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.nada-petals--back  { z-index: -1; }
.nada-petals--front { z-index: 40; }

/* ---------- Jouri (SF:1780-1801) ------------------------------------------- */
.nada.nada-jouri {
    position: fixed;
    inset: 0;
    z-index: 35;
    overflow: hidden;
    pointer-events: none;
    background: none;
}
/* ponytail: physical on purpose — the engine places her in SCREEN coordinates
   (translate3d from the top-left corner, as the design does), in both directions. */
.nada.nada-jouri .nada-jouri__wrap {
    position: absolute;
    inset: 0 auto auto 0;
    opacity: 0;
    transition: opacity .2s ease-in-out;
    will-change: transform, opacity;
}
.nada.nada-jouri .nada-jouri__flip,
.nada.nada-jouri .nada-jouri__bn {
    position: absolute;
    inset: 0;
}
.nada.nada-jouri .nada-jouri__bn { transform-origin: 50% 100%; }
.nada.nada-jouri .nada-jouri__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: 50% 100%;
    user-select: none;
}
/* A clip cell: anchored to the feet line, its height = canvasH / 800 (set by the engine). */
.nada .nada-jouri__clip {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    display: none;
    background-repeat: no-repeat;
}
.nada.nada-jouri .nada-jouri__hit {
    position: absolute;
    inset-block: 0;
    inset-inline: 20%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
}
.nada.nada-jouri .nada-jouri__hit:focus-visible { outline: 2px dashed var(--b); outline-offset: 2px; border-radius: 22px; }

/* The speech bubble. Side (left / right), bottom and width are set by the engine:
   she speaks toward the middle of the screen. */
.nada.nada-jouri .nada-jouri__bub {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px 16px;
    padding-inline: 16px 14px;
    border-radius: 22px;
    background: var(--p);
    color: var(--b);
    box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--d) 60%, transparent);
    pointer-events: auto;
    animation: nada-rise .3s ease both;
}
.nada.nada-jouri .nada-jouri__bub[hidden] { display: none; }
.nada.nada-jouri .nada-jouri__tail {
    position: absolute;
    inset-block-end: -8px;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: var(--p);
    transform: rotate(45deg);
}
.nada.nada-jouri .nada-jouri__row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.nada.nada-jouri .nada-jouri__name { font: 700 14px/1.2 'Changa', sans-serif; color: var(--b); }
.nada.nada-jouri .nada-jouri__x {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: -6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--b);
    cursor: pointer;
}
.nada.nada-jouri .nada-jouri__x:hover { background: var(--f); }
.nada.nada-jouri .nada-jouri__x .nada-i { font-size: 18px; }
.nada.nada-jouri .nada-jouri__say {
    position: relative;
    margin: 0;
    font: 700 15px/1.55 'Changa', sans-serif;
    color: var(--b);
    text-wrap: pretty;
}
/* Phones (SF:3300): tighter bubble, no name, the close button in the corner. */
html.nada-narrow .nada.nada-jouri .nada-jouri__bub { padding: 9px 12px 10px; border-radius: 18px; }
html.nada-narrow .nada.nada-jouri .nada-jouri__row { position: absolute; inset-block-start: 3px; inset-inline-end: 3px; z-index: 1; }
html.nada-narrow .nada.nada-jouri .nada-jouri__name { display: none; }
html.nada-narrow .nada.nada-jouri .nada-jouri__say { padding-inline-end: 22px; font: 700 14px/1.4 'Changa', sans-serif; }

/* ---------- the opening shutter (SF:1850-1866) ----------------------------- */
html.nada-opening,
html.nada-opening body { overflow: hidden; }
.nada.nada-open {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 16px clamp(14px, 4vw, 64px) 0;
    background-color: var(--f);
    background-image: var(--nada-shutter);
    background-size: max(100%, 1200px) auto;
    background-repeat: repeat;
    background-blend-mode: luminosity;
    overflow: hidden;
    touch-action: none;
    cursor: pointer;
    user-select: none;
    color: var(--b);
    transition: transform .9s cubic-bezier(.76, 0, .24, 1);
}
.nada.nada-open[hidden] { display: none; }
.nada.nada-open .nada-open__top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
}
.nada.nada-open .nada-open__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 9999px;
    background: var(--p);
    color: var(--b);
    font: 700 24px/1 'Changa', sans-serif;
}
.nada.nada-open .nada-open__mark { width: 28px; height: 28px; object-fit: contain; }
.nada.nada-open .nada-open__skipw { display: flex; justify-content: flex-end; }
.nada.nada-open .nada-open__skip {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 9999px;
    background: var(--g);
    color: var(--b);
    font: 700 14px/1.2 'Changa', sans-serif;
    cursor: pointer;
}
.nada.nada-open .nada-open__stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-wrap: wrap-reverse;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(4px, 1.6vw, 28px);
}
/* Her height: 44 % of the width, capped at 74 % of the screen (half on phones). */
.nada.nada-open .nada-open__j {
    position: relative;
    flex: none;
    height: min(clamp(280px, 44vw, 580px), 74vh);
    aspect-ratio: .75;
}
html.nada-narrow .nada.nada-open .nada-open__j { height: min(clamp(280px, 44vw, 580px), 50vh); }
.nada.nada-open .nada-open__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: 50% 100%;
}
.nada.nada-open .nada-open__card {
    position: relative;
    flex: 0 1 500px;
    min-width: min(100%, 260px);
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(20px, 2.8vw, 36px);
    border-radius: 28px;
    background: var(--p);
    color: var(--b);
    box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--d) 60%, transparent);
}
.nada.nada-open .nada-open__who { font: 700 15px/1.2 'Changa', sans-serif; }
.nada.nada-open .nada-open__hi {
    margin: 0;
    font: 600 clamp(56px, 5vw, 72px)/1.3 'Changa', sans-serif;
    color: var(--b);
    text-wrap: balance;
}
.nada.nada-open .nada-open__hint { display: flex; align-items: center; gap: 8px; font: 600 14px/1.4 'Changa', sans-serif; }
.nada.nada-open .nada-open__hint .nada-i { font-size: 18px; }

/* The platform's floating WhatsApp button (shared tenant footer) is not part of
   Nada — Ahmed 2026-11-07: the shop's WhatsApp lives elsewhere in the theme.
   Hidden here, in a layer only Nada loads, so the shared footer stays untouched. */
html body .wa-wrapper { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .nada.nada-open { transition: none; }
    .nada.nada-jouri .nada-jouri__bub { animation: none; }
}
