/* The Layer Below — pagina di vendita. Stile del libro: manuale del campo. */
:root {
  --paper: #F6F2E8;
  --paper-2: #EFEADC;
  --ink: #1E2420;
  --ink-soft: #4B524C;
  --green: #1F4D33;
  --green-deep: #14301F;
  --green-tint: #E5EBDD;
  --rust: #A4502A;
  --rule: #C9CDBF;
  --cream: #F3EEDF;
  --slab: "Zilla Slab", Georgia, serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-family: var(--slab); font-weight: 700; line-height: 1.08; margin: 0; color: var(--green); text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 20px; }
p { margin: 0 0 16px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }
section { padding: 96px 0; }

/* etichette numerate, come i titoletti del libro */
.label { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: .18em; color: var(--green); text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.label .n { color: var(--rust); }
.label.light { color: #CFD9C4; }
.label::after { content: ""; flex: 1; max-width: 120px; border-top: 1px solid currentColor; opacity: .5; }

/* bottoni */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--rust); color: #FFF8EF; font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: .04em; text-decoration: none; padding: 15px 24px; border-radius: 3px; border: 2px solid var(--rust); transition: transform .15s, background .15s; }
.btn:hover { background: #8D4322; border-color: #8D4322; transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: rgba(243,238,223,.7); color: var(--cream); }
.btn.ghost:hover { background: rgba(243,238,223,.12); }
.btn.big { font-size: 17px; padding: 18px 30px; }
.btn.light { background: var(--cream); color: var(--green-deep); border-color: var(--cream); }
.btn.light:hover { background: #fff; border-color: #fff; }

/* barra in alto */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; background: rgba(20,48,31,.88); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(243,238,223,.12); }
.brand { font-family: var(--mono); font-weight: 600; letter-spacing: .24em; font-size: 14px; color: var(--cream); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 14px; height: 14px; border: 2px solid var(--cream); border-top-color: var(--rust); display: inline-block; }
.topbar nav { display: flex; gap: 26px; align-items: center; }
.topbar nav a { color: #DCE3D3; text-decoration: none; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; }
.topbar nav a:hover { color: #fff; }
.topbar .nav-buy { background: var(--rust); color: #FFF8EF; padding: 9px 14px; border-radius: 3px; white-space: nowrap; }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; padding: 140px 0 80px; color: var(--cream); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; transform: scale(1.04); animation: drift 22s ease-out forwards; }
@keyframes drift { to { transform: scale(1); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,34,22,.92) 0%, rgba(14,34,22,.72) 42%, rgba(14,34,22,.15) 75%), linear-gradient(0deg, rgba(14,34,22,.7), transparent 45%); }
.hero-text { position: relative; max-width: 620px; margin-left: max(24px, calc((100vw - 1160px) / 2 + 24px)); padding-right: 24px; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .3em; color: #CFD9C4; margin-bottom: 22px; }
.hero h1 { color: var(--cream); font-size: clamp(40px, 6vw, 68px); margin-bottom: 24px; }
.lead { font-size: 20px; color: #E7EADF; }
.lead em { font-style: italic; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-note { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: #B9C6B0; margin-top: 22px; }

/* due colonne */
.two { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: center; }
.two.rev { grid-template-columns: 1fr 1.15fr; }
.photo { margin: 0; }
.two > *, .book-grid > *, .dale-grid > *, .diag > * { min-width: 0; }
.photo img { width: 100%; border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--green-tint); }
.photo figcaption { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); margin-top: 12px; border-top: 1px solid var(--rule); padding-top: 8px; }
.photo figcaption span { color: var(--rust); font-weight: 600; margin-right: 8px; }
.punch { font-family: var(--slab); font-weight: 700; font-size: 24px; color: var(--green); }

/* fascia del suolo */
.band { position: relative; padding: 0; min-height: 520px; display: flex; align-items: center; overflow: hidden; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,34,22,.05) 30%, rgba(14,34,22,.85) 75%); z-index: 1; }
.band-text { position: relative; z-index: 2; margin-left: auto; max-width: 480px; padding: 60px 40px; margin-right: max(24px, calc((100vw - 1160px) / 2)); }
.band-quote { font-family: var(--slab); font-weight: 500; font-style: italic; font-size: clamp(26px, 3vw, 36px); line-height: 1.2; color: var(--cream); }

/* le quattro correzioni */
.fixes { background: var(--paper-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.head { max-width: 760px; margin-bottom: 44px; }
.fix-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1.5px solid var(--ink); background: var(--paper); }
.fix { padding: 28px 24px 24px; border-right: 1px solid var(--ink); display: flex; flex-direction: column; }
.fix:last-child { border-right: none; }
.fix-n { font-family: var(--slab); font-weight: 700; font-size: 64px; line-height: .8; color: var(--rust); margin-bottom: 18px; }
.fix h3 { font-size: 28px; margin-bottom: 10px; }
.fix .quote { font-family: var(--slab); font-style: italic; font-weight: 500; color: var(--green); font-size: 18px; line-height: 1.3; }
.fix p { font-size: 16px; }
.fix .test { margin-top: auto; margin-bottom: 0; padding-top: 12px; border-top: 1px dashed var(--rule); font-family: var(--mono); font-size: 13px; color: var(--ink-soft); }
.fix .test span { color: var(--rust); font-weight: 600; margin-right: 6px; }

/* diagnosi */
.diag { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-family: var(--serif); font-size: 16px; background: var(--paper); border: 1.5px solid var(--green); color: var(--green); padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: background .15s, color .15s; }
.chip:hover { background: var(--green-tint); }
.chip.on { background: var(--green); color: var(--cream); }
.card { background: #FBF9F3; border: 1.5px solid var(--ink); padding: 26px 28px 20px; min-height: 250px; box-shadow: 10px 10px 0 var(--green-tint); }
.card-tag { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; border-bottom: 1.5px solid var(--ink); padding-bottom: 12px; margin-bottom: 16px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.card-tag span { color: var(--rust); font-weight: 600; }
.card-tag b { font-family: var(--slab); font-size: 20px; letter-spacing: 0; color: var(--green); }
.card-foot { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); margin: 0; }

/* il libro */
.book { background: var(--green-deep); color: #E7EADF; }
.book h2 { color: var(--cream); }
.book .label { color: #CFD9C4; }
.book-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.cover img { width: 100%; max-width: 400px; margin: 0 auto; box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(243,238,223,.15); transform: rotate(-1.5deg); }
.ticks { list-style: none; padding: 0; margin: 22px 0 28px; }
.ticks li { padding: 8px 0 8px 30px; position: relative; border-bottom: 1px solid rgba(243,238,223,.12); font-size: 17px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 15px; width: 14px; height: 14px; border: 2px solid #CFD9C4; background: linear-gradient(135deg, transparent 45%, var(--rust) 45%, var(--rust) 60%, transparent 60%); }
.price-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border: 1.5px solid rgba(243,238,223,.5); padding: 20px 22px; background: rgba(0,0,0,.18); }
.price { font-family: var(--slab); font-weight: 700; font-size: 46px; color: var(--cream); margin: 0; line-height: 1; }
.price-note { font-family: var(--mono); font-size: 12.5px; color: #B9C6B0; margin: 6px 0 0; }
.fine { font-family: var(--mono); font-size: 12.5px; color: #B9C6B0; margin-top: 14px; }
.sample { margin-top: 18px; }
.sample a { color: var(--cream); }

/* dentro */
.shape { list-style: none; counter-reset: s; padding: 0; margin: 0; border: 1.5px solid var(--ink); background: #FBF9F3; }
.shape li { counter-increment: s; padding: 12px 18px 12px 56px; position: relative; border-bottom: 1px dashed var(--rule); font-size: 17px; }
.shape li:last-child { border-bottom: none; }
.shape li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 18px; top: 13px; font-family: var(--mono); font-weight: 600; font-size: 14px; color: var(--rust); }
.shape b { font-family: var(--slab); color: var(--green); }
.parts { padding-top: 0; }
.parts-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 2.5px solid var(--green); border-bottom: 1px solid var(--green); }
.part { padding: 18px 14px; border-right: 1px solid var(--rule); }
.part:last-child { border-right: none; }
.part span { font-family: var(--slab); font-weight: 700; font-size: 38px; color: var(--rust); line-height: 1; }
.part p { font-family: var(--slab); font-weight: 500; font-size: 17px; line-height: 1.2; margin: 8px 0 0; color: var(--green); }
.part.hl { background: var(--green-tint); }
.parts-back { margin-top: 24px; font-size: 16px; color: var(--ink-soft); max-width: 900px; }
.parts-back b { color: var(--green); font-family: var(--slab); }
.wall { padding-top: 40px; }
.photo.tall img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 35% 50%; }

/* Dale */
.dale { background: var(--paper-2); border-top: 1px solid var(--rule); }
.dale-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 64px; align-items: center; }
.porch { margin: 0; }
.porch img { border: 1px solid var(--ink); box-shadow: -10px 10px 0 var(--green-tint); }
.disclose { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); border-left: 3px solid var(--rust); padding-left: 12px; margin-top: 24px; }

/* domande */
details { border-bottom: 1px solid var(--rule); padding: 18px 0; }
summary { font-family: var(--slab); font-weight: 700; font-size: 22px; color: var(--green); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--rust); font-size: 24px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 4px; color: var(--ink-soft); }

/* finale */
.final { position: relative; padding: 0; min-height: 640px; display: flex; align-items: flex-end; overflow: hidden; color: var(--cream); }
.final img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.final::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,24,16,.92) 10%, rgba(10,24,16,.35) 60%, rgba(10,24,16,.1)); z-index: 1; }
.final-text { position: relative; z-index: 2; text-align: center; max-width: 720px; margin: 0 auto; padding: 0 24px 90px; }
.final-text .label { justify-content: center; }
.final-text .label::after { display: none; }
.final h2 { color: var(--cream); font-size: clamp(34px, 5vw, 56px); }
.final p { font-size: 20px; color: #DCE3D3; margin-bottom: 28px; }

footer { background: var(--green-deep); color: #9FB09A; padding: 36px 0; font-size: 14px; }
.foot { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: baseline; }
.foot p { margin: 0; }
.brand-foot { font-family: var(--mono); letter-spacing: .2em; color: var(--cream); }

/* barra d'acquisto */
.sticky { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 40; display: flex; align-items: center; gap: 14px; background: var(--green-deep); color: var(--cream); padding: 10px 10px 10px 12px; border-radius: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.35); transition: transform .3s; width: min(520px, calc(100vw - 24px)); }
.sticky.show { transform: translate(-50%, 0); }
.sticky img { width: 34px; height: auto; }
.sticky p { margin: 0; flex: 1; font-size: 15px; line-height: 1.25; }
.sticky p span { display: block; font-family: var(--mono); font-size: 11.5px; color: #B9C6B0; }
.sticky .btn { padding: 11px 16px; font-size: 14px; }

/* comparsa */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .hero-img { animation: none; transform: none; } html { scroll-behavior: auto; } }

/* tablet e telefono */
@media (max-width: 980px) {
  .topbar nav a:not(.nav-buy) { display: none; }
  .two, .two.rev, .book-grid, .dale-grid, .diag { grid-template-columns: 1fr; gap: 36px; }
  .two.rev .photo { order: -1; }
  .fix-grid { grid-template-columns: 1fr 1fr; }
  .fix:nth-child(2) { border-right: none; }
  .fix:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .parts-grid { grid-template-columns: repeat(2, 1fr); }
  .part { border-bottom: 1px solid var(--rule); }
  .part:nth-child(2n) { border-right: none; }
  .cover img { max-width: 300px; }
  .porch img { max-width: min(420px, 100%); }
  .foot { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  section { padding: 68px 0; }
  .wrap { padding: 0 16px; }
  .topbar { padding: 12px 16px; }
  .brand { font-size: 12px; letter-spacing: .18em; }
  .hero { padding: 120px 0 56px; }
  .hero-img { object-position: 72% 40%; }
  .hero-shade { background: linear-gradient(0deg, rgba(14,34,22,.95) 0%, rgba(14,34,22,.8) 55%, rgba(14,34,22,.35) 100%); }
  .hero-text { margin-left: 16px; padding-right: 16px; }
  .lead { font-size: 18px; }
  .fix-grid { grid-template-columns: 1fr; }
  .fix { border-right: none; border-bottom: 1px solid var(--ink); }
  .fix:last-child { border-bottom: none; }
  .band { min-height: 460px; align-items: flex-end; }
  .band::before { background: linear-gradient(0deg, rgba(14,34,22,.9) 25%, transparent 70%); }
  .band-text { margin: 0; padding: 30px 20px; }
  .price-box { flex-direction: column; align-items: stretch; text-align: center; }
  .price-box .btn { justify-content: center; }
  .final { min-height: 560px; }
}
