@import url("type.css");

/* C&C Caminetti · restyling BDIGITAL 2026 — il fuoco protagonista */
:root {
  color-scheme: dark;
  --bg: #0d0a08;
  --bg-2: #14100d;
  --bg-3: #1c1511;
  --ink: #f7efe8;
  --soft: #cdbcae;
  --muted: #a8968a;
  --fire: #ff7a2f;
  --fire-2: #ffb24a;
  --ember: #d6461b;
  --copper: #eaa27c;
  --line: rgba(255, 236, 220, .12);
  --line-strong: rgba(255, 200, 160, .28);
  --grad-fire: linear-gradient(120deg, #ffc15a 0%, #ff8a32 45%, #e9521f 100%);
  --header-h: 5rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 82rem;
  --radius: 1rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.65; font-size: 1.0625rem; overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, h4 { margin: 0; }
h1, h2, h3 { line-height: 1.06; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.035em; }
h1 { font-size: clamp(3rem, 7.4vw, 6.6rem); }
h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
h3 { font-size: 1.3rem; letter-spacing: -.015em; }
h1 em, h2 em { font-style: italic; font-weight: 500; background: var(--grad-fire); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid #ffd089; outline-offset: 4px; border-radius: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--fire); color: #1a0d05; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip:focus { position: fixed; z-index: 50; top: .5rem; left: .5rem; padding: .6rem .9rem; background: var(--ink); color: var(--bg); }
.page-top { position: absolute; top: 0; width: 1px; height: 1px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.wrap.wide { width: min(100% - 2 * var(--gutter), 110rem); }
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.kicker { display: inline-flex; align-items: center; gap: .7rem; margin: 0 0 1.1rem; color: var(--fire-2); text-transform: uppercase; letter-spacing: .16em; font-weight: 700; font-size: .78rem; }
.kicker::before { content: ""; width: 1.8rem; height: 2px; background: var(--grad-fire); border-radius: 2px; }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--soft); max-width: 58ch; }
.subhead { margin: .9rem 0 0; color: var(--copper); font-family: var(--serif); font-style: italic; font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.35; }

/* Buttons & links */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.8rem; }
.button { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.1rem; padding: .8rem 1.5rem; border: 0; border-radius: 999px; background: var(--grad-fire); color: #1d0e05; font: inherit; font-size: .98rem; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 .6rem 2rem -0.8rem rgba(255, 110, 40, .75); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.button::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, #ffd98a, #ffa040 60%, #ff6a2b); opacity: 0; transition: opacity .35s var(--ease); }
.button:hover { transform: translateY(-2px); box-shadow: 0 1rem 2.6rem -0.6rem rgba(255, 110, 40, .9); }
.button:hover::after { opacity: 1; }
.button.secondary, .button.ghost { background: rgba(255, 255, 255, .04); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); backdrop-filter: blur(6px); }
.button.secondary::after, .button.ghost::after { background: rgba(255, 140, 60, .14); }
.button.secondary:hover, .button.ghost:hover { box-shadow: inset 0 0 0 1px var(--fire-2), 0 .8rem 2rem -1rem rgba(255, 110, 40, .6); }
.text-link { display: inline-flex; align-items: center; gap: .55rem; color: var(--fire-2); font-weight: 650; text-decoration: none; }
.text-link::after { content: "→"; transition: transform .3s var(--ease); }
.text-link:hover::after { transform: translateX(.35rem); }
.text-link:hover { text-decoration: underline; }

/* Header */
.top { position: fixed; inset: 0 0 auto; z-index: 30; transition: background-color .4s var(--ease), box-shadow .4s var(--ease), backdrop-filter .4s; }
.top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 6, 5, .75), rgba(8, 6, 5, 0)); transition: opacity .4s; }
.top.is-scrolled { background: rgba(13, 10, 8, .86); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.top.is-scrolled::before { opacity: 0; }
.top-inner { display: flex; align-items: center; gap: 1rem 2rem; min-height: var(--header-h); width: min(100% - 2 * var(--gutter), 110rem); margin-inline: auto; }
.brand { display: inline-flex; width: clamp(9.5rem, 15vw, 12rem); flex: 0 0 auto; }
.brand img { width: 100%; }
.menu { display: flex; align-items: center; gap: .2rem clamp(1rem, 2.3vw, 2.2rem); margin-left: auto; }
.menu a { position: relative; padding: .5rem 0; font-size: .95rem; font-weight: 600; text-decoration: none; color: #f1e6dc; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px; border-radius: 2px; background: var(--grad-fire); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease); }
.menu a:hover::after, .menu a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.top-cta { min-height: 2.6rem; padding: .5rem 1.15rem; font-size: .9rem; }
.menu-toggle { display: none; margin-left: auto; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .4rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(0, 0, 0, .35); color: var(--ink); font: inherit; font-weight: 650; font-size: .9rem; cursor: pointer; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 1.1rem; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .3s; }
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-open .menu-icon { background: transparent; }
.menu-open .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* Embers & glow */
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.glow { position: absolute; z-index: 0; pointer-events: none; left: 50%; bottom: -30%; width: min(140vw, 90rem); aspect-ratio: 2; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 120, 40, .32), rgba(255, 80, 20, .12) 55%, transparent); filter: blur(10px); }

