/* Effetti: apertura a colori con cielo stellato, carte animate, comparse. Tutto si ferma con "riduci movimento". */

main, .site-footer { position: relative; z-index: 1; }

/* ---------- apertura */
.hero {
  position: relative; overflow: hidden; color: #fff; padding-block: 34px 44px;
  background:
    radial-gradient(90% 70% at 85% 10%, rgba(255, 210, 58, 0.28), transparent 60%),
    radial-gradient(80% 80% at 0% 100%, rgba(61, 13, 58, 0.9), transparent 70%),
    linear-gradient(140deg, #e3197a 0%, #b5126a 40%, #6c1260 75%, #3d0d3a 100%);
}
.hero .sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero::after { /* onda morbida verso la sezione successiva */
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -40px; height: 80px; border-radius: 50%;
  background: var(--bg); z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; display: grid; gap: 22px; }
@media (min-width: 900px) {
  .hero { padding-block: 56px 80px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; column-gap: 48px; }
  .hero-text { grid-column: 1; }
  .oracle-area { grid-column: 2; grid-row: 1 / span 2; }
}
.hero h1 { color: #fff; text-transform: uppercase; text-shadow: 0 4px 24px rgba(61, 13, 58, 0.45); }
.hero h1 .hl {
  display: inline; color: var(--sun);
  background: linear-gradient(transparent 72%, rgba(255, 210, 58, 0.28) 72%);
}
.hero-tag {
  display: inline-flex; width: fit-content; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
  background: #fff; color: var(--primary); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.5);
}
.hero-sub { font-size: clamp(1.2rem, 4.5vw, 1.5rem); font-weight: 700; color: #ffe9f3; }
.hero-lead { color: rgba(255, 255, 255, 0.9); }
.hero .btn-call { background: #fff; color: var(--primary); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.55); }
.hero .btn-call:hover { background: #fff; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }

.promo-sticker {
  display: grid; width: fit-content; gap: 0; padding: 12px 20px; border-radius: 16px; text-decoration: none;
  background: var(--sun); color: var(--sun-ink); transform: rotate(-2.5deg);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.5), inset 0 -4px 0 rgba(0, 0, 0, 0.08);
  animation: wobble 4s ease-in-out infinite;
}
.promo-sticker small { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.promo-sticker strong { font-size: 1.45rem; font-weight: 900; line-height: 1.1; text-transform: uppercase; }
.promo-sticker strong em { font-style: normal; color: var(--primary); }
@keyframes wobble { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(-1deg) scale(1.03); } }

/* ---------- oracolo: tre carte da scoprire */
.oracle-area { display: grid; gap: 14px; justify-items: center; perspective: 1400px; }
.oracle-title {
  font-size: 0.8rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: #fff;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.3); padding: 5px 14px; border-radius: 999px;
}
.oracle {
  --cw: clamp(96px, 27vw, 156px);
  --tilt-x: 0deg; --tilt-y: 0deg;
  position: relative; width: 100%; max-width: 470px; height: calc(var(--cw) * 1.95);
  transform-style: preserve-3d; transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transition: transform .4s ease-out;
}
.oracle::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -8%; height: 30%;
  background: radial-gradient(ellipse at center, rgba(255, 210, 58, 0.55), transparent 70%); filter: blur(14px); z-index: -1;
}
.slot {
  --x: 0px; --y: 0px; --r: 0deg; --s: 1;
  position: absolute; left: 50%; top: 50%; width: var(--cw); aspect-ratio: 3 / 5;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s));
  transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .5s ease;
}
.slot-0 { --x: calc(var(--cw) * -0.82); --y: calc(var(--cw) * 0.1); --r: -13deg; }
.slot-1 { --y: calc(var(--cw) * -0.08); z-index: 2; }
.slot-2 { --x: calc(var(--cw) * 0.82); --y: calc(var(--cw) * 0.1); --r: 13deg; }
.oracle.is-shuffling .slot { --x: 0px; --y: 0px; --r: 0deg; }
.oracle.is-shuffling .slot-0 { --r: -3deg; }
.oracle.is-shuffling .slot-2 { --r: 3deg; }
.slot.is-chosen { --x: 0px; --y: calc(var(--cw) * -0.04); --r: 0deg; --s: 1.18; z-index: 5; }
.slot.is-dim { --s: 0.86; opacity: 0.3; }
.slot-0.is-dim { --x: calc(var(--cw) * -1.05); --y: calc(var(--cw) * 0.3); }
.slot-2.is-dim { --x: calc(var(--cw) * 1.05); --y: calc(var(--cw) * 0.3); }
.slot-1.is-dim { --y: calc(var(--cw) * 0.35); }

.tarot { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 10px; color: inherit; }
.tarot:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
.tarot-float { display: block; width: 100%; height: 100%; animation: float 5s ease-in-out infinite; }
.slot-0 .tarot-float { animation-delay: -1.2s; }
.slot-2 .tarot-float { animation-delay: -2.6s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.tarot-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.3, .7, .2, 1); }
.is-chosen .tarot-inner { transform: rotateY(180deg); }
.tarot-face {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 22px 44px -14px rgba(30, 0, 30, 0.75), 0 0 0 1px rgba(255, 220, 160, 0.35);
}
.tarot-face svg { width: 100%; height: 100%; display: block; }
.tarot-front { transform: rotateY(180deg); }
.tarot-face::after {
  content: ""; position: absolute; inset: -40%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 236, 190, 0.28) 50%, transparent 60%);
  transform: translateX(-60%); animation: sheen 6s ease-in-out infinite;
}
.slot-1 .tarot-face::after { animation-delay: -2s; }
.slot-2 .tarot-face::after { animation-delay: -4s; }
@keyframes sheen { 0%, 60% { transform: translateX(-60%); } 100% { transform: translateX(60%); } }
.oracle:not(.has-pick) .tarot:hover .tarot-float { animation-play-state: paused; transform: translateY(-14px); transition: transform .3s; }
.is-chosen .tarot-face { box-shadow: 0 26px 60px -12px rgba(255, 210, 58, 0.6), 0 0 0 2px rgba(255, 210, 58, 0.8); }

