/* Variante C "Portico": architettonica e notturna.
   Nome come iscrizione su architrave, immagini ad arco, ritmo di lesene sulle fasce scure. */
:root {
  --notte: #0F2133;
  --abisso: #0A1826;
  --profondo: #172F4B;
  --pietra: #ECE7DE;
  --avorio: #F7F5F1;
  --oro-chiaro: #D8C4A0;
  --bronzo: #B18A54;
  --oro-testo: #8A6636;
  --testo: #46505B;
  --su-scuro: rgba(236, 231, 222, .8);
  --linea-scura: rgba(216, 196, 160, .2);
  --linea-chiara: rgba(16, 36, 58, .14);
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, serif;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 56px);
  --head: 88px;
  --ease: cubic-bezier(.22, .68, .1, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--avorio); color: var(--testo); font: 400 1.125rem/1.65 var(--text); overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--oro-chiaro); outline-offset: 3px; }
.light :focus-visible, .stone :focus-visible { outline-color: var(--oro-testo); }

h1, h2, h3 { font-family: var(--display); font-weight: 300; color: var(--notte); margin: 0 0 .45em; line-height: 1.1; letter-spacing: -.005em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-family: var(--text); font-weight: 400; font-size: 1.4rem; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 60ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--pietra); color: var(--notte); padding: .6em 1em; z-index: 60; }
.skip:focus { left: 8px; top: 8px; }
.demo-bar { position: relative; z-index: 30; background: var(--abisso); color: var(--oro-chiaro); font: 400 .8rem/1.45 var(--display); letter-spacing: .02em; text-align: center; padding: .55em var(--gutter); }
.demo-bar a { color: var(--pietra); margin-left: .4em; }
.pending { color: var(--oro-testo); font-style: italic; }
.bays .pending, .site-footer .pending { color: var(--oro-chiaro); }

/* Header: trasparente sulla hero, pieno durante lo scroll */
.site-header { position: sticky; top: 0; z-index: 40; color: var(--pietra); view-transition-name: vl-header; }
.site-header::before { content: ""; position: absolute; inset: 0; background: var(--notte); border-bottom: 1px solid var(--linea-scura); transition: opacity .5s var(--ease); }
.js .site-header:not(.scrolled)::before { opacity: 0; }
.js .site-header.scrolled::before { background: rgba(15, 33, 51, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--head); }
.brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--oro-chiaro); }
.mono { width: 54px; height: 40px; flex: none; }
.brand-name { font: 400 .98rem/1.2 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--pietra); }
.brand-name small { display: block; font: italic 400 .95rem/1.3 var(--text); letter-spacing: 0; text-transform: none; color: var(--oro-chiaro); margin-top: 3px; }
.nav ul { list-style: none; display: flex; gap: clamp(20px, 2.6vw, 40px); margin: 0; padding: 0; }
.nav a { position: relative; display: inline-block; text-decoration: none; font: 400 .95rem/1 var(--display); letter-spacing: .05em; color: var(--su-scuro); padding: 12px 0; transition: color .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--oro-chiaro); transform: scaleX(0); transition: transform .5s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--pietra); }
.nav a:hover::after, .nav a:focus-visible::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; position: relative; z-index: 2; background: none; border: 1px solid var(--linea-scura); color: var(--pietra); font: 400 .9rem var(--display); letter-spacing: .08em; padding: 10px 16px; min-height: 44px; cursor: pointer; }

/* Pulsanti e link con freccia che si allunga */
.arr { width: 34px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.2; transition: transform .5s var(--ease); }
.btn { display: inline-flex; align-items: center; gap: 18px; min-height: 58px; padding: 0 26px; font: 500 .95rem/1.2 var(--display); letter-spacing: .05em; text-decoration: none; background: var(--notte); color: var(--pietra); border: 1px solid transparent; transition: background-color .4s var(--ease), color .4s; }
.btn-light { background: var(--pietra); color: var(--notte); }
.btn-light:hover, .btn-light:focus-visible { background: var(--oro-chiaro); }
.btn:hover .arr, .more:hover .arr, .btn:focus-visible .arr, .more:focus-visible .arr { transform: translateX(6px); }
.more { display: inline-flex; align-items: center; gap: 14px; font: 500 .95rem/1.3 var(--display); letter-spacing: .04em; text-decoration: none; color: var(--oro-chiaro); padding: 6px 0; }
.light .more, .stone .more { color: var(--oro-testo); }
.more:hover { color: var(--pietra); }
.light .more:hover, .stone .more:hover { color: var(--notte); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 36px; }

