/* ========================================================================
   landing.css: houseofplay.rs landing page.
   Six full-screen sections, one per design concept from
   landing-concepts.html, snapping as you scroll. Builds on site.css.
   ======================================================================== */

html { scroll-behavior: smooth; }
@media (min-width: 900px) and (min-height: 640px) {
  html { scroll-snap-type: y mandatory; }
}
.dots button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }

/* ========================================================================
   Section dots
   ======================================================================== */
.dots {
  position: fixed; z-index: 50; right: 18px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0;
}
.dots button {
  position: relative; display: block; width: 14px; height: 14px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--cream); border: 2.5px solid var(--ink); transition: transform .2s, background .2s;
}
.dots button.on { background: var(--orange); transform: scale(1.35); }
.dots button span {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  background: var(--ink); color: var(--cream); font-family: var(--display); font-size: 13px; letter-spacing: .08em;
  padding: 6px 10px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.dots button:hover span, .dots button:focus-visible span { opacity: 1; }
@media (max-width: 600px) { .dots { display: none; } }

/* ========================================================================
   Sections
   ======================================================================== */
.s {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  scroll-snap-align: start; display: flex; align-items: center;
  padding: calc(var(--header-h) + 36px) var(--gutter) 64px;
}
.s-inner { position: relative; z-index: 5; width: 100%; max-width: 1240px; margin: 0 auto; }
.kicker { font-size: clamp(14px, 1.4vw, 18px); letter-spacing: .14em; }
.pill { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 8px 14px; font-size: 14px; letter-spacing: .12em; }

/* Animations only run while their section is on screen. */
.s:not(.is-live) *, .s:not(.is-live) *::before, .s:not(.is-live) *::after { animation-play-state: paused !important; }

/* ---------- 1 · HERO (Confetti Pop) ---------- */
.s-hero { background: var(--mint); }
.s-hero .confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.s-hero .confetti i {
  position: absolute; top: -30px; display: block;
  animation: fall var(--d) linear infinite; animation-delay: var(--dl);
}
@keyframes fall {
  from { transform: translate3d(0,0,0) rotate(0deg); }
  to   { transform: translate3d(var(--sway), 110vh, 0) rotate(var(--rot)); }
}
.s-hero .kicker { color: var(--green); }
.s-hero h1 { font-size: clamp(76px, 15vw, 210px); line-height: .86; margin: 22px 0 26px; letter-spacing: .01em; }
.s-hero h1 .row { display: block; white-space: nowrap; }
.s-hero h1 .ch { display: inline-block; animation: hop 2.6s cubic-bezier(.3,.7,.4,1.4) infinite; animation-delay: calc(var(--i) * 90ms); }
.s-hero h1 .accent .ch { color: var(--orange); }
@keyframes hop {
  0%, 55%, 100% { transform: translateY(0) rotate(0); }
  20% { transform: translateY(-.13em) rotate(-4deg); }
  38% { transform: translateY(0) rotate(2deg); }
}
.s-hero .sub { font-size: clamp(17px, 1.7vw, 21px); max-width: 470px; margin-bottom: 30px; }
.s-hero .dragon {
  position: absolute; right: -60px; bottom: -70px; width: clamp(300px, 40vw, 580px); z-index: 4;
  animation: peek 5s ease-in-out infinite; transform-origin: 80% 100%;
}
@keyframes peek { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-18px) rotate(-2.5deg); } }
@media (max-width: 760px) {
  .s-hero { align-items: flex-start; padding-bottom: 52vw; }
  .s-hero .dragon { width: 78vw; right: -14vw; bottom: -12vw; }
}

