/* Morlacchi demo: editorial boutique. Sand and cocoa-night fields, one saffron, Bodoni display over Jost. */

@font-face {
    font-family: "Bodoni Moda";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/frontend/fonts/bodoni-moda-roman-500.woff2") format("woff2");
}

@font-face {
    font-family: "Bodoni Moda";
    font-style: italic;
    font-weight: 500;
    font-display: swap;
    src: url("/assets/frontend/fonts/bodoni-moda-italic-500.woff2") format("woff2");
}

@font-face {
    font-family: "Jost";
    font-weight: 300;
    font-display: swap;
    src: url("/assets/frontend/fonts/jost-300.woff2") format("woff2");
}

@font-face {
    font-family: "Jost";
    font-weight: 400;
    font-display: swap;
    src: url("/assets/frontend/fonts/jost-400.woff2") format("woff2");
}

@font-face {
    font-family: "Jost";
    font-weight: 500;
    font-display: swap;
    src: url("/assets/frontend/fonts/jost-500.woff2") format("woff2");
}

:root {
    --sand: #e7ddce;
    --sand-deep: #dccfbc;
    --ink: #2a1a12;
    --ink-soft: #5b4638;
    --night: #17110d;
    --saffron: #e2a72b;
    --line: rgb(42 26 18 / 0.22);
    --line-night: rgb(231 221 206 / 0.22);
    --serif: "Bodoni Moda", "Bodoni 72", "Didot", "Times New Roman", serif;
    --sans: "Jost", "Futura", "Avenir Next", sans-serif;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
    --edge: max(var(--gutter), calc((100% - 96rem) / 2 + var(--gutter)));
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 7rem;
    scrollbar-color: var(--ink-soft) var(--sand);
    accent-color: var(--ink);
}

body {
    margin: 0;
    background: var(--sand);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    caret-color: var(--ink);
}

::selection {
    background: var(--saffron);
    color: var(--ink);
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-underline-offset: 0.3em;
    text-decoration-thickness: 1px;
}

:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.num {
    font-variant-numeric: tabular-nums;
}

.muted {
    color: var(--ink-soft);
}

/* Type: Bodoni for titles, Jost for text and tracked labels */

.h-page,
.h-section,
.hero__title,
.done__title {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.04;
    text-wrap: balance;
}

.h-page em,
.h-section em,
.hero__title em,
.done__title em {
    font-style: italic;
}

.h-page {
    font-size: clamp(2.6rem, 6vw, 4.8rem);
}

.h-section {
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    max-width: 18ch;
}

.h-block {
    margin-bottom: 1.2rem;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hint {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* Buttons and links */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.1rem;
    padding: 0.8rem 1.9rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    font: 500 0.78rem/1 var(--sans);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn--primary {
    background: var(--saffron);
}

.btn--primary:hover {
    background: var(--ink);
    color: var(--sand);
}

.btn--ghost {
    border-color: var(--ink);
}

.btn--ghost:hover {
    background: var(--ink);
    color: var(--sand);
}

.btn--block {
    width: 100%;
}

.btn:disabled {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-soft);
    cursor: not-allowed;
}

.link-quiet {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* Top strip and header */

.strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem 1.4rem;
    padding: 0.6rem var(--gutter);
    background: var(--night);
    color: var(--sand);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-align: center;
    text-transform: uppercase;
}

.strip :focus-visible {
    outline-color: var(--sand);
}

.strip__short {
    display: none;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
}

.site-header__bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem 2rem;
    max-width: 96rem;
    margin: 0 auto;
    padding: 0.9rem var(--gutter);
}

.site-header__brand img {
    width: 10rem;
    height: auto;
}

.site-header__nav {
    display: flex;
    justify-content: center;
    gap: clamp(1.2rem, 3vw, 2.8rem);
}

.site-header__nav a {
    padding: 0.4rem 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
}

.site-header__nav a:hover {
    text-decoration: underline;
}

/* Hero: sand text field beside a full-height photo */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: clamp(34rem, calc(100svh - 7rem), 52rem);
}

.hero__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(2.5rem, 6vw, 5rem) var(--edge);
}

.hero__title {
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    line-height: 1.1;
}

.hero__lead {
    max-width: 34ch;
    margin-top: 1.6rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    margin-top: 2.2rem;
}