.oracle-msg { width: 100%; max-width: 470px; min-height: 3.2em; text-align: center; display: grid; gap: 10px; justify-items: center; }
.oracle-msg.is-open {
  animation: rise .6s ease both .35s; background: #fff; color: var(--ink); border-radius: 18px; padding: 18px 18px 14px;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.55);
}
.oracle-hint { color: #ffe9f3; font-style: italic; font-family: var(--font-serif); font-size: 1.15rem; }
.oracle-card { font-family: var(--font-display); font-weight: 900; font-size: 1.45rem; color: var(--primary); text-transform: uppercase; }
.oracle-num { font-family: var(--font-serif); font-size: 1rem; letter-spacing: 0.1em; color: var(--primary-2); margin-right: 4px; }
.oracle-msg p { max-width: 34rem; }
.oracle-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.hero .oracle-msg .btn-call, .hero .oracle-msg .btn-call:hover { background: linear-gradient(135deg, var(--primary), #b0105e); color: #fff; }
.oracle-msg .btn-ghost { color: var(--primary); border-color: var(--line); }
.oracle-note { font-size: 0.82rem; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- dettagli animati */
.status-disponibile::before { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.9); } 100% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); } }
.person, .tcard, .step { transition: transform .25s ease, box-shadow .25s ease; }
@media (hover: hover) {
  .person:hover, .step:hover, .tcard:not(.tcard-featured):hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}
.tcard-featured::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.16) 50%, transparent 65%);
  transform: translateX(-100%); animation: banner-sheen 5s ease-in-out infinite;
}
@keyframes banner-sheen { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.tcard-featured .btn-call { animation: nudge 3s ease-in-out infinite; }
@keyframes nudge { 0%, 85%, 100% { transform: none; } 90% { transform: scale(1.04); } 95% { transform: scale(0.99); } }

/* comparsa durante lo scorrimento (gli elementi sono già visibili prima) */
.fx-in { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.people .fx-in:nth-child(3n + 2), .offers .fx-in:nth-child(2), .steps .fx-in:nth-child(2) { animation-delay: .08s; }
.people .fx-in:nth-child(3n), .steps .fx-in:nth-child(3) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  .tarot-float, .tarot-face::after, .tcard-featured::before, .tcard-featured .btn-call, .status-disponibile::before,
  .fx-in, .oracle-msg.is-open, .promo-sticker { animation: none !important; }
  .slot, .tarot-inner { transition: none; }
}

/* carte reali del mazzo Rider-Waite */
.tarot-front { background: #fdf8ec; }
.tarot-face img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }

/* foto di apertura caricata dal pannello */
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; z-index: 0; }
.hero-shade { display: none; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(196, 20, 110, 0.72) 0%, rgba(140, 18, 104, 0.82) 50%, rgba(61, 13, 58, 0.94) 100%); }
.hero.has-photo .hero-shade { display: block; }
.hero .sky { z-index: 1; }
.hero .wrap { z-index: 2; }
@media (min-width: 900px) {
  .hero-shade { background: linear-gradient(90deg, rgba(200, 20, 112, 0.95) 0%, rgba(160, 18, 106, 0.85) 40%, rgba(80, 14, 70, 0.45) 75%, rgba(61, 13, 58, 0.3) 100%); }
}