/* Home hero */
.hero { position: relative; isolation: isolate; display: grid; min-height: 100svh; overflow: hidden; background: #000; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 7, 5, .92) 0%, rgba(10, 7, 5, .7) 34%, rgba(10, 7, 5, .1) 70%), linear-gradient(0deg, rgba(13, 10, 8, 1) 0%, rgba(13, 10, 8, 0) 32%); }
.hero-inner { position: relative; z-index: 2; align-self: center; padding-block: calc(var(--header-h) + 3rem) 12rem; }
.hero-copy { max-width: 44rem; }
.hero-copy h1 { line-height: .95; }
.hero-copy .lead { margin-top: 1.5rem; max-width: 36ch; color: #e3d5ca; }
.stats { position: absolute; inset: auto 0 0; z-index: 3; }
.stats ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.stats li { padding: 1.5rem 1.4rem 1.8rem 0; border-right: 1px solid var(--line); }
.stats li + li { padding-left: 1.4rem; }
.stats li:last-child { border-right: 0; }
.stats strong { display: block; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.3rem); font-weight: 600; line-height: 1.1; letter-spacing: -.02em; background: var(--grad-fire); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { display: block; margin-top: .35rem; color: var(--soft); font-size: .9rem; line-height: 1.4; }

/* Inner page hero */
.page-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: end; min-height: clamp(26rem, 62svh, 40rem); background: #000; }
.page-hero.compact { min-height: clamp(20rem, 42svh, 28rem); }
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero.blurred .page-hero-media img { filter: blur(28px) saturate(1.25) brightness(.85); transform: scale(1.2); }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 7, 5, .9) 0%, rgba(10, 7, 5, .55) 55%, rgba(10, 7, 5, .25)), linear-gradient(0deg, var(--bg) 0%, rgba(13, 10, 8, 0) 45%); }
.page-hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: end; gap: 2rem 4rem; padding-block: calc(var(--header-h) + 3rem) clamp(2.5rem, 5vw, 4.5rem); }
.page-hero h1 { font-size: clamp(2.7rem, 6vw, 5.4rem); }
.page-hero .lead { margin: 1.2rem 0 0; }
.page-hero-photo { justify-self: end; width: min(100%, 23rem); aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2rem 4rem -1.5rem #000, 0 0 0 1px var(--line-strong); transform: rotate(1.5deg); transition: transform .6s var(--ease); }
.page-hero-photo:hover { transform: rotate(0) scale(1.02); }
.page-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 1.4rem; color: var(--soft); font-size: .92rem; }
.page-hero-meta span::before { content: "◆"; margin-right: .5rem; color: var(--fire); font-size: .6rem; vertical-align: .15em; }
.breadcrumb { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.2rem; color: var(--soft); font-size: .88rem; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--fire-2); text-decoration: underline; }