/* ---------- 2 · INVITATIONS (Invitation Studio) ---------- */
.s-invite { background: var(--lavender); }
.s-invite .s-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.s-invite .pill { background: var(--ink); color: var(--mint); }
.s-invite .pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); animation: blink 1.2s steps(2) infinite; }
.s-invite h2 { font-size: clamp(56px, 6.8vw, 92px); line-height: .9; margin: 22px 0 26px; }
.s-invite h2 em { font-style: normal; color: var(--cream); }
.mock-form {
  background: var(--cream); border-radius: 22px; padding: 20px 22px; max-width: 470px;
  box-shadow: 0 8px 0 var(--ink); border: 3px solid var(--ink); margin-bottom: 30px;
}
.mock-form .field-lbl { font-size: 13px; letter-spacing: .14em; color: #6b6760; margin-bottom: 8px; }
.mock-form .field-row { display: flex; gap: 12px; align-items: center; }
.mock-form .input {
  flex: 1; border: 3px solid var(--ink); border-radius: 12px; padding: 12px 14px; font-size: clamp(22px, 2.4vw, 30px);
  background: #fff; min-height: 60px; display: flex; align-items: center; min-width: 0;
}
.mock-form .caret { display: inline-block; width: 3px; height: 1em; background: var(--orange); margin-left: 3px; animation: blink 1s steps(2) infinite; }
.mock-form .age { width: 72px; height: 60px; flex: none; border-radius: 12px; background: var(--orange); border: 3px solid var(--ink); display: grid; place-items: center; font-size: 30px; }
.mock-form .steps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.mock-form .steps span { font-size: 13px; letter-spacing: .1em; padding: 7px 12px; border-radius: 999px; border: 2px solid var(--ink); }
.mock-form .steps span.on { background: var(--ink); color: var(--cream); }
.fan-wrap { position: relative; display: grid; place-items: center; padding: 30px 0; }
.fan { --pw: clamp(200px, 24vw, 330px); position: relative; width: var(--pw); aspect-ratio: 3768 / 5339; }
.fan .poster-card {
  position: absolute; inset: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 40px rgba(38,38,38,.35);
  animation: shuffle 9s cubic-bezier(.6,0,.3,1) infinite; animation-delay: var(--dl);
}
.fan .poster-container { width: 100%; max-width: none; }
@keyframes shuffle {
  0%, 28%   { transform: translate(0,0) rotate(-2deg) scale(1); z-index: 3; }
  33%, 61%  { transform: translate(58%, 7%) rotate(12deg) scale(.82); z-index: 1; }
  66%, 94%  { transform: translate(-58%, 7%) rotate(-14deg) scale(.82); z-index: 2; }
  100%      { transform: translate(0,0) rotate(-2deg) scale(1); z-index: 3; }
}
.s-invite .sticker {
  position: absolute; right: 4%; top: 0; z-index: 6; width: 124px; height: 124px; border-radius: 50%;
  background: var(--mint); border: 3px solid var(--ink); display: grid; place-items: center; text-align: center;
  font-size: 19px; line-height: .95; animation: pop 3s ease-in-out infinite;
}
@keyframes pop { 0%,100% { transform: rotate(12deg) scale(1); } 50% { transform: rotate(4deg) scale(1.08); } }
@media (max-width: 960px) {
  .s-invite .s-inner { grid-template-columns: 1fr; }
  .fan-wrap { padding: 10px 0 30px; }
  .fan { --pw: min(52vw, 260px); }
  .s-invite .sticker { width: 96px; height: 96px; font-size: 15px; right: 0; }
}

/* ---------- 3 · CONTACT (Crocodile Parade over a video) ----------
   Two layers: the stage (background video, headline, walking crocodiles)
   and the green footer with the contact info. The video runs a little
   past the stage's bottom, so the footer's scalloped edge sits over it. */
.s-outro {
  --parade-h: clamp(150px, 22vw, 290px);
  flex-direction: column; align-items: stretch; padding: 0; background: var(--ink); color: var(--cream);
}
.outro-stage {
  position: relative; flex: 1; display: flex; align-items: flex-start;
  padding: calc(var(--header-h) + 36px) var(--gutter) calc(var(--parade-h) + 24px);
}
.outro-video { position: absolute; inset: 0 0 -60px 0; z-index: 0; overflow: hidden; background: var(--green); }
.outro-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.outro-video::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(38,38,38,.82) 0%, rgba(38,38,38,.55) 55%, rgba(38,38,38,.4) 100%),
    linear-gradient(180deg, rgba(38,38,38,.35) 0%, transparent 30%);
}
/* The headline rotates through slides that share one grid cell: landing.js
   marks one .is-on at a time, its lines roll in from below and roll out
   upwards (.is-out). The phone, address and Instagram slides are links. */
.words { display: grid; font-size: clamp(64px, 11vw, 150px); line-height: .9; }
.words .slide { grid-area: 1 / 1; display: block; pointer-events: none; visibility: hidden; }
.words .slide.is-on { pointer-events: auto; }
.words .slide.is-on, .words .slide.is-out { visibility: visible; }
.words .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.words .ln.md { font-size: .52em; }
.words .ln span {
  display: inline-block; transform: translateY(125%);
  transition: transform .7s cubic-bezier(.7,0,.2,1); transition-delay: calc(var(--i) * 120ms);
}
.words .slide.is-on .ln span { transform: translateY(0); }
.words .slide.is-out .ln span { transform: translateY(-125%); }
.words .slide.no-tr .ln span { transition: none; }
.words .ln:nth-child(1) span { color: var(--cream); }
.words .ln:nth-child(2) span { color: var(--orange); }
.words .ln:nth-child(3) span { color: var(--mint); }
.words a.slide:hover .ln span, .words a.slide:focus-visible .ln span { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .08em; }
.words a.slide:focus-visible { outline: 3px solid var(--orange); outline-offset: 6px; }