/* Icone lineari */
.ico { width: 40px; height: 40px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; color: var(--oro-testo); }
.bays .ico { color: var(--oro-chiaro); }

/* Lesene: righe verticali come campate di un portico */
.pilasters { background-color: var(--notte); background-image: repeating-linear-gradient(90deg, rgba(216,196,160,.06) 0 1px, transparent 1px 16.6667%); }

/* Hero cinematografica */
.hero { position: relative; margin-top: calc(-1 * var(--head)); min-height: max(640px, calc(100svh - 32px)); display: flex; align-items: flex-end; background: var(--notte); color: var(--pietra); overflow: hidden; isolation: isolate; }
.hero-inner { min-height: max(520px, 76svh); }
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(15,33,51,.95) 0%, rgba(15,33,51,.86) 34%, rgba(15,33,51,.45) 64%, rgba(15,33,51,.2) 100%),
  linear-gradient(to top, rgba(15,33,51,1) 0%, rgba(15,33,51,0) 32%),
  linear-gradient(to bottom, rgba(15,33,51,.75) 0%, rgba(15,33,51,0) 22%); }
.hero-content { width: 100%; padding-top: calc(var(--head) + 64px); padding-bottom: clamp(72px, 10vh, 120px); }
.hero-content > * { max-width: 720px; }
.kicker { display: flex; align-items: center; gap: 14px; font: 400 .92rem/1.4 var(--display); letter-spacing: .08em; color: var(--oro-chiaro); margin-bottom: 26px; }
.kicker::before { content: ""; width: 40px; height: 1px; background: var(--bronzo); }
.inscription { font: 300 clamp(2.4rem, 5.6vw, 5rem)/1.04 var(--display); text-transform: uppercase; letter-spacing: .07em; color: var(--pietra); margin-bottom: .3em; }
.avv { display: block; font-size: .36em; letter-spacing: .32em; color: var(--oro-chiaro); margin-bottom: .55em; }
.title { font: 300 clamp(2.4rem, 5vw, 4.4rem)/1.06 var(--display); color: var(--pietra); }
.sub { font: italic 400 clamp(1.35rem, 2.3vw, 1.9rem)/1.25 var(--text); color: var(--oro-chiaro); margin-bottom: .9em; }
.lead { color: var(--su-scuro); font-size: 1.18rem; max-width: 54ch; }
.hero-phrase { position: absolute; right: var(--gutter); bottom: clamp(96px, 14vh, 150px); width: 220px; margin: 0; font: italic 400 1.35rem/1.35 var(--text); color: var(--pietra); }
.hero-phrase::before { content: ""; display: block; width: 40px; height: 1px; background: var(--oro-chiaro); margin-bottom: 14px; }
.photo-note { position: absolute; right: 12px; bottom: 12px; z-index: 2; margin: 0; max-width: 320px; font: 400 .72rem/1.3 var(--display); letter-spacing: .02em; color: var(--pietra); background: rgba(10,24,38,.72); padding: 5px 9px; }

/* Tre campate */
.bays { color: var(--su-scuro); padding: 0 0 clamp(72px, 9vw, 128px); }
.bays-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--linea-scura); }
.bay { position: relative; padding: 52px clamp(24px, 3vw, 44px) 12px; border-left: 1px solid var(--linea-scura); }
.bay:last-child { border-right: 1px solid var(--linea-scura); }
.bay::before { content: ""; position: absolute; left: -1px; top: -1px; width: 1px; height: 0; background: var(--oro-chiaro); transition: height .8s var(--ease); }
.bay:hover::before, .bay:focus-within::before { height: 100%; }
.bay .ico { margin-bottom: 28px; transition: transform .6s var(--ease); }
.bay:hover .ico { transform: translateY(-4px); }
.bay h2 { font: 400 1.6rem/1.2 var(--display); color: var(--pietra); }
.bay p { font-size: 1.08rem; }

