@charset "UTF-8";
/*
 * Estrel Tower — Layout
 * Full-page gradient background, transparent sections, fixed overlays
 */

/* ============================
   RESET & BASE
   ============================ */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* clip (not hidden): contains horizontal overflow without creating a scroll
       container. Safari 16+ / Chrome 90+. `overflow-x: hidden` on html/body
       breaks iOS momentum-scrolling (first-swipe-ignored bug). */
    overflow-x: clip;
    background: #14172D;   /* fills sides on viewports > 1920px */
    --max-vw: min(100vw, 1920px);  /* clamp viewport references to 1920px */
}

body {
    margin: 0;
    padding-top: 121px; /* room for fixed navbar + gap to hero (Figma: hero top=121) */
    overflow-x: clip;
}

/* Subpages: hero/page background extends to top:0 behind the transparent navbar.
   The navbar already has background:transparent at scroll-top and fades in its
   ::before backdrop via .is-scrolled (>50px). Only the startpage keeps the 121px
   gap because its hero composition is built around that offset. */
body:not(.is-startpage) {
    padding-top: 0;
}

/* Constrain page content to 1920px — body stays full-width for background + gradient.
   No overflow clipping here — glow and gradient extend to full viewport.
   body { overflow-x: hidden } prevents horizontal scrollbar.
   IMPORTANT: no z-index here — a non-auto z-index would create a stacking
   context that hides the body-level `.estrel-sunset-bg` gradient (z:0 sibling)
   behind the page. position:relative by itself does not create an SC. */
.estrel-page {
    position: relative;
    max-width: 1920px;
    margin: 0 auto;
}

/* Reset Contao wrapper constraints for full-bleed sections */
.mod_article,
.inside,
[class^="content-estrel"],
[class^="module-estrel"] {
    max-width: none !important;
    padding: 0;
    margin: 0;
}

img, video {
    max-width: 100%;
    height: auto;
}


/* ============================
   MAIN CONTAINER
   ============================ */

.mod_article {
    position: relative;
    z-index: 1;
}


/* ============================
   SECTION BASE
   All sections are transparent over the page gradient
   ============================ */

[class^="estrel-"] > section,
section[class^="estrel-"] {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--section-gap) var(--container-padding);
}

/* Full-bleed sections break out of container */
.estrel-accordion,
.estrel-architecture,
.estrel-newsletter > section,
.estrel-contact > section,
.estrel-stats > section {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Zimmer sections — defined with --u scaling in zimmer.css. Opt them out of
   the global section container so zimmer.css rules can win cleanly. */
section.estrel-room-title,
section.estrel-room-gallery,
section.estrel-intro--pullquote,
section.estrel-highlights,
section.estrel-related,
section.estrel-seo,
section.estrel-faq,
section.estrel-split,
section.estrel-room-fokus,
section.estrel-room-details,
section.estrel-room-grid {
    max-width: none;
    padding: 0;
    margin: 0 auto;
}

/* ============================
   SECTION GAPS (Figma-exact spacing between sections)
   Uses calc(Xpx * 100vw / 1920) for responsive scaling.
   ============================ */

section.estrel-accordion    { margin-top: calc(172 * 100vw / 1920) !important; }  /* Intro → Accordion */
section.estrel-news         { margin-top: calc(102 * 100vw / 1920) !important; }  /* Accordion → News (Figma 222 − 120u internal news__inner top pad = 102) */
section.estrel-meetings     { padding-top: calc(304 * 100vw / 1920) !important; }  /* News → Meetings */
section.estrel-architecture { margin-top: calc(200 * 100vw / 1920) !important; }  /* Meetings → Architecture */
section.estrel-sustainability { margin-top: calc(38 * 100vw / 1920) !important; } /* Stats → Sustainability */
section.estrel-testimonials { margin-top: calc(209 * 100vw / 1920) !important; }  /* Sustainability → Testimonials */
section.estrel-gallery      { margin-top: calc(335 * 100vw / 1920) !important; }  /* Testimonials → Gallery */


/* ============================
   OPAQUE SECTIONS
   Newsletter, Contact, Footer have solid backgrounds
   ============================ */

/* Opaque section backgrounds are now defined in their own section CSS files
   with !important to force colors regardless of Night/Sunrise theme */


/* ============================
   NAV BAR (Fixed)
   ============================ */

/* Navbar — exact Figma spec
   Fixed top bar over deep-sea background.
   Pills + logo row at top 44, height 46.35px (Figma frame Menü). */
.estrel-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Full-bleed bar; content stays centered within a 1600px column.
       max(40px, …) preserves the Figma 40px inset on viewports ≤1680. */
    padding-top: 44px;
    padding-bottom: 44px;
    padding-inline: max(40px, calc((100% - 1600px) / 2));
    background: transparent;
    transition: padding 0.4s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}

/* Navbar backdrop: blur + gradient + edge-fade mask applied to ::before so
   children (pills, logo) stay fully opaque — only the navbar's OWN
   backdrop fades out at bottom/edges.
   At scroll-top the backdrop is invisible (no blur, no tint) so the deep-sea
   background stays clean; once .is-scrolled fires (>50px) the blur + tint
   fade in for pill legibility over the warm gradient zone. */
