@charset "UTF-8";
/*
 * Estrel Tower — Categories / Accordion Section
 * Pixel-perfect Figma implementation (1920 design frame).
 *
 * Frame model: 5 panels side by side
 *   1 expanded (1116 wide) + 4 closed (216 wide each) = 1980 total
 *   Panel height 854.
 *
 * Expanded panel content block (within 1116 frame):
 *   Text block 569 × 120, top 638, left 231
 *     Title  Söhne 500 20 / 26  #FEF5EC
 *     Body   Söhne 400 20 / 26  #FEF5EC
 *   CTA "Tisch reservieren" 215 × 30, top 743, left 231, radius 41.5
 *     filled Watermelon (#FED3CD)
 *   CTA "Mehr erfahren"     167 × 30, top 743, left 460, radius 41.5
 *     transparent, 1px Butter Yellow (#FEF5EC)
 *   Buttons gap = 14
 *
 * Closed panel label:
 *   Söhne 400 144 / 125, color #FED3CD @ 60% opacity
 *   Rotated 90° (writing-mode vertical-rl + rotate 180°)
 *   Active panel → Alpina Thin Italic instead of Söhne.
 *
 * Scaling: --u = 100cqi / 1980. Defined on a descendant so cqi resolves
 * against .estrel-accordion's inline-size (cqi on the container element
 * itself falls back to viewport — see reference_pixel_perfect_scaling.md).
 *
 * Interaction: .is-active (set by accordion.js on click) drives the
 * expanded state. :hover provides live preview via :has() — when any
 * panel is hovered, it expands and the currently active one collapses;
 * on mouse leave the active panel re-expands.
 */

.estrel-accordion {
    container-type: inline-size;
    width: 100%;
    max-width: none !important;
    padding: 0 !important;
    overflow: hidden;
    background: transparent;
}

/* Full-viewport bleed. Selector is `section.estrel-accordion` to outrank
   layout.css `section[class^="estrel-"]` which sets `margin: 0 auto` and would
   otherwise override our left-margin. Width 100vw + negative left margin pulls
   the section's left edge to the actual viewport-left when the parent
   (.estrel-page, max 1920px) is centered inside a wider viewport. */
section.estrel-accordion {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.estrel-accordion__panels {
    --u: calc(100cqw / 1980);  /* cqw not cqi — cqi flips with writing-mode vertical-rl on labels */
    display: flex;
    width: 100%;
    height: calc(854 * var(--u));
    margin: 0;
    padding: 0;
}

/* ---- Panel base ---- */
.estrel-accordion__panel {
    position: relative;
    flex: 0 0 calc(216 * var(--u));
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background-color: #14172D;
    transition: flex-basis 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Active panel (class toggled by accordion.js) */
.estrel-accordion__panel.is-active {
    flex-basis: calc(1116 * var(--u));
    cursor: default;
}

/* Expansion is click-only — driven by .is-active (set by accordion.js).
   No :hover preview. */

/* ---- Background image ----
   The bg is pinned at the panel's top-left and rendered at the FULL
   expanded width (1116). Panels are overflow: hidden, so closed panels
   reveal just the leftmost slice; expanding uncovers the rest. */
.estrel-accordion__bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: calc(1116 * var(--u));
    z-index: 1;
}

.estrel-accordion__img,
.estrel-accordion__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ---- Dark gradient overlay for legibility ---- */
.estrel-accordion__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(20,23,45,0) 40%, rgba(20,23,45,0.55) 100%);
    pointer-events: none;
    transition: none;
    opacity: 1;
}

/* ---- Vertical label ----
   writing-mode: vertical-rl flips cqi/cqw resolution (CSS spec: container query
   units resolve relative to the element's own writing-mode). So font-size and
   line-height use vw instead of var(--u) to stay width-based. */