.hero__media {
    position: relative;
    overflow: hidden;
}

.hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 58%;
}

@media (prefers-reduced-motion: no-preference) {
    .hero__media {
        animation: hero-open 1.5s var(--ease) backwards;
    }

    .hero__title,
    .hero__lead,
    .hero__actions {
        animation: rise 1s var(--ease) backwards;
    }

    .hero__lead {
        animation-delay: 0.15s;
    }

    .hero__actions {
        animation-delay: 0.3s;
    }
}

@keyframes hero-open {
    from {
        clip-path: inset(0 0 0 100%);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(1.2rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Slow scroll-linked drift, where the browser supports it */

@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .hero__media img {
            animation: drift-hero linear both;
            animation-timeline: scroll(root);
            animation-range: 0 90vh;
        }

        .band img {
            animation: drift-band linear both;
            animation-timeline: view();
        }
    }
}

@keyframes drift-hero {
    from {
        transform: scale(1.04) translateY(0);
    }

    to {
        transform: scale(1.12) translateY(5%);
    }
}

@keyframes drift-band {
    from {
        transform: scale(1.18) translateY(-7%);
    }

    to {
        transform: scale(1.18) translateY(7%);
    }
}

/* Ticker */

.ticker {
    overflow: hidden;
    background: var(--saffron);
    color: var(--ink);
}

.ticker__track {
    display: flex;
    width: max-content;
    animation: ticker 52s linear infinite;
}

.ticker:hover .ticker__track {
    animation-play-state: paused;
}

.ticker ul {
    display: flex;
    flex: none;
}

.ticker li {
    display: flex;
    align-items: center;
    padding: 1.1rem 0;
    font-family: var(--serif);
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-style: italic;
    white-space: nowrap;
}

.ticker li::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    margin: 0 clamp(1.6rem, 3vw, 3rem);
    background: var(--ink);
    transform: rotate(45deg);
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker__track {
        animation: none;
    }
}

/* Scroll reveals: visible unless the page script is running */

.js [data-reveal] {
    opacity: 0;
    transform: translateY(1.6rem);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--d, 0ms);
}

.js [data-reveal].in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Panettone on the night field */

.panettone {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
    padding: clamp(4rem, 9vw, 8rem) var(--edge);
    background: var(--night);
    color: var(--sand);
}

.panettone :focus-visible {
    outline-color: var(--sand);
}

.panettone__text p {
    max-width: 40ch;
    margin-top: 1.6rem;
    color: #d9cdbb;
}

.duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 2.4rem);
}

.duo__item a {
    display: block;
    text-decoration: none;
}

.duo__img {
    display: block;
    overflow: hidden;
    margin-bottom: 1.2rem;
}

.duo__img img {
    width: 100%;
    aspect-ratio: 394 / 556;
    object-fit: cover;
    transition: transform 1s var(--ease);
}

.duo__item a:hover .duo__img img {
    transform: scale(1.05);
}

.duo__item h3 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 500;
    line-height: 1.1;
}

.duo__item p {
    margin: 0.2rem 0 0.8rem;
    color: #d9cdbb;
}

.duo__item .link-quiet {
    text-decoration: underline;
}

/* How it works */

.how {
    padding: clamp(4rem, 9vw, 8rem) var(--edge);
}

.how__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(2rem, 5vw, 4rem);
    border-top: 1px solid var(--ink);
}

.how__steps li {
    padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 0 0;
}

.how__steps li + li {
    padding-left: clamp(1rem, 3vw, 2.4rem);
    border-left: 1px solid var(--line);
}

.how__n {
    display: block;
    font-family: var(--serif);
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-style: italic;
    line-height: 1;
}

.how__steps h3 {
    margin: 0.6rem 0 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.how__steps p {
    max-width: 30ch;
    color: var(--ink-soft);
}

/* Shelf that scrolls sideways */

.specialita {
    padding: clamp(4rem, 9vw, 8rem) 0;
    background: var(--sand-deep);
}

.specialita__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 var(--edge);
}

.rail-ctl {
    display: flex;
    gap: 0.6rem;
}

.rail-ctl__btn {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.rail-ctl__btn:hover {
    background: var(--ink);
    color: var(--sand);
}

.rail {
    display: flex;
    gap: clamp(1rem, 2vw, 1.6rem);
    margin-top: clamp(2rem, 4vw, 3rem);
    padding: 0 var(--edge);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--edge);
    scrollbar-width: none;
}