.parade { position: absolute; left: 0; right: 0; bottom: -10px; height: var(--parade-h); z-index: 3; pointer-events: none; }
.walker { position: absolute; left: 0; bottom: 0; width: clamp(230px, 32vw, 420px); animation: walk 24s linear infinite; animation-delay: var(--dl); }
.walker .art { animation: step .5s ease-in-out infinite alternate; }
@keyframes walk { from { transform: translateX(-110%); } to { transform: translateX(100vw); } }
@keyframes step { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-8px) rotate(1deg); } }

.site-footer {
  position: relative; z-index: 2; background: var(--green); color: var(--cream);
  padding: 34px var(--gutter) 26px;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 24px;
  background: radial-gradient(circle at 18px 24px, var(--green) 17px, transparent 18px) 0 0 / 36px 24px repeat-x;
}
/* Footer icons: little stickers like the rest of the page, a flat colour
   badge with an ink border and drop shadow, each tilted its own way, with
   a hand-drawn icon inside (ink outline, flat fills). */
.foot-icons { display: flex; justify-content: center; gap: 22px; padding-top: 6px; }
.foot-icon {
  --tilt: 0deg;
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transform: rotate(var(--tilt));
  transition: transform .18s ease, box-shadow .18s ease;
}
.foot-icon svg { width: 46px; height: 46px; overflow: visible; }
.foot-icon svg * { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.foot-icon .ic-ink { fill: var(--ink); stroke: none; }
.foot-icon .ic-line { fill: none; stroke-width: 1.7; }
.ic-phone { --tilt: -7deg; background: var(--orange); }
.ic-phone .ic-fill { fill: var(--cream); }
.ic-pin { --tilt: 4deg; background: var(--mint); }
.ic-pin .ic-fill { fill: var(--pink); }
.ic-pin .ic-dot { fill: var(--cream); }
.ic-insta { --tilt: -3deg; background: var(--lavender); }
.ic-insta .ic-fill { fill: var(--cream); }
.ic-insta .ic-dot { fill: var(--orange); }
.foot-icon:hover { transform: translateY(-4px) rotate(calc(var(--tilt) * -1)); box-shadow: 0 10px 0 var(--ink); }
.foot-icon:hover svg { animation: icon-wiggle .5s ease-in-out; }
@keyframes icon-wiggle { 30% { transform: rotate(-12deg) scale(1.08); } 65% { transform: rotate(8deg); } }
.foot-icon:focus-visible { outline: 3px solid var(--cream); outline-offset: 4px; }
.foot-bottom { margin: 20px 0 0; text-align: center; font-size: 14px; letter-spacing: .08em; opacity: .85; }

/* ========================================================================
   Scroll animation
   landing.js sets, per section, --enter (1 → 0 as it scrolls in from
   below), --exit (0 → 1 as it scrolls out the top) and --p = enter − exit.
   Reveal targets get .revealed while they are on screen, and lose it
   when they leave, so the entrance replays on the way back.
   ======================================================================== */

/* thin progress bar along the top of the window */
.scroll-progress {
  position: fixed; z-index: 60; top: 0; left: 0; width: 100%; height: 5px;
  background: var(--orange); transform-origin: 0 50%; scale: var(--scroll, 0) 1;
}

/* entrances: individual translate / scale properties, so they compose
   with each element's own transform animation */
[data-reveal] {
  opacity: 0; translate: 0 56px;
  transition: opacity .6s ease, translate .9s cubic-bezier(.2,.85,.25,1), scale .9s cubic-bezier(.3,1.4,.5,1);
  transition-delay: calc(var(--r, 0) * 90ms);
}
[data-reveal="left"] { translate: -80px 0; }
[data-reveal="pop"] { translate: none; scale: .55; }
[data-reveal].revealed { opacity: 1; translate: 0 0; scale: 1; }
[data-reveal="pop"].revealed { translate: none; }

[data-reveal-chars] .ch {
  opacity: 0; translate: 0 .9em;
  transition: opacity .4s ease, translate .8s cubic-bezier(.3,1.5,.5,1);
  transition-delay: calc(var(--i) * 55ms + 150ms);
}
[data-reveal-chars].revealed .ch { opacity: 1; translate: 0 0; }


/* parallax: artwork drifts at its own speed while a section scrolls by */
.s-hero .confetti { translate: 0 calc(var(--p, 0) * -320px); }
.s-hero .dragon.revealed { translate: 0 calc(var(--p, 0) * -180px); }
.fan-wrap.revealed { translate: 0 calc(var(--p, 0) * 140px); }
.fan { rotate: calc(var(--p, 0) * 10deg); }
.parade { translate: calc(var(--enter, 0) * 240px) 0; }

/* exit: content sinks back a little as its section scrolls away */
.s-inner {
  opacity: calc(1 - var(--exit, 0) * .75);
  scale: calc(1 - var(--exit, 0) * .08);
  transform-origin: 50% 0;
}

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-play-state: paused !important; transition: none !important; }
  [data-reveal], [data-reveal-chars] .ch { opacity: 1; translate: none; scale: none; }
  .s-inner { opacity: 1; scale: none; }
}
