:root { color-scheme: light; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Layout: galleria silenziosa. Molto spazio bianco, una grande foto d'apertura, titoli in serif leggero,
   righe sottili al posto dei riquadri. Solo inchiostro e carta, nessun colore d'accento. */
:root {
  --bg: #FFFFFF;
  --fg: #161616;
  --muted: #6E6E6B;
  --line: #E2E2DF;
  --frame-a: #ECECEA;
  --frame-b: #DCDCD8;
  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --body: "Jost", "Helvetica Neue", Arial, system-ui, sans-serif;
  --script: "Mrs Saint Delafield", "Snell Roundhand", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.7;
  padding-block: 0;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1180px; margin: 0 auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }

.label { font-size: 12px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* Header */
header.top { text-align: center; padding-block: 36px 28px; }
.brand { font-family: var(--script); font-size: 56px; font-weight: 400; line-height: 1; letter-spacing: 0; text-transform: none; text-decoration: none; display: inline-block; padding-inline: 12px; }
nav.main { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 34px; margin-top: 18px; }
nav.main a { font-size: 12px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding-block: 6px; border-bottom: 1px solid transparent; }
nav.main a:hover { color: var(--fg); border-bottom-color: var(--fg); }

/* Frames (segnaposto foto) */
.frame { position: relative; background: linear-gradient(var(--ang, 160deg), var(--frame-a), var(--frame-b)); overflow: hidden; }
.frame .ph { position: absolute; left: 14px; bottom: 12px; font-size: 11px; font-weight: 400; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* Hero */
.hero .frame { aspect-ratio: 16 / 8; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.hero-text { text-align: center; padding-block: 56px 72px; }
.hero h1 { font-size: clamp(40px, 6.4vw, 80px); letter-spacing: -0.005em; }
.hero h1 em { font-style: italic; }
.hero .lead { margin: 22px auto 0; max-width: 46ch; color: var(--muted); font-size: 18px; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 36px; margin-top: 34px; }
.tlink { font-size: 12.5px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; padding-bottom: 6px; border-bottom: 1px solid var(--fg); }
.tlink:hover { opacity: 0.6; }

/* Sezioni */
section { padding-block: 80px; border-top: 1px solid var(--line); }
.sec-head { text-align: center; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(34px, 4.6vw, 54px); margin-top: 12px; }

/* Chi sono */
.about { max-width: 640px; margin: 0 auto; text-align: center; }
.about .frame { aspect-ratio: 4 / 5; }
.about h2 { font-size: clamp(32px, 4vw, 46px); margin: 14px 0 22px; }
.about p + p { margin-top: 16px; }
.about p { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* Servizi */
.rows { border-top: 1px solid var(--line); }
.row-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 0.9fr); gap: 16px 40px; padding-block: 34px; border-bottom: 1px solid var(--line); align-items: start; }
.row-item h3 { font-size: clamp(30px, 3.4vw, 40px); }
.row-item p { color: var(--muted); max-width: 48ch; }
.row-item ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 15px; }
.row-item li { padding-left: 0; }
.row-item li::before { content: "\2014\00a0"; color: var(--muted); }

/* Portfolio */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 30px; margin-bottom: 44px; }
.fbtn { font: 400 12px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); background: none; border: 0; border-bottom: 1px solid transparent; padding: 10px 0; cursor: pointer; }
.fbtn:hover { color: var(--fg); }
.fbtn[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--fg); }
.gallery { columns: 170px; column-gap: 16px; }
.gallery figure { margin: 0 0 16px; break-inside: avoid; min-width: 0; }
.pbtn { display: block; width: 100%; padding: 0; border: 0; background: var(--frame-a); cursor: zoom-in; }
.pbtn img { display: block; width: 100%; height: auto; }
.cat .frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery .frame { aspect-ratio: 4 / 5; }
.gallery figure:nth-child(3n+2) .frame { aspect-ratio: 3 / 4; }
.gallery figcaption { margin-top: 10px; }
.note { text-align: center; margin-top: 44px; }

