/* Dimorio site: static content pages (guida, faq, come-funziona, prezzi, legal) and the shared footer.
   Tokens come from v4.css. Everything here is scoped to .pg pages, except the footer (.sf), which index.html shares. */

/* ---------- page frame ---------- */
.pg body { background: var(--paper); color: var(--graphite); }
.pg :focus-visible { outline-color: var(--volt); }
.pg .skip:focus { top: 12px; }
:root { --wrap: max(var(--gut), calc((100% - 1180px) / 2)); }

/* ink band: header, breadcrumb, title (the story's colour, the page's door) */
.pg-ink { display: flow-root; background: var(--ink); color: var(--paper); padding: 0 var(--wrap) clamp(48px, 9vh, 96px); } /* flow-root: the crumb's top margin stays inside the band */
.pg-ink.has-cover { padding-bottom: clamp(140px, 20vw, 250px); }
/* the bar above the band (.pg-bar) lives in css/menu.css */
.crumb { margin: clamp(28px, 6vh, 64px) 0 18px; font-size: 15px; color: var(--mist); }
.crumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumb li + li::before { content: '/'; margin-right: 6px; opacity: .6; }
.crumb a { color: var(--mist); text-underline-offset: 4px; }
.crumb a:hover { color: var(--paper); }
.pg-title { margin: 0; font: 620 clamp(44px, 7vw, 112px)/.95 var(--display); font-variation-settings: 'wdth' 80; letter-spacing: -.028em; max-width: 16ch; text-wrap: balance; }
.pg-title.long { font-size: clamp(38px, 5.4vw, 88px); max-width: 20ch; }
.pg-lead { margin: 22px 0 0; max-width: 58ch; font-size: clamp(17px, 1.45vw, 20px); color: var(--mist); }
.pg-lead a { color: var(--paper); text-underline-offset: 4px; }
.meta { margin: 20px 0 0; font-size: 15px; color: var(--mist); }

/* cover photo straddling ink and paper (as in casa.html) */
.pg-cover { padding: 0 var(--wrap); margin-top: calc(-1 * clamp(110px, 17vw, 220px)); }
.pg-cover figure { margin: 0; }

