@import './variables.css';

/* ---------------------------------- */
/*   BLOCK SETTINGS                   */
/* ---------------------------------- */

.gap-row {
    row-gap: 40px;
}

.is-hidden-frontend {
    display: none;
}

.is-hidden-editor {
    opacity: 0.5;
    filter: brightness(50%);
    border: 3px dashed red;
}

/* ---------------------------------- */
/*   BACKGROUND COLORS                */
/* ---------------------------------- */


/** LIGHT **/

.bg-light {
    --bg-color: var(--color-marigold-light);
    --content-color: var(--color-coffee);
    --accent-color: var(--color-marigold);
}

/** MARIGOLD **/

.bg-marigold {
    --bg-color: var(--color-marigold);
    --content-color: var(--color-beet);
    --accent-color: var(--color-marigold);
}

.content-marigold {
    --content-color: var(--color-marigold);
    --accent-color: var(--color-beet);
}

/** CARROT **/

.bg-carrot {
    --bg-color: var(--color-carrot);
    --content-color: var(--color-white);
    --accent-color: var(--color-ash);
}

.content-carrot {
    --content-color: var(--color-carrot);
    --accent-color: var(--color-white);
}

/** BEET **/

.bg-beet {
    --bg-color: var(--color-beet);
    --content-color: var(--color-marigold);
    --accent-color: var(--color-beet);
}

.content-beet {
    --content-color: var(--color-beet);
    --accent-color: var(--color-marigold);
}


/** COFFEE **/

.bg-coffee {
    --bg-color: var(--color-coffee);
    --content-color: var(--color-marigold);
    --accent-color: var(--color-beet);
}

.content-coffee {
    --content-color: var(--color-coffee);
    --accent-color: var(--color-marigold);
}

/** ASH **/

.bg-ash {
    --bg-color: var(--color-ash);
    --content-color: var(--color-carrot);
    --accent-color: white;
}

.content-ash {
    --content-color: var(--color-ash);
    --accent-color: var(--color-carrot);
}

/** SEA SALT **/

.bg-seasalt {
    --bg-color: var(--color-seasalt);
    --content-color: var(--color-beet);
    --accent-color: var(--color-marigold);
}

.content-seasalt {
    --content-color: var(--color-seasalt);
    --accent-color: var(--color-beet);
}

/*** GENERAL ***/

body [class^="bg-"],
body [class*=" bg-"] {
    background-color: var(--bg-color) !important;
    color: var(--content-color);
}

a,
p,
span,
h1,
h2,
h3,
h4,
h5,
h6,
li,
div {
    color: var(--content-color);
}


a,
p,
span,
li,
div {
    font-family: var(--font);
}


h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
}



/* ---------------------------------- */
/*   GENERAL.                         */
/* ---------------------------------- */

body {
    font-family: var(--font);
}

.content-block {
    padding: 140px 0px;
    background-repeat: no-repeat;
    background-size: cover;
}

@media screen and (max-width: 768px) {
    .content-block {
        padding: 56px 0px;
    }
}

a.btn {
    font-size: var(--font-body);
    padding: 12px 32px;
    color: var(--content-color);
    border: 2px solid var(--content-color);
    margin: 0;
    border-radius: 0;
    font-family: var(--font-display);
    font-weight: 500;
    text-align: center;
    text-decoration: none;

    /* Smooth, unified transition */
    transition:
        background-size 0.4s ease,
        color 0.4s ease,
        border-color 0.4s ease;

    /* Two background layers that expand from sides */
    background:
        linear-gradient(var(--content-color), var(--content-color)) left center / 0% 100% no-repeat,
        linear-gradient(var(--content-color), var(--content-color)) right center / 0% 100% no-repeat;

    /* Extend right fill slightly past boundary */
    background-position: left center, calc(100% + 1px) center;

    /* Helps prevent subpixel flicker on Safari */
    backface-visibility: hidden;
    transform: translateZ(0);
}

a.btn:hover,
a.btn:focus-visible {
    /* Slight overfill to avoid seam between halves */
    background-size: 51% 101%, 51% 101%;

    /* Keep colors in sync */
    border-color: var(--content-color);
    color: var(--accent-color);
}



/* ---------------------------------- */
/*   REPEATED                         */
/* ---------------------------------- */



h2.area-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--font-h3) !important;
    text-transform: uppercase;
    display: flex;
    grid-gap: 10px;
    margin-bottom: 8px;
}

h2.area-title::before {
    content: "";
    display: block;
    width: 10px;
    background-color: var(--content-color);
}