.estrel-accordion__label {
    position: absolute;
    right: 0;
    left: auto;
    bottom: 0;
    z-index: 3;
    writing-mode: vertical-rl;
    /* +15u shift compensates for em-box whitespace after rotation so the
       visible glyph ink sits flush against the panel right edge (Figma 75:352).
       Mobile rule below overrides transform entirely. */
    transform: translateX(calc(9 * 100vw / 1980)) rotate(180deg);
    transform-origin: center;
    color: #FED3CD;
    opacity: 0.6;
    font-family: var(--font-soehne);
    font-weight: 400;
    font-style: normal;
    font-size: calc(144 * 100vw / 1980);
    line-height: calc(125 * 100vw / 1980);
    letter-spacing: 0;
    white-space: nowrap;
    pointer-events: none;
    transition: font-family 0s, opacity 0.4s ease;
    text-transform: none;
}

/* Active → Alpina Thin Italic, larger size, full opacity, pinned to LEFT edge
   (inactive panels keep label at right). Desktop only — mobile shows all labels
   horizontally at top-left (see @media max-width: 767px below). */
@media (min-width: 768px) {
    .estrel-accordion__panel.is-active .estrel-accordion__label {
        left: calc(20 * 100vw / 1980);
        right: auto;
        transform: rotate(180deg); /* no inactive-side shift */
        font-family: var(--font-alpina);
        font-weight: 250;
        font-style: italic;
        font-size: calc(164 * 100vw / 1980);
        opacity: 1;
    }
}

/* Sunrise theme — keep the same pink label; Figma uses 0.6 opacity */
body.sunrise .estrel-accordion__label {
    opacity: 0.6;
}

/* ---- Expanded content ---- */
.estrel-accordion__content {
    position: absolute;
    left: calc(231 * var(--u));
    top: calc(638 * var(--u));
    width: calc(569 * var(--u));
    z-index: 4;
    color: #FEF5EC;
    opacity: 0;
    transform: translateY(calc(8 * var(--u)));
    transition: opacity 0.4s ease 0.05s, transform 0.5s ease 0.05s;
    pointer-events: none;
}

.estrel-accordion__panel.is-active .estrel-accordion__content {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.estrel-accordion__title,
.estrel-accordion__content-title {
    margin: 0;
    font-family: var(--font-soehne);
    font-weight: 500;
    font-size: calc(20 * var(--u));
    line-height: calc(26 * var(--u));
    color: #FEF5EC;
    letter-spacing: 0;
    text-transform: none;
}

.estrel-accordion__text,
.estrel-accordion__content-text {
    margin: 0;
    font-family: var(--font-soehne);
    font-weight: 400;
    font-size: calc(20 * var(--u));
    line-height: calc(26 * var(--u));
    color: #FEF5EC;
    max-width: none;
}

.estrel-accordion__text p {
    margin: 0;
}
.estrel-accordion__text p + p {
    margin-top: calc(4 * var(--u));
}

/* ---- CTAs ---- */
.estrel-accordion__ctas {
    display: flex;
    gap: calc(14 * var(--u));
    margin-top: calc(29 * var(--u));
    flex-wrap: nowrap;
}

/* Scoped pill buttons — override global .estrel-btn so the old element
   renders with the new Figma-accurate pills. */
.estrel-accordion .estrel-btn,
.estrel-accordion__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: calc(30 * var(--u));
    padding: 0 calc(24 * var(--u));
    border-radius: calc(41.5 * var(--u));
    border: 1px solid transparent;
    font-family: var(--font-alpina);
    font-weight: 250;
    font-style: italic;
    font-size: calc(19 * var(--u));
    line-height: calc(22 * var(--u));
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity var(--hover-transition);
}

.estrel-accordion .estrel-btn--primary,
.estrel-accordion__btn--primary {
    min-width: calc(215 * var(--u));
    background: #FED3CD;
    border-color: #FED3CD;
    color: #14172D;
    letter-spacing: 2.09px;
}