/* paper body */
.pg-main { padding: clamp(36px, 7vh, 72px) var(--wrap) clamp(56px, 10vh, 112px); }
.prose { max-width: 70ch; font-size: 18px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 2.2em 0 .6em; font: 620 clamp(28px, 3.2vw, 42px)/1.02 var(--display); font-variation-settings: 'wdth' 80; letter-spacing: -.02em; }
.prose h3 { margin: 1.8em 0 .4em; font-size: 20px; line-height: 1.3; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--volt-deep); }
.prose a, .lnk { color: var(--volt-deep); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose a:hover, .lnk:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose .wide { max-width: none; }
.note { margin: 0 0 32px; padding: 16px 20px; border-left: 3px solid var(--volt); background: #F3F5FB; border-radius: 0 12px 12px 0; font-size: 16px; line-height: 1.55; }
mark.ph { background: #FFF1B8; color: var(--graphite); padding: 0 .2em; border-radius: 3px; }
.legal dl { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 10px 24px; margin: 0 0 1.4em; }
.legal dt { color: var(--mute); }
.legal dd { margin: 0; }
@media (max-width: 599px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 12px; } }

/* ---------- static before/after pair ---------- */
.pair { margin: 2em 0 2.2em; max-width: 1040px; }
.pair-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair-imgs > div { position: relative; margin: 0; aspect-ratio: var(--ar, 4 / 3); border-radius: 14px; overflow: hidden; background: #EEF0F4; }
.pair-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tag { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.2; background: rgba(13, 23, 48, .82); color: var(--paper); }
.tag.after { background: var(--volt); }
.pair figcaption, .pc figcaption { margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--mute); }
.single { margin: 2em 0; max-width: 520px; }
.single > div { position: relative; aspect-ratio: var(--ar, 4 / 3); border-radius: 14px; overflow: hidden; background: #EEF0F4; }
.single img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 599px) { .pair-imgs { grid-template-columns: 1fr; } }

/* ---------- curtain (come-funziona): side by side without JS, curtain with js/pages.js ---------- */
.pc { margin: 0; }
.pc-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pc-stage > div { position: relative; aspect-ratio: var(--ar, 4 / 3); border-radius: 22px; overflow: hidden; background: #1B2747; }
.pc-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.pc.on .pc-stage { display: block; position: relative; aspect-ratio: var(--ar, 4 / 3); border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px -30px rgba(13, 23, 48, .55); }
.pc.on .pc-stage > div { position: absolute; inset: 0; border-radius: 0; }
.pc.on .pc-after { clip-path: inset(0 0 0 var(--x, 50%)); }
.pc.on .pc-after .tag { left: auto; right: 10px; }
.pc-line { display: none; }
.pc.on .pc-line { display: block; position: absolute; top: 0; bottom: 0; left: var(--x, 50%); z-index: 2; width: 2px; margin-left: -1px; background: var(--paper); box-shadow: 0 0 0 1px rgba(58, 87, 255, .55); pointer-events: none; }
.pc.on .pc-line::after { content: ''; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230D1730' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 22px no-repeat; box-shadow: 0 8px 24px rgba(5, 10, 30, .3); }
.pc-range { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.pc.on .pc-stage:has(.pc-range:focus-visible) { outline: 2px solid var(--volt); outline-offset: 3px; }
@media (max-width: 599px) { .pc-stage { grid-template-columns: 1fr; } .pc.on .pc-stage, .pc-stage > div { border-radius: 16px; } }

/* ---------- guida hub cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 48px); }
.card a { display: block; color: inherit; text-decoration: none; }
.card .thumb { position: relative; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: #EEF0F4; }
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card a:hover .thumb img { transform: scale(1.03); }
.card h2 { margin: 18px 0 8px; font: 620 clamp(28px, 2.8vw, 38px)/1.02 var(--display); font-variation-settings: 'wdth' 80; letter-spacing: -.02em; text-wrap: balance; }
.card a:hover h2 { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--volt); }
.card p { margin: 0 0 8px; color: var(--mute); max-width: 52ch; }
.card .when { font-size: 15px; color: var(--mute); }
@media (max-width: 799px) { .cards { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 78ch; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 22px 0; font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; font: 400 28px/1 var(--text); color: var(--volt-deep); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 0 24px; max-width: 66ch; font-size: 17px; line-height: 1.65; }
.faq .a p { margin: 0 0 .8em; }
.faq .a a { color: var(--volt-deep); text-underline-offset: 4px; }

/* ---------- come-funziona steps ---------- */
.steps { list-style: none; margin: clamp(40px, 7vh, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.steps li { padding: 28px 28px 8px 0; }
.steps li + li { border-left: 1px solid var(--line); padding-left: clamp(18px, 2.4vw, 32px); }
.steps .n { display: block; font: 640 clamp(64px, 7vw, 112px)/.86 var(--display); font-variation-settings: 'wdth' 68; letter-spacing: -.035em; color: var(--volt); }
.steps h2 { margin: 18px 0 10px; font: 620 clamp(26px, 2.6vw, 36px)/1.02 var(--display); font-variation-settings: 'wdth' 80; letter-spacing: -.02em; }
.steps p { margin: 0 0 12px; color: var(--graphite); }
.steps p.s { color: var(--mute); font-size: 16px; }
@media (max-width: 799px) { .steps { grid-template-columns: 1fr; } .steps li { padding: 24px 0 8px; } .steps li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }

/* ---------- prezzi page ---------- */
.pg .packs { margin-top: 0; }
.incl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 48px; max-width: 980px; margin: clamp(36px, 6vh, 56px) 0 0; padding: 0; list-style: none; }
.incl li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.incl b { display: block; font-weight: 600; }
.incl span { color: var(--mute); font-size: 16px; }
@media (max-width: 699px) { .incl { grid-template-columns: 1fr; } }
.pg .act { margin-top: clamp(32px, 6vh, 56px); }
.h-sec { margin: clamp(48px, 9vh, 96px) 0 18px; font: 620 clamp(30px, 3.6vw, 48px)/1 var(--display); font-variation-settings: 'wdth' 80; letter-spacing: -.02em; }

/* ---------- shared footer (pages and index.html) ---------- */
.sf { flex-direction: column; gap: 14px; }
.pg .sf { width: auto; max-width: none; margin: 0 var(--wrap); padding-left: 0; padding-right: 0; }
.sf-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.sf-links a { color: var(--graphite); text-decoration: none; }
.sf-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.sf-ai, .sf-co { margin: 0; font-size: 13px; line-height: 1.5; color: var(--mute); }
.sf-ai a { color: var(--mute); text-underline-offset: 3px; }
.sf-pv { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--mute); }
.sf-pv a { color: var(--mute); }
