/* Vetrina: le bolle stanno ferme, i testi ci scorrono sopra. */

:root {
    --ink: #3c2618;
    --muted: #6d5646;
    --red: #c4392a;
    --cream: #f7f1e6;
    --cream-deep: #efe2cf;
    --glow: #fffaf3;
    --bubble-rim: rgba(92, 58, 32, 0.55);
    --bubble-shine: rgba(255, 255, 255, 0.98);
    --bubble-fill: rgba(255, 252, 245, 0.72);
    --cta-ink: #fffaf3;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    min-height: 100dvh;
    background: var(--cream);
    color: var(--ink);
    font-family: "Albert Sans", "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 72% 52% at 50% 38%, var(--glow) 0%, var(--cream) 58%, var(--cream-deep) 100%);
}

a {
    color: inherit;
}

.skip {
    position: absolute;
    left: 0.75rem;
    top: 0.75rem;
    z-index: 5;
    padding: 0.4rem 0.7rem;
    background: var(--ink);
    color: var(--cream);
    transform: translateY(-150%);
}

.skip:focus {
    transform: none;
}

.langs {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0;
    padding: 1rem 1.15rem;
}

.langs-split {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1;
}

.langs-social {
    display: inline-flex;
    color: var(--muted);
}

.langs-social:hover,
.more:hover {
    color: var(--ink);
}

.langs a {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
}

.langs a[aria-current="page"] {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.langs a:focus-visible,
.cta:focus-visible,
.fine a:focus-visible,
.fine .measure-open:focus-visible,
.measure button:focus-visible,
.more:focus-visible,
.pip:focus-visible,
.impressum summary:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.bubbles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bubbles span {
    position: absolute;
    bottom: -12%;
    left: var(--x);
    width: var(--size);
    height: var(--size);
    border: 1.5px solid var(--bubble-rim);
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, var(--bubble-shine) 0%, transparent 34%),
        radial-gradient(circle at 70% 78%, rgba(230, 162, 26, 0.35), transparent 62%),
        var(--bubble-fill);
    box-shadow:
        inset -3px -5px 8px rgba(60, 38, 24, 0.1),
        0 0 14px rgba(255, 244, 220, 0.35);
    animation: bubble-rise var(--dur) linear infinite;
    animation-delay: var(--delay);
    will-change: transform, opacity;
}

main,
footer {
    position: relative;
    z-index: 1;
}

.hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: calc(100dvh - 12rem);
}

.more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-top: 1.85rem;
    border: 1px solid color-mix(in srgb, var(--ink) 28%, transparent);
    border-radius: 999px;
    color: var(--ink);
    background: color-mix(in srgb, var(--cream) 70%, transparent);
    animation: more-bob 1.8s ease-in-out infinite;
}

.more svg {
    width: 1.6rem;
    height: 1.6rem;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: min(100%, 34rem);
    padding: 4.5rem 1.5rem 3.5rem;
}

.logo {
    width: min(38vw, 168px);
    height: auto;
    filter: drop-shadow(0 18px 22px rgba(60, 38, 24, 0.16));
}