.estrel-navbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    -webkit-mask:
        linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%),
        linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask:
        linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%),
        linear-gradient(to bottom, black 0%, black 50%, transparent 100%);
    mask-composite: intersect;
    z-index: -1;
    pointer-events: none;
    /* Hält Compositor-Layer permanent — verhindert iOS Safari Layer-Eviction
       nach Idle, die beim nächsten Scroll teure Re-Promotion auslöste. */
    will-change: backdrop-filter, background;
    transition: background 0.3s ease;
}

.estrel-navbar.is-scrolled::before {
    background: linear-gradient(to bottom, rgba(20, 23, 45, 0.08) 0%, rgba(20, 23, 45, 0.04) 60%, transparent 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.sunrise .estrel-navbar.is-scrolled::before {
    background: linear-gradient(to bottom, rgba(254, 245, 236, 0.5) 0%, rgba(254, 245, 236, 0.25) 60%, transparent 100%);
}

/* Compact navbar after scrolling */
.estrel-navbar.is-scrolled {
    padding-top: 24px;
    padding-bottom: 24px;
}

.estrel-navbar__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10.59px;
    text-decoration: none;
    width: 89.21px;
}

/* Navbar logo — Figma 75:1311 + 208:491 — beide Varianten haben fill=#FED3CD
   (Watermelon Pink). Keine Themen-Variante; konsistent pink auf allen Pages. */
.estrel-navbar__logo-svg {
    display: block;
    width: 90px;
    height: 47px;
    color: #FED3CD;
}


/* ============================
   THEME TOGGLE (Moon/Sun icon)
   ============================ */

/* SUNSET / SUNRISE Pill — exact Figma spec (Rectangle 176)
   Width 115 × Height 28, border-radius 41.5, fill + border #FED3CD
   Figma Night 334:87 — Text+Moon(25) right.
   Figma Sunrise 75:1321 — Sun(25) left + Text + Moon(22) right. */
.estrel-theme-toggle {
    position: relative;
    z-index: 2;
    display: block;
    width: 115px;
    height: 28px;
    padding: 0;
    box-sizing: border-box;
    border-radius: 41.5px;
    border: 1px solid #FED3CD;
    background: #FED3CD;
    color: #14172D;
    font-family: var(--font-alpina);
    font-style: italic;
    font-weight: 250;
    font-size: 14px;
    letter-spacing: 0.11em;
    cursor: pointer;
    transition: opacity var(--hover-transition);
}

.estrel-theme-toggle:hover {
    opacity: 0.9;
}

/* Text label — night: 28px from left; sunrise: 40px from left (after sun icon)
   z-index 2 lets the trailing letter stay readable when it overlaps the moon
   circle in Sunrise state (Figma has 9px text/moon overlap by design). */
.estrel-theme-toggle__label {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    z-index: 2;
}

body.sunrise .estrel-theme-toggle__label {
    left: 40px;
}

/* Icon-Scheiben — pure CSS per Figma (kein Icon-SVG). Radial gradient disc stacked on butter-yellow bg. */
.estrel-theme-toggle__icon-circle {
    position: absolute;
    display: inline-block;
    border-radius: 50%;
}

/* Sun — LEFT in Sunrise. Figma 75:1321 Sun Visual: bg #FEF5EC @1.0 + radial gradient (gold #F4D073). */
.estrel-theme-toggle__icon-circle--sun {
    left: 2px;
    top: 1.5px;
    width: 25px;
    height: 23px;
    display: none;
    background:
        radial-gradient(circle at 50% 50%,
            rgba(243, 208, 115, 1) 0%,
            rgba(245, 199, 77, 0.5) 49%,
            rgba(245, 199, 77, 0.25) 100%),
        #FEF5EC;
}

body.sunrise .estrel-theme-toggle__icon-circle--sun {
    display: inline-block;
}

/* Moon — RIGHT. Figma 334:87 Moon Visual: bg #FEF5EC @0.8 + soft radial gradient (cool gray/lavender). */
.estrel-theme-toggle__icon-circle--moon {
    right: 2px; /* 115 - 88 - 25 */
    top: 1.5px;
    width: 25px;
    height: 23px;
    background:
        radial-gradient(circle at 50% 50%,
            rgba(201, 200, 218, 1) 0%,
            rgba(200, 200, 200, 0.7) 49%,
            rgba(231, 231, 231, 0.45) 100%),
        rgba(254, 245, 236, 0.8);
}

body.sunrise .estrel-theme-toggle__icon-circle--moon {
    display: none; /* Figma 75:1321: Sunrise zeigt nur die Sonne, keinen zweiten Moon-Dot */
}


/* ============================
   STICKY BOOKING BUTTON (fixed bottom-right)
   Figma "Book now Nav": 261x35, pill, #FED3CD, Alpina 250i 19px
   ============================ */

.estrel-sticky-booking {
    position: fixed;
    bottom: 30px;
    right: max(30px, calc((100vw - 1920px) / 2 + 30px));
    z-index: 999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 35px;
    padding: 0 24px;
    border-radius: 41.5px;
    background: #FED3CD;
    color: #14172D;
    font-family: var(--font-alpina);
    font-weight: 250;
    font-style: italic;
    font-size: 19px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(20, 23, 45, 0.15);
    /* Hält GPU-Layer warm gegen iOS Safari Eviction nach Idle. */
    will-change: transform;
    transition: opacity var(--hover-transition), transform var(--hover-transition);
}

.estrel-sticky-booking:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    text-decoration: none;
}