.content-block p.area-heading {
    font-size: var(--font-h1-large);
    font-family: var(--font-display);
}

.content-block p {
    font-size: var(--font-body);
}


/* ---------------------------------- */
/*   HERO                             */
/* ---------------------------------- */

section.hero {
    min-height: 90vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


section.hero.image-hero {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 4rem;
}

section.hero.image-hero .book-btn {
    margin-bottom: 60px;
}

.cta-btn {
    padding-inline: 0.75rem;
    min-width: 12rem;
}

@media screen and (max-width: 480px) {
    .cta-btn {
        width: 100%;
    }
}





section.hero.image-hero h1 {
    position: absolute;
    font-size: var(--font-large);
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    width: 100%;
    left: 0;
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
}



section.hero.animated-hero {
    display: flex;
    justify-content: center;
    flex-direction: column;
    row-gap: 4rem;
    padding: 4rem;
    position: relative
}

section.hero.animated-hero .esse-logo {
    margin-bottom: 90px;
    margin-top: 130px;
}

section.hero.animated-hero .hero-content {
    position: relative;
    z-index: 1;
    left: 0;
    flex-wrap: wrap;
    width: 100%;
}


@media screen and (max-width: 768px) {
    section.hero.animated-hero {
        padding: 1.5rem;
    }

    section.hero.animated-hero .hero-content {
        justify-content: center;
        text-align: center;
    }
}


section.hero.animated-hero .reflection {
    position: absolute;
    inset: 0;
    /* z-index: -1; */
    display: flex;
    width: 100%;
    height: 100%;
}




.reflection__cont--right {
    transform: scaleX(-1);
    margin-left: -1px;
}

.reflection__cont {
    flex: 1;
    overflow: hidden;
}

.reflection__cont__img {
    display: block;
    width: 200%;
    height: 100% !important;
    object-fit: cover;
    transform-origin: 60% 60%;
    filter: brightness(50%) contrast(1.5);
    animation: kaleidoscope 3s forwards;
}

.hero .hero-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    width: 100%;
    gap: 4rem;
}

.hero-content div {
    color: var(--content-color);
    font-family: var(--font-display);
}

.book-btn {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 2;
    gap: 1rem;
}



/* ---------------------------------- */
/*   TEXT CONTENT                     */
/* ---------------------------------- */


.text-content {
    font-size: var(--font-h2);
    text-align: center;
}

.text-content p {
    font-size: var(--content-color);
    font-family: var(--font-display);

}


/* ---------------------------------- */
/*   RICH TEXT                        */
/* ---------------------------------- */

.rich-text-content h2 {
    font-weight: 600;
    line-height: 125%;
}

.rich-text-content h3 {
    font-weight: 500;
    font-size: 20px;
    line-height: 175%;
}

.rich-text-content p, .rich-text-content li{
    font-family: var(--font-display);
    font-size: var(--font-body);
    line-height: 175%;
}

.rich-text-content p strong {
    font-weight: 600;
}

/* ---------------------------------- */
/*   FOOD MENU                        */
/* ---------------------------------- */

.block-food-menu .rich-text-content,
.block-food-menu .button-wrapper {
    width: fit-content;
    margin-inline: auto;
}

.block-food-menu .rich-text-content .menu-divider {
    font-weight: 900;
    opacity: 0.25;
    margin-inline: 0.25rem;
}

.block-food-menu .button-wrapper {
    margin-top: 2rem;
}

/* ---------------------------------- */
/*   TEXT & IMAGE                     */
/* ---------------------------------- */

.text-wrapper {
    display: flex;
    flex-direction: column;
    row-gap: 32px;
}

.text-wrapper .description p {
    line-height: 32px;
}

.text-wrapper .heading-wrapper h2 {
    font-size: var(--font-h2);
}

