/* Landing (index.html) and «Come trovo le ore» (ore.html). World: the stories' — dark grain, aura light, wide display type, the real top-5 card. */
html:has(.landing), .landing { overflow-x: clip; }

.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Aura (scenes/aura.js): live behind the hero, a still frame behind .how and .previews. */
.aura { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; opacity: 0; animation: auraIn 1.4s ease-out forwards; }
.aura.still { --to: .45; }
@keyframes auraIn { to { opacity: var(--to, 1); } }
main > section { position: relative; isolation: isolate; }
main > section > :not(.aura) { position: relative; z-index: 1; }
.foot { position: relative; z-index: 1; }

.section-title { margin: 0; font: 900 clamp(1.6rem, 6.4vw, 2.8rem)/1.02 var(--font-display); color: var(--coral); text-transform: uppercase; letter-spacing: -.02em; text-wrap: balance; }

/* Hero: title, subtitle, the three cards with the button in front of their base */
.hero {
  min-height: 100svh; display: grid; align-content: center; justify-items: center; text-align: center;
  gap: clamp(14px, 3vw, 24px); padding: calc(40px + env(safe-area-inset-top)) 20px 48px;
}
.title { margin: 0; font-family: var(--font-display); font-weight: 900; text-transform: uppercase; line-height: .86; letter-spacing: -.02em; }
.title-line { display: block; color: var(--lavender); font-size: clamp(2.4rem, 11.5vw, 5.6rem); }
.title-year { display: block; color: var(--lime); font-size: clamp(2rem, 9vw, 4.6rem); margin-top: .12em; }
.lede { margin: 0; max-width: 30ch; font-size: clamp(1rem, 3.6vw, 1.25rem); font-weight: 500; color: var(--lavender); text-wrap: balance; }