.estrel-sticky-booking__icon {
    display: inline-flex;
    align-items: center;
    width: 13px;
    height: 13px;
}

.estrel-sticky-booking__icon svg {
    width: 100%;
    height: 100%;
}

.estrel-sticky-booking__label {
    line-height: 1;
}


/* ============================
   RESPONSIVE BREAKPOINTS
   ============================ */

/* --- TABLET (768–1024) --- */
@media (max-width: 1024px) {
    body {
        padding-top: 80px;
    }

    .estrel-navbar {
        padding: 24px 30px;
    }

    .estrel-navbar.is-scrolled {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .estrel-sticky-booking {
        bottom: 20px;
        right: 20px;
        height: 32px;
        font-size: 16px;
        padding: 0 18px;
    }

    /* Reduce section gaps proportionally */
    section.estrel-accordion    { margin-top: calc(100 * 100vw / 1920) !important; }
    section.estrel-news         { margin-top: calc(130 * 100vw / 1920) !important; }
    section.estrel-architecture { margin-top: calc(100 * 100vw / 1920) !important; }
    section.estrel-sustainability { margin-top: calc(24 * 100vw / 1920) !important; }
    section.estrel-testimonials { margin-top: calc(120 * 100vw / 1920) !important; }
    section.estrel-gallery      { margin-top: calc(180 * 100vw / 1920) !important; }
}

/* --- MOBILE (<768) --- */
@media (max-width: 767px) {
    :root {
        --container-padding: 20px;
        --section-gap: 40px;
    }

    body {
        padding-top: 60px;
    }

    .estrel-navbar {
        padding: 16px 20px;
    }

    .estrel-navbar.is-scrolled {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .estrel-navbar__logo {
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .estrel-navbar__logo-svg {
        width: 65px;
        height: 34px; /* proportional zu Figma 90×47 (65/90 ≈ 0.72 → 47×0.72 ≈ 34) */
    }

    .estrel-theme-toggle {
        width: 100px;
        height: 26px;
        font-size: 12px;
    }

    /* Touch-target overlay — visually 26px but tap area ≥ 44px (WCAG 2.5.5) */
    .estrel-theme-toggle::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: var(--touch-target-min);
        transform: translateY(-50%);
        pointer-events: none;
    }

    /* Label anchors — scale Figma 28/40 down ~0.87 → 24/34 */
    .estrel-theme-toggle__label {
        left: 24px;
    }
    body.sunrise .estrel-theme-toggle__label {
        left: 34px;
    }

    /* Sun (sunrise only) and Moon (always) — ~22x22 on mobile */
    .estrel-theme-toggle__icon-circle--sun {
        width: 22px;
        height: 20px;
        left: 2px;
        top: 1.5px;
    }

    .estrel-theme-toggle__icon-circle--moon {
        width: 22px;
        height: 20px;
        right: 2px;
        top: 1.5px;
    }

    body.sunrise .estrel-theme-toggle__icon-circle--moon {
        display: none;
    }

    .estrel-pill {
        height: 26px;
        font-size: 12px;
        padding: 0 12px;
    }

    /* Touch-target overlay — visually 26px but tap area ≥ 44px (WCAG 2.5.5) */
    .estrel-pill::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: var(--touch-target-min);
        transform: translateY(-50%);
        pointer-events: none;
    }

    .estrel-sticky-booking {
        bottom: 16px;
        right: 16px;
        height: 30px;
        font-size: 14px;
        padding: 0 16px;
        gap: 8px;
    }

    /* Touch-target overlay — visually 30px but tap area ≥ 44px (WCAG 2.5.5) */
    .estrel-sticky-booking::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: var(--touch-target-min);
        transform: translateY(-50%);
        pointer-events: none;
    }

    .estrel-sticky-booking__icon {
        width: 11px;
        height: 11px;
    }

    /* Remove all section gaps on mobile — use uniform spacing */
    section.estrel-accordion,
    section.estrel-news,
    section.estrel-architecture,
    section.estrel-sustainability,
    section.estrel-testimonials,
    section.estrel-gallery {
        margin-top: 40px !important;
    }

    section.estrel-meetings {
        padding-top: 40px !important;
    }
}

@media (min-width: 768px) {
    :root {
        --container-padding: clamp(30px, 5vw, 80px);
    }
}

@media (min-width: 1440px) {
    :root {
        --container-padding: 80px;
    }
}