.button-wrapper {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* .parallelogram-image {
    display: block;
    width: 100%;
    height: calc(100vh - 200px);
}

.parallelogram-image rect {
    fill: var(--content-color);
}

.parallelogram-image path {
    stroke: var(--content-color);
} */

/* ---------- Mirror Panels ---------- */
/* ---------- Reference Overlay (for debugging only) ---------- */
.reference {
    position: absolute;
    top: -22%;
    left: 17%;
    height: 144%;
    opacity: 0.5;
    pointer-events: none;
}

/* Mobile-first: small screens (stacked layout) */
.mirror-scene {
    width: 100%;
    margin-inline: auto;
    /* Centered */
    margin-bottom: 2rem;
    --scene-rotation: -62.5deg;
    --scene-active-tilt: 0;
    --mirror-transition: 1.8s;

    aspect-ratio: 8/5;
    position: relative;
    perspective: 45rem;
}

/* Mirror the rotation + alignment for right-aligned scenes */
.order-md-2 .mirror-scene {
    --scene-rotation: 62.5deg;
}

/* Desktop: side-by-side layout */
@media (min-width: 768px) {
    .mirror-scene {
        width: 85%;
        margin-block: 2rem;

        /* Larger multiplier for wider screens */
        --scene-active-tilt: 0.25;
    }

    /* Left-aligned mirrors (default) */
    .mirror-scene {
        margin-right: auto;
        /* Push left */
        margin-left: 0;
    }

    /* Right-aligned mirrors */
    .order-md-2 .mirror-scene {
        margin-left: auto;
        /* Push right */
        margin-right: 0;
    }
}

/* Aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 1) {
    .mirror-scene {
        height: 0;
        padding-top: calc(100% * 5 / 8);
        perspective: calc(var(--scene-width) * 1.85);
    }

    .mirror-scene>.mirror-frame {
        position: absolute;
        inset: 0;
    }
}

/* ---------- Frame ---------- */
.mirror-frame {
    --black-tint: #00000040;
    --mirror-transition: 1.2s;
    --mirror-transition-delay: 0.4s;

    background-color: black;
    width: 100%;
    height: 100%;
    transform: rotateY(var(--scene-rotation));

    border-radius: 1px;
    outline: 2px solid var(--black-tint);
    /*  box-shadow: 0.5rem 0.5rem 1rem 0.25rem var(--black-tint); */

    overflow: hidden;
    background-clip: content-box;

    transition: transform var(--mirror-transition) ease var(--mirror-transition-delay);
    will-change: transform;
}

/* .order-md-2 .mirror-frame {
    box-shadow: -0.5rem 0.25rem 1rem 0.25rem var(--black-tint);
} */

/* ---------- Image ---------- */
.mirror-frame img {
    width: 100%;
    height: 100%;
    opacity: 0.8;

    object-fit: cover;
    display: block;

    /* Blends the anti-alias halo */
    outline: 1px solid rgba(0, 0, 0, 0.1);

    transition:
        opacity var(--mirror-transition) ease var(--mirror-transition-delay),
        transform var(--mirror-transition) ease var(--mirror-transition-delay);
}

/* ---------- Active state ---------- */
.mirror-frame.active {
    /* Rotate toward viewer — uses variable for intensity */
    transform: rotateY(calc(var(--scene-rotation) * var(--scene-active-tilt)));
}

/* Active image when scrolled into view */
.mirror-frame.active img {
    opacity: 1;
    transform: scale(1.05);
}



/* ---------------------------------- */
/*      ACCORDION                     */
/* ---------------------------------- */



.block-accordion .accordion {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.esse-accordion .accordion-button::after {
    display: none;
}

.block-accordion .accordion-item {
    border: 2px solid var(--content-color);
    border-left-width: 8px;
    border-radius: 0;
    background-color: transparent;
    padding: 0.75rem;
}



.block-accordion .accordion-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: transparent;
    box-shadow: none !important;
    padding: 0px;
}

.block-accordion .accordion-body {
    padding: 0px;
    margin-top: 32px;
}

/* Keep color on open/focus */
.esse-accordion__button:not(.collapsed),
.esse-accordion__button:focus {
    color: var(--esse-green);
    background: transparent;
}

/* Icon container on the far right */
.esse-accordion__button {
    position: relative;
}

/* --- Bigger + / - icon --- */
.esse-acc-icon {
    margin-left: auto;
    position: relative;
    width: 2rem;
    /* ⬅️ increase container width (~32px) */
    height: 2rem;
    /* same height for a square area */
    flex: 0 0 2rem;
    /* lock the size */
}

/* Draw the two bars */
.esse-acc-icon::before,
.esse-acc-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1.5rem;
    /* ⬅️ horizontal/vertical line length */
    height: 0.25rem;
    /* ⬅️ line thickness (like font-weight) */
    background: currentColor;
    transform-origin: center;
    transform: translate(-50%, -50%);
    transition: transform 200ms ease, opacity 200ms ease;
    will-change: transform, opacity;
}

/* Horizontal bar (always visible) */
.esse-acc-icon::after {}

/* Vertical bar (to make the +) */
.esse-acc-icon::before {
    transform: translate(-50%, -50%) rotate(90deg);
}

