/* =========================================================
   City Postcards — Atelier MOTION layer
   Loaded after style-atelier.css. Adds the intro "bang" zoom,
   hero scroll-scrub, and the line-art "draw-in" reveal.
   Driven by atelier-motion.js (transforms via CSS variables).
   ========================================================= */

/* ---------- Intro "bang": the postcard flies in and settles ---------- */
@keyframes heroBang {
  0%   { transform: scale(1.85) translateY(-7vh) rotate(0.5deg); filter: blur(7px); opacity: 0; }
  45%  { opacity: 1; }
  100% { transform: scale(1) translateY(0) rotate(-1deg); filter: blur(0); opacity: 1; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hintPulse { 0%,100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(7px); opacity: 1; } }

.motion .hero-plate { animation: heroBang 1.25s cubic-bezier(.16,.84,.3,1) both; }
.motion .hero-plate-wrap .wax,
.motion .hero-plate-wrap .hero-buy { opacity: 0; animation: riseIn 0.7s ease both; animation-delay: 1.15s; }
.motion .hero-plate-wrap .birds-accent { opacity: 0; animation: riseIn 1.1s ease both; animation-delay: 1.3s; }

/* stagger the hero copy in after the bang */
.motion .hero-copy { opacity: 1 !important; transform: none !important; } /* neutralize base .reveal */
.motion .hero-copy > * { opacity: 0; animation: riseIn 0.7s cubic-bezier(.2,.8,.2,1) both; }
.motion .hero-copy > *:nth-child(1) { animation-delay: 0.15s; }
.motion .hero-copy > *:nth-child(2) { animation-delay: 0.28s; }
.motion .hero-copy > *:nth-child(3) { animation-delay: 0.4s; }
.motion .hero-copy > *:nth-child(4) { animation-delay: 0.52s; }
.motion .hero-copy > *:nth-child(5) { animation-delay: 0.64s; }

/* the hero plate travels a little as you scroll ("comes down on the page") */
.motion .hero-plate-wrap { will-change: transform; }

/* scroll-down hint */
.scroll-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 5;
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-soft);
  font-family: var(--font-ui); font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
  transition: opacity 0.4s ease; }
.scroll-hint b { font-size: 1.1rem; line-height: 1; animation: hintPulse 1.8s ease-in-out infinite; }
.scrolled .scroll-hint { opacity: 0; pointer-events: none; }

/* ---------- Line-art "draw-in" reveal ---------- */
.drawin { position: relative; height: 240vh; background: color-mix(in srgb, var(--card) 55%, transparent); }
.drawin-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; overflow: hidden; padding: 0 var(--gutter); }
.drawin-inner { display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); justify-items: center; text-align: center; width: 100%; max-width: 960px; }
.drawin-head .eyebrow { justify-content: center; }
.drawin-head h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.drawin-head h2 em { color: var(--rust); }
.drawin-stage { position: relative; width: min(880px, 90vw); aspect-ratio: 3/2; background: var(--card);
  padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line-soft); }
.drawin-frame { position: relative; width: 100%; height: 100%; overflow: hidden; }
.drawin-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drawin-line { filter: contrast(1.05); }
.drawin-color { clip-path: inset(calc(100% - var(--fill, 0%)) 0 0 0); will-change: clip-path; }
/* soft glowing edge where colour meets line */
.drawin-scan { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--rust), transparent);
  bottom: var(--fill, 0%); opacity: var(--scan-op, 0); z-index: 3; mix-blend-mode: multiply; }
.drawin-progress { font-family: var(--font-ui); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.drawin-progress b { color: var(--rust); font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .motion .hero-plate, .motion .hero-copy > *, .motion .hero-plate-wrap .wax,
  .motion .hero-plate-wrap .hero-buy, .motion .hero-plate-wrap .birds-accent { animation: none !important; opacity: 1 !important; transform: none; }
  .scroll-hint { display: none; }
  .drawin { height: auto; padding: clamp(3rem,8vw,7rem) 0; }
  .drawin-sticky { position: static; height: auto; }
  .drawin-color { clip-path: none; }
}