/* Full-bleed split */
.bleed-split { display: grid; grid-template-columns: 1fr 1fr; min-height: min(52rem, 92svh); background: var(--bg-2); }
.bleed-media { position: relative; overflow: hidden; min-height: 22rem; }
.bleed-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.bleed-split:hover .bleed-media img { transform: scale(1.04); }
.bleed-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, var(--bg-2)); }
.bleed-split.reverse .bleed-media { order: 2; }
.bleed-split.reverse .bleed-media::after { background: linear-gradient(270deg, transparent 60%, var(--bg-2)); }
.bleed-copy { align-self: center; padding: clamp(3rem, 7vw, 7rem) var(--gutter); max-width: 44rem; }
.bleed-split:not(.reverse) .bleed-copy { padding-left: clamp(2rem, 5vw, 6rem); }
.bleed-split.reverse .bleed-copy { justify-self: end; padding-right: clamp(2rem, 5vw, 6rem); }
.bleed-copy p { color: var(--soft); }
.bleed-copy .address { margin-top: 1.6rem; padding: 1.1rem 1.3rem; border-left: 3px solid var(--fire); background: rgba(255, 255, 255, .03); color: var(--ink); }

/* Section heads */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem 3rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head > div { max-width: 46rem; }
.section-head .lead { margin: 1.1rem 0 0; }

