/* B · Il ricamo. I colori dei fili: prugna del velluto, magenta, salvia, salmone, sul cemento delle foto. */
[data-theme="al-ricamo"] {
  --bg: oklch(0.88 0.008 85);
  --surface: oklch(0.955 0.006 85);
  --ink: oklch(0.22 0.06 345);
  --ink-soft: oklch(0.40 0.05 345);
  --accent: oklch(0.50 0.19 355);
  --accent-ink: oklch(0.98 0.005 85);
  --border: oklch(0.76 0.012 345);
  --danger: oklch(0.50 0.19 355);
  --salvia: oklch(0.74 0.05 140);
  --salvia-chiaro: oklch(0.86 0.04 140);
  --salmone: oklch(0.79 0.10 40);
  --salmone-chiaro: oklch(0.87 0.06 40);
  --rosa-chiaro: oklch(0.88 0.045 0);
  --cd-btn-fill: var(--ink);
  --cd-btn-fill-ink: var(--bg);
  --font-display: "Gambarino", "Iowan Old Style", serif;
  --font-body: "Switzer", system-ui, sans-serif;
  --cd-display-weight: 400;
  --head-h: 64px;
  --gutter: 16px;
  --r: 14px;
}
@media (min-width: 768px) { [data-theme="al-ricamo"] { --gutter: 32px; } }
[data-theme="al-ricamo"] body { font-size: 17px; line-height: 1.55; }
[data-theme="al-ricamo"] a { color: inherit; text-underline-offset: 4px; }
[data-theme="al-ricamo"] h1, [data-theme="al-ricamo"] h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }

/* ── Testata ── */
.b-head { position: sticky; top: 0; z-index: 50; height: var(--head-h); box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 var(--gutter); background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.b-mark { font: 400 30px/1 var(--font-display); text-decoration: none; letter-spacing: -0.02em; }
.b-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.b-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; transition: background-color var(--dur-fast); }
@media (hover: hover) and (pointer: fine) { .b-nav a:hover { background: var(--surface); } }
.b-head__dx { display: flex; align-items: center; gap: 4px; }
.b-menu { position: relative; display: none; }
.b-menu summary { display: grid; place-items: center; width: 44px; height: 44px; list-style: none; cursor: pointer; }
.b-menu summary::-webkit-details-marker { display: none; }
.b-menu summary .cd-icon { width: 24px; height: 24px; }
.b-menu ul { position: absolute; right: 0; top: 48px; min-width: 220px; margin: 0; padding: 8px; list-style: none; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-float); }
.b-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; text-decoration: none; }
@media (max-width: 1023px) { .b-nav { display: none; } .b-menu { display: block; } }

/* ── Velluto contropelo: la luce segue il cursore ── */
.b-velluto { position: relative; display: block; overflow: hidden; border-radius: var(--r); isolation: isolate; }
.b-velluto img { width: 100%; height: 100%; object-fit: cover; transition: scale var(--dur-slow) var(--ease-out-expo), filter var(--dur-slow) var(--ease-out); }
.b-velluto::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(60% 50% at var(--lx, 50%) var(--ly, 40%), rgb(255 240 230 / 0.45), transparent 70%); mix-blend-mode: soft-light; transition: opacity var(--dur-slow) var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .b-velluto:hover::after { opacity: 1; }
  .b-velluto:hover img { scale: 1.025; filter: saturate(1.08) contrast(1.03); }
}

/* ── Il filo a punto catenella ── */
.b-capitoli { position: relative; }
.b-capitoli > .cd-bgshift { position: relative; z-index: 0; }
.b-capitoli > .cd-bgshift > section { position: relative; z-index: 1; }
.b-filo { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: visible; }
.b-filo__a { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 10 7; }
.b-filo__b { stroke: color-mix(in oklab, var(--accent) 30%, var(--bg)); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 6 11; stroke-dashoffset: -2; }
.b-punto-ancora { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 20%, transparent); }
@media (max-width: 767px) { .b-filo { display: none; } .b-punto-ancora { display: none; } }

