/* Tomolea — identità dal packaging: latta verde bosco, oro a caldo, carta avorio, rosso passata.
   Layout: hero 3D a tutta larghezza, poi sezioni alternate scure/avorio come etichette diverse della stessa linea. */
:root {
  --bosco: #13261c;
  --bosco-2: #1b3326;
  --oro: #c9a45c;
  --oro-chiaro: #e3c88d;
  --avorio: #f2ead9;
  --inchiostro: #2a2a1f;
  --muto: #b9b49c;
  --passata: #9c2d23;
  --linea: rgba(201, 164, 92, 0.35);
  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
  --sans: "Karla", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bosco);
  color: var(--avorio);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--bosco);
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; letter-spacing: 0.02em; margin: 0; }
p { margin: 0; }
.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--oro);
}
.fregio { display: flex; align-items: center; gap: 12px; color: var(--oro); }
.fregio::before, .fregio::after { content: ""; height: 1px; width: 48px; background: var(--linea); }
.fregio span { width: 5px; height: 5px; border-radius: 50%; background: var(--oro); }
.tricolore { display: flex; width: 90px; height: 3px; }
.tricolore i { flex: 1; } .tricolore i:nth-child(1){background:#2f7a43} .tricolore i:nth-child(2){background:#efe9dc} .tricolore i:nth-child(3){background:var(--passata)}

/* nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(19, 38, 28, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linea);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.marchio { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.marchio .mono { font-family: var(--display); font-size: 26px; color: var(--oro); line-height: 1; letter-spacing: -0.12em; }
.marchio .nome { font-family: var(--display); font-size: 18px; letter-spacing: 0.32em; color: var(--oro-chiaro); }
.nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 14px; letter-spacing: 0.08em; }
.nav ul a { text-decoration: none; color: var(--muto); }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--avorio); }
@media (max-width: 760px) { .nav ul .nascondi { display: none; } .nav ul { gap: 16px; } .marchio .nome { font-size: 15px; letter-spacing: 0.24em; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--sans); font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 15px 26px; border: 1px solid var(--oro); color: var(--bosco); background: var(--oro);
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--oro-chiaro); transform: translateY(-1px); }
.btn.vuoto { background: transparent; color: var(--oro-chiaro); }
.btn.vuoto:hover { background: rgba(201,164,92,.12); }
.btn-piccolo { padding: 9px 16px; font-size: 12px; }

/* hero 3D */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--linea); }
.hero > canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: linear-gradient(180deg, #24382c 0%, #6f6a3e 60%, #5e6b37 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(19,38,28,.86) 0%, rgba(19,38,28,.35) 55%, rgba(19,38,28,0) 100%),
              linear-gradient(0deg, rgba(19,38,28,.9) 0%, rgba(19,38,28,0) 40%);
}
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(88px, 16vh, 150px) clamp(64px, 12vh, 110px); }
.hero h1 { font-size: clamp(42px, 7.4vw, 92px); line-height: 1.02; max-width: 12ch; color: var(--avorio); }
.hero h1 em { font-family: var(--serif); font-style: italic; color: var(--oro-chiaro); font-weight: 500; }
.hero .lead { max-width: 46ch; font-size: clamp(17px, 1.6vw, 20px); color: #ddd5c1; margin-top: 22px; }
.hero .azioni { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .stack { display: grid; gap: 18px; }
.hero-coord {
  position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); bottom: 22px; z-index: 2;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muto); text-align: right;
}

/* sezioni */
section { padding-block: clamp(72px, 10vw, 128px); }
.avorio { background: var(--avorio); color: var(--inchiostro); }
.avorio .eyebrow { color: #8a6a2c; }
.avorio .fregio { color: #8a6a2c; }
.avorio .fregio::before, .avorio .fregio::after { background: rgba(138,106,44,.4); }
.avorio .fregio span { background: #8a6a2c; }
.titolo-sez { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.08; margin-top: 14px; }
.titolo-sez em { font-family: var(--serif); font-style: italic; font-weight: 500; }
.corpo { font-size: 18px; max-width: 62ch; }
.corpo + .corpo { margin-top: 16px; }

.due { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.due > * { min-width: 0; }
@media (max-width: 860px) { .due { grid-template-columns: 1fr; } }

.reveal { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.giu { transform: translateY(18px); }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.giu { transform: none; transition: none; } }

/* carta 3D inclinabile */
.tilt { perspective: 1100px; }
.tilt .carta {
  transform-style: preserve-3d; transition: transform .25s ease-out;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6), 0 0 0 1px var(--linea);
  position: relative;
}
.tilt .carta img { display: block; width: 100%; height: auto; }
.tilt .carta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--lx, 30%) var(--ly, 20%), rgba(255,240,200,.28), rgba(255,240,200,0) 45%);
  mix-blend-mode: soft-light;
}

footer { background: #0d1b14; border-top: 1px solid var(--linea); padding-block: 56px 40px; font-size: 14px; color: var(--muto); }
footer .righe { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
footer h4 { font-family: var(--display); font-weight: 400; color: var(--oro-chiaro); font-size: 15px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 10px; }
footer .fine { margin-top: 40px; padding-top: 18px; border-top: 1px solid rgba(201,164,92,.18); font-size: 12px; letter-spacing: .08em; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.segnaposto { border-bottom: 1px dashed currentColor; opacity: .85; }

/* SEO: h1 descrittivo piccolo, titolo grande visivo */
body { margin: 0; }
h1.eyebrow, h2.eyebrow { font-family: var(--sans); font-weight: 400; font-size: 12px; line-height: 1.6; letter-spacing: 0.24em; }
.avorio h2.eyebrow { color: #8a6a2c; }
.fregio + h2.eyebrow { margin-top: 18px; }
.hero .titolo-hero { font-family: var(--display); font-size: clamp(42px, 7.4vw, 92px); line-height: 1.02; max-width: 12ch; color: var(--avorio); text-wrap: balance; letter-spacing: .02em; }
.hero .titolo-hero em { font-family: var(--serif); font-style: italic; color: var(--oro-chiaro); font-weight: 500; }
.h1-luogo { display: block; font-family: var(--sans); font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--muto); margin-top: 14px; }
footer .righe a { text-decoration: none; }
footer .righe a:hover { color: var(--avorio); }
.hero h1.eyebrow { max-width: none; color: var(--oro); line-height: 1.6; }

/* logo ufficiale Tomolea (maschere colorate in oro) */
.logo-mono, .logo-nome { display: block; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.logo-mono { width: 22px; aspect-ratio: 351 / 561; background: var(--oro); -webkit-mask-image: url(img/logo-monogramma.png); mask-image: url(img/logo-monogramma.png); }
.logo-nome { width: 116px; aspect-ratio: 792 / 211; background: var(--oro-chiaro); -webkit-mask-image: url(img/logo-nome.png); mask-image: url(img/logo-nome.png); }
.marchio { gap: 12px; }
footer .logo-mono { width: 30px; }
footer .logo-nome { width: 150px; }
@media (max-width: 760px) { .logo-nome { width: 96px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* foto 4D (foto4d.js): la tela WebGL copre la foto, che resta sotto per motori di ricerca e browser senza WebGL */
.f4d { position: relative; overflow: hidden; margin: 0; }
.f4d img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
canvas.foto4d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vivo img { visibility: hidden; }
.didascalia { position: absolute; left: 18px; bottom: 14px; z-index: 1; margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--avorio); text-shadow: 0 1px 8px rgba(0,0,0,.6); pointer-events: none; }