.rail::-webkit-scrollbar {
    display: none;
}

.rail__item {
    flex: none;
    width: min(74vw, 20rem);
    scroll-snap-align: start;
}

.rail__item a {
    display: block;
    text-decoration: none;
}

.rail__img {
    display: block;
    overflow: hidden;
    margin-bottom: 1rem;
}

.rail__img img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.9s var(--ease);
}

.rail__item a:hover .rail__img img {
    transform: scale(1.06);
}

.rail__item h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.2;
}

.rail__item p {
    margin-top: 0.15rem;
    color: var(--ink-soft);
}

.specialita__cta {
    margin-top: clamp(2rem, 4vw, 3rem);
    padding: 0 var(--edge);
}

/* Full-bleed chef band with parallax */

.band {
    position: relative;
    height: clamp(28rem, 82svh, 50rem);
    overflow: hidden;
    color: #f6efe4;
}

.band img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 62%;
}

.band::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgb(23 17 13 / 0.7), transparent 60%),
        linear-gradient(to top, rgb(23 17 13 / 0.92), rgb(23 17 13 / 0.55) 40%, transparent 75%);
}

.band__title {
    position: absolute;
    z-index: 1;
    left: var(--edge);
    bottom: clamp(1.8rem, 4vw, 3.4rem);
    max-width: 14ch;
    font-size: clamp(2.4rem, 5.6vw, 4.8rem);
}

/* Non solo panettone: pasticceria, ristorazione, aperitivi */

.casa {
    padding: clamp(4rem, 9vw, 8rem) var(--edge);
}

.row {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
    margin-top: clamp(3rem, 7vw, 6rem);
}

.row--flip {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.row--flip .row__pics {
    order: 2;
}

.row__pics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.8rem, 2vw, 1.4rem);
}

.row__pics img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.row__pics img:nth-child(2) {
    margin-top: clamp(2rem, 6vw, 5rem);
}

.h-row {
    font-family: var(--serif);
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.08;
}

.row__text p {
    max-width: 42ch;
    margin: 1.2rem 0 0;
}

.row__text .link-quiet {
    display: inline-block;
    margin-top: 1.6rem;
}

/* History */

.storia {
    padding: clamp(4rem, 9vw, 8rem) var(--edge);
    background: var(--sand-deep);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: clamp(2rem, 5vw, 4rem);
    border-top: 1px solid var(--ink);
}

.timeline li {
    padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 2.4rem 0;
}

.timeline li:not(:nth-child(3n + 1)) {
    padding-left: clamp(1rem, 3vw, 2.4rem);
    border-left: 1px solid var(--line);
}

.timeline__y {
    display: block;
    font-family: var(--serif);
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-style: italic;
    line-height: 1;
}

.timeline p {
    max-width: 30ch;
    margin-top: 0.8rem;
    color: var(--ink-soft);
}

/* Map in the contacts column, tinted to sit in the palette */

.map {
    margin-top: 2rem;
    background: var(--sand-deep);
}

.map iframe {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    filter: sepia(0.35) saturate(0.75) contrast(0.95);
}

/* Contacts: a short message form, address lives in the footer */

.contatti {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: start;
    padding: clamp(4rem, 9vw, 8rem) var(--edge);
}

.contatti__intro p {
    max-width: 38ch;
    margin: 1.6rem 0 1.4rem;
}

.contatti__card {
    padding: clamp(1.4rem, 3vw, 2.4rem);
    background: var(--sand-deep);
}

.msg__reasons {
    min-width: 0;
    margin: 0 0 0.4rem;
    padding: 0;
    border: 0;
}

.msg__reasons legend {
    float: left;
    width: 100%;
}

.msg__reasons legend + * {
    clear: both;
}

.reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reason {
    position: relative;
}