/* ── Apertura ── */
.b-hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: end; min-height: calc(100svh - var(--head-h) - 48px); padding: 24px var(--gutter) 48px; box-sizing: border-box; }
.b-hero__testo { display: grid; gap: 24px; align-self: center; position: relative; z-index: 3; }
.b-hero h1 { margin: 0; font-size: clamp(48px, 5.4vw, 88px); line-height: 1.04; }
.b-hero__sub { margin: 0; max-width: 34ch; font-size: 19px; color: var(--ink-soft); }
.b-hero__azioni { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.b-hero__testo .b-punto-ancora { margin-top: 24px; }
.b-hero__foto { margin: 0; height: min(calc(100svh - var(--head-h) - 96px), 860px); aspect-ratio: 3 / 4; justify-self: end; }
.b-hero__foto2 { position: absolute; z-index: 1; margin: 0; width: clamp(140px, 14vw, 220px); aspect-ratio: 3 / 4; right: calc(var(--gutter) + min(calc(100svh - var(--head-h) - 96px), 860px) * 0.75 - 96px); bottom: 32px; rotate: -4deg; box-shadow: var(--shadow-float); }
@media (max-width: 900px) {
  .b-hero { grid-template-columns: 1fr; min-height: 0; padding-top: 16px; gap: 24px; }
  .b-hero h1 { font-size: clamp(42px, 12vw, 64px); }
  .b-hero__foto { height: auto; width: 100%; justify-self: stretch; }
  .b-hero__foto2 { display: none; }
}

/* ── Titoli di capitolo ── */
.b-cap { display: grid; gap: 8px; padding: 0 var(--gutter); max-width: 720px; }
.b-cap h2, .b-pisi h2, .b-pigiami h2, .b-parete h2, .b-showroom h2, .b-altri h2 { margin: 0; font-size: clamp(40px, 5.2vw, 80px); line-height: 1.02; }
.b-cap p { margin: 0; max-width: 52ch; color: var(--ink-soft); }
.b-cap--chiaro p { color: color-mix(in oklab, currentColor 82%, transparent); }

/* ── Ricamati: la galleria orizzontale ── */
.b-hs { padding: 48px 0; }
.b-hs .cd-hs__track { --cd-gutter: var(--gutter); }
.b-hs__item { margin: 0; width: clamp(240px, 26vw, 380px); }
.b-hs__item .b-velluto { aspect-ratio: 3 / 4; }
.b-hs__item figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 15px; }
.b-hs__item s { color: var(--ink-soft); margin-right: 4px; }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
    :is([data-motion="4"], [data-motion="5"]) .b-hs { padding: 0; }
    :is([data-motion="4"], [data-motion="5"]) .b-hs .cd-hs__stage { top: var(--head-h); height: calc(var(--cd-vh) - var(--head-h)); gap: 24px; }
    :is([data-motion="4"], [data-motion="5"]) .b-hs__item { width: auto; height: calc(var(--cd-vh) - var(--head-h) - 260px); }
    :is([data-motion="4"], [data-motion="5"]) .b-hs__item .b-velluto { height: 100%; width: auto; }
  }
}

/* ── PISI PISI ── */
.b-pisi { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 48px var(--gutter); }
.b-pisi__foto { margin: 0; aspect-ratio: 4 / 5; }
.b-pisi__testo { display: grid; gap: 16px; max-width: 560px; }
.b-pisi__testo > p { margin: 0; font-size: 19px; }
.b-righe { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid color-mix(in oklab, var(--ink) 25%, transparent); }
.b-righe a { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid color-mix(in oklab, var(--ink) 25%, transparent); text-decoration: none; min-height: 64px; }
.b-righe img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.b-righe__n { font: 400 22px/1.2 var(--font-display); }
.b-righe__p s { color: var(--ink-soft); margin-right: 4px; }
@media (hover: hover) and (pointer: fine) { .b-righe a:hover .b-righe__n { text-decoration: underline; text-decoration-thickness: 1px; } }
@media (max-width: 800px) { .b-pisi { grid-template-columns: 1fr; gap: 24px; } }