/* Category cards (rail + grid) */
.cat-card { position: relative; isolation: isolate; display: block; height: 100%; overflow: hidden; border-radius: var(--radius); background: var(--bg-3); text-decoration: none; box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.cat-card img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; filter: saturate(.9) brightness(.86) sepia(.08) contrast(1.05); transition: transform 1s var(--ease), filter .6s var(--ease); }
.cat-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 6, 4, .95) 0%, rgba(10, 6, 4, .45) 42%, rgba(10, 6, 4, 0) 70%); transition: opacity .5s; }
.cat-card::before { content: ""; position: absolute; inset: auto -20% -40% -20%; height: 70%; z-index: 2; background: radial-gradient(closest-side, rgba(255, 120, 40, .55), transparent); opacity: 0; transform: translateY(20%); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; mix-blend-mode: screen; }
.cat-card-body { position: absolute; inset: auto 0 0; z-index: 3; padding: 1.4rem 1.4rem 1.5rem; }
.cat-count { display: inline-block; margin-bottom: .55rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(6px); color: #f3e3d6; font-size: .75rem; font-weight: 650; letter-spacing: .04em; }
.cat-card h3 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 1.95rem); letter-spacing: -.025em; }
.cat-card p { margin: .35rem 0 0; color: var(--soft); font-size: .92rem; line-height: 1.45; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .5s var(--ease); }
.cat-arrow { position: absolute; top: 1.2rem; right: 1.2rem; z-index: 3; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); color: var(--ink); transform: rotate(-45deg) scale(.85); opacity: 0; transition: transform .5s var(--ease), opacity .5s, background-color .4s; }
.cat-arrow::before { content: "→"; font-size: 1.15rem; }
.cat-card:hover, .cat-card:focus-visible { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(255, 160, 80, .5), 0 1.8rem 3.5rem -1.4rem rgba(255, 100, 30, .55); }
.cat-card:hover img, .cat-card:focus-visible img { transform: scale(1.08); filter: saturate(1.05) brightness(.95) sepia(0); }
.cat-card:hover::before, .cat-card:focus-visible::before { opacity: 1; transform: none; }
.cat-card:hover p, .cat-card:focus-visible p { max-height: 4.5rem; opacity: 1; }
.cat-card:hover .cat-arrow, .cat-card:focus-visible .cat-arrow { opacity: 1; transform: rotate(0) scale(1); background: var(--fire); color: #1d0e05; }
@media (hover: none) { .cat-card p { max-height: 4.5rem; opacity: 1; } .cat-arrow { opacity: 1; transform: none; } }

/* Rail carousel */
.rail-section { position: relative; padding-block: clamp(4rem, 9vw, 8rem) clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.rail-nav { display: flex; gap: .6rem; }
.rail-btn, .photo-control { display: inline-grid; place-items: center; flex: 0 0 auto; width: 3.2rem; height: 3.2rem; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: rgba(255, 255, 255, .03); color: var(--ink); font: inherit; cursor: pointer; transition: background-color .3s, color .3s, border-color .3s, transform .3s var(--ease), opacity .3s; }
.rail-btn:hover, .photo-control:hover { background: var(--fire); border-color: var(--fire); color: #1d0e05; transform: scale(1.06); }
.rail-btn:disabled { opacity: .3; cursor: default; transform: none; background: transparent; color: var(--ink); border-color: var(--line); }
.rail-btn.prev::before, .rail-btn.next::before, .arrow-prev::before, .arrow-next::before { content: ""; width: .6rem; height: .6rem; border: solid currentColor; border-width: 2px 2px 0 0; }
.rail-btn.prev::before, .arrow-prev::before { transform: translateX(.12rem) rotate(-135deg); }
.rail-btn.next::before, .arrow-next::before { transform: translateX(-.12rem) rotate(45deg); }
.rail { --pad: max(var(--gutter), (100% - var(--max)) / 2); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; cursor: grab; }
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging a { pointer-events: none; }
.rail-track { display: flex; gap: clamp(.9rem, 1.6vw, 1.4rem); width: max-content; margin: 0; padding: 1rem var(--pad) 2rem; list-style: none; }
.rail-track > li { width: clamp(16rem, 25vw, 22rem); flex: 0 0 auto; scroll-snap-align: start; }
.rail-progress { position: relative; height: 2px; margin-top: .6rem; border-radius: 2px; background: var(--line); overflow: hidden; }
.rail-progress span { position: absolute; inset: 0 auto 0 0; width: 20%; border-radius: 2px; background: var(--grad-fire); transition: transform .2s linear, width .2s; }

/* Grid of categories */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.8rem, 1.4vw, 1.2rem); }
.tiles > li { list-style: none; }
.tiles { margin: 0; padding: 0; }
.tiles > li:first-child { grid-column: span 2; grid-row: span 2; }
.tiles .cat-card img { aspect-ratio: 1; }
.tiles > li:first-child .cat-card h3 { font-size: clamp(2rem, 3.4vw, 3rem); }

/* Marquee */
.marquee { overflow: hidden; padding-block: clamp(1.4rem, 3vw, 2.2rem); border-block: 1px solid var(--line); background: var(--bg-2); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 0; }
.marquee-track span { display: inline-flex; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); padding-right: clamp(1.5rem, 3vw, 3rem); font-family: var(--serif); font-size: clamp(2rem, 5vw, 4rem); font-weight: 500; font-style: italic; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px rgba(255, 210, 180, .45); white-space: nowrap; transition: color .4s; }
.marquee-track span::after { content: ""; width: .7rem; height: .7rem; border-radius: 50%; background: var(--grad-fire); box-shadow: 0 0 1.2rem var(--fire); }
.marquee-track span:hover { color: var(--fire-2); -webkit-text-stroke-color: transparent; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; counter-increment: step; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.steps li:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(255, 160, 80, .45), 0 1.6rem 3rem -1.4rem rgba(255, 100, 30, .5); }
.steps figure { overflow: hidden; }
.steps img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; transition: transform 1s var(--ease); }
.steps li:hover img { transform: scale(1.07); }
.steps li > div { position: relative; padding: 1.5rem 1.5rem 1.8rem; }
.steps li > div::before { content: "0" counter(step); position: absolute; top: -2.6rem; right: 1.2rem; font-family: var(--serif); font-size: 4.2rem; font-weight: 600; line-height: 1; background: var(--grad-fire); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .3rem 1rem rgba(0, 0, 0, .7)); }
.steps h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; }
.steps p { margin: .5rem 0 0; color: var(--soft); font-size: .98rem; }

/* Flame band (parallax) */
.flame-band { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: clamp(24rem, 70svh, 42rem); text-align: center; background: #000; }
.flame-band-media { position: absolute; inset: -18% 0; z-index: -2; will-change: transform; }
.flame-band-media img { width: 100%; height: 100%; object-fit: cover; }
.flame-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(10, 6, 4, .35), rgba(10, 6, 4, .85) 75%), linear-gradient(180deg, var(--bg) 0%, transparent 22%, transparent 78%, var(--bg-2) 100%); }
.flame-band-inner { position: relative; z-index: 2; padding-block: 5rem; }
.flame-band h2 { max-width: 18ch; margin-inline: auto; font-size: clamp(2.4rem, 5.6vw, 5rem); text-shadow: 0 .4rem 3rem rgba(0, 0, 0, .6); }
.flame-band .kicker { justify-content: center; }