/* Pietra con arco */
.stone { background: var(--pietra); padding: clamp(72px, 9vw, 136px) 0; }
.arch-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 7vw, 112px); align-items: center; }
.arch { position: relative; margin: 0; aspect-ratio: 4 / 5; max-height: 640px; overflow: hidden; border-radius: 50% 50% 0 0 / 40% 40% 0 0; background: #D6CDBE; }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch .photo-note { right: 0; bottom: 0; }
.big { font: 300 clamp(2.2rem, 4.4vw, 3.8rem)/1.1 var(--display); color: var(--notte); max-width: 17ch; }
.kicker-dark { display: flex; align-items: center; gap: 14px; font: 500 .9rem/1.4 var(--display); letter-spacing: .08em; color: var(--oro-testo); margin: 0 0 20px; }
.kicker-dark::before { content: ""; width: 32px; height: 1px; background: var(--bronzo); }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--linea-chiara); }
.checks .ico { width: 28px; height: 28px; }

/* Sezioni chiare */
.light { background: var(--avorio); padding: clamp(72px, 9vw, 136px) 0; }
.light + .light { padding-top: 0; }
.intro { max-width: 760px; margin-bottom: 56px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.steps li { counter-increment: s; position: relative; padding-top: 28px; }
.steps li::before { content: counter(s); display: block; font: 200 3.2rem/1 var(--display); color: var(--oro-testo); margin-bottom: 18px; }
.steps li::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--linea-chiara); transform-origin: left; }
.steps h3 { color: var(--notte); }
.steps p { margin: 0; font-size: 1.05rem; }
.steps-col { grid-template-columns: 1fr; gap: 8px; }
.steps-col li { display: grid; grid-template-columns: 72px 1fr; column-gap: 16px; padding: 24px 0; }
.steps-col li::before { grid-row: span 2; font-size: 2.4rem; margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.note { font-size: 1rem; font-style: italic; border-left: 1px solid var(--bronzo); padding-left: 16px; }
.todo { border: 1px dashed var(--bronzo); padding: 22px 24px; margin-bottom: 16px; background: #fff; }
.todo h3 { margin-bottom: .2em; }
.todo p { margin: 0; font-size: 1.02rem; }

/* Volta: fascia scura con immagine in parallasse */
.vault { position: relative; overflow: hidden; background: var(--notte); color: var(--su-scuro); padding: clamp(96px, 12vw, 176px) 0; isolation: isolate; }
.vault-media { position: absolute; inset: -12% 0; z-index: -1; }
.vault-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.vault-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15,33,51,.96) 0%, rgba(15,33,51,.88) 50%, rgba(15,33,51,.7) 100%); }
.vault-in > * { max-width: 680px; }
.vault h2 { color: var(--pietra); }
.vault .btn { margin-top: 16px; }