/* ── Pigiami: collage ── */
.b-pigiami { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 48px var(--gutter); }
.b-pigiami__testo { display: grid; gap: 16px; align-content: start; }
.b-pigiami__testo p { margin: 0; font-size: 19px; max-width: 36ch; }
.b-pigiami__foto { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(8, 64px); }
.b-pf1 { grid-column: 1 / 5; grid-row: 2 / 9; z-index: 1; }
.b-pf2 { grid-column: 4 / 10; grid-row: 1 / 7; rotate: 2deg; box-shadow: var(--shadow-float); z-index: 2; }
.b-pf3 { grid-column: 9 / 13; grid-row: 3 / 9; rotate: -2deg; z-index: 1; }
@media (max-width: 900px) {
  .b-pigiami { grid-template-columns: 1fr; gap: 24px; }
  .b-pigiami__foto { grid-template-rows: repeat(8, 48px); }
}

/* ── Borse e gioielli: bento ── */
.b-gioielli { padding: 48px var(--gutter); display: grid; gap: 32px; }
.b-gioielli .b-cap { padding: 0; }
.b-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 280px 280px; gap: 16px; margin: 0; padding: 0; list-style: none; }
.b-bento a { height: 100%; text-decoration: none; }
.b-bento__c1 { grid-column: 1 / 2; grid-row: 1 / 3; }
.b-bento__c2 { grid-column: 2 / 4; grid-row: 1 / 2; }
.b-bento__c3 { grid-column: 4 / 5; grid-row: 1 / 3; }
.b-bento__c4 { grid-column: 2 / 3; grid-row: 2 / 3; }
.b-bento__c5 { grid-column: 3 / 4; grid-row: 2 / 3; }
.b-bento__t { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; justify-content: space-between; gap: 8px; padding: 8px 16px; border-radius: 999px; background: color-mix(in oklab, var(--ink) 72%, transparent); color: var(--bg); font-size: 14px; backdrop-filter: blur(8px); }
@media (max-width: 900px) {
  .b-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto; }
  .b-bento > li { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 3 / 4; }
  .b-bento__c1 { grid-column: 1 / -1 !important; aspect-ratio: 4 / 5 !important; }
}

/* ── Casa ── */
.b-casa { padding: 48px 0; display: grid; gap: 32px; }
.b-casa__fila { display: grid; grid-template-columns: 1.2fr 1fr 0.9fr; gap: 24px; align-items: end; margin: 0; padding: 0 var(--gutter); list-style: none; }
.b-casa__fila .b-velluto { aspect-ratio: 3 / 4; }
.b-casa__fila p { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; }
.b-casa__fila p a { text-decoration: none; font-weight: 500; }
@media (max-width: 700px) { .b-casa__fila { grid-template-columns: 1fr 1fr; } .b-casa__fila li:first-child { grid-column: 1 / -1; } }

/* ── Visti addosso ── */
.b-parete { padding: 48px 0 0; background: var(--bg); }
.b-parete__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding: 0 var(--gutter) 24px; }
.b-parete__uso { margin: 0; padding: 8px 16px; border-radius: 999px; background: var(--surface); font-size: 14px; font-weight: 500; }
.b-wall { --wall-h: 70svh; padding: 0 var(--gutter); }
.b-wall.is-live { padding: 0; margin: 0 var(--gutter); }
.b-wall .cd-wall__item { border-radius: var(--r); }

/* ── Showroom ── */
.b-showroom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 48px var(--gutter); }
.b-showroom__storia { display: grid; gap: 16px; align-content: start; max-width: 56ch; }
.b-showroom__storia p { margin: 0; }
.b-showroom__ind { font-size: 19px; font-weight: 500; }
.b-showroom__modulo { padding: 32px; background: var(--surface); border-radius: var(--r); }
@media (max-width: 900px) { .b-showroom { grid-template-columns: 1fr; gap: 24px; } .b-showroom__modulo { padding: 24px 16px; } }