.reason input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.reason span {
    display: block;
    padding: 0.7rem 1.1rem;
    border: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.reason:hover span {
    border-color: var(--ink);
}

.reason input:checked + span {
    background: var(--night);
    border-color: var(--night);
    color: var(--sand);
}

.reason input:focus-visible + span {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.consent {
    display: flex;
    gap: 0.8rem;
    align-items: start;
    margin: 1.6rem 0;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.consent input {
    flex: none;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0.2rem 0 0;
}

.msg .hint {
    margin-top: 0.9rem;
}

.msg__done {
    padding: clamp(1rem, 3vw, 2rem) 0;
    text-align: center;
}

.msg__done .tick {
    color: var(--ink);
}

.msg__done .done__title {
    font-size: 2.2rem;
}

.msg__done p {
    margin: 0.8rem 0 1.4rem;
}

/* Footer */

.site-footer {
    padding: clamp(3rem, 6vw, 5rem) var(--gutter) 2.4rem;
    background: var(--night);
    color: #d9cdbb;
    font-size: 0.9rem;
}

.site-footer :focus-visible {
    outline-color: #d9cdbb;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 90rem;
    margin: 0 auto;
}

.site-footer__name {
    margin-bottom: 0.4rem;
    color: var(--sand);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.site-footer__legal {
    max-width: 90rem;
    margin: 2.4rem auto 0;
    font-size: 0.78rem;
    opacity: 0.75;
}

.site-footer__credit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    max-width: 90rem;
    margin: 2.4rem auto 0;
    padding-top: 2.4rem;
    border-top: 1px solid var(--line-night);
    font-size: 0.78rem;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.3s var(--ease);
}

.site-footer__credit:hover {
    opacity: 1;
}

.site-footer__credit img {
    height: 16px;
    width: auto;
}

/* Prenota */

.book {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 23rem;
    grid-template-areas: "head head" "form summary";
    gap: clamp(1.4rem, 3vw, 2.4rem) clamp(2rem, 5vw, 5rem);
    max-width: 90rem;
    margin: 0 auto;
    padding: clamp(1.8rem, 3.5vw, 3rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
}

.book__head {
    grid-area: head;
}

.book__head p {
    max-width: 48ch;
    margin-top: 1rem;
}

.steps {
    display: flex;
    gap: 2rem;
    margin: 1.4rem 0 0;
}

.steps__btn {
    padding: 0.5rem 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--ink-soft);
    font: 500 0.78rem/1 var(--sans);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
}

.steps__btn.is-current {
    border-bottom-color: var(--ink);
    color: var(--ink);
}

.steps__btn:disabled {
    cursor: default;
    opacity: 0.5;
}

.book__form {
    grid-area: form;
    min-width: 0;
}

.book__block {
    min-width: 0;
    margin: 0 0 3rem;
    padding: 0;
    border: 0;
}

.book__block legend {
    float: left;
    width: 100%;
}

.book__block legend + * {
    clear: both;
}

.cats {
    position: sticky;
    top: 4.3rem;
    z-index: 5;
    display: flex;
    gap: 0.5rem;
    padding: 0.8rem 0;
    overflow-x: auto;
    background: var(--sand);
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}

.cats::-webkit-scrollbar {
    display: none;
}

.cat {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font: 500 0.78rem/1 var(--sans);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    scroll-snap-align: start;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.cat:hover {
    border-color: var(--ink);
}

.cat.is-on {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--sand);
}

.cat__n {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.3rem;
    background: var(--saffron);
    color: var(--ink);
    font-size: 0.78rem;
    letter-spacing: 0;
}

/* Product tiles: the photo leads, the add button sits on it */

.items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 2rem 1.4rem;
    padding-top: 1.6rem;
}

.item__media {
    position: relative;
    overflow: hidden;
    margin-bottom: 0.8rem;
}

.item__media img,
.item__ph {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.item:hover .item__media img {
    transform: scale(1.05);
}

.item__ph {
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--sand-deep);
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.1;
    text-align: center;
}

.item__badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    display: grid;
    place-items: center;
    min-width: 1.8rem;
    height: 1.8rem;
    padding: 0 0.4rem;
    background: var(--saffron);
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 500;
    animation: pop 0.4s var(--ease);
}

.add {
    position: absolute;
    right: 0.6rem;
    bottom: 0.6rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: var(--saffron);
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.35s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.add:hover {
    background: var(--ink);
    color: var(--sand);
    transform: scale(1.08);
}

.stepper {
    position: absolute;
    left: 0.6rem;
    right: 0.6rem;
    bottom: 0.6rem;
    display: grid;
    grid-template-columns: 2.75rem 1fr 2.75rem;
    align-items: center;
    height: 2.75rem;
    background: var(--night);
    color: var(--sand);
    animation: pop 0.35s var(--ease);
}

.stepper__btn {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.stepper__btn:hover:not(:disabled) {
    background: var(--saffron);
    color: var(--ink);
}

.stepper__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.stepper__qty {
    text-align: center;
    font-weight: 500;
}

.item h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.2;
}

.item__detail {
    margin-top: 0.1rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
    line-height: 1.4;
}

.item__price {
    margin-top: 0.3rem;
    font-size: 0.9rem;
}

.back {
    margin-top: 0.4rem;
    padding: 0.6rem 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: var(--sans);
    cursor: pointer;
}

/* Pickup day: big date tiles and two slot tiles */

.days,
.slots {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.days {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.day,
.slot {
    position: relative;
    display: block;
}

.day input,
.slot input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.day__box,
.slot__box {
    display: grid;
    justify-items: center;
    padding: 1.1rem 0.4rem;
    border: 1px solid var(--line);
    text-align: center;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.35s var(--ease);
}

.day__w,
.day__m {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.day__m {
    color: var(--ink-soft);
}

.day__n {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.slot__box {
    grid-auto-flow: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem 0.6rem;
}

.slot__box svg {
    flex: none;
    display: block;
}

.slot__name {
    font-family: var(--serif);
    font-size: 1.35rem;
}

.day:hover .day__box,
.slot:hover .slot__box {
    border-color: var(--ink);
}

.day input:checked + .day__box,
.slot input:checked + .slot__box {
    background: var(--night);
    border-color: var(--night);
    color: var(--sand);
}

.day input:checked + .day__box .day__n {
    color: var(--saffron);
}

.day input:checked + .day__box .day__m {
    color: #d9cdbb;
}

.day input:focus-visible + .day__box,
.slot input:focus-visible + .slot__box {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

.field {
    display: block;
    margin-top: 1.4rem;
}

.field span {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.field input,
.field textarea {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.7rem 0;
    border: 0;
    border-bottom: 1px solid var(--ink-soft);
    border-radius: 0;
    background: transparent;
    color: var(--ink);
    font: 400 1rem/1.5 var(--sans);
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: 0;
    border-bottom-color: var(--ink);
    box-shadow: 0 1px 0 var(--ink);
}

/* The booking summary is a pickup ticket */

.summary {
    --pad: 1.8rem;
    grid-area: summary;
    align-self: start;
    position: sticky;
    top: 5.5rem;
    padding: var(--pad);
    background: var(--night);
    color: var(--sand);
}

.summary :focus-visible {
    outline-color: var(--sand);
}

.summary .btn--primary:hover {
    background: var(--sand);
    color: var(--ink);
}

.summary .btn:disabled {
    border-color: var(--line-night);
    color: rgb(231 221 206 / 0.55);
}

.summary .btn--ghost {
    border-color: var(--sand);
    color: var(--sand);
}

.summary .btn--ghost:hover {
    background: var(--sand);
    color: var(--ink);
}

.summary__lines li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--line-night);
    animation: line-in 0.5s var(--ease) backwards;
}

.summary__lines li span:last-child {
    flex: none;
    text-align: right;
    color: #d9cdbb;
}

.summary__empty {
    padding: 0.6rem 0;
    border-top: 1px solid var(--line-night);
    color: #d9cdbb;
}

.summary__meta {
    position: relative;
    margin: 1rem 0 1.2rem;
    border-top: 2px dashed var(--line-night);
}

.summary__meta::before,
.summary__meta::after {
    content: "";
    position: absolute;
    top: -0.9rem;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--sand);
}

.summary__meta::before {
    left: calc(var(--pad) * -1 - 0.8rem);
}

.summary__meta::after {
    right: calc(var(--pad) * -1 - 0.8rem);
}

.summary__meta div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
}

.summary__meta dt {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.summary__meta dd {
    text-align: right;
}

.summary__total {
    font-family: var(--serif);
    font-size: 1.7rem;
    line-height: 1.1;
}

.summary__total.bump {
    animation: bump 0.5s var(--ease);
}

.summary__note {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #d9cdbb;
}

.summary .hint {
    margin: 0.9rem 0 0;
    color: #d9cdbb;
}

/* Confirmation */

.summary__done {
    text-align: center;
}

.tick {
    margin: 0 auto 0.6rem;
    color: var(--saffron);
}

.tick__path {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: draw 0.7s var(--ease) 0.2s forwards;
}

.done__title {
    font-size: 2.2rem;
}

.done__who {
    margin: 0.6rem 0 1.2rem;
    color: #d9cdbb;
}

.done__when {
    display: grid;
    justify-items: center;
    padding: 1rem 0;
    border-block: 2px dashed var(--line-night);
}

.done__w {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.done__n {
    font-family: var(--serif);
    font-size: 5rem;
    line-height: 1;
    color: var(--saffron);
}

.done__m {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.summary__done .summary__lines {
    margin: 1.2rem 0;
    text-align: left;
}

.done__code {
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.summary__done .hint {
    margin: 0 0 1.2rem;
}

[hidden] {
    display: none !important;
}

@keyframes line-in {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes bump {
    40% {
        transform: scale(1.12);
    }
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.book[data-step="3"] {
    grid-template-columns: minmax(0, 30rem);
    grid-template-areas: "head" "summary";
    justify-content: center;
}

.book[data-step="3"] .book__form,
.book[data-step="3"] .steps {
    display: none;
}

.btn--sm {
    min-height: 2.5rem;
    padding: 0.5rem 1.1rem;
}

/* Mobile booking dock: running total and the one primary action */

.dock {
    display: none;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hero__media {
        order: -1;
        height: clamp(15rem, 42svh, 24rem);
    }

    .hero__body {
        padding: 2rem var(--gutter) 2.6rem;
    }

    .panettone,
    .how__steps,
    .contatti,
    .row,
    .row--flip,
    .timeline,
    .site-footer__grid {
        grid-template-columns: 1fr;
    }

    .row--flip .row__pics {
        order: 0;
    }

    .timeline li,
    .timeline li:not(:nth-child(3n + 1)) {
        padding-left: 0;
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }

    .how__steps li + li {
        padding-left: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
        margin-top: 1.6rem;
    }

    .duo {
        max-width: 34rem;
    }

    .band__title {
        max-width: 16ch;
    }

    .book {
        grid-template-columns: 1fr;
        grid-template-areas: "head" "form" "summary";
        padding-bottom: 6rem;
    }

    .cats {
        top: 4rem;
    }

    .items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.6rem 1rem;
    }

    .summary {
        --pad: 1.4rem;
        position: static;
    }

    .summary__go {
        display: none;
    }

    /* Step 1 on small screens: the dock carries the total, no summary block */
    .book[data-step="1"] .summary {
        display: none;
    }

    .dock {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.8rem var(--gutter) calc(0.8rem + env(safe-area-inset-bottom));
        background: var(--night);
        color: var(--sand);
        font-size: 0.9rem;
        animation: rise 0.5s var(--ease) backwards;
    }

    .dock[hidden] {
        display: none;
    }

    .dock__sum {
        display: grid;
        min-width: 0;
        line-height: 1.2;
    }

    .dock__small {
        font-size: 0.78rem;
        letter-spacing: 0.04em;
        color: #d9cdbb;
    }

    .dock__total {
        overflow: hidden;
        font-family: var(--serif);
        font-size: 1.35rem;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dock .btn--sm {
        flex: none;
        min-height: 2.75rem;
        padding: 0.5rem 1.4rem;
        white-space: nowrap;
    }

    .dock .btn--primary:disabled {
        border-color: var(--line-night);
        color: rgb(231 221 206 / 0.6);
    }

    .dock :focus-visible {
        outline-color: var(--sand);
    }
}

@media (max-width: 760px) {
    .strip {
        flex-wrap: nowrap;
        gap: 0.8rem;
        padding: 0.5rem var(--gutter);
        letter-spacing: 0.1em;
    }

    .strip__long {
        display: none;
    }

    .strip__short {
        display: inline;
    }

    .site-header__bar {
        grid-template-columns: 1fr auto;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }

    .site-header__brand img {
        width: 8.5rem;
    }

    .site-header__nav {
        display: none;
    }

    .site-header__cta {
        min-height: 2.6rem;
        padding: 0.6rem 1.2rem;
    }

    .days {
        gap: 0.4rem;
    }

    .day__m {
        letter-spacing: 0.04em;
    }

    .slot__name {
        font-size: 1.15rem;
    }

    .done__n {
        font-size: 4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