.estrel-accordion .estrel-btn--secondary,
.estrel-accordion__btn--ghost {
    min-width: calc(167 * var(--u));
    background: transparent;
    border-color: #FED3CD;
    color: #FEF5EC;
    letter-spacing: 0.95px;
}

.estrel-accordion .estrel-btn:hover,
.estrel-accordion__btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

/* ============================
   SUNRISE THEME
   ============================ */
/* Text and buttons stay cream/accent over the dark gradient overlay
   in BOTH themes — Figma uses identical colors for day & night. */

/* ---- Inactive panel wash (Day/Sunrise only) ----
   Figma: #FEF5EC at 40% with LIGHTEN blend mode on non-active panels */
body.sunrise .estrel-accordion__panel:not(.is-active)::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    background: #FEF5EC;
    opacity: 0.4;
    mix-blend-mode: lighten;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

body.sunrise .estrel-accordion__panel:not(.is-active):hover::after {
    opacity: 0;
}

/* ---- Dark overlay on inactive panels (Night/Sunset theme) ----
   Mirrors Sunrise light-wash pattern. Figma Node 75:352 shows solid
   #14172D overlay at opacity 1; pragmatische Abweichung auf 0.4 damit
   Label + Bg-Image teilweise durchscheinen. */
body.night .estrel-accordion__panel:not(.is-active)::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 5;
    background: #14172D;
    opacity: 0.4;
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

body.night .estrel-accordion__panel:not(.is-active):hover::after {
    opacity: 0;
}


/* ============================
   MOBILE (<768) — horizontal swipe carousel
   ============================ */
@media (max-width: 767px) {
    .estrel-accordion {
        overflow: visible;
        background: transparent;
    }

    .estrel-accordion__panel {
        background-color: transparent;
    }

    .estrel-accordion__panels {
        flex-direction: row;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        padding-inline: 4vw;   /* (100vw - 92vw) / 2 — first/last panel centered */
        scroll-padding-inline: 4vw;
        scrollbar-width: none;   /* Firefox */
    }

    .estrel-accordion__panels::-webkit-scrollbar {
        display: none;           /* Chrome/Safari */
    }

    .estrel-accordion__panel,
    .estrel-accordion__panel.is-active {
        flex: 0 0 92vw;
        width: 92vw;
        height: 75vh;
        min-height: 400px;
        max-height: 550px;
        scroll-snap-align: center;
        border-radius: 6px;
        cursor: default;
    }

    /* All panels show their content on mobile (no expand/collapse) */
    .estrel-accordion__panel .estrel-accordion__content {
        opacity: 1;
        transform: none;
        pointer-events: auto;
        position: absolute;
        left: 20px;
        right: 20px;
        top: auto;
        bottom: 24px;
        width: auto;
    }

    .estrel-accordion__bg {
        width: 100%;
    }

    .estrel-accordion__label {
        left: 20px;
        bottom: auto;
        top: 20px;
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 2.5rem;
        line-height: 1;
        opacity: 1;
        font-family: var(--font-alpina);
        font-weight: 250;
        font-style: italic;
    }

    .estrel-accordion__overlay {
        background: linear-gradient(180deg, rgba(20,23,45,0) 30%, rgba(20,23,45,0.7) 100%);
    }

    /* Disable inactive-panel overlay on mobile — all panels visible in carousel */
    body.sunrise .estrel-accordion__panel:not(.is-active)::after,
    body.night .estrel-accordion__panel:not(.is-active)::after {
        display: none;
    }

    .estrel-accordion__title,
    .estrel-accordion__text {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .estrel-accordion__ctas {
        margin-top: 16px;
    }

    .estrel-accordion .estrel-btn,
    .estrel-accordion__btn {
        height: 34px;
        min-width: 0;
        padding: 0 1.25rem;
        font-size: 0.85rem;
        border-radius: 17px;
    }
}