.hero-stage { --cw: min(34vw, 30svh, 250px); --spread: 66%; display: grid; justify-items: center; margin-top: 8px; }
.hero-cards { position: relative; width: calc(var(--cw) * (1 + 2 * var(--spread) / 100%)); height: calc(var(--cw) * 900 / 644 * 1.08); perspective: 1200px; }
.hero-cards > * { transform-style: preserve-3d; }
.hc { position: absolute; left: 50%; top: 0; width: var(--cw); aspect-ratio: 644 / 900; margin-left: calc(var(--cw) / -2);
  translate: var(--x) var(--y); rotate: var(--r); transform-origin: 50% 90%;
  transform: rotateY(calc(var(--lx, 0) * 7deg)) rotateX(calc(var(--ly, 0) * -5deg)); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
/* The fan: middle card in front, the side ones lower and turned out. */
.hc:nth-child(1) { --x: calc(-1 * var(--spread)); --y: 6%; --r: -8deg; }
.hc:nth-child(2) { --x: 0%; --y: 0%; --r: 0deg; z-index: 2; }
.hc:nth-child(3) { --x: var(--spread); --y: 6%; --r: 8deg; }
@media (min-width: 700px) { .hero-stage { --spread: 100%; } }
.hc-float { position: absolute; inset: 0; }
.floating .hc-float { animation: hcFloat var(--t) var(--fd) ease-in-out infinite alternate; }
@keyframes hcFloat { from { translate: 0 -1.5%; } to { translate: 0 1.5%; } }
.hc .t5-card { cursor: default; }
.hc .t5-body { box-shadow: 0 4cqw 10cqw rgba(0,0,0,.6), 0 1cqw 2cqw rgba(0,0,0,.4); }

.cta { min-height: 58px; padding: 0 clamp(1.1em, 4vw, 1.8em); font-size: clamp(.9rem, 3.9vw, 1.05rem); white-space: nowrap; font-weight: 700; }
.hero-stage .cta { position: relative; z-index: 3; margin-top: calc(var(--cw) * -0.06);
  box-shadow: 0 14px 30px -10px rgb(0 0 0 / .85), 0 0 0 6px rgb(13 11 20 / .55); }
@media (hover: hover) { .cta:hover { transform: translateY(-2px); } }

/* How it works: three steps, numbered because the order is the point */
.how { padding: 72px 20px; }
.how > * { max-width: 760px; margin-inline: auto; }
.steps { list-style: none; counter-reset: step; padding: 0; margin-top: 36px; display: grid; gap: 36px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: start; }
.steps li::before { content: counter(step); grid-row: span 9; font: 800 clamp(3rem, 12vw, 4.6rem)/.8 var(--font-condensed); color: var(--lime); min-width: .62em; }
.steps h3 { margin: 0 0 8px; font: 800 clamp(1.35rem, 5.2vw, 1.9rem)/1.05 var(--font-condensed); color: var(--lavender); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.steps p { margin: 0; color: var(--text); font-size: 1.02rem; max-width: 52ch; }
.steps .note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.note-link { justify-self: start; margin-top: 8px; font-weight: 600; color: var(--lime); }

/* Previews: a swipeable row on the phone, side by side on desktop */
.previews { padding: 56px 0 72px; }
.previews .section-title { padding: 0 20px; max-width: 760px; margin: 0 auto; }
.previews-row { display: flex; gap: 14px; margin-top: 28px; padding: 4px 20px 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.previews-row::-webkit-scrollbar { display: none; }
.previews-row img { flex: none; height: min(64svh, 520px); width: auto; border-radius: 14px; scroll-snap-align: center;
  box-shadow: 0 18px 40px -16px rgb(0 0 0 / .8); background: #07060b; }
@media (min-width: 900px) { .previews-row { justify-content: safe center; } }

/* Final */
.final { display: grid; justify-items: center; gap: 24px; text-align: center; padding: 48px 20px 110px; }
.final-line { margin: 0; max-width: 22ch; font: 900 clamp(1.4rem, 5.5vw, 2.3rem)/1.05 var(--font-display); color: var(--lavender); text-transform: uppercase; text-wrap: balance; }

.foot { padding: 24px 20px calc(28px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: .85rem; display: grid; gap: 6px; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .aura { opacity: var(--to, 1); }
  .hc { transform: none; }
}

/* «Dove trovo le ore giocate» (ore.html): a reading page in the landing's world, one column. */
.ore main { max-width: 720px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 20px 0; }
.ore-home { display: inline-block; margin-bottom: 28px; font: 900 .95rem/1 var(--font-display); color: var(--lavender); text-transform: uppercase; text-decoration: none; letter-spacing: -.01em; }
.ore-intro { margin: 14px 0 0; font-size: 1.1rem; color: var(--text); max-width: 52ch; }
.ore-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.ore-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.1em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; transition: border-color .15s ease; }
@media (hover: hover) { .ore-nav a:hover { border-color: var(--lavender); } }
.ore-which { margin: 22px 0 0; color: var(--lime); font-weight: 600; }
.console { padding: 48px 0 8px; scroll-margin-top: 16px; }
.console h2 { margin: 0; font: 800 clamp(1.6rem, 6.4vw, 2.3rem)/1.02 var(--font-condensed); color: var(--lavender); text-transform: uppercase; letter-spacing: .01em; }
.console .joke { margin: 8px 0 0; color: var(--coral); font-weight: 600; }
.console ol { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.console ol li { counter-increment: s; position: relative; padding-left: 2.2rem; font-size: 1.05rem; }
.console ol li::before { content: counter(s); position: absolute; left: 0; top: -.05em; font: 800 1.7rem/1 var(--font-condensed); color: var(--lime); }
.console b { color: #fff; }
.console .extra { margin: 18px 0 0; padding: 14px 0 0 2.2rem; border-top: 1px solid var(--line); color: var(--muted); display: grid; gap: 8px; list-style: none; }
.console .sources { margin: 14px 0 0 2.2rem; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; }
.console .sources a { color: var(--muted); }
.ore .final { padding: 56px 0 80px; }