.row-item .tlink { display: inline-block; margin-top: 18px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

/* Sezioni alternate */
:root { --tint: #E4EBDE; }
main > section:nth-of-type(odd) { background: var(--tint); box-shadow: 0 0 0 100vmax var(--tint); clip-path: inset(0 -100vmax); border-top-color: transparent; }
main > section:nth-of-type(odd) + section { border-top-color: transparent; }
main > section:nth-of-type(odd) { --muted: #55554F; }
main > section:nth-of-type(odd) code { background: #ECEBE7; }
.rv main > section > * { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s ease; }
.rv main > section > .in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv main > section > * { opacity: 1; transform: none; transition: none; } }

/* Categorie del portfolio */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 24px 18px; max-width: 920px; margin: 0 auto; }
.cat { display: block; text-decoration: none; min-width: 0; }
.cat .frame { aspect-ratio: 4 / 5; transition: opacity 0.25s; }
.cat:hover .frame, .cat:focus-visible .frame { opacity: 0.8; }
.cat .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 12px; }
.cat h3 { font-size: 28px; }
.detail-head { display: grid; justify-items: center; gap: 14px; margin-bottom: 36px; text-align: center; }
.detail-head h3 { font-size: clamp(32px, 4.4vw, 48px); }
.back { text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.back:hover { color: var(--fg); border-bottom-color: var(--fg); }

/* Come lavoro */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 36px 40px; }
.steps li { min-width: 0; border-top: 1px solid var(--fg); padding-top: 18px; }
.steps h3 { font-size: 30px; margin: 10px 0 10px; }
.steps p { color: var(--muted); font-size: 16px; }

/* Contatti */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
.contact h2 { font-size: clamp(34px, 4.6vw, 54px); margin: 12px 0 20px; }
.contact .intro { color: var(--muted); max-width: 40ch; }
.details { margin-top: 36px; display: grid; gap: 20px; }
.details div { display: grid; gap: 2px; }
.val { font-size: 19px; user-select: all; overflow-wrap: anywhere; }
form { display: grid; gap: 26px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
label { display: grid; gap: 4px; min-width: 0; }
label span { font-size: 12px; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
input, select, textarea { font: 300 17px/1.5 var(--body); color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 10px 0; width: 100%; min-width: 0; }
input:hover, select:hover, textarea:hover { border-bottom-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-bottom-color: var(--fg); }
textarea { min-height: 90px; resize: vertical; }
select option { background: var(--bg); color: var(--fg); }
.submit { justify-self: start; font: 400 12.5px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--bg); background: var(--fg); border: 1px solid var(--fg); padding: 17px 30px; cursor: pointer; }
.submit:hover { opacity: 0.85; }
.ghost { justify-self: start; font: 400 12.5px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg); background: transparent; border: 1px solid var(--line); padding: 15px 24px; cursor: pointer; }
.ghost:hover { border-color: var(--fg); }
.out { display: none; border-top: 1px solid var(--line); padding-top: 24px; gap: 16px; }
.out.on { display: grid; }
.out pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 300 16px/1.65 var(--body); }
.hint { color: var(--muted); font-size: 14px; }