h1 {
    margin: 1.15rem 0 0;
    font-family: "Bakbak One", Georgia, serif;
    font-size: clamp(2.5rem, 9vw, 3.4rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1;
}

.lead {
    margin: 0.9rem 0 0;
    max-width: 26rem;
    color: var(--muted);
    font-size: 1.15rem;
    line-height: 1.45;
}

.cta {
    display: inline-block;
    margin-top: 1.6rem;
    padding: 0.85rem 1.45rem;
    border-radius: 999px;
    background: var(--red);
    color: var(--cta-ink);
    font-weight: 600;
    text-decoration: none;
}

.cta:hover {
    filter: brightness(1.06);
}

.story {
    display: grid;
    grid-template-columns: 1fr;
}

.steps,
.pin {
    grid-column: 1;
    grid-row: 1;
}

.pin {
    z-index: 2;
    pointer-events: none;
}

.pin-sticky {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 62dvh;
    padding-top: 3.1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    min-height: 100dvh;
    padding: 66dvh 1.35rem 16vh;
}

.step-copy {
    transform: translate3d(0, calc(var(--shift, 0) * 28px), 0);
    opacity: calc(1 - max(var(--shift, 0), calc(var(--shift, 0) * -1)) * 0.62);
}

.step h2 {
    margin: 0;
    font-family: "Bakbak One", Georgia, serif;
    font-size: clamp(2rem, 8vw, 2.6rem);
    font-weight: 400;
}

.step p {
    margin: 0.45rem 0 0;
    max-width: 22rem;
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.45;
}

.phone {
    width: min(13.6rem, 58vw);
    padding: 0.45rem;
    border-radius: 1.7rem;
    background: #1c140e;
    box-shadow: 0 22px 46px rgba(60, 38, 24, 0.28);
}

.phone-screens {
    position: relative;
    overflow: hidden;
    border-radius: 1.35rem;
    background: #efe6d6;
}

.screen {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transform: scale(1.045);
    transition: opacity 0.7s ease, transform 0.95s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.screen:first-child {
    position: relative;
}

.screen.is-on {
    opacity: 1;
    transform: none;
    z-index: 1;
}

.pips {
    position: relative;
    display: grid;
    grid-template-columns: repeat(var(--n), minmax(0, 1fr));
    width: min(19rem, 94vw);
    margin-top: 0.7rem;
    pointer-events: auto;
}

.pip {
    margin: 0;
    padding: 0.35rem 0.1rem 0.65rem;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 0.62rem;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
}

.pip[aria-current="true"] {
    color: var(--ink);
}

.pips-bar {
    position: absolute;
    left: 0;
    bottom: 0.15rem;
    width: calc(100% / var(--n));
    height: 2px;
    border-radius: 2px;
    background: var(--red);
    transform: translateX(calc(var(--i) * 100%));
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.guide article,
.guide h2,
.guide p,
.faq dt,
.faq dd {
    scroll-margin-top: 3.4rem;
}

.guide {
    max-width: 40rem;
    margin: 0 auto;
    padding: 2.6rem 1.35rem 2rem;
}

.guide h2 {
    margin: 1.45rem 0 0;
    font-family: "Bakbak One", Georgia, serif;
    font-size: clamp(1.4rem, 4vw, 1.7rem);
    font-weight: 400;
    line-height: 1.15;
}

.guide article:first-child h2 {
    margin-top: 0;
}

.guide p,
.guide dd {
    margin: 0.4rem 0 0;
    font-size: 0.98rem;
    line-height: 1.5;
}

.guide dd {
    margin-top: 0.35rem;
    color: var(--muted);
}

.faq {
    margin: 0.2rem 0 0;
}

.faq dt {
    margin-top: 0.9rem;
    font-weight: 600;
}

.guide-end {
    margin: 2.2rem 0 0;
    text-align: center;
}

.guide-end .cta {
    margin-top: 0;
}

footer {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1.25rem 1.75rem;
    color: var(--muted);
    font-size: 0.75rem;
    text-align: center;
}

.social {
    display: flex;
    justify-content: center;
    gap: 0.85rem;
    margin: 0 0 0.7rem;
}

.social a {
    display: inline-flex;
    color: var(--muted);
}

.langs svg,
.social svg,
.more svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.langs svg,
.social svg {
    width: 1.15rem;
    height: 1.15rem;
}

.social a:hover {
    color: var(--ink);
}

.fine {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.9rem;
    margin: 0;
}

.fine a {
    color: var(--muted);
    text-decoration: none;
}

.fine a:hover,
.langs a:hover,
.impressum summary:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.impressum {
    margin-top: 0.35rem;
}

.impressum summary {
    display: inline;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
}

.impressum summary::-webkit-details-marker {
    display: none;
}

.impressum p {
    max-width: 28rem;
    margin: 0.4rem auto 0;
    line-height: 1.45;
}

.fine .measure-open {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: inherit;
    cursor: pointer;
}

.fine .measure-open:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

body.measure-on {
    padding-bottom: 8rem;
}

.measure {
    position: fixed;
    z-index: 6;
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    display: grid;
    gap: 0.75rem;
    max-width: 36rem;
    margin-left: auto;
    padding: 0.9rem 1rem;
    border-radius: 0.5rem;
    background: var(--cream);
    color: var(--ink);
    box-shadow: 0 12px 40px rgba(60, 38, 24, 0.16);
}

.measure[hidden] {
    display: none;
}

.measure p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.measure a {
    text-underline-offset: 0.15em;
}

.measure-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.measure-yes,
.measure-no {
    font: inherit;
    cursor: pointer;
}

.measure-yes {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    background: var(--red);
    color: var(--cta-ink);
    font-weight: 600;
}

.measure-no {
    border: 0;
    background: none;
    color: var(--ink);
    padding: 0.55rem 0.7rem;
}

@media (min-width: 900px) {
    .hero {
        min-height: calc(100dvh - 4.5rem);
    }

    .story {
        grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 28rem);
        max-width: 72rem;
        margin: 0 auto;
        padding-right: 1.5rem;
    }

    .steps {
        grid-column: 1;
    }

    .pin {
        grid-column: 2;
    }

    .pin-sticky {
        justify-content: center;
        height: 100dvh;
        padding-top: 0;
    }

    .step {
        align-items: center;
        padding: 0 2.5rem 0 2rem;
    }

    .step h2 {
        font-size: clamp(2.4rem, 4vw, 3.3rem);
    }

    .step p {
        max-width: 28rem;
        font-size: 1.2rem;
    }

    .phone {
        width: min(17.25rem, 34vw);
        padding: 0.55rem;
        border-radius: 2rem;
    }

    .phone-screens {
        border-radius: 1.55rem;
    }

    .pips {
        width: min(19rem, 36vw);
    }

    .pip {
        font-size: 0.68rem;
    }

    .guide {
        max-width: 68rem;
        padding: 3rem 2rem 2.15rem;
    }

    .guide-topics,
    .faq {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 2.75rem;
    }

    .guide-topics {
        row-gap: 0.15rem;
    }

    .guide-topics h2 {
        margin-top: 1.1rem;
    }

    .guide-topics article:nth-child(-n + 2) h2 {
        margin-top: 0;
    }

    .faq dt {
        margin-top: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bubbles span {
        bottom: auto;
        top: var(--rest);
        animation: none;
        opacity: 0.55;
    }

    .cta:hover {
        filter: none;
    }

    .screen,
    .pips-bar,
    .step-copy,
    .more {
        transition: none;
    }

    .more {
        animation: none;
    }

    .step-copy {
        transform: none;
        opacity: 1;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f6efe4;
        --muted: #d7c4b0;
        --red: #f0a23a;
        --cream: #24180f;
        --cream-deep: #140e09;
        --glow: #3a2a1c;
        --bubble-rim: rgba(255, 244, 224, 0.9);
        --bubble-shine: rgba(255, 255, 255, 1);
        --bubble-fill: rgba(255, 236, 206, 0.38);
        --cta-ink: #24180f;
    }

    .logo {
        filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.45));
    }

    .phone {
        box-shadow: 0 22px 46px rgba(0, 0, 0, 0.45);
    }

    .phone-screens {
        background: #1a140f;
    }

    .skip {
        background: var(--cream);
        color: #24180f;
    }
}

@keyframes more-bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

@keyframes bubble-rise {
    0% {
        transform: translate3d(0, 8vh, 0) scale(0.55);
        opacity: 0;
    }

    12% {
        opacity: 0.95;
    }

    45% {
        transform: translate3d(var(--drift), -48vh, 0) scale(0.9);
        opacity: 0.8;
    }

    78% {
        opacity: 0.6;
    }

    100% {
        transform: translate3d(calc(var(--drift) * -0.6), -112vh, 0) scale(1.12);
        opacity: 0;
    }
}