.head-line { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 40px; }
.head-line h2 { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.card { border-top: 1px solid var(--bronzo); padding-top: 26px; }
.tag { display: inline-block; font: 400 .74rem/1.3 var(--display); letter-spacing: .06em; color: var(--testo); border: 1px solid var(--linea-chiara); padding: 4px 10px; margin-bottom: 16px; }
.cat { font: 500 .9rem/1.4 var(--display); letter-spacing: .06em; color: var(--oro-testo); margin: 0 0 8px; }
.card h3 { color: var(--notte); margin: 0; }

.closing { padding: clamp(88px, 11vw, 160px) 0; }
.closing-in { display: flex; justify-content: space-between; align-items: center; gap: 28px 48px; flex-wrap: wrap; }
.closing h2 { margin: 0; font-size: clamp(2.4rem, 5.2vw, 4.6rem); color: var(--pietra); }

/* Pagine interne */
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 72px; }
.areas li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 24px; padding: 40px 0; border-top: 1px solid var(--linea-chiara); }
.areas h2 { font: 400 1.65rem/1.2 var(--display); }
.areas .is-pending h2 { color: var(--testo); }
.cats { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0 0 56px; }
.cats li { font: 400 .88rem/1.3 var(--display); letter-spacing: .04em; border: 1px solid var(--linea-chiara); padding: 9px 16px; color: var(--notte); }
.featured { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; margin-bottom: 72px; }
.arch-wide { aspect-ratio: 4 / 3; }
.featured h2 { max-width: 20ch; }
.contact-list { margin: 0; border-bottom: 1px solid var(--linea-chiara); }
.contact-list > div { display: grid; grid-template-columns: 32px 120px minmax(0, 1fr); gap: 18px; align-items: center; padding: 18px 0; border-top: 1px solid var(--linea-chiara); }
.contact-list .ico { width: 26px; height: 26px; }
.contact-list dt { font: 500 .95rem/1.3 var(--display); letter-spacing: .04em; color: var(--notte); }
.contact-list dd { margin: 0; }

/* Footer con iscrizione */
.site-footer { position: relative; overflow: hidden; background: var(--abisso); color: var(--su-scuro); font-size: 1rem; padding: 72px 0 0; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--pietra); }
.foot-id p { margin-top: 18px; }
.foot-base { grid-column: 1 / -1; max-width: none; border-top: 1px solid var(--linea-scura); padding-top: 22px; margin: 8px 0 0; font: 400 .85rem var(--display); letter-spacing: .02em; }
.foot-inscription { margin: 24px 0 0; max-width: none; text-align: center; white-space: nowrap; font: 300 clamp(4rem, 17vw, 15rem)/.78 var(--display); letter-spacing: .14em; color: rgba(216,196,160,.07); user-select: none; }