/* Foto ingrandita */
.lb { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 64px max(16px, env(safe-area-inset-left, 0px)) 72px; }
.lb { touch-action: pan-y; }
.lb img { display: block; -webkit-user-drag: none; user-select: none; max-width: 100%; max-height: 100%; object-fit: contain; }
.lb button { position: absolute; font: 400 12px/1 var(--body); letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg); background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; cursor: pointer; }
.lb button:hover { border-bottom-color: var(--fg); }
.lb .lb-x { top: calc(18px + env(safe-area-inset-top, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
.lb .lb-p { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); }
.lb .lb-n { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }

/* Recensioni */
.marquee { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.marquee::-webkit-scrollbar { display: none; }
.track { display: flex; align-items: flex-start; gap: 20px; width: max-content; }
.review { flex: 0 0 min(80vw, 320px); margin: 0; border-top: 1px solid var(--fg); padding-top: 18px; display: grid; gap: 14px; }
.review .stars { font-size: 14px; letter-spacing: 0.25em; }
.review blockquote { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.35; }

footer { border-top: 1px solid var(--line); padding-block: 34px 48px; text-align: center; display: grid; gap: 6px; }

@media (max-width: 860px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about .frame { aspect-ratio: 3 / 2; }
  .row-item { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 28px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  section { padding-block: 60px; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .brand { font-size: 44px; }
  .hero .frame { aspect-ratio: 4 / 5; }
  .hero-photo img { object-position: 50% 0%; }
  .hero-text { padding-block: 40px 52px; }
  .row { grid-template-columns: minmax(0, 1fr); }
  nav.main { gap: 4px 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Barra fissa e pulsanti */
.bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--bg); padding-block: 10px; border-bottom: 1px solid var(--line); }
.bar .brand { padding: 0; display: block; line-height: 0; }
.bar .brand img { height: 56px; width: auto; display: block; }
.cta { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--fg); border: 1px solid var(--fg); padding: 11px 18px; white-space: nowrap; transition: background .2s, color .2s; }
.cta:hover { background: var(--fg); color: var(--bg); }
header.top { padding-block: 22px 8px; }
[id] { scroll-margin-top: 84px; }
.fab { position: fixed; z-index: 60; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.fab a { width: 44px; height: 44px; display: grid; place-items: center; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 50%; box-shadow: 0 4px 16px rgba(0,0,0,.08); transition: background .2s, color .2s; }
.fab a:hover { background: var(--fg); color: var(--bg); }
@media (max-width: 560px) { .bar .brand img { height: 46px; } .cta { padding: 10px 14px; } }

/* Legale */
footer a { text-decoration: none; border-bottom: 1px solid transparent; }
footer a:hover { border-bottom-color: var(--line); }
.todo { background: #FFF3B0; color: #161616; padding: 0 4px; font-style: normal; letter-spacing: 0; text-transform: none; }
.cb { position: fixed; z-index: 70; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); max-width: 520px; margin: 0 auto; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(0,0,0,.08); padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; font-size: 14px; line-height: 1.5; }
.cb p { margin: 0; flex: 1 1 260px; min-width: 0; }
.cb a { border-bottom: 1px solid var(--line); text-decoration: none; }
.cb button { font: inherit; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; background: var(--fg); color: var(--bg); border: 0; padding: 11px 20px; cursor: pointer; }
.legal-page { max-width: 720px; margin: 0 auto; padding-block: 56px 80px; }
.legal-page h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 8px; }
.legal-page h3 { font-size: 26px; margin: 34px 0 8px; }
.legal-page p { margin: 0 0 12px; color: var(--fg); }
.legal-page .upd { color: var(--muted); font-size: 14px; }
.legal-page a { border-bottom: 1px solid var(--line); text-decoration: none; }
.legal-page code { font-size: 13px; background: #F3F3F1; padding: 1px 5px; }
.legal-ov { position: fixed; inset: 0; z-index: 80; background: var(--bg); overflow: auto; padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
.legal-ov .legal-page { padding-top: 20px; }
.legal-x { font: inherit; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--fg); cursor: pointer; padding: 4px 0; }
/* Accento verde salvia */
:root { --accent: #4A6B50; }
::selection { background: #CBD9C3; }
h1 em, .hero h1 em { color: var(--accent); }
.stars { color: var(--accent); }
.tlink { border-bottom-color: var(--accent); }
.tlink:hover { color: var(--accent); }
.cta { color: var(--accent); border-color: var(--accent); }
.cta:hover { background: var(--accent); color: #fff; }
.submit { background: var(--accent); border-color: var(--accent); color: #fff; }
.cb button { background: var(--accent); color: #fff; }
.fab a { color: var(--accent); }
.fab a:hover { background: var(--accent); color: #fff; }
.cat:hover h3 { color: var(--accent); }
.faq summary::after { color: var(--accent); }
main > section:nth-of-type(odd) { --muted: #55554F; }
main > section:nth-of-type(odd) code { background: #D8E2D0; }
/* Ottimizzazione smartphone */
html { -webkit-text-size-adjust: 100%; }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (max-width: 560px) {
  nav.main { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 0 4px; margin-top: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  nav.main::-webkit-scrollbar { display: none; }
  nav.main a { flex: 0 0 auto; padding: 14px 10px; font-size: 11.5px; }
  .hero .frame { aspect-ratio: 1 / 0.92; }
  .hero-text { padding-block: 28px 40px; }
  section { padding-block: 48px; }
  .gallery { columns: 2; column-gap: 10px; }
  .gallery figure { margin-bottom: 10px; }
  .tlink { display: inline-block; padding-block: 12px 8px; }
  .faq summary { padding-block: 14px; }
  footer a { display: inline-block; padding: 10px 4px; }
  .fab a { width: 48px; height: 48px; }
  .lb button { padding: 14px 8px; }
  .lb { padding-inline: 8px; }
  .cb { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom, 0px)); padding: 12px 14px; font-size: 13px; gap: 8px 12px; }
  .cb p { flex: 1 1 180px; }
  .cb button { padding: 12px 18px; }
  body:has(.cb:not([hidden])) .fab { bottom: calc(max(10px, env(safe-area-inset-bottom, 0px)) + 118px); }
}

/* Pagine dei servizi */
.crumbs a { text-decoration: none; border-bottom: 1px solid var(--line); }
.page-hero { text-align: center; padding-block: 56px 64px; }
.page-hero h1 { font-size: clamp(38px, 6vw, 68px); margin-top: 16px; }
.page-hero .lead { margin: 20px auto 0; max-width: 50ch; color: var(--muted); font-size: 18px; }
.incl { list-style: none; padding: 0; margin: 30px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px; font-size: 15px; }
.incl li::before { content: "\2014\00a0"; color: var(--muted); }
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--line); padding-block: 18px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 24px; line-height: 1.25; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin-top: 10px; color: var(--muted); }
.more { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.empty { text-align: center; color: var(--muted); }