/* When OPEN → minus */
.esse-accordion__button:not(.collapsed) .esse-acc-icon::before {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg);
}



.esse-accordion__body p {
    font-size: 18px;
}

.esse-accordion__label {
    font-size: 20px;
    font-family: var(--font-display) !important;
    font-weight: 500;
}

.accordion-item:not(:first-of-type) {
    border-top: 2px solid !important;
    border-color: var(--content-color) !important;
}

.accordion-button:not(.collapsed) {
    background-color: transparent !important;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {

    .esse-acc-icon::before,
    .esse-acc-icon::after {
        transition: none;
    }
}



/* ---------------------------------- */
/*      IMAGE SLIDER                  */
/* ---------------------------------- */

.content-block.block-image-slider {
    padding: 0;
}

.slider-wrapper {
    position: relative;
    overflow: hidden;

    /* maximum height while preserving aspect ratio */
    max-height: 860px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Aspect ratio fallback (Safari) */
.slider-wrapper::before {
    content: "";
    display: block;
    padding-top: calc(100% * 5 / 8); /* 8/5 ratio */
}

/* Slider sits on top */
.slider-wrapper .slick-slider,
.slider-wrapper .slick-list {
    position: absolute;
    inset: 0;
    max-height: inherit;
}

/* IMPORTANT FIX — keep real height consistent */
.slider-wrapper .slick-slider,
.slider-wrapper .slick-list,
.slider-wrapper .slick-track,
.slick-slide,
.slick-slide img {
    height: 100% !important;
}

/* dots */
.slick-dots {
    display: flex;
    justify-content: center;
    gap: 22px;
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    position: absolute;
    bottom: 50px;
    width: 100%;
}

.slick-dots li button {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-marigold);
    border-radius: 50%;
    background: transparent;
    padding: 0;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
}

.slick-dots li.slick-active button {
    background-color: var(--color-marigold);
}

/* Let Slick handle slides as flex items */
.slick-track {
    display: flex !important;
}

/* Slide layout */
.slick-slide {
    display: flex !important;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Image crop from center */
.slick-slide img {
    width: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Disable aspect-ratio safari-hack inside Gutenberg editor */
.editor-styles-wrapper .slider-wrapper::before {
    content: none !important;
    padding-top: 0 !important;
    display: none !important;
}


/* ---------------------------------- */
/*      QUOTE                         */
/* ---------------------------------- */


.quote-wrapper p {
    font-size: var(--font-h1);
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    text-align: center;
    text-transform: uppercase;
}

/*Center background images if needed*/
/* .content-block.block-quote {
    background-size: cover;         
    background-position: center;    
    background-repeat: no-repeat;
} */


/* ---------------------------------- */
/*      MARQUEE                       */
/* ---------------------------------- */



/* ---- Mirror Marquee ---- */
.block-marquee {
    /* Tweakables */
    --size: clamp(40px, 9vw, 150px);
    /* responsive text size */
    --gap: 6vw;
    /* space between repeats */
    --weight: 900;
    --upper: uppercase;
    /* set to 'none' to keep case */
    --fade: 12%;
    /* side fade width */
    --mirror-opacity: .35;
    /* strength of the reflection */

    overflow: hidden;
    position: relative;
    padding-block: 2.5rem;
    background: transparent;
}

/* Side fades so the text can start slightly off-screen without harsh edges */
.block-marquee::before,
.block-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: max(60px, var(--fade));
    pointer-events: none;
    z-index: 1;
}

/* .block-marquee::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.block-marquee::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
} */

/* Rows */
.block-marquee .marquee__row {
    display: flex;
    align-items: center;
    line-height: .95;
    font-size: var(--size);
    font-weight: var(--weight);
    text-transform: var(--upper);
    white-space: nowrap;
    will-change: transform;
    gap: var(--gap);
    position: relative;
}

.block-marquee .marquee__row+.marquee__row {
    margin-top: 1.2rem;
}

.block-marquee .marquee__row--mirror {
    transform: scaleY(-1);
    opacity: var(--mirror-opacity);
}

/* Track holds the repeated copies */
.block-marquee .marquee__track {
    display: inline-flex;
    gap: var(--gap);
    will-change: transform;
}

.block-marquee .marquee__item {
    display: inline-block;
    padding-inline: 1vw;
    color: var(--content-color);
    font-family: var(--font-display);
    font-weight: 700;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .block-marquee .marquee__track {
        transform: none !important;
    }
}