/* Valle di Taranis — home demo */
@font-face { font-family: 'Cormorant'; src: url(fonts/cormorant-garamond-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url(fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url(fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url(fonts/cormorant-garamond-latin-400-italic.woff2) format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url(fonts/cormorant-garamond-latin-500-italic.woff2) format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(fonts/manrope-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(fonts/manrope-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(fonts/manrope-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url(fonts/manrope-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #0d120f;
  --forest: #131d17;
  --forest-2: #1a271f;
  --moss: #4b6350;
  --sage: #a8b7a2;
  --parch: #f1e9da;
  --parch-2: #e6dcc8;
  --cream: #fbf8f1;
  --gold: #c9a35d;
  --gold-2: #e4c993;
  --ember: #d9844b;
  --wa: #25d366;
  --text-d: #efe9de;
  --muted-d: rgba(239, 233, 222, .72);
  --line-d: rgba(239, 233, 222, .14);
  --text-l: #1c241f;
  --muted-l: #58625b;
  --line-l: rgba(28, 36, 31, .14);
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 18px;
  --gutter: clamp(16px, 4.5vw, 64px);
  --maxw: 1240px;
  --topbar-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); color: var(--text-d); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; background: transparent; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- scena 3D ---------- */
#valle3d { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; opacity: 0; transition: opacity 1.8s ease; pointer-events: none; }
#valle3d.is-ready { opacity: 1; }
.scene-poster { position: fixed; inset: 0; z-index: -1; background: #2a2620 url(../pictures/panorama-tramonto.jpg) center 60% / cover no-repeat; }
.scene-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,18,15,.25), rgba(13,18,15,.55)); }
.no-webgl #valle3d { display: none; }

main, .site-footer { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- tipografia ---------- */
.eyebrow { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: inline-flex; align-items: center; gap: .75rem; margin: 0 0 1.1rem; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .7; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.04; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2.2rem, 5.2vw, 4rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); line-height: 1.12; }
h2 em, h1 em { font-style: italic; color: var(--gold-2); font-weight: 400; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.16rem); color: var(--muted-d); max-width: 60ch; }
.light .lead { color: var(--muted-l); }

/* ---------- bottoni ---------- */
.btn { --b: var(--gold); display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 50px; padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .35s var(--ease), background .3s, color .3s, box-shadow .35s, border-color .3s; white-space: nowrap; }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1b1408; box-shadow: 0 12px 30px -12px rgba(201,163,93,.7); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgba(201,163,93,.85); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(239,233,222,.35); color: var(--text-d); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-wa { background: var(--wa); color: #06210f; box-shadow: 0 12px 30px -12px rgba(37,211,102,.6); }
.btn-wa:hover { transform: translateY(-2px); }
.btn-dark { background: var(--forest); color: var(--text-d); }
.btn-dark:hover { background: #0b110d; transform: translateY(-2px); }
.btn-line { border-color: var(--line-l); color: var(--text-l); background: transparent; }
.btn-line:hover { border-color: var(--text-l); }
.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; text-decoration: none; color: var(--gold-2); }
.link-arrow svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- barra annuncio ---------- */
.topbar { position: relative; z-index: 60; background: linear-gradient(90deg, #2a1f10, #3b2c15 50%, #2a1f10); color: var(--gold-2); font-size: .84rem; text-align: center; padding: .55rem 2.8rem; }
.topbar a { color: #fff3dc; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(228,201,147,.6); }
.topbar .x { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--gold-2); cursor: pointer; width: 36px; height: 36px; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.topbar .x:hover { background: rgba(255,255,255,.08); }
.topbar.is-hidden { display: none; }

/* ---------- header ---------- */
.site-header { position: fixed; left: 0; right: 0; top: var(--topbar-h); z-index: 50; transition: background .45s, backdrop-filter .45s, top .3s, box-shadow .45s; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 84px; transition: height .4s var(--ease); }
.site-header.is-solid { background: rgba(13,18,15,.78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line-d); }
.site-header.is-solid .wrap { height: 70px; }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
.brand img { height: 56px; width: auto; transition: height .4s var(--ease); filter: drop-shadow(0 2px 10px rgba(0,0,0,.35)); }
.is-solid .brand img { height: 46px; }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.1rem); }
.nav a { text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--text-d); opacity: .85; position: relative; padding: .4rem 0; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); }
.header-cta { display: flex; align-items: center; gap: .7rem; }
.header-cta .btn { min-height: 44px; padding: .6rem 1.15rem; font-size: .88rem; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-d); background: rgba(255,255,255,.05); cursor: pointer; align-items: center; justify-content: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 1.5px; background: var(--text-d); position: relative; transition: transform .3s, background .3s; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.menu-open .burger span { background: transparent; }
.menu-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 45; background: rgba(10,14,12,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: center; padding: 110px var(--gutter) 40px; gap: .3rem; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a:not(.btn) { font-family: var(--serif); font-size: 2.3rem; text-decoration: none; padding: .2rem 0; border-bottom: 1px solid var(--line-d); }
.mobile-menu .btn { margin-top: 1.6rem; }

/* ---------- hero (finestra sulla valle 3D) ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; position: relative; padding: 128px 0 clamp(48px, 9vh, 96px); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 15% 100%, rgba(10,13,11,.72) 0%, rgba(10,13,11,.35) 45%, rgba(10,13,11,0) 70%), linear-gradient(180deg, rgba(10,13,11,.45) 0%, rgba(10,13,11,0) 22%); pointer-events: none; }
.hero .wrap { position: relative; opacity: calc(1 - var(--hero-p, 0) * 1.5); transform: translateY(calc(var(--hero-p, 0) * -60px)); }
.hero-tag { display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .95rem .45rem .5rem; border-radius: 999px; background: rgba(13,18,15,.45); border: 1px solid var(--line-d); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .8rem; color: var(--muted-d); margin-bottom: 1.6rem; }
.hero-tag b { background: var(--gold); color: #1b1408; border-radius: 999px; padding: .12rem .6rem; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: clamp(3.4rem, min(10.5vw, 14.5vh), 8.6rem); line-height: .92; letter-spacing: -.02em; text-shadow: 0 4px 40px rgba(0,0,0,.35); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); animation: rise 1.3s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .14s; }
.hero-sub { margin: 1.6rem 0 2.1rem; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(239,233,222,.86); max-width: 54ch; text-shadow: 0 2px 20px rgba(0,0,0,.4); opacity: 0; animation: fade 1s .55s var(--ease) forwards; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; opacity: 0; animation: fade 1s .75s var(--ease) forwards; }
.hero-feats { list-style: none; margin: 2.6rem 0 0; padding: 1.4rem 0 0; display: flex; flex-wrap: wrap; gap: .8rem 2.2rem; border-top: 1px solid var(--line-d); max-width: 760px; opacity: 0; animation: fade 1s .95s var(--ease) forwards; }
.hero-feats li { display: flex; align-items: center; gap: .65rem; font-size: .92rem; color: var(--muted-d); }
.hero-feats svg { width: 22px; height: 22px; color: var(--gold-2); flex: none; }
.scroll-cue { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: .7rem; font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted-d); writing-mode: vertical-rl; text-decoration: none; }
.scroll-cue i { width: 1px; height: 64px; background: linear-gradient(var(--gold), transparent); animation: cue 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes rise { to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- sezioni ---------- */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.dark { background: var(--forest); }
.ink { background: var(--ink); }
.light { background: var(--parch); color: var(--text-l); }
.light .eyebrow { color: #8a6a2f; }
.light h2 em { color: #9a7432; }
.section-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem 4rem; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head .lead { margin: 0; }

/* manifesto: la scena 3D sfuma nel contenuto */
.manifesto { background: linear-gradient(180deg, rgba(19,29,23,0) 0, rgba(19,29,23,.85) 160px, var(--forest) 320px); padding-top: clamp(140px, 18vw, 240px); margin-top: -1px; }
.manifesto-statement { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.12; max-width: 22ch; margin: 0 0 1.4rem; }
.manifesto-statement em { color: var(--gold-2); }
.manifesto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem 5rem; align-items: start; }
.manifesto-copy p { color: var(--muted-d); margin: 0 0 1rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: clamp(56px, 7vw, 90px); perspective: 1200px; }
.pillar { position: relative; padding: 2rem 1.8rem 2.1rem; border-radius: var(--r); background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); border: 1px solid var(--line-d); overflow: hidden; }
.pillar::after { content: ''; position: absolute; inset: auto -30% -60% auto; width: 70%; aspect-ratio: 1; background: radial-gradient(circle, rgba(201,163,93,.16), transparent 70%); pointer-events: none; }
.pillar .ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(201,163,93,.4); color: var(--gold-2); margin-bottom: 1.4rem; }
.pillar .ico svg { width: 26px; height: 26px; }
.pillar h3 { margin-bottom: .6rem; }
.pillar p { margin: 0; color: var(--muted-d); font-size: .96rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 7vw, 90px); border-top: 1px solid var(--line-d); }
.stat { padding: 1.8rem 1rem 0 0; }
.stat b { display: block; font-family: var(--serif); font-weight: 500; font-size: clamp(2.4rem, 4.6vw, 3.6rem); line-height: 1; color: var(--gold-2); }
.stat span { display: block; margin-top: .5rem; font-size: .88rem; color: var(--muted-d); }

/* ---------- card evento 3D ---------- */
.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; perspective: 1400px; }
.ecard { position: relative; border-radius: 22px; overflow: hidden; min-height: 430px; display: flex; align-items: flex-end; color: var(--text-d); text-decoration: none; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease), box-shadow .5s; box-shadow: 0 30px 60px -36px rgba(20,24,18,.6); isolation: isolate; background: #1a201b; }
.ecard.is-tilting { transition: transform .08s linear, box-shadow .5s; }
.ecard:hover { box-shadow: 0 45px 80px -40px rgba(20,24,18,.75); }
.ecard img { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; z-index: -2; transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -14px), 0) scale(1.02); transition: transform .6s var(--ease); }
.ecard::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,13,11,0) 30%, rgba(10,13,11,.88) 100%); }
.ecard::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(400px circle at var(--gx, 50%) var(--gy, 0%), rgba(255,236,200,.18), transparent 45%); opacity: 0; transition: opacity .4s; }
.ecard:hover::after { opacity: 1; }
.ecard-body { padding: 1.7rem; transform: translateZ(40px); }
.ecard .num { font-family: var(--serif); font-style: italic; color: var(--gold-2); font-size: 1.05rem; }
.ecard h3 { margin: .2rem 0 .55rem; }
.ecard p { margin: 0 0 1.1rem; font-size: .93rem; color: rgba(239,233,222,.82); }
.ecard.feature { grid-column: span 1; }
.ecard.custom { background: linear-gradient(150deg, #2b3a2e, #16201a); }
.ecard.custom::before { background: radial-gradient(120% 80% at 80% 0%, rgba(201,163,93,.22), transparent 60%); }
.ecard.custom img { opacity: .22; mix-blend-mode: luminosity; }

.cta-strip { margin-top: 1.6rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; padding: 1.5rem 1.8rem; border-radius: 20px; background: var(--forest); color: var(--text-d); }
.cta-strip p { margin: 0; font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.2; }
.cta-strip p small { display: block; font-family: var(--sans); font-size: .88rem; color: var(--muted-d); margin-top: .3rem; }
.cta-strip .btns { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------- mappa interattiva ---------- */
.map-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.spaces { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line-l); }
.spaces li { border-bottom: 1px solid var(--line-l); }
.spaces button { width: 100%; text-align: left; background: none; border: 0; padding: 1.05rem .2rem; display: flex; gap: 1rem; align-items: baseline; cursor: pointer; color: var(--text-l); }
.spaces button .n { font-family: var(--serif); font-style: italic; color: #9a7432; min-width: 1.6rem; }
.spaces button .t { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; flex: 1; }
.spaces button .plus { width: 22px; height: 22px; flex: none; position: relative; align-self: center; transition: transform .35s var(--ease); }
.spaces button .plus::before, .spaces button .plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.spaces button .plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .35s var(--ease); }
.spaces li.is-active .plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.spaces .desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.spaces .desc > div { overflow: hidden; }
.spaces .desc p { margin: 0 0 1.1rem 2.6rem; color: var(--muted-l); font-size: .95rem; max-width: 48ch; }
.spaces li.is-active .desc { grid-template-rows: 1fr; }
.map-stage { position: relative; perspective: 1600px; }
.map-board { position: relative; transform: rotateX(var(--rx, 14deg)) rotateY(var(--ry, -6deg)) rotateZ(1deg); transform-style: preserve-3d; transition: transform .8s var(--ease); border-radius: 26px; background: var(--cream); padding: clamp(10px, 2vw, 22px); box-shadow: 0 60px 90px -50px rgba(28,36,31,.55), 0 0 0 1px rgba(28,36,31,.06); }
.map-board img { width: 100%; height: auto; border-radius: 16px; }
.hotspot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: rgba(201,163,93,.25); display: grid; place-items: center; transform: translateZ(30px); }
.hotspot::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0,0,0,.35); transition: transform .3s var(--ease), background .3s; }
.hotspot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--gold); animation: ping 2.4s ease-out infinite; }
.hotspot.is-active::before { background: var(--ember); transform: scale(1.35); }
.hotspot:hover::before { transform: scale(1.3); }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
.map-note { margin-top: 1.4rem; font-size: .84rem; color: var(--muted-l); text-align: center; }

