:root {
    --text: #ffffff;
    --overlay: rgba(0, 0, 0, 0.32);
    --header-top: min(8vh, 48px);
    --wrapper-width: min(calc((100vw / 6) * 5), 1400px);
    --text-rail: calc((100vw / 6) * 2.25);
    --content-rail-width: min(var(--wrapper-width), calc(100% - 1rem));
    --sequence-image-scale: 1.5;
}

@font-face {
    font-family: "Ciutadella";
    src: url("../fonts/Ciutadella-Light.woff2") format("woff2"),
         url("../fonts/Ciutadella-Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ciutadella";
    src: url("../fonts/Ciutadella-Regular.woff2") format("woff2"),
         url("../fonts/Ciutadella-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Ciutadella";
    src: url("../fonts/Ciutadella-SemiBold.woff2") format("woff2"),
         url("../fonts/Ciutadella-SemiBold.woff") format("woff");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #000;
    color: var(--text);
    font-family: "Ciutadella", Arial, Helvetica, sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

html {
    max-height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(var(--wrapper-width), calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    top: var(--header-top);
    left: 0;
    width: 100%;
    z-index: 100;
    pointer-events: none;
}

.nav-wrap {
    position: relative;
    left: 50%;
    width: var(--content-rail-width);
    margin-left: calc(var(--content-rail-width) / -2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    pointer-events: auto;
}

.logo-palma {
    width: clamp(170px, 15vw, 250px);
    display: block;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.langs {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.langs a {
    opacity: 0.65;
}

.langs a.is-current {
    opacity: 1;
}

.site-nav {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.site-nav a {
    padding: 0.34rem 0.5rem 0.28rem;
    border-radius: 6px;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(0, 0, 0, 0.35);
    font-weight: 600;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.8);
    color: #000;
}

.menu-toggle {
    display: none;
    border: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.62rem;
}

.scene {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.scene-explosion {
    min-height: 190vh;
    position: relative;
}

.scene-sequence {
    min-height: 100vh;
    position: relative;
}

.scene-explosion .explosion-sticky {
    position: sticky;
    top: 0;
    min-height: 100vh;
    overflow: hidden;
}

.scene-sequence .sequence-sticky {
    position: sticky;
    top: 0;
    min-height: 100vh;
    overflow: hidden;
}

.scene-sequence > .wrapper {
    position: relative;
    margin: 0 auto;
    min-height: 100%;
}

.sequence-controller {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(1rem, 3vw, 3rem);
}

.sequence-copy {
    max-width: min(var(--text-rail), 42rem);
    justify-self: start;
}

.explosion-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 24%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(180deg, #090909 0%, #000000 100%);
    z-index: 0;
}

.sequence-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 22%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(180deg, #0d0d0d 0%, #000000 100%);
    z-index: 0;
}


.sequence-bg-cover {
    /*
    position: absolute;
    inset: 0;
    z-index: 0;
    */
    background:
        radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 22%, rgba(0, 0, 0, 0) 60%),
        linear-gradient(180deg, #0d0d0d 0%, #000000 100%);
    
}

.scene-bg,
.scene-bg img,
.scene-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.scene-bg {
    z-index: 0;
}

.scene-bg img {
    object-fit: cover;
    object-position: center;
}

.bg-fixed {
    clip-path: inset(0 0 0 0);
}

.bg-fixed .bg-image {
    position: fixed;
}

.scene-overlay {
    background: var(--overlay);
    z-index: 1;
}

.scene-content {
    position: relative;
    left: 50%;
    width: var(--content-rail-width);
    margin-left: calc(var(--content-rail-width) / -2);
    z-index: 2;
    padding-top: 7rem;
    padding-bottom: 4rem;
    max-width: none;
    text-align: left;
    align-items: flex-start;
}

.wrapper {
    width: min(var(--wrapper-width), calc(100% - 2rem));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.wrapper.max-33 > * {
    max-width: min(var(--text-rail), 42rem);
}

h1,
h2 {
    margin: 0 0 1rem;
    font-weight: 300;
    line-height: 1.15;
    text-wrap: balance;
    letter-spacing: 0.01em;
}

h1 {
    font-size: clamp(2rem, 4.2vw, 4.2rem);
}

h2 {
    font-size: clamp(1.7rem, 3.4vw, 3rem);
}

p {
    margin: 0 0 1rem;
    line-height: 1.12;
    font-size: clamp(0.98rem, 1.2vw, 1.08rem);
    max-width: 40ch;
}

.inline-link {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

.scene-buy .scene-content {
    max-width: 60ch;
}

.scene-buy .wrapper.max-33 > * {
    max-width: min(calc((100vw / 6) * 2.6), 48rem);
}

.explosion-stage {
    --explode-progress: 0;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(52vw, 760px);
    aspect-ratio: 16 / 9;
    z-index: 3;
    pointer-events: none;
}

.sequence-stage {
    position: relative;
    width: min(62vw, calc(760px * var(--sequence-image-scale)));
    justify-self: end;
    aspect-ratio: 16 / 9;
    z-index: 3;
    pointer-events: none;
}

.sequence-frame {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.35));
}

.sequence-canvas {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.35));
}

.explode-piece {
    position: absolute;
    inset: 0;
    transition: transform 0.08s linear;
    will-change: transform;
}

.explode-piece img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 20px 32px rgba(0, 0, 0, 0.35));
}

.piece-core {
    z-index: 5;
    transform:
        scale(calc(1 - (var(--explode-progress) * 0.08)));
}

.piece-ear-left {
    z-index: 4;
    clip-path: polygon(0% 16%, 31% 9%, 36% 84%, 0% 92%);
    transform:
        translateX(calc(var(--explode-progress) * -72%))
        rotate(calc(var(--explode-progress) * -8deg));
}

.piece-ear-right {
    z-index: 4;
    clip-path: polygon(68% 8%, 100% 15%, 100% 92%, 64% 84%);
    transform:
        translateX(calc(var(--explode-progress) * 72%))
        rotate(calc(var(--explode-progress) * 8deg));
}

.piece-band {
    z-index: 6;
    clip-path: polygon(27% 0%, 74% 0%, 68% 25%, 33% 25%);
    transform:
        translateY(calc(var(--explode-progress) * -48%))
        scale(calc(1 - (var(--explode-progress) * 0.04)));
}

.piece-chamber-left {
    z-index: 3;
    clip-path: polygon(22% 32%, 42% 30%, 40% 70%, 21% 72%);
    transform:
        translateX(calc(var(--explode-progress) * -36%))
        translateY(calc(var(--explode-progress) * 8%))
        rotate(calc(var(--explode-progress) * -4deg));
}

.piece-chamber-right {
    z-index: 3;
    clip-path: polygon(58% 30%, 79% 32%, 80% 72%, 60% 70%);
    transform:
        translateX(calc(var(--explode-progress) * 36%))
        translateY(calc(var(--explode-progress) * 8%))
        rotate(calc(var(--explode-progress) * 4deg));
}

.lead-form {
    margin-top: 1.2rem;
    display: grid;
    gap: 0.7rem;
    max-width: 560px;
}

.lead-form label {
    display: grid;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.lead-form input[type="text"],
.lead-form input[type="email"] {
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 1rem;
}

.lead-form button {
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.checkbox {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.85rem;
}

.site-footer {
    background: #000;
    padding: 1.4rem 0;
    scroll-snap-align: start;
}

.reviews,
.reviews-mobile {
    width: 240px;
    overflow: hidden;
    position: absolute;
    right: 1.5rem;
    bottom: 2.2rem;
    border-radius: 220px;
    background: #fff;
    display: block;
}

.reviews-mobile {
    display: none;
    width: min(95vw, 760px);
    border-radius: 0;
    right: 0;
    left: 0;
    margin-inline: auto;
}

.reviews-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.reviews-mobile .reviews-inner {
    aspect-ratio: 1024 / 173;
}

.review-image {
    position: absolute;
    inset: 0;
    left: 100%;
    transition: left 0.45s ease;
}

.review-image.active {
    left: 0;
}

.review-image.unactive {
    left: -100%;
}

.review-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.footer-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-wrap p {
    margin: 0;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-links img {
    width: 1rem;
    display: block;
}

@media (max-width: 1080px) {
    .site-nav {
        display: none;
        position: absolute;
        top: 2rem;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 0.55rem;
        border-radius: 10px;
        background: rgba(0, 0, 0, 0.78);
    }

    .site-nav.is-open {
        display: flex;
    }

    .menu-toggle {
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .site-header {
        top: 0.9rem;
    }

    .container {
        width: calc(100% - 1rem);
    }

    .nav-wrap {
        left: 0;
        width: 100%;
        margin-left: 0;
        padding-inline: 0.2rem;
    }

    .scene-content {
        left: 0;
        width: 100%;
        margin-left: 0;
    }

    .header-right {
        gap: 0.6rem;
    }

    .scene-content {
        max-width: 100%;
        padding-top: 8rem;
        padding-bottom: 2rem;
    }

    .sequence-controller {
        min-height: 100vh;
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }

    .wrapper.max-33 > * {
        max-width: 100%;
    }

    .scene-explosion {
        min-height: 175vh;
    }

    .scene-sequence {
        min-height: 100vh;
    }

    .explosion-stage {
        left: 50%;
        top: 58%;
        width: min(92vw, 640px);
        transform: translate(-50%, -50%);
    }

    .sequence-stage {
        width: min(94vw, calc(760px * var(--sequence-image-scale)));
        justify-self: center;
    }

    p {
        max-width: 100%;
        font-size: 0.92rem;
        line-height: 1.15;
    }

    .reviews {
        display: none;
    }

    .reviews-mobile {
        display: block;
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
    }

    .bg-fixed .bg-image {
        position: fixed;
    }

    .footer-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

