/* =========================================================
   Aurea Asset — stile del sito
   Palette: carbone + oro. Titoli Playfair Display, testo Plus Jakarta Sans.
   ========================================================= */
:root {
  --bg: #1b1b1b;
  --bg-deep: #121212;
  --card: #222220;
  --fg: #f3f1ec;
  --muted: #aeaba4;
  --gold: #cda85a;
  --gold-ink: #161616;
  --line: rgba(205, 168, 90, 0.22);
  --line-strong: rgba(205, 168, 90, 0.5);
  --error: #e0806c;

  --f-display: "Playfair Display", "Didot", Georgia, serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
em { font-style: italic; color: var(--gold); }
::selection { background: rgba(205, 168, 90, 0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.container--narrow { max-width: 900px; }

.eyebrow { font-size: 0.7rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); }
.hairline { height: 1px; width: 100%; margin-top: 24px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.hairline[style*="width"] { background: linear-gradient(90deg, var(--line-strong), transparent); }
.h2 { margin-top: 24px; font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem); max-width: 22ch; }
.lead { font-size: 1.15rem; color: var(--muted); line-height: 1.7; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.center .h2 { margin-left: auto; margin-right: auto; }
.narrow { max-width: 42rem; margin: 24px auto 0; }
.col-7 .muted { margin-top: 24px; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 32px; border: 1px solid transparent; border-radius: 0;
  font: 500 0.78rem/1.2 var(--f-body); letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .5s var(--ease), background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.btn--gold { background: var(--gold); color: var(--gold-ink); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -16px var(--gold); }
.btn--outline { border-color: rgba(205, 168, 90, 0.7); color: var(--gold); background: transparent; }
.btn--outline:hover { background: var(--gold); color: var(--gold-ink); }
.btn--glass { background: rgba(27, 27, 27, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn--sm { padding: 10px 22px; font-size: 0.72rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- menu ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(27, 27, 27, 0.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color .4s, border-color .4s;
}
.nav.is-scrolled { background: rgba(27, 27, 27, 0.88); border-bottom-color: var(--line); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }
.brand { font-family: var(--f-display); font-size: 1.1rem; letter-spacing: 0.35em; color: var(--gold); text-decoration: none; white-space: nowrap; margin: 0; }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a:not(.btn) {
  position: relative; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .3s;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right; transition: transform .3s;
}
.nav__links a:not(.btn):hover { color: var(--fg); }
.nav__links a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__toggle { display: none; width: 40px; height: 40px; background: none; border: 0; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 7px; }
.nav__toggle span { width: 24px; height: 1px; background: var(--gold); transition: transform .3s; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav__mobile { padding: 8px var(--gutter) 24px; border-top: 1px solid var(--line); background: rgba(27,27,27,.96); }
.nav__mobile a:not(.btn) { display: block; padding: 16px 0; border-bottom: 1px solid rgba(205,168,90,.14); font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.nav__mobile .btn { width: 100%; margin-top: 24px; }
@media (max-width: 1100px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
}

/* ---------- scene allo scroll (struttura comune) ---------- */
.scene { position: relative; }
.scene__stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene--hero { height: 320vh; }
.scene--op { height: 230vh; }
.scene__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.scene__progress i, .op__bar i { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(0); }

/* ---------- hero ---------- */
.scene--hero .scene__stage { background: var(--bg-deep); }
.hero__exterior, .hero__interior { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform, opacity; }
/* posizione del portone nella foto esterna (aggiornare se si cambia foto) */
.hero__exterior { --door-x: 44.5%; --door-y: 86%; object-position: var(--door-x) var(--door-y); transform-origin: var(--door-x) var(--door-y); }
.hero__interior { opacity: 0; transform: scale(1.4); }
.hero__veil { position: absolute; inset: 0; pointer-events: none; opacity: .62; background: linear-gradient(90deg, var(--bg) 0%, rgba(27,27,27,.8) 45%, rgba(27,27,27,.1) 100%); }
.hero__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none; background: linear-gradient(0deg, var(--bg), transparent); }
.hero__intro { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: var(--nav-h); }
.hero__intro > * { max-width: 46rem; }
.hero__intro h1 { margin-top: 32px; font-size: clamp(2.3rem, 1.5rem + 3.6vw, 4.6rem); line-height: 1.1; }
.hero__lede { margin-top: 28px; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: rgba(243,241,236,.82); max-width: 40rem; }
.hero__ctas { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 14px; max-width: none !important; }
.hero__inside { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 104px; opacity: 0; pointer-events: none; }
.hero__inside h2 { margin-top: 22px; font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.6rem); max-width: 18ch; }
.link-gold { margin-top: 30px; width: fit-content; padding-bottom: 4px; border-bottom: 1px solid var(--gold); color: var(--gold); text-decoration: none; font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; }
.hero__hint { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: .65rem; letter-spacing: .35em; text-transform: uppercase; color: rgba(243,241,236,.7); pointer-events: none; }
.hero__hint span { width: 1px; height: 40px; background: var(--gold); animation: hint 2s ease-in-out infinite; transform-origin: top; }
@keyframes hint { 0%,100% { transform: scaleY(.3); opacity: .4 } 50% { transform: scaleY(1); opacity: 1 } }
@media (max-width: 720px) {
  .hide-mobile { display: none; }
  .hero__ctas { flex-direction: column; margin-top: 32px; }
  .hero__ctas .btn { width: 100%; }
  .hero__veil { background: linear-gradient(180deg, rgba(27,27,27,.55) 0%, rgba(27,27,27,.85) 55%, var(--bg) 100%); }
  .hero__hint { display: none; }
}

/* ---------- sezioni ---------- */
.section { padding-block: clamp(88px, 10vw, 136px); }
.section--band { background: rgba(34, 34, 32, 0.5); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { padding-top: clamp(88px, 10vw, 136px); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px 32px; }
.col-5 { grid-column: span 5; } .col-7 { grid-column: span 7; padding-top: 8px; }
@media (max-width: 900px) { .col-5, .col-7 { grid-column: 1 / -1; } }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 72px; }
.fact { padding: 28px 24px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.fact__n { font-family: var(--f-display); font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); color: var(--gold); line-height: 1; font-variant-numeric: lining-nums; }
.fact__l { font-size: .88rem; color: var(--muted); max-width: 22ch; }
@media (max-width: 800px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; } }

.cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 64px; }
.card { border: 1px solid rgba(205,168,90,.3); background: rgba(27,27,27,.6); padding: 36px; transition: transform .5s var(--ease), border-color .5s, background-color .5s; height: 100%; }
.card:hover { transform: translateY(-6px); border-color: rgba(205,168,90,.7); background: var(--bg); }
.card__n { display: block; font-family: var(--f-display); font-size: 2.4rem; color: rgba(205,168,90,.7); transition: color .5s; }
.card:hover .card__n { color: var(--gold); }
.card__icon { width: 34px; height: 34px; fill: none; stroke: var(--gold); stroke-width: 1.3; }
.card h3 { margin-top: 24px; font-size: 1.3rem; }
.card p { margin-top: 20px; color: var(--muted); font-size: .93rem; }
@media (max-width: 900px) { .cards-3 { grid-template-columns: 1fr; } }

.steps { list-style: none; padding: 0; margin: 80px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.steps li { position: relative; padding-top: 20px; border-top: 2px solid rgba(205,168,90,.18); }
.steps li::before { content: ""; position: absolute; left: 0; top: -2px; height: 2px; width: calc(var(--fill, 0) * 100%); background: var(--gold); }
.steps__k { font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.steps h4 { margin: 10px 0 8px; font-size: 1.25rem; }
.steps p { color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- scene operazioni ---------- */
.op { display: flex; align-items: center; }
.op__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; padding-top: var(--nav-h); }
.op__text h3 { margin-top: 16px; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.2rem); }
.op__text .muted { margin-top: 24px; max-width: 28rem; }
.op__spec { margin-top: 24px; max-width: 28rem; padding-left: 16px; border-left: 1px solid rgba(205,168,90,.7); font-size: .92rem; color: rgba(243,241,236,.85); }
.op__bar { margin-top: 32px; width: 160px; height: 1px; background: var(--line); }
.op__frame { position: relative; height: 74vh; height: 74svh; overflow: hidden; border: 1px solid rgba(205,168,90,.3); background: var(--card); }
.op__frame > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
@media (max-width: 900px) {
  .op__grid { grid-template-columns: 1fr; gap: 24px; padding-top: calc(var(--nav-h) + 8px); }
  .op__frame { order: -1; height: 44vh; height: 44svh; }
  .op__text h3 { font-size: 1.8rem; margin-top: 10px; }
  .op__text .muted, .op__spec { margin-top: 14px; font-size: .9rem; }
  .op__bar { margin-top: 18px; }
}

.tag { position: absolute; z-index: 2; padding: 6px 12px; font-size: .65rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold); background: rgba(27,27,27,.85); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; }
.tag--tl { left: 16px; top: 16px; } .tag--tr { right: 16px; top: 16px; }
.tag--gold { background: var(--gold); color: var(--gold-ink); }
.tag--unit { left: 14px; bottom: 14px; opacity: 0; white-space: nowrap; }
@media (max-width: 900px) { .tag--unit { left: 6px; bottom: 8px; padding: 4px 6px; font-size: .55rem; letter-spacing: .12em; } }

/* frazionamento */
.split { display: flex; width: 100%; height: 100%; }
.split__slice { position: relative; flex: 1; overflow: hidden; will-change: transform; }
.split__slice img { position: absolute; top: 0; height: 100%; width: 300%; max-width: none; object-fit: cover; }
.split__slice:nth-child(1) img { left: 0; }
.split__slice:nth-child(2) img { left: -100%; }
.split__slice:nth-child(3) img { left: -200%; }

/* off-market */
.lens__base { filter: grayscale(1) brightness(.45); transform: scale(1.25); }
.lens__color { clip-path: circle(7% at 58% 62%); transform: scale(1.25); }
.lens__ring { position: absolute; left: 58%; top: 62%; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid var(--gold); border-radius: 50%; pointer-events: none; }
.lens__tag { opacity: 0; }

/* riqualificazione */
.pan__img { transform: scale(1.85) translateX(22%); }
.pan__before { color: var(--fg); }
.pan__after { opacity: 0; }

/* ---------- soggiorni ---------- */
.soon { margin-top: 48px; max-width: 760px; padding: 36px 40px; border: 1px solid var(--line); border-left: 2px solid var(--gold); background: rgba(34,34,32,.5); }
.soon p:last-child { margin-top: 16px; color: var(--muted); }
.soon a { color: var(--gold); }

/* ---------- moduli ---------- */
.form-panel { margin-top: 56px; border: 1px solid rgba(205,168,90,.3); background: rgba(27,27,27,.6); padding: clamp(28px, 5vw, 48px); }
#segPanel { max-width: 900px; margin-left: auto; margin-right: auto; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid rgba(205,168,90,.35); border-radius: 0;
  background: transparent; color: var(--fg); font: 400 .95rem var(--f-body); outline: none; transition: border-color .3s;
}
.field select option { background: var(--card); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--gold); }
.field.is-invalid input, .field.is-invalid select { border-bottom-color: var(--error); }
.form__actions { display: flex; flex-direction: column; gap: 12px; }
.form__msg { text-align: center; font-size: .88rem; color: var(--error); min-height: 1.2em; }
.form__done { text-align: center; padding: 24px 0; }
.form__done h3 { font-size: 1.6rem; color: var(--gold); }
.form__done p { margin-top: 14px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 700px) { .form { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 64px calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.footer__grid .muted { margin-top: 20px; }
.footer__h { font-family: var(--f-body); font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold); }
.footer ul { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 12px; font-size: .9rem; color: var(--muted); }
.footer ul a { text-decoration: none; transition: color .3s; }
.footer ul a:hover { color: var(--gold); }
.footer__legal { margin-top: 32px; font-size: .75rem; line-height: 1.7; color: rgba(174,171,164,.7); }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- comparsa al passaggio ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- "riduci movimento": tutto statico ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene--hero, .scene--op { height: auto; }
  .scene__stage { position: relative; height: auto; min-height: 100svh; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__hint span { animation: none; }
}