/* ── Piè di pagina ── */
.b-foot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; padding: 48px var(--gutter); background: var(--ink); color: var(--bg); }
.b-foot .b-foot__mark { grid-column: 1 / -1; margin: 0; font: 400 clamp(72px, 16vw, 220px)/0.9 var(--font-display); letter-spacing: -0.03em; color: var(--salmone); }
.b-foot h2 { margin: 0 0 8px; font-size: 24px; }
.b-foot p, .b-foot address { margin: 0; font-style: normal; font-size: 15px; color: color-mix(in oklab, var(--bg) 82%, var(--ink)); }
.b-foot a { color: var(--bg); }
.b-foot__nota { grid-column: 1 / -1; font-size: 13px !important; }
@media (max-width: 900px) { .b-foot { grid-template-columns: 1fr; } }

/* ── Scheda prodotto ── */
.b-scheda { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding: 16px var(--gutter) 48px; background: var(--tinta, var(--bg)); align-items: start; }
.b-scheda__foto { display: grid; gap: 16px; }
.b-scheda__main { margin: 0; aspect-ratio: 3 / 4; max-height: calc(100svh - var(--head-h) - 32px); }
.b-scheda__main img { view-transition-name: al-main; }
.b-scheda__mini { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.b-scheda__mini button { width: 72px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.b-scheda__mini button[aria-current="true"] { border-color: var(--ink); }
.b-scheda__mini img { aspect-ratio: 3 / 4; object-fit: cover; }
.b-scheda__info { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 16px; }
.b-briciole { font-size: 14px; color: var(--ink-soft); }
.b-scheda h1 { margin: 0; font-size: clamp(40px, 4.4vw, 64px); line-height: 1.02; }
.b-scheda__prezzo { margin: 0; font-size: 22px; }
.b-scheda__prezzo s { color: var(--ink-soft); margin-right: 8px; font-size: 18px; }
.b-scheda__breve { margin: 0 0 8px; font-size: 18px; }
.b-scheda__showroom { margin: 0; font-size: 15px; }
.b-scheda .cd-chip > span { background: color-mix(in oklab, var(--surface) 70%, transparent); }
@media (max-width: 900px) {
  .b-scheda { grid-template-columns: 1fr; gap: 24px; padding-inline: 0; }
  .b-scheda__main { border-radius: 0; max-height: none; }
  .b-scheda__mini { padding: 0 var(--gutter); }
  .b-scheda__info { position: static; padding: 0 var(--gutter); }
}
.b-altri { padding: 48px var(--gutter); }
.b-altri h2 { margin-bottom: 24px; }
.b-altri ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 0; padding: 0; list-style: none; }
.b-altri .b-velluto { aspect-ratio: 3 / 4; }
.b-altri p { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0 0; }
.b-altri p a { text-decoration: none; font-weight: 500; }
@media (max-width: 900px) { .b-altri ul { grid-template-columns: 1fr 1fr; gap: 16px; } }

/* ── Borsa ── */
[data-theme="al-ricamo"] .al-drawer { border-radius: var(--r) 0 0 var(--r); }
[data-theme="al-ricamo"] .al-drawer__head h2 { font-size: 32px; font-weight: 400; }

/* ── Il punto che corre alla borsa ── */
.b-punto { position: fixed; left: 0; top: 0; z-index: 100; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 25%, transparent); pointer-events: none; }

/* ── Cursore: la cruna dell'ago ── */
[data-theme="al-ricamo"] .cd-cursor { width: 14px; height: 30px; border: 0; border-radius: 0; mix-blend-mode: normal; transform-origin: 7px 1px; rotate: -28deg; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 30'%3E%3Cpath d='M7 1 L9 22 Q9 29 7 29 Q5 29 5 22 Z' fill='%232B1124'/%3E%3Cellipse cx='7' cy='24' rx='1' ry='2.6' fill='%23F0A48C'/%3E%3C/svg%3E") no-repeat center / contain; translate: calc(var(--cx, -100px) - 7px) calc(var(--cy, -100px) - 1px); }