/* ---------- configuratore ---------- */
.config { background: radial-gradient(90% 70% at 100% 0%, rgba(201,163,93,.12), transparent 60%), var(--ink); }
.config-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.config-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1rem; }
.config-points li { display: flex; gap: .9rem; align-items: flex-start; color: var(--muted-d); }
.config-points svg { width: 22px; height: 22px; color: var(--gold-2); flex: none; margin-top: .15rem; }
.config-card { border-radius: 26px; padding: clamp(1.4rem, 3.4vw, 2.6rem); background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid var(--line-d); box-shadow: 0 50px 100px -60px rgba(0,0,0,.9); }
.field { margin-bottom: 1.6rem; }
.field > label, .field > .label { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); font-weight: 600; margin-bottom: .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { border: 1px solid var(--line-d); background: rgba(255,255,255,.03); color: var(--text-d); padding: .6rem 1rem; border-radius: 999px; cursor: pointer; font-size: .9rem; transition: background .25s, border-color .25s, color .25s; min-height: 42px; }
.chip:hover { border-color: rgba(239,233,222,.4); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1b1408; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.input { width: 100%; min-height: 50px; border-radius: 14px; border: 1px solid var(--line-d); background: rgba(0,0,0,.25); color: var(--text-d); padding: .8rem 1rem; font: inherit; font-size: 1rem; color-scheme: dark; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,163,93,.2); }
.range-wrap { display: flex; align-items: center; gap: 1rem; }
.range-wrap output { font-family: var(--serif); font-size: 2rem; color: var(--gold-2); min-width: 4.2ch; text-align: right; line-height: 1; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold) var(--fill, 30%), rgba(239,233,222,.15) var(--fill, 30%)); outline-offset: 8px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-2); border: 4px solid var(--ink); box-shadow: 0 0 0 1px var(--gold); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--gold-2); border: 4px solid var(--ink); box-shadow: 0 0 0 1px var(--gold); cursor: pointer; }
.config-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: .4rem; }
.config-actions small { color: var(--muted-d); font-size: .82rem; }

