/* Storyscrolling: un palco fermo e una lunga corsa di scorrimento */
.story { height: 1500vh; position: relative; background: #03050c; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
.stage > * { position: absolute; }

.stage { background: #040a1a; }
.sky { inset: 0; }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .32; }
.scena { position: absolute; max-width: none; height: auto; pointer-events: none; }
.nebbia { mix-blend-mode: screen; }
#nebbiaDietro { opacity: .5; animation: deriva 34s ease-in-out infinite alternate; }
#nebbiaDavanti { opacity: .05; animation: deriva 26s ease-in-out infinite alternate-reverse; }
@keyframes deriva { from { translate: -1.2% 0; } to { translate: 1.2% 0; } }
.tint { inset: 0; opacity: 0; background: radial-gradient(90% 90% at 50% 40%, rgba(84, 30, 150, .55), rgba(6, 3, 16, .94)); pointer-events: none; }
.portal { aspect-ratio: 1; translate: -50% -50%; }
.p-face { position: absolute; inset: 0; }
.p-face .p-vortice { position: absolute; inset: 13%; width: 74%; height: 74%; border-radius: 50%; animation: spin 46s linear infinite reverse; }
.p-face .p-rune { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 150s linear infinite; }
.p-face svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.p-face .runes { transform-origin: 50% 50%; animation: spin 120s linear infinite; }
.p-face::before { content: ""; position: absolute; inset: -4%; border-radius: 50%; background: radial-gradient(closest-side, transparent 72%, var(--c2) 82.6%, transparent 94%); opacity: .72; }
.p-face::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .62), var(--c1) 46%, transparent 86%); opacity: .95; }
#pGreen { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.fig { width: auto; max-width: none; translate: -50% 0; transform-origin: 50% 89%;
  filter: brightness(.5) saturate(.85) drop-shadow(0 0 1.5px #d4eeff) drop-shadow(0 0 16px rgba(120, 196, 255, .85)); }
.hero-copy { right: clamp(16px, 2.2vw, 64px); top: 21%; width: 46vw; text-align: center; z-index: 5; }
.hero-copy h1 { position: relative; display: inline-block; font-size: clamp(44px, 6.4vw, 118px); font-weight: 900; margin-top: 12px; white-space: nowrap; filter: drop-shadow(0 4px 22px rgba(0, 0, 0, .6)); }
.hero-copy h1::before, .hero-copy h1::after { content: ""; position: absolute; width: .62em; height: .62em; background: #fff; clip-path: polygon(50% 0, 54% 46%, 100% 50%, 54% 54%, 50% 100%, 46% 54%, 0 50%, 46% 46%); animation: scintilla 3.4s ease-in-out infinite; }
.hero-copy h1::before { left: -.2em; top: -.12em; }
.hero-copy h1::after { right: -.24em; bottom: -.06em; width: .46em; height: .46em; animation-delay: -1.6s; }
@keyframes scintilla { 50% { opacity: .35; transform: scale(.7) rotate(12deg); } }
.ico { flex: none; width: 1.3em; height: 1.3em; fill: currentColor; }
.rule { position: relative; height: 1px; margin: 18px auto 16px; width: 74%; background: linear-gradient(90deg, transparent, rgba(220, 235, 255, .8), transparent); }
.rule i { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; background: #e7f3ff; transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 12px #9fd8ff; }
.tagline { font: italic 400 clamp(20px, 2.1vw, 30px)/1.3 var(--serif); }
.hero-cta .btn { text-transform: uppercase; letter-spacing: .06em; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.status { display: inline-flex; gap: 10px; align-items: center; margin-top: 22px; color: var(--muted); font-size: 14px; font-weight: 600; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #6ff0d8; box-shadow: 0 0 0 0 rgba(111, 240, 216, .6); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.scroll-hint { left: 50%; bottom: 24px; translate: -50% 0; display: grid; justify-items: center; gap: 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--text); z-index: 5; }
.scroll-hint i { display: grid; place-items: center; width: 24px; height: 34px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(143, 208, 255, .12); }
.scroll-hint i::before { content: ""; width: 7px; height: 7px; margin-top: -3px; border: solid var(--text); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); animation: drop 1.8s var(--ease) infinite; }
@keyframes drop { 50% { translate: 0 5px; } }

/* Battiti */
.beat { visibility: hidden; opacity: 0; z-index: 5; width: min(44vw, 620px); top: 50%; translate: 0 -50%; }
.beat.right { right: clamp(16px, 3.4vw, 80px); width: 40vw; }
.beat.left { left: clamp(70px, 7vw, 120px); }
.beat.center { left: 50%; translate: -50% -50%; width: min(92vw, 860px); text-align: center; }
.beat h2 { font-size: clamp(32px, 4.3vw, 62px); margin-top: 12px; text-shadow: 0 2px 30px rgba(0, 0, 0, .7); }
.beat > p:not(.kicker) { margin-top: 18px; font: 400 clamp(19px, 1.75vw, 25px)/1.5 var(--serif); text-shadow: 0 1px 18px rgba(0, 0, 0, .9); }
.beat > p.tale { margin: 0; font: 400 clamp(24px, 2.55vw, 38px)/1.42 var(--serif); }
.capolettera .w:first-child::first-letter { font: 700 1.9em/1 var(--display); color: var(--ice); }
.beat.center > p.tale { max-width: 34em; margin: 22px auto 0; font-size: clamp(22px, 2.1vw, 30px); }
.beat.dim-title > p.tale { font-size: clamp(21px, 2vw, 28px); }
.beat.dim-title > p.tale + h2 + p.tale { margin-top: 10px; }
.beat.final > p.tale { margin: 0 auto 14px; }
.beat.final .big { font-size: clamp(34px, 5.6vw, 96px); white-space: normal; }
#b4 .after { margin-top: 20px; font: 400 clamp(21px, 2vw, 29px)/1.42 var(--serif); }
.beat .kicker { text-shadow: 0 1px 12px rgba(0, 0, 0, .9); }
.beat h2 .w, .beat p .w { display: inline-block; white-space: pre; }
.beat .big { font-size: clamp(44px, 8vw, 136px); font-weight: 900; white-space: nowrap; padding-inline: .06em; }
#b4 .after { opacity: 0; }
.beat.dim-title { left: 50%; top: 22%; translate: -50% 0; width: min(92vw, 900px); text-align: center; }
.dim-title h2 { color: #eaf6c8; text-shadow: 0 4px 44px rgba(0, 0, 0, .8), 0 0 60px rgba(120, 220, 90, .3); }
.big-year { font: 900 clamp(96px, 20vh, 220px)/1 var(--display); color: var(--amber); text-shadow: 0 0 70px rgba(255, 170, 80, .45); }
.lumini { display: grid; grid-template-columns: repeat(30, 1fr); gap: 7px; width: min(100%, 640px); margin: 16px auto 0; }
.lumini i { aspect-ratio: 1; border-radius: 2px; background: rgba(255, 200, 130, .1); }
.beat.center.final { width: 96vw; }

/* Scene dipinte */
.scene { inset: 0; overflow: hidden; visibility: hidden; opacity: 0; background: #070a06; }
.cover { position: absolute; left: 0; top: 0; aspect-ratio: 2000 / 1116; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; }
#sCabin { background: #0a0d08; }
.glow { position: absolute; left: 74.25%; top: 43.9%; width: 12%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(150, 255, 170, .75), transparent); animation: pulse 3s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .45; } }
.scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(90% 90% at 50% 50%, transparent 45%, rgba(0, 0, 0, .62)); }
#sCabin::after { background: linear-gradient(90deg, rgba(0, 0, 0, .72), transparent 56%), radial-gradient(90% 90% at 50% 50%, transparent 45%, rgba(0, 0, 0, .5)); }
#sCastle::after, #sTree::after { background: linear-gradient(90deg, rgba(0, 0, 0, .66), transparent 56%), radial-gradient(90% 90% at 50% 50%, transparent 50%, rgba(0, 0, 0, .55)); }
#sSwamp::after { background: linear-gradient(180deg, rgba(0, 0, 0, .42), transparent 56%), radial-gradient(90% 90% at 50% 50%, transparent 50%, rgba(0, 0, 0, .55)); }
.fog { inset: -10%; opacity: 0; pointer-events: none; z-index: 3; }
.fog i { position: absolute; inset: 0; background: radial-gradient(45% 30% at 30% 72%, rgba(190, 215, 140, .36), transparent), radial-gradient(40% 26% at 72% 60%, rgba(170, 200, 130, .3), transparent), radial-gradient(60% 24% at 50% 92%, rgba(150, 190, 120, .4), transparent); animation: fogA 26s ease-in-out infinite alternate; }
.fog i + i { animation: fogB 34s ease-in-out infinite alternate; opacity: .8; }
@keyframes fogA { to { transform: translateX(7%) scale(1.12); } }
@keyframes fogB { from { transform: translateX(6%) scaleX(-1); } to { transform: translateX(-7%) scaleX(-1.2); } }
.spores { inset: 0; width: 100%; height: 100%; z-index: 4; opacity: 0; pointer-events: none; }
.white { inset: 0; opacity: 0; z-index: 4; pointer-events: none; background: radial-gradient(circle, #e9f5c9, #b7cf8e 70%); }

/* Indicatore */
.hud { left: clamp(16px, 2.4vw, 34px); top: 50%; translate: 0 -50%; z-index: 6; opacity: 0; display: grid; justify-items: center; gap: 2px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hud b { font: 700 22px var(--display); color: var(--text); letter-spacing: 0; }
.hud .track { width: 2px; height: 30vh; margin-top: 10px; background: rgba(255, 255, 255, .16); }
.hud .track i { display: block; height: 100%; background: var(--text); transform-origin: top; transform: scaleY(0); }

/* Le dimensioni */
.mondi { background: #04060d; }
.mondi-pin { position: relative; min-height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 96px 0 56px; }
.mondi-pin::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 60% 50%, color-mix(in srgb, var(--dim, #a6e86a) 22%, transparent), transparent 75%); }
.mondi-head { position: relative; padding-inline: var(--gutter); }
.mondi-head h2 { font-size: clamp(30px, 3.6vw, 48px); margin-top: 6px; }
.rail { position: relative; display: flex; gap: 22px; padding: 26px var(--gutter); width: max-content; }
.dim { position: relative; flex: none; width: clamp(280px, 26vw, 380px); height: min(58vh, 480px); padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); background: linear-gradient(170deg, color-mix(in srgb, var(--c) 14%, #080b16), #070a14 70%); }
.dim.open { width: clamp(320px, 38vw, 560px); }
.dim.open::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 5, 10, .94), rgba(3, 5, 10, .2) 62%); }
.dim > * { z-index: 1; position: relative; }
.dim > img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.dim .num { position: absolute; top: 2px; right: 18px; font: 900 clamp(110px, 12vw, 170px)/1 var(--display); color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--c) 66%, transparent); opacity: .85; }
.dim h3 { font-size: clamp(22px, 2vw, 28px); }
.dim p { margin-top: 8px; color: #c9d2e4; font: 400 16.5px/1.45 var(--serif); }
.dim .state { align-self: flex-start; margin-bottom: 12px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; color: #06080f; background: var(--c); }
.dim.sealed .state { color: var(--text); background: rgba(255, 255, 255, .08); border: 1px solid var(--line-strong); }
.dim .seal { position: absolute; top: 40%; left: 50%; width: 74px; translate: -50% -50%; opacity: .75; filter: drop-shadow(0 0 16px var(--c)); }
.seal path { fill: none; stroke: var(--c); stroke-width: 2; }
.mondi-bar { position: relative; height: 2px; margin: 0 var(--gutter); background: var(--line); }
.mondi-bar i { display: block; height: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; }

/* Sistemi */
.sistemi, .community { padding: clamp(72px, 10vw, 130px) 0; }
.sistemi { background: linear-gradient(180deg, #04060d, var(--surface)); }
.community { position: relative; overflow: hidden; background: radial-gradient(70% 70% at 50% 100%, rgba(58, 149, 255, .22), transparent 72%), var(--surface); }
.sec-head { max-width: 760px; margin-bottom: 44px; }
.sec-head h2 { font-size: clamp(32px, 4.6vw, 58px); margin: 10px 0 14px; }
.sec-head h2 .silver { display: block; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 200px; gap: 16px; }
.tile { position: relative; overflow: hidden; display: flex; align-items: flex-end; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); transition: border-color .3s, translate .4s var(--ease); }
.tile:hover { border-color: var(--line-strong); translate: 0 -4px; }
.t-wide, .t-photo { grid-row: span 2; background: linear-gradient(0deg, rgba(5, 8, 16, .94), rgba(5, 8, 16, .06) 66%), var(--img) center / cover; }
.t-wide { grid-column: span 7; }
.t-photo { grid-column: span 5; }
.t-model { grid-column: span 3; grid-row: span 2; background: radial-gradient(70% 60% at 50% 30%, rgba(166, 232, 106, .18), transparent), var(--surface-2); }
.t-blue { background: radial-gradient(70% 60% at 50% 30%, rgba(143, 208, 255, .2), transparent), var(--surface-2); }
.t-model img { position: absolute; top: 8px; left: 50%; translate: -50% 0; width: 86%; max-width: 250px; height: auto; transition: scale .6s var(--ease); }
.t-model:hover img { scale: 1.05; }
.t-inspect { grid-column: span 6; grid-row: span 2; }
.t-inspect img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.t-inspect::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 8, 16, .94), rgba(5, 8, 16, .06) 56%); }
.t-inspect .t-body { z-index: 1; }
.t-inspect .t-body p { color: #d3dbea; max-width: 46ch; }
.t-text { grid-column: span 6; align-items: flex-end; }
.t-body { position: relative; padding: 22px; }
.t-body h3 { font-size: 22px; margin-bottom: 8px; }
.t-body p { color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.t-wide .t-body p, .t-photo .t-body p { color: #d3dbea; max-width: 54ch; }
.jobs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 10px; padding: 0; font: 500 18px var(--serif); }

.soc { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 16px; }
.soc-card { position: relative; display: block; padding: 26px; min-height: 240px; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .03); transition: translate .35s var(--ease), border-color .3s, background .3s; }
.soc-card:hover { translate: 0 -5px; border-color: var(--ice); background: rgba(143, 208, 255, .07); }
.soc-card.discord { background: linear-gradient(150deg, rgba(88, 101, 242, .34), rgba(255, 255, 255, .03)); }
.hex .ico { width: 26px; height: 26px; }
.hex { display: grid; place-items: center; width: 54px; height: 60px; margin-bottom: 18px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(170deg, #e6edf8, #7c8fb0); color: #09122a; font: 900 22px var(--display); }
.soc-card h3 { font-size: 26px; }
.soc-card p { margin-top: 6px; color: var(--muted); }
.go { display: block; margin-top: 18px; font-weight: 700; font-size: 14.5px; color: var(--ice); }
.recruit { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; margin-top: 16px; padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .03); }
.recruit h3 { font-size: 22px; }
.recruit p { color: var(--muted); }

@media (max-width: 1000px) {
  .t-wide, .t-photo { grid-column: span 12; }
  .t-model, .t-text { grid-column: span 6; }
  .t-inspect { grid-column: span 12; }
  .soc { grid-template-columns: 1fr; }
  .soc-card { min-height: 0; }
}
@media (max-width: 820px) {
  .story { height: 1300vh; }
  .scena { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
  .hero-copy { left: 16px; right: 16px; top: auto; bottom: 8vh; width: auto; }
  .hero-copy h1 { font-size: clamp(42px, 13vw, 76px); }
  .hero-copy .kicker { display: none; }
  .scroll-hint { display: none; }
  .status { margin-top: 14px; }
  .beat, .beat.right, .beat.left { left: 16px; right: 16px; width: auto; top: auto; bottom: 7vh; translate: 0 0; }
  .beat.center { left: 16px; translate: 0 -50%; top: 50%; bottom: auto; width: calc(100% - 32px); }
  .beat.center.final { width: calc(100% - 32px); }
  .beat .big { font-size: clamp(36px, 11.4vw, 80px); }
  .beat > p.tale { font-size: 21px; }
  .beat.center > p.tale { font-size: 20px; }
  .beat.dim-title > p.tale { font-size: 19px; }
  .beat.final .big { font-size: 32px; text-wrap: balance; }
  #sSwamp::after { background: linear-gradient(180deg, rgba(0, 0, 0, .62), transparent 46%) !important; }
  #b4 .after { font-size: 19px; margin-top: 12px; }
  .beat.dim-title { left: 16px; top: 13%; bottom: auto; translate: 0 0; width: calc(100% - 32px); }
  .lumini { grid-template-columns: repeat(18, 1fr); gap: 5px; }
  .hud { top: 76px; left: 16px; translate: 0 0; grid-auto-flow: column; gap: 8px; align-items: baseline; }
  .hud .track { display: none; }
  .scene::after { background: linear-gradient(0deg, rgba(0, 0, 0, .86), transparent 62%) !important; }
  .mondi-pin { padding: 90px 0 40px; }
  .rail { flex-direction: column; width: auto; }
  .dim, .dim.open { width: 100%; height: 300px; }
  .mondi-bar { display: none; }
  .t-model, .t-text { grid-column: span 12; }
}