/* Showcase slideshow */
.showcase { padding-block: clamp(4rem, 8vw, 7rem); background: var(--bg-2); }
.home-archive { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
.home-archive img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .6rem; }
.has-carousel .home-archive { display: block; position: relative; overflow: hidden; border-radius: var(--radius); background: #000; touch-action: pan-y pinch-zoom; box-shadow: 0 0 0 1px var(--line); }
.has-carousel .home-archive img { aspect-ratio: 21 / 9; object-fit: cover; border-radius: 0; }
.home-photo-controls { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.1rem; }
.home-thumbnails { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; min-width: 0; }
.home-thumbnails button { width: clamp(3.2rem, 9vw, 6.5rem); padding: 0; border: 2px solid transparent; border-radius: .5rem; overflow: hidden; background: var(--bg-3); cursor: pointer; opacity: .55; transition: opacity .3s, border-color .3s, transform .3s var(--ease); }
.home-thumbnails button:hover { opacity: 1; transform: translateY(-2px); }
.home-thumbnails button[aria-current] { opacity: 1; border-color: var(--fire); }
.home-thumbnails img { aspect-ratio: 4 / 3; object-fit: cover; }

/* CTA band */
.cta-band { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(5rem, 11vw, 9rem); background: radial-gradient(ellipse 80% 120% at 50% 120%, #4a1a08 0%, #22100a 45%, var(--bg) 80%); border-top: 1px solid var(--line); }
.cta-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 2rem 4rem; }
.cta-inner h2 { font-size: clamp(2.6rem, 6vw, 5.4rem); }
.cta-inner p:not(.kicker) { color: var(--soft); max-width: 46ch; }
.cta-inner .actions { justify-content: flex-end; margin-top: 0; }

/* Editorial content */
.editorial { max-width: 70ch; }
.editorial p { margin: 1rem 0; color: var(--soft); }
.editorial strong { color: var(--ink); }
.editorial h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.editorial h2:not(:first-child) { margin-top: 2.4rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.editorial h3, .original-copy h3 { margin-top: .9rem; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.35; color: var(--copper); }
.editorial ol, .editorial ul { color: var(--soft); padding-left: 1.2rem; }
.editorial li { margin: .5rem 0; }
.editorial li::marker { color: var(--fire); }
.editorial a:not(.button) { color: var(--fire-2); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(2rem, 6vw, 6rem); }
.split > img, .split > figure { border-radius: var(--radius); overflow: hidden; box-shadow: 0 2rem 4rem -2rem #000, 0 0 0 1px var(--line); }
.split > img { width: 100%; height: 100%; max-height: 36rem; object-fit: cover; }
.original-copy { max-width: 62ch; }
.original-copy p { color: #e0d1c5; }
.statement { padding-block: clamp(4rem, 9vw, 7.5rem); background: var(--bg-2); border-block: 1px solid var(--line); }
.statement .editorial { max-width: 62rem; margin-inline: auto; }
.statement .editorial p:first-child { font-family: var(--serif); font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.35; color: var(--ink); letter-spacing: -.015em; }

/* Gallery */
.gallery-section { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(4rem, 8vw, 6rem); }
.gallery-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; color: var(--soft); font-size: .92rem; }
.gallery { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: clamp(10rem, 14vw, 15rem); grid-auto-flow: dense; gap: clamp(.5rem, .9vw, .8rem); }
.gallery a { position: relative; display: block; overflow: hidden; border-radius: .7rem; background: var(--bg-3); }
.gallery a:nth-child(7n + 1) { grid-column: span 2; grid-row: span 2; }
.gallery a:nth-child(7n + 5) { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; }
.gallery a::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(40, 12, 2, .7), rgba(255, 110, 40, .12)); opacity: 0; transition: opacity .45s var(--ease); }
.gallery a::after { content: "+"; position: absolute; z-index: 2; left: 50%; top: 50%; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--grad-fire); color: #1d0e05; font-size: 1.7rem; font-weight: 400; line-height: 1; transform: translate(-50%, -50%) scale(.6); opacity: 0; transition: transform .45s var(--ease), opacity .45s; box-shadow: 0 0 2rem rgba(255, 110, 40, .7); }
.gallery a:hover img, .gallery a:focus-visible img { transform: scale(1.08); }
.gallery a:hover::before, .gallery a:focus-visible::before { opacity: 1; }
.gallery a:hover::after, .gallery a:focus-visible::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Photo viewer */
.photo-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; color: var(--ink); background: rgba(6, 4, 3, .97); }
.photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.photo-viewer::backdrop { background: rgba(6, 4, 3, .9); backdrop-filter: blur(6px); }
.photo-viewer-head, .photo-viewer-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 3vw, 2rem); }
.photo-viewer-head h2 { font-size: clamp(1.1rem, 2.2vw, 1.5rem); }
.photo-stage { display: grid; place-items: center; min-height: 0; padding-inline: clamp(.5rem, 2vw, 2rem); touch-action: pan-y pinch-zoom; }
.photo-stage img { width: 100%; height: 100%; max-width: 70rem; object-fit: contain; filter: drop-shadow(0 2rem 3rem rgba(0, 0, 0, .7)); }
.photo-close span { font-size: 1.7rem; line-height: 1; }
.photo-position { display: grid; gap: .4rem; justify-items: center; }
.photo-position p { margin: 0; color: var(--soft); font-size: .85rem; font-variant-numeric: tabular-nums; }
.photo-position progress { display: block; width: clamp(5rem, 24vw, 14rem); height: .2rem; border: 0; accent-color: var(--fire); }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.team article { display: grid; grid-template-columns: 9rem 1fr; gap: 1.4rem; align-items: center; padding: 1rem; border-radius: var(--radius); background: var(--bg-3); box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.team article:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255, 160, 80, .45), 0 1.4rem 3rem -1.4rem rgba(255, 100, 30, .5); }
.team img { aspect-ratio: 1; object-fit: cover; border-radius: .7rem; filter: grayscale(.4); transition: filter .5s; }
.team article:hover img { filter: none; }
.team p { margin: 0; color: var(--soft); }
.team strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; color: var(--ink); }
.team a { color: var(--fire-2); }