/* ---------- finestra notturna (citazione) ---------- */
.window-quote { min-height: 92vh; display: grid; place-items: center; text-align: center; position: relative; padding: 120px 0; }
.window-quote::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0, rgba(13,18,15,0) 22%, rgba(13,18,15,0) 78%, var(--forest) 100%); pointer-events: none; }
.window-quote blockquote { position: relative; margin: 0; }
.window-quote blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(2.6rem, 8vw, 6.4rem); line-height: 1; margin: 0; text-shadow: 0 6px 50px rgba(0,0,0,.55); }
.window-quote blockquote footer { margin-top: 1.4rem; font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-2); }
.window-quote .symbol { width: 74px; margin: 0 auto 1.6rem; opacity: .9; filter: drop-shadow(0 6px 24px rgba(0,0,0,.6)); }

/* ---------- alloggi ---------- */
.stay-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2.4rem, 6vw, 6rem); align-items: center; }
.stay-visual { position: relative; aspect-ratio: 5 / 5.4; perspective: 1200px; }
.stay-visual .ph { position: absolute; border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0,0,0,.8); will-change: transform; }
.stay-visual .ph img { width: 100%; height: 100%; object-fit: cover; }
.stay-visual .ph.a { inset: 0 18% 22% 0; transform: translate3d(0, calc(var(--py, 0) * -30px), 0); }
.stay-visual .ph.b { inset: 46% 0 0 34%; transform: translate3d(0, calc(var(--py, 0) * 40px), 0); border: 6px solid var(--forest); }
.stay-visual .badge { position: absolute; left: 6%; bottom: 8%; background: var(--parch); color: var(--text-l); border-radius: 16px; padding: 1rem 1.2rem; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); max-width: 220px; transform: translate3d(0, calc(var(--py, 0) * 60px), 0); }
.stay-visual .badge b { display: block; font-family: var(--serif); font-size: 1.5rem; line-height: 1.05; }
.stay-visual .badge span { font-size: .8rem; color: var(--muted-l); }
.checks { list-style: none; padding: 0; margin: 1.8rem 0 2.2rem; display: grid; gap: .85rem; }
.checks li { display: flex; gap: .85rem; color: var(--muted-d); }
.checks li svg { width: 20px; height: 20px; color: var(--gold-2); flex: none; margin-top: .2rem; }
.stay-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.stay-note { margin-top: 1.4rem; font-size: .9rem; color: var(--muted-d); }
.stay-note a { color: var(--gold-2); }