/* Movimento */
@media (prefers-reduced-motion: no-preference) {
  .hero-media::before { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--notte); transform-origin: top; animation: c-curtain 1.1s var(--ease) .05s both; }
  .hero-media img { animation: c-settle 2.8s var(--ease) both; }
  .hero-content > * { animation: c-rise 1s var(--ease) both; }
  .hero-content > :nth-child(1) { animation-delay: .35s; }
  .hero-content > :nth-child(2) { animation-delay: .45s; }
  .hero-content > :nth-child(3) { animation-delay: .6s; }
  .hero-content > :nth-child(4) { animation-delay: .7s; }
  .hero-content > :nth-child(5) { animation-delay: .8s; }
  .inscription { animation-name: c-carve !important; animation-duration: 1.6s !important; }
  .hero-phrase { animation: c-rise 1s var(--ease) 1.1s both; }

  .reveal-on .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
  .reveal-on .reveal.in { opacity: 1; transform: none; }
  .reveal-on .bays-grid .bay:nth-child(2) { transition-delay: .12s; }
  .reveal-on .bays-grid .bay:nth-child(3) { transition-delay: .24s; }
  .reveal-on .arch.reveal { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1.5s var(--ease); }
  .reveal-on .arch.reveal img { transform: scale(1.12); transition: transform 2s var(--ease); }
  .reveal-on .arch.reveal.in { clip-path: inset(0); }
  .reveal-on .arch.reveal.in img { transform: none; }
  .reveal-on .steps li::after { transform: scaleX(0); transition: transform 1.2s var(--ease) .15s; }
  .reveal-on .steps li.in::after { transform: scaleX(1); }

  @supports (animation-timeline: view()) {
    .vault-media img { animation: c-drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }

  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: c-dim .6s ease both; }
  ::view-transition-new(root) { animation: c-wipe .75s var(--ease) both; }
  ::view-transition-group(vl-header) { animation: none; }
}
@keyframes c-curtain { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes c-settle { from { transform: scale(1.12); } to { transform: none; } }
@keyframes c-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes c-carve { from { opacity: 0; letter-spacing: .22em; } to { opacity: 1; letter-spacing: .07em; } }
@keyframes c-drift { from { transform: translateY(-8%); } to { transform: translateY(8%); } }
@keyframes c-dim { to { opacity: .4; } }
@keyframes c-wipe { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }

/* Responsive */
@media (max-width: 1100px) {
  .nav ul { gap: 22px; }
  .brand-name { font-size: .9rem; letter-spacing: .12em; }
}
@media (max-width: 1023px) {
  .bays-grid, .cards { grid-template-columns: 1fr; }
  .bay, .bay:last-child { border-left: 0; border-right: 0; border-bottom: 1px solid var(--linea-scura); padding: 40px 0 28px; }
  .bay::before { display: none; }
  .bays-grid { border-top: 0; }
  .arch-split, .split, .featured { grid-template-columns: 1fr; }
  .arch { max-height: 460px; max-width: 420px; }
  .arch-wide { max-width: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .areas { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  :root { --head: 72px; }
  .menu-btn { display: inline-flex; align-items: center; }
  .js .nav { position: fixed; inset: 0; z-index: 1; display: flex; align-items: center; background: var(--notte); background-image: repeating-linear-gradient(90deg, rgba(216,196,160,.06) 0 1px, transparent 1px 25%); padding: calc(var(--head) + 24px) var(--gutter) 40px; visibility: hidden; opacity: 0; transition: opacity .45s var(--ease), visibility 0s .45s; }
  .js .nav.open { visibility: visible; opacity: 1; transition: opacity .45s var(--ease); }
  .js .nav ul { flex-direction: column; gap: 0; width: 100%; }
  .js .nav li { border-bottom: 1px solid var(--linea-scura); }
  .js .nav a { display: block; font: 300 2rem/1.2 var(--display); letter-spacing: .02em; padding: 18px 0; color: var(--pietra); }
  .js .nav a::after { display: none; }
  .js .nav a[aria-current="page"] { color: var(--oro-chiaro); }
  html:not(.js) .site-header { position: relative; }
  html:not(.js) .head { flex-wrap: wrap; padding-bottom: 12px; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .nav ul { flex-wrap: wrap; gap: 4px 20px; }
  html:not(.js) .hero { margin-top: 0; }
  .hero { min-height: 0; }
  .hero-content { padding-top: calc(var(--head) + 72px); padding-bottom: 32px; }
  .hero-phrase { position: relative; right: auto; bottom: auto; width: auto; padding: 0 var(--gutter) 64px; font-size: 1.15rem; }
  .hero-phrase::before { width: 32px; }
  .hero-home, .hero-inner { flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .hero-inner .hero-content { padding-bottom: 64px; }
  .hero-media::after { background: linear-gradient(to top, rgba(15,33,51,.97) 0%, rgba(15,33,51,.9) 50%, rgba(15,33,51,.55) 100%); }
  .steps { grid-template-columns: 1fr; gap: 8px; }
  .contact-list > div { grid-template-columns: 32px minmax(0, 1fr); }
  .contact-list dd { grid-column: 2; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 900px) {
  .js .nav li { opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .6s var(--ease); }
  .js .nav.open li { opacity: 1; transform: none; }
  .js .nav.open li:nth-child(1) { transition-delay: .08s; }
  .js .nav.open li:nth-child(2) { transition-delay: .13s; }
  .js .nav.open li:nth-child(3) { transition-delay: .18s; }
  .js .nav.open li:nth-child(4) { transition-delay: .23s; }
  .js .nav.open li:nth-child(5) { transition-delay: .28s; }
}
@media (max-width: 600px) {
  .mono { width: 44px; height: 32px; }
  .brand { gap: 10px; }
  .brand-name { font-size: .8rem; letter-spacing: .1em; }
  .brand-name small { font-size: .85rem; }
  .actions .btn { width: 100%; justify-content: space-between; }
  .foot { grid-template-columns: 1fr; }
  .photo-note { left: 12px; right: 12px; max-width: none; }
  .arch .photo-note { left: 0; }
}
