/* Palette chiesta dal cliente: beige caldo, bianco sporco, antracite. Il blu del logo resta nella
   scritta e nel contorno di chi usa la tastiera. La scena 3D è in scena.css, i movimenti in movimento.css. */

/* Manrope (licenza OFL, assets/font/LICENSE-manrope.txt) servito dal sito: nessuna richiesta a terzi. */
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url("assets/font/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Manrope; font-weight: 200 800; font-display: swap; src: url("assets/font/manrope-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }

:root {
  --ink: #26221d;
  --ink-soft: #5f574c;
  --calce: #f7f4ee;
  --cemento: #ede5d8;
  --beige: #e0d2bd;
  --legno: #b4906a;
  --legno-chiaro: #dcc3a4;
  --blu: #5b84b5;
  --blu-scuro: #35608f;
  --filo: rgb(38 34 29 / 0.16);
  --errore: #9c3d26;
  --r: 3px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(68px, 8.5vw, 128px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--calce); color: var(--ink); font-family: Manrope, "Segoe UI", system-ui, sans-serif; font-size: 1.0625rem; line-height: 1.65; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; }
ol, ul { list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blu); outline-offset: 3px; }
.wrap { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
section[id] { scroll-margin-top: 72px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icona { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 40; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip:focus { top: 12px; }

h1, h2, h3 { font-weight: 300; line-height: 1.1; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: clamp(2.5rem, 1.2rem + 4.2vw, 4.9rem); letter-spacing: -0.028em; margin-top: 16px; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3.2rem); letter-spacing: -0.018em; margin-top: 14px; }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.55rem); font-weight: 400; }
.eyebrow { display: flex; align-items: center; gap: 14px; text-transform: uppercase; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.22em; color: var(--ink-soft); }
.eyebrow::before { content: ""; flex: 0 0 40px; height: 1px; background: currentColor; }
.lead { max-width: 30em; margin-top: 18px; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 1px solid var(--ink); border-radius: var(--r); background: var(--ink); color: #fff; font-size: 0.9rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s var(--ease); }
.btn:hover { background: var(--legno); border-color: var(--legno); color: var(--ink); transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn .icona { transition: transform 0.3s var(--ease); }
.btn:hover .icona { transform: translateX(4px); }
.btn--line { background: transparent; border-color: currentColor; color: inherit; }
.tag { display: inline-block; margin-top: 18px; padding: 3px 12px; border: 1px dashed currentColor; border-radius: var(--r); font-size: 0.78rem; opacity: 0.8; }

/* Intestazione */
.top { position: fixed; inset: 0 0 auto; z-index: 20; border-bottom: 1px solid transparent; transition: background-color 0.3s, border-color 0.3s, color 0.3s; }
.top--solid { background: rgb(247 244 238 / 0.97); border-color: var(--filo); }
.top__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.wordmark { font-weight: 500; font-size: 0.95rem; letter-spacing: 0.26em; text-decoration: none; white-space: nowrap; margin-right: auto; }
.wordmark__b { color: var(--blu-scuro); }
.nav { display: flex; gap: 30px; font-size: 0.88rem; }
.nav a { text-decoration: none; padding-block: 6px; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.nav a:hover { background-size: 100% 1px; }
.lang { display: flex; border: 1px solid; border-color: color-mix(in srgb, currentColor 30%, transparent); border-radius: var(--r); }
/* Nel sito pubblicato i due pulsanti diventano collegamenti alla pagina nell'altra lingua. */
.lang :is(button, a) { display: grid; place-items: center; min-width: 42px; min-height: 40px; border: 0; background: transparent; color: inherit; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-decoration: none; cursor: pointer; transition: background-color 0.25s, color 0.25s; }
.lang :is(button, a):hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.lang :is(button[aria-pressed="true"], a[aria-current]) { background: var(--ink); color: #fff; }
.top__cta { min-height: 42px; padding: 0 18px; font-size: 0.82rem; }
.menu-btn { display: none; place-items: center; width: 44px; height: 44px; border: 1px solid; border-color: color-mix(in srgb, currentColor 30%, transparent); border-radius: var(--r); background: transparent; color: inherit; cursor: pointer; }
.menu-btn__chiudi, .menu-btn[aria-expanded="true"] .menu-btn__apri { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__chiudi { display: block; }

/* Apertura a tutta larghezza */
.apertura { position: relative; height: 100vh; height: 100svh; min-height: 560px; max-height: 1100px; overflow: hidden; background: var(--beige); }
.apertura__immagine { position: absolute; inset: 0; }
.apertura__immagine img, .apertura__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; }
.apertura__video { opacity: 0; transition: opacity 1.4s ease; }
.apertura__immagine.riproduce .apertura__video { opacity: 1; transition: none; }
.apertura__testo { position: absolute; inset: auto 0 0; padding: 130px 0 clamp(36px, 6vh, 72px); background: linear-gradient(transparent, rgb(22 18 12 / 0.5) 42%, rgb(22 18 12 / 0.74)); color: #fbf8f2; }
.apertura__testo .eyebrow, .apertura__testo .lead { color: #f1e9dc; }
.apertura__testo h1 { max-width: 15em; }
.btn--chiaro { background: #fbf8f2; border-color: #fbf8f2; color: var(--ink); }
.apertura__rivedi { position: absolute; z-index: 1; right: var(--gutter); bottom: clamp(36px, 6vh, 72px); display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid rgb(251 248 242 / 0.5); border-radius: var(--r); background: rgb(22 18 12 / 0.34); color: #fbf8f2; font-size: 0.78rem; cursor: pointer; backdrop-filter: blur(8px); }
.apertura__rivedi .icona { width: 16px; height: 16px; }

/* Lo studio */
.section { padding-block: var(--section); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); }
.studio { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(32px, 6vw, 88px); }
.studio__frase { margin-top: 18px; font-size: clamp(1.35rem, 1rem + 1.4vw, 2.1rem); font-weight: 300; line-height: 1.35; text-wrap: pretty; }
.studio__clienti { margin-top: 22px; max-width: 34em; color: var(--ink-soft); }
.studio__logo { width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 40px 70px -50px rgb(38 34 29 / 0.55); }

/* Portfolio */
.portfolio { padding-block: 0 var(--section); }
.categoria { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.categoria::after { content: ""; flex: 1; height: 1px; background: var(--filo); }
.galleria { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: clamp(48px, 7vw, 88px); }
.galleria__grande { grid-column: 1 / -1; }
.foto { display: block; width: 100%; overflow: hidden; border: 0; border-radius: var(--r); background: var(--cemento); cursor: zoom-in; }
.foto img { width: 100%; height: auto; aspect-ratio: 1672 / 941; object-fit: cover; transition: transform 0.9s var(--ease); }
.foto:hover img { transform: scale(1.025); }
.vuoto { display: grid; justify-items: center; gap: 10px; padding: clamp(32px, 6vw, 72px) 20px; border: 1px dashed var(--filo); border-radius: var(--r); background: var(--cemento); color: var(--ink-soft); text-align: center; }
.vuoto svg { width: min(100%, 360px); fill: none; stroke: var(--ink); stroke-width: 1; opacity: 0.45; }
.visore { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; border: 0; background: rgb(20 17 13 / 0.94); }
.visore[open] { display: grid; place-items: center; }
.visore::backdrop { background: rgb(20 17 13 / 0.94); }
.visore img { max-width: 96vw; max-height: 86vh; width: auto; height: auto; }
.visore__chiudi { position: fixed; top: 14px; right: 14px; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgb(251 248 242 / 0.4); border-radius: var(--r); background: transparent; color: #fbf8f2; cursor: pointer; }

/* Come lavoro */
.process { background: var(--ink); color: #f2ede4; }
.percorso { position: relative; }
/* La linea va dal centro del primo quadrato al centro dell'ultimo. */
.percorso::before, .percorso::after { content: ""; position: absolute; top: 25px; left: 26px; right: calc(25% - 44px); height: 1px; }
.percorso::before { background: rgb(242 237 228 / 0.2); }
.percorso::after { background: var(--legno); transform-origin: left top; }
.steps { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
.step__n { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 22px; border: 1px solid var(--legno); border-radius: var(--r); background: var(--ink); color: var(--legno-chiaro); }
.step__n .icona { width: 23px; height: 23px; }
.step p { margin-top: 10px; color: #c3b9a9; font-size: 0.95rem; }
.condizioni { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: clamp(48px, 6vw, 80px); padding-top: 32px; border-top: 1px solid rgb(242 237 228 / 0.2); }
.condizioni p { margin-top: 10px; max-width: 32em; color: #c3b9a9; }

/* Richiesta di preventivo */
.preventivo { background: var(--cemento); }
.preventivo__in { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.preventivo__diretto { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--filo); text-transform: uppercase; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em; color: var(--ink-soft); }
.contatto__email { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; margin-top: 8px; font-size: 1.1rem; overflow-wrap: anywhere; }
.contatto__icone { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.contatto__icona { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border: 1px solid var(--ink); border-radius: var(--r); font-size: 0.85rem; text-decoration: none; transition: background-color 0.25s, color 0.25s; }
.contatto__icona[href]:hover { background: var(--ink); color: #fff; }
.contatto__icona.in-arrivo { border-style: dashed; opacity: 0.6; cursor: default; }
.modulo { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: clamp(22px, 3.5vw, 40px); border: 1px solid var(--filo); border-radius: var(--r); background: var(--calce); }
.modulo label { display: grid; gap: 6px; min-width: 0; font-size: 0.82rem; font-weight: 600; }
.modulo input, .modulo select, .modulo textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid rgb(38 34 29 / 0.26); border-radius: var(--r); background: #fffdf9; font-size: 1rem; font-weight: 400; }
.modulo textarea { resize: vertical; }
.modulo input[type="file"] { padding: 9px; font-size: 0.85rem; }
.modulo [aria-invalid="true"] { border-color: var(--errore); box-shadow: 0 0 0 1px var(--errore); }
.modulo__largo, .modulo__nota, .modulo__invia, .modulo__esito { grid-column: 1 / -1; }
.modulo__nota { font-size: 0.8rem; color: var(--ink-soft); }
.modulo__privacy { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; min-height: 44px; margin-top: -18px; font-size: 0.8rem; color: var(--ink-soft); text-underline-offset: 3px; }
.modulo__invia { justify-self: start; }
.modulo__esito:empty { display: none; }
.modulo__esito { padding: 10px 14px; border-left: 3px solid var(--legno); background: var(--cemento); font-size: 0.9rem; }
.modulo__esito[data-tipo="errore"] { border-color: var(--errore); color: var(--errore); }
.modulo .trappola { position: absolute; left: -9999px; width: 1px; height: 1px; min-height: 0; opacity: 0; }

/* Piè di pagina */
.foot { overflow: hidden; background: var(--ink); color: #c3b9a9; font-size: 0.85rem; }
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding-block: 28px; }
.foot__credito { display: inline-block; padding-block: 10px; color: #f2ede4; font-weight: 600; text-underline-offset: 3px; }
.foot__credito:hover { color: var(--legno-chiaro); }
.foot__legale { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
.foot__legale:hover { color: var(--legno-chiaro); }
.foot__su { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.foot__su .icona { width: 16px; height: 16px; }
.foot__marchio { font-size: 17vw; font-weight: 600; line-height: 0.82; letter-spacing: 0.08em; text-align: center; white-space: nowrap; color: rgb(255 255 255 / 0.06); user-select: none; }

/* Domande frequenti: risposte in chiaro, leggibili anche dai motori di risposta */
.faq__elenco { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; margin-top: 40px; }
.faq__voce { padding-block: 24px; border-top: 1px solid var(--filo); }
.faq__voce h3 { font-size: 1.12rem; font-weight: 500; }
.faq__voce p { margin-top: 10px; color: var(--ink-soft); }
@media (max-width: 760px) { .faq__elenco { grid-template-columns: 1fr; margin-top: 28px; } }

/* Pagina delle note legali (legal.html) e pagina non trovata (404.html) */
.legale__testa { display: flex; align-items: center; gap: 16px; min-height: 72px; border-bottom: 1px solid var(--filo); }
.legale { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; padding-block: 48px 80px; }
.legale h1 { margin-top: 0; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.legale h2 { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--filo); font-size: 1.6rem; }
.legale h3 { margin-top: 24px; font-size: 1.05rem; font-weight: 600; }
.legale p { margin-top: 10px; }
.legale a { overflow-wrap: anywhere; text-underline-offset: 3px; }
.legale dl { margin-top: 14px; }
.legale dl > div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 2px 20px; padding-block: 10px; border-bottom: 1px solid var(--filo); }
.legale dt { color: var(--ink-soft); font-size: 0.9rem; }
.legale dd { overflow-wrap: anywhere; }
.legale dd span { display: block; }
.legale .legale__data { margin-top: 40px; font-size: 0.85rem; color: var(--ink-soft); }
.legale__torna { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; }
@media (max-width: 560px) { .legale dl > div { grid-template-columns: 1fr; } }

@media (max-width: 1060px) {
  .nav { gap: 20px; }
  .top__cta { display: none; }
}

@media (max-width: 900px) {
  .top__in { gap: 12px; }
  .menu-btn { display: grid; }
  .nav { display: none; }
  .js .top.aperto .nav { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; gap: 0; padding: 4px var(--gutter) 20px; border-bottom: 1px solid var(--filo); background: var(--calce); box-shadow: 0 30px 40px -30px rgb(38 34 29 / 0.5); }
  .nav a { padding-block: 14px; border-bottom: 1px solid var(--filo); font-size: 1.15rem; }
  .studio, .preventivo__in { grid-template-columns: 1fr; }
  .percorso::before, .percorso::after { top: 0; bottom: 0; left: 25px; right: auto; width: 1px; height: auto; }
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 52px 1fr; column-gap: 24px; align-content: start; }
  .step__n { grid-row: span 2; }
  .step h3 { align-self: center; min-height: 52px; display: flex; align-items: center; }
  .step p { margin-top: 0; }
  .step:last-child { position: relative; }
  .step:last-child::before { content: ""; position: absolute; top: 56px; bottom: 0; left: 24px; width: 4px; background: var(--ink); }
  .condizioni { grid-template-columns: 1fr; }
}

/* Telefono in verticale: l'immagine intera in alto, i testi sotto su fondo chiaro */
@media (max-width: 760px) and (orientation: portrait) {
  .top { background: rgb(247 244 238 / 0.94); border-color: var(--filo); }
  .apertura { display: flex; flex-direction: column; height: auto; min-height: 0; max-height: none; padding-top: 72px; background: var(--calce); }
  .apertura__immagine { position: relative; aspect-ratio: 4 / 3.3; }
  .apertura__immagine img, .apertura__video { object-position: 44% 55%; }
  .apertura__testo { position: static; padding: 28px 0 44px; background: none; color: var(--ink); }
  .apertura__testo .eyebrow, .apertura__testo .lead { color: var(--ink-soft); }
  .apertura__testo .btn--chiaro { background: var(--ink); border-color: var(--ink); color: #fff; }
  .apertura__rivedi { top: calc(72px + (100vw / 1.212) - 54px); right: 10px; bottom: auto; }
  .apertura__rivedi span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .apertura__rivedi { min-width: 44px; justify-content: center; padding: 0; }
  .galleria { grid-template-columns: 1fr; }
  .foto img { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  .wordmark { font-size: 0.74rem; letter-spacing: 0.13em; }
  .lang :is(button, a) { min-width: 38px; }
  .eyebrow { font-size: 0.66rem; letter-spacing: 0.16em; }
  .eyebrow::before { flex-basis: 24px; }
  .actions .btn { flex: 1 1 140px; padding: 0 14px; font-size: 0.84rem; text-align: center; }
  .actions .btn .icona { display: none; }
  .modulo { grid-template-columns: 1fr; }
  .modulo__invia { justify-self: stretch; }
}

@media (orientation: landscape) and (max-height: 520px) {
  h1 { font-size: 2.1rem; }
  .apertura { min-height: 0; height: 100svh; }
  .apertura__testo { padding: 60px 0 16px; }
  .apertura__testo .eyebrow, .apertura__testo .lead { display: none; }
  .apertura__testo .actions { margin-top: 14px; }
}