/* ---------- esperienze ---------- */
.xp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-d); border: 1px solid var(--line-d); border-radius: 22px; overflow: hidden; }
.xp { background: var(--forest); padding: 2rem 1.8rem 2.2rem; transition: background .35s; position: relative; }
.xp:hover { background: var(--forest-2); }
.xp svg { width: 34px; height: 34px; color: var(--gold-2); margin-bottom: 1.2rem; }
.xp h3 { font-size: 1.55rem; margin-bottom: .5rem; }
.xp p { margin: 0; color: var(--muted-d); font-size: .94rem; }

/* ---------- eventi associazione (banner) ---------- */
.assoc { position: relative; border-radius: 28px; overflow: hidden; min-height: 420px; display: flex; align-items: center; isolation: isolate; }
.assoc > img { position: absolute; inset: 0; width: 100%; height: 120%; object-fit: cover; z-index: -2; transform: translate3d(0, calc(var(--py, 0) * -60px), 0); }
.assoc::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,13,11,.88) 0%, rgba(10,13,11,.55) 55%, rgba(10,13,11,.15) 100%); }
.assoc-body { padding: clamp(2rem, 5vw, 4rem); max-width: 640px; }
.assoc-body p { color: rgba(239,233,222,.85); margin: 1.1rem 0 1.8rem; }
.assoc-body .btns { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ---------- storia ---------- */
.story { background: var(--parch) url(../pictures/pergamena.jpg) center / cover; color: var(--text-l); position: relative; overflow: hidden; }
.story::before { content: ''; position: absolute; inset: 0; background: rgba(241,233,218,.55); }
.story .wrap { position: relative; }
.story-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.story-mark { position: relative; display: grid; place-items: center; }
.story-mark img { width: min(360px, 80%); opacity: .55; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.story-mark .peak { position: absolute; text-align: center; }
.story-mark .peak b { display: block; font-family: var(--serif); font-size: clamp(3rem, 6vw, 4.6rem); line-height: 1; font-weight: 500; }
.story-mark .peak span { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-l); }
.story-copy p { color: #3e4740; margin: 0 0 1rem; }
.story .eyebrow { color: #8a6a2f; }
.story h2 em { color: #9a7432; }
.story-copy blockquote { margin: 1.8rem 0 0; padding: 1.2rem 0 0 1.4rem; border-left: 2px solid #9a7432; font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.3; color: var(--text-l); }

/* ---------- dove siamo ---------- */
.where-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
.where-info { display: flex; flex-direction: column; gap: 1.4rem; }
.where-item { display: flex; gap: 1rem; }
.where-item svg { width: 24px; height: 24px; color: var(--gold-2); flex: none; margin-top: .2rem; }
.where-item b { display: block; font-weight: 600; }
.where-item span, .where-item a { color: var(--muted-d); font-size: .95rem; }
.map-embed { border-radius: 22px; overflow: hidden; min-height: 420px; border: 1px solid var(--line-d); background: #1d2620; position: relative; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.25) contrast(1.05); }

/* ---------- finestra finale ---------- */
.final { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; position: relative; padding: 140px 0 120px; }
.final::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0, rgba(13,18,15,0) 26%, rgba(13,18,15,.15) 70%, rgba(13,18,15,.7) 100%); pointer-events: none; }
.final .wrap { position: relative; }
.final h2 { font-size: clamp(3rem, 9vw, 7rem); text-shadow: 0 6px 50px rgba(0,0,0,.5); }
.final p { margin: 1.4rem auto 2.2rem; color: rgba(239,233,222,.86); max-width: 52ch; font-size: 1.08rem; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.final .btns { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }

/* ---------- footer ---------- */
.site-footer { background: #090c0a; color: var(--muted-d); padding: 72px 0 40px; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.4rem; }
.footer-grid img { width: 170px; margin-bottom: 1.2rem; }
.footer-grid h4 { font-family: var(--sans); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); margin: .4rem 0 1rem; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--text-d); }
.footer-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-d); display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .8rem; }
.footer-bottom a { color: var(--gold-2); text-decoration: none; }

/* ---------- WhatsApp fisso ---------- */
.wa-float { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.wa-float .bubble { background: var(--cream); color: var(--text-l); font-size: .88rem; padding: .7rem 1rem; border-radius: 14px 14px 4px 14px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.5); max-width: 230px; line-height: 1.35; opacity: 0; transform: translateX(10px) scale(.96); transform-origin: right bottom; transition: opacity .4s, transform .4s var(--ease); pointer-events: none; }
.wa-float.show-bubble .bubble { opacity: 1; transform: none; pointer-events: auto; }
.wa-float .bubble b { display: block; font-size: .78rem; color: #1a7f45; margin-bottom: .15rem; }
.wa-float .disc { width: 62px; height: 62px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px -10px rgba(37,211,102,.75); position: relative; transition: transform .35s var(--ease); flex: none; }
.wa-float .disc::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: ping 2.6s ease-out infinite; }
.wa-float:hover .disc { transform: scale(1.06); }
.wa-float .disc svg { width: 32px; height: 32px; }

/* ---------- barra azioni mobile ---------- */
.mobile-bar { display: none; }

/* ---------- popup 20 secondi ---------- */
.popup { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; visibility: hidden; opacity: 0; transition: opacity .45s, visibility .45s; }
.popup.is-open { visibility: visible; opacity: 1; }
.popup-backdrop { position: absolute; inset: 0; background: rgba(6,9,7,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.popup-card { position: relative; width: min(880px, 100%); display: grid; grid-template-columns: 1fr 1.1fr; border-radius: 26px; overflow: hidden; background: var(--parch); color: var(--text-l); box-shadow: 0 60px 120px -40px rgba(0,0,0,.8); transform: translateY(24px) rotateX(8deg) scale(.97); transform-origin: center bottom; transition: transform .7s var(--ease); max-height: calc(100vh - 32px); max-height: calc(100svh - 32px); }
.popup.is-open .popup-card { transform: none; }
.popup-media { position: relative; min-height: 100%; }
.popup-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.popup-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,13,11,0) 50%, rgba(10,13,11,.55)); }
.popup-media .tag { position: absolute; left: 1.2rem; bottom: 1.1rem; z-index: 1; color: #fff; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.popup-body { padding: clamp(1.6rem, 4vw, 2.8rem); overflow-y: auto; }
.popup-body .eyebrow { color: #8a6a2f; }
.popup-body h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.popup-body h2 em { color: #9a7432; }
.popup-body p { color: var(--muted-l); margin: 1rem 0 1.6rem; }
.popup-body .btns { display: flex; flex-direction: column; gap: .7rem; }
.popup-body .btn { width: 100%; }
.popup-body .later { background: none; border: 0; color: var(--muted-l); font-size: .88rem; cursor: pointer; padding: .6rem; text-decoration: underline; text-underline-offset: 3px; }
.popup-close { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--text-l); cursor: pointer; font-size: 1.4rem; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.2); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

/* ---------- fallback senza WebGL ---------- */
.no-webgl .window-quote { background: url(../pictures/panorama-giorno.jpg) center / cover; }
.no-webgl .final { background: url(../pictures/villaggio-tramonto.jpg) center / cover; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .xp-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .section-head, .manifesto-grid, .map-grid, .config-grid, .stay-grid, .story-grid, .where-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .popup-card { grid-template-columns: 1fr; max-width: 460px; }
  .popup-media { min-height: 190px; }
  .story-mark img { width: 220px; }
  .map-board { --rx: 8deg; --ry: 0deg; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .site-header .wrap { height: 70px; }
  .brand img { height: 46px; }
  .header-cta .btn { display: none; }
  .topbar { font-size: .78rem; padding: .5rem 2.6rem .5rem .9rem; text-align: left; }
  .hero { padding-bottom: 104px; }
  .hero h1 { font-size: clamp(3.1rem, 16vw, 4.8rem); text-shadow: 0 2px 30px rgba(0,0,0,.45); }
  .hero::before { background: linear-gradient(180deg, rgba(10,13,11,.62) 0%, rgba(10,13,11,.42) 38%, rgba(10,13,11,.5) 62%, rgba(10,13,11,.82) 100%); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-feats { gap: .7rem 1.4rem; margin-top: 1.8rem; }
  .scroll-cue { display: none; }
  .events-grid, .xp-grid { grid-template-columns: 1fr; }
  .ecard { min-height: 360px; }
  .row2 { grid-template-columns: 1fr; }
  .cta-strip { padding: 1.3rem; }
  .cta-strip .btns, .cta-strip .btns .btn { width: 100%; }
  .stay-actions .btn, .final .btns .btn, .assoc-body .btns .btn { width: 100%; }
  .config-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 110px; }
  .map-embed { min-height: 320px; }
  .wa-float { display: none; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: .6rem 12px calc(.6rem + env(safe-area-inset-bottom)); background: rgba(13,18,15,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line-d); transform: translateY(110%); transition: transform .45s var(--ease); }
  .mobile-bar.is-on { transform: none; }
  .mobile-bar .btn { min-height: 48px; padding: .6rem .8rem; font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