/* Contact */
.contact-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.contact-card { padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--radius); background: var(--bg-3); box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(255, 160, 80, .45), 0 1.4rem 3rem -1.4rem rgba(255, 100, 30, .45); }
.contact-card h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); margin-bottom: .8rem; }
.contact-card p { color: var(--soft); }
.contact-card .icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.2rem; border-radius: 50%; background: var(--grad-fire); color: #1d0e05; font-size: 1.2rem; box-shadow: 0 0 1.6rem rgba(255, 110, 40, .45); }
.contact-card .actions { margin-top: 1.2rem; }
address { font-style: normal; overflow-wrap: anywhere; }
.quote-section { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2rem clamp(2rem, 6vw, 5rem); align-items: start; }
.quote-section > div > p { color: var(--soft); }
.quote-section a { color: var(--fire-2); }
.quote-section .button { color: #1d0e05; }
.quote-form, .quote-draft { padding: clamp(1.3rem, 3vw, 2.2rem); border-radius: var(--radius); background: var(--bg-3); box-shadow: 0 0 0 1px var(--line); }
.quote-form > p:first-child { margin-top: 0; color: var(--soft); font-size: .95rem; }
.quote-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.3rem 0; }
.quote-section label { display: block; margin-bottom: .35rem; font-weight: 650; font-size: .95rem; }
.quote-section input, .quote-section select, .quote-section textarea { display: block; width: 100%; min-height: 3rem; padding: .6rem .85rem; border: 1px solid #8f7a6c; border-radius: .6rem; background: var(--bg); color: var(--ink); color-scheme: dark; font: inherit; transition: border-color .3s, box-shadow .3s; }
.quote-section input:hover, .quote-section select:hover, .quote-section textarea:hover { border-color: var(--copper); }
.quote-section input:focus, .quote-section select:focus, .quote-section textarea:focus { border-color: var(--fire-2); box-shadow: 0 0 0 4px rgba(255, 150, 60, .18); outline: none; }
.quote-section textarea { resize: vertical; }
.quote-section .field-error { margin: .35rem 0 0; color: #ffad9e; }
.quote-section .field-hint { margin: .35rem 0; color: var(--muted); font-size: .9rem; }
.quote-section [aria-invalid="true"] { border-color: #ffad9e; }
.quote-form button, .quote-draft a.button { margin-top: 1rem; }
.quote-draft { margin-top: 1rem; }
.review { padding: .7rem .9rem; border-left: 3px solid var(--fire); background: var(--bg-3); }

/* Legal copy */
.copy { max-width: 74ch; }
.copy p, .copy li { color: var(--soft); }
.copy a { color: var(--fire-2); }
.copy h2 { margin: 2.2rem 0 .6rem; font-family: var(--sans); font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.rule { border-top: 1px solid var(--line); }

/* Footer */
.foot { position: relative; padding-block: clamp(3.5rem, 7vw, 5.5rem) 1.5rem; background: #080605; border-top: 1px solid var(--line); }
.foot::before { content: ""; position: absolute; inset: -1px 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--fire), transparent); opacity: .7; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 2.5rem 3rem; }
.foot-brand img { width: 12rem; margin-bottom: 1.2rem; }
.foot h2 { margin-bottom: 1rem; font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--fire-2); }
.foot p, .foot li { color: var(--soft); font-size: .93rem; }
.foot p { margin: 0 0 .9rem; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { margin-bottom: .45rem; }
.foot a { text-decoration: none; transition: color .3s; }
.foot a:hover { color: var(--fire-2); text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; gap: .8rem 2rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.foot-bottom nav { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; font-size: .85rem; }
.foot small { color: var(--muted); font-size: .82rem; }
.foot-ai { flex: 0 0 100%; margin: 0; color: var(--muted); font-size: .8rem; }
.back-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 20; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--grad-fire); color: #1d0e05; font-weight: 700; text-decoration: none; box-shadow: 0 .6rem 2rem -0.6rem rgba(255, 110, 40, .8); transition: transform .3s var(--ease); }
.back-top::before { content: ""; width: .6rem; height: .6rem; border: solid currentColor; border-width: 2px 2px 0 0; transform: translateY(.15rem) rotate(-45deg); }
.back-top:hover { transform: translateY(-3px); }

/* Responsive */
@media (max-width: 64rem) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .contact-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 60rem) {
  .js .menu-toggle { display: inline-flex; }
  .js .top-cta { display: none; }
  .js .menu { position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem var(--gutter) 2rem; background: rgba(13, 10, 8, .97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transform: translateY(-1rem); opacity: 0; visibility: hidden; transition: opacity .3s, transform .3s var(--ease), visibility .3s; }
  .js .menu-open .menu { transform: none; opacity: 1; visibility: visible; }
  .js .menu a { padding: .95rem 0; font-family: var(--serif); font-size: 1.6rem; border-bottom: 1px solid var(--line); }
  .js .menu a::after { display: none; }
  .js .menu a[aria-current] { color: var(--fire-2); }
  .js .top-inner { justify-content: space-between; }
  .menu-open.top { background: rgba(13, 10, 8, .97); }
  html:not(.js) .top { position: absolute; }
  html:not(.js) .top-inner { flex-wrap: wrap; padding-block: .6rem; }
  html:not(.js) .menu { margin-left: 0; flex-wrap: wrap; }
  .bleed-split, .split, .quote-section, .cta-inner, .page-hero-inner { grid-template-columns: 1fr; }
  .bleed-split.reverse .bleed-media { order: 0; }
  .bleed-media { min-height: 0; aspect-ratio: 4 / 3; }
  .bleed-media::after, .bleed-split.reverse .bleed-media::after { background: linear-gradient(0deg, var(--bg-2), transparent 45%); }
  .bleed-copy, .bleed-split.reverse .bleed-copy { padding: 2.5rem var(--gutter) 4rem; justify-self: stretch; }
  .bleed-split:not(.reverse) .bleed-copy { padding-left: var(--gutter); }
  .stats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats li, .stats li + li { padding: 1rem 1rem 1.1rem 0; border-right: 0; }
  .stats li:nth-child(odd) { border-right: 1px solid var(--line); }
  .stats li:nth-child(even) { padding-left: 1rem; }
  .stats li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .hero-inner { padding-bottom: 15rem; align-self: end; }
  .steps { grid-template-columns: 1fr; }
  .steps li { display: grid; grid-template-columns: 40% 1fr; }
  .steps img { height: 100%; aspect-ratio: auto; }
  .steps li > div::before { position: static; display: block; margin-bottom: .4rem; font-size: 2.4rem; filter: none; }
  .cta-inner .actions { justify-content: flex-start; }
  .page-hero-photo { display: none; }
  .page-hero.blurred .page-hero-media img { filter: brightness(.8); transform: none; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team { grid-template-columns: 1fr; }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .hero::after { background: linear-gradient(0deg, rgba(13, 10, 8, 1) 18%, rgba(10, 7, 5, .7) 55%, rgba(10, 7, 5, .25) 100%); }
  .hero-media img { object-position: 60% 50%; }
  .stats strong { font-size: 1.35rem; }
  .stats span { font-size: .8rem; }
  .steps li { grid-template-columns: 1fr; }
  .steps img { aspect-ratio: 16 / 10; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 9rem; }
  .gallery a:nth-child(7n + 5) { grid-row: auto; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles > li:nth-child(1) { grid-column: span 2; grid-row: auto; }
  .tiles .cat-card p { display: none; }
  .tiles .cat-card h3 { font-size: 1.25rem; }
  .tiles .cat-card-body { padding: 1rem; }
  .contact-cards, .foot-grid, .quote-fields { grid-template-columns: 1fr; }
  .team article { grid-template-columns: 6rem 1fr; }
  .has-carousel .home-archive img { aspect-ratio: 4 / 3; }
  .home-thumbnails button { width: 3rem; }
  .rail-track > li { width: 78vw; }
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
  .hero-media img { animation: kenburns 22s ease-out both; }
  @keyframes kenburns { from { transform: scale(1.12); } to { transform: scale(1); } }
  .glow { animation: flicker 4.5s ease-in-out infinite alternate; }
  @keyframes flicker {
    0% { opacity: .75; transform: translateX(-50%) scale(1); }
    35% { opacity: 1; transform: translateX(-50%) scale(1.04); }
    55% { opacity: .82; transform: translateX(-50%) scale(.98); }
    100% { opacity: .95; transform: translateX(-50%) scale(1.06); }
  }
  .hero-copy > * { animation: rise .9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: .1s; }
  .hero-copy > :nth-child(3) { animation-delay: .22s; }
  .hero-copy > :nth-child(4) { animation-delay: .34s; }
  .page-hero-inner > * { animation: rise .8s var(--ease) both; }
  .page-hero-inner > :nth-child(2) { animation-delay: .15s; }
  @keyframes rise { from { opacity: 0; transform: translateY(1.6rem); } to { opacity: 1; transform: none; } }
  .marquee-track { animation: marquee 38s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(-50%); } }
  .js .reveal { opacity: 0; transform: translateY(2rem); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }
  .has-carousel .home-archive img:not([hidden]) { animation: fade .6s ease-out; }
  .photo-stage img { animation: fade .3s ease-out; }
  @keyframes fade { from { opacity: .3; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* Pagine dei camini: apertura con titolo e testo, senza immagine */
.page-intro { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)) 0 clamp(2rem, 4vw, 3.2rem); background: radial-gradient(ellipse 60% 120% at 0% 0%, rgba(255, 110, 40, .16), transparent 60%), radial-gradient(ellipse 40% 80% at 100% 100%, rgba(214, 70, 27, .1), transparent 70%), var(--bg); border-bottom: 1px solid var(--line); }
.page-intro-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 1.2rem clamp(2rem, 6vw, 6rem); }
.page-intro .breadcrumb { grid-column: 1 / -1; margin-bottom: 0; }
.page-intro h1 { font-size: clamp(2.8rem, 6.6vw, 6rem); line-height: .98; }
.page-intro .original-copy h3 { margin-top: 0; }
.page-intro .original-copy p { margin-bottom: 0; }
.page-intro + .gallery-section { padding-top: clamp(2rem, 4vw, 3rem); }
@media (max-width: 60rem) { .page-intro-inner { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: no-preference) {
  .page-intro-inner > * { animation: rise .8s var(--ease) both; }
  .page-intro-inner > :nth-child(3) { animation-delay: .15s; }
}
