/* Hero C with motion: floating cards, steam, embers, and a short ad per project. */

/* ---------- Floating deck ---------- */
.pile > .photo { border: 0; font: inherit; text-align: left; padding: 9px 9px 0; }
.photo .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 4px 11px; font-size: 13px; color: #6c6a63; }
.photo .cap b { font-family: 'Cal Sans', sans-serif; font-weight: 400; font-size: 17px; color: #1f1f1d; }
.photo .cap .nm { display: inline-flex; align-items: center; gap: 8px; }
.photo .tag { padding: 3px 8px 3px; border-radius: 999px; background: #ecebe4; color: #6c6a63; font: 700 10.5px/1.2 'Figtree', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; }
.photo .tag--live { background: #a3f064; color: #234a31; }
.photo .tag--live::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #234a31; vertical-align: 1px; }
.photo .shot { position: relative; display: block; overflow: hidden; border-radius: 4px; }
.photo .play { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 9px; border-radius: 999px; background: rgba(31,31,29,0.78); color: #fff; font-size: 12.5px; font-weight: 700; backdrop-filter: blur(6px); opacity: 0; transform: translateY(6px); transition: opacity 200ms ease, transform 200ms ease; }
.photo .play::before { content: ''; width: 0; height: 0; border-left: 8px solid #a3f064; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.photo:hover .play, .photo:focus-visible .play { opacity: 1; transform: none; }
.pile > * { animation: drift var(--d, 8s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.pile > .photo:hover, .pile > .photo:focus-visible { z-index: 20 !important; transform: translate(var(--x), calc(var(--y) - 22px)) rotate(calc(var(--r) * 0.25)) scale(calc(var(--s, 1) * 1.06)); box-shadow: 0 60px 100px -36px rgba(31,31,29,0.6); animation-play-state: paused; outline: none; }

/* Steam: soft white puffs that rise, widen and fade */
.steam { position: absolute; pointer-events: none; width: 160px; height: 120px; }
.steam { z-index: 2; }
.steam i { position: absolute; bottom: 0; left: var(--l); width: 58px; height: 96px; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255,255,255,0.95), rgba(255,255,255,0.35) 40%, rgba(255,255,255,0) 70%); filter: blur(6px); opacity: 0; animation: steam 4.2s ease-out infinite; animation-delay: var(--t); }
@keyframes steam { 0% { transform: translate(0, 10px) scale(0.45, 0.6); opacity: 0; } 25% { opacity: 1; } 60% { transform: translate(10px, -55px) scale(1.15, 1.25); opacity: 0.6; } 100% { transform: translate(-12px, -120px) scale(1.7, 1.6); opacity: 0; } }

/* Embers: small sparks off a grill */
.embers { position: absolute; pointer-events: none; width: 140px; height: 140px; }
.embers i { position: absolute; bottom: 0; left: var(--l); width: 4px; height: 4px; border-radius: 50%; background: #ffb340; box-shadow: 0 0 6px 2px rgba(255,140,30,0.8); opacity: 0; animation: ember 2.6s ease-out infinite; animation-delay: var(--t); }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx, 14px), -130px); opacity: 0; } }

/* ---------- Ad player ---------- */
.ad-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(18,24,16,0.62); -webkit-backdrop-filter: blur(16px) saturate(120%); backdrop-filter: blur(16px) saturate(120%); opacity: 0; pointer-events: none; transition: opacity 350ms ease; }
.ad-backdrop.open { opacity: 1; pointer-events: auto; }
.ad { position: relative; width: min(1120px, 88vw); aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #111; box-shadow: 0 70px 140px -40px rgba(0,0,0,0.75); transform: scale(0.92) rotate(-2deg); transition: transform 600ms cubic-bezier(.2,.8,.2,1); }
.ad-backdrop.open .ad { transform: none; }
.ad-top { position: absolute; top: 18px; left: 22px; right: 22px; z-index: 20; display: flex; align-items: center; gap: 14px; }
.ad-segs { flex: 1; display: flex; gap: 6px; }
.ad-segs span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.32); overflow: hidden; }
.ad-segs span i { display: block; height: 100%; width: 0; background: #fff; }
.ad-segs span.done i { width: 100%; }
.ad-segs span.run i { animation: seg var(--dur) linear forwards; }
@keyframes seg { to { width: 100%; } }
.ad-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,0.18); color: #fff; font-size: 20px; cursor: pointer; backdrop-filter: blur(6px); }
.ad-btn:hover { background: rgba(255,255,255,0.3); }
.ad-side { position: absolute; top: 50%; translate: 0 -50%; z-index: 101; width: 54px; height: 54px; font-size: 24px; background: rgba(255,255,255,0.14); }
.ad-prev { left: 28px; } .ad-next { right: 28px; }
.ad-label { position: absolute; left: 24px; bottom: 20px; z-index: 20; padding: 8px 14px; border-radius: 999px; background: rgba(0,0,0,0.5); color: #fff; font: 600 13px/1 'Figtree', sans-serif; backdrop-filter: blur(6px); }
.reel { position: absolute; inset: 0; display: none; }
.reel.on { display: block; }
.sc { position: absolute; inset: 0; opacity: 0; transition: opacity 700ms ease; overflow: hidden; }
.sc.on { opacity: 1; }
.kb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sc.on .kb { animation: kb 7s ease-out forwards; }
@keyframes kb { from { transform: scale(1.12) translate(1.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
.rise { opacity: 0; transform: translateY(26px); }
.sc.on .rise { animation: rise 800ms cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--t, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
.pop { opacity: 0; transform: scale(0.6) rotate(-6deg); }
.sc.on .pop { animation: pop 650ms cubic-bezier(.3,1.5,.5,1) forwards; animation-delay: var(--t, 0s); }
@keyframes pop { to { opacity: 1; transform: none; } }
.frame { position: absolute; background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6); }
.frame img { display: block; width: 100%; border-radius: 8px; }
.frame .bar { display: flex; gap: 6px; padding: 2px 4px 8px; }
.frame .bar i { width: 9px; height: 9px; border-radius: 50%; background: #d4d1c7; }
.sc.on .frame.fly { animation: fly 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fly { from { transform: translateY(120px) rotate(6deg) scale(0.9); opacity: 0; } to { transform: rotate(var(--fr, -2deg)); opacity: 1; } }
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* Leaving for the project page: the player swells and fills with the project's own background colour. */
.ad::after { content: ''; position: absolute; inset: 0; z-index: 40; background: var(--go, #111); opacity: 0; pointer-events: none; transition: opacity 600ms ease; }
.ad-backdrop.leaving { background: var(--go, #111); transition: opacity 350ms ease, background-color 600ms ease; }
.ad-backdrop.leaving .ad { transform: scale(1.14); border-radius: 0; transition: transform 600ms cubic-bezier(.6,0,.2,1), border-radius 600ms ease; }
.ad-backdrop.leaving .ad::after { opacity: 1; pointer-events: auto; }
.ad-backdrop.leaving .ad-side { opacity: 0; pointer-events: none; transition: opacity 250ms ease; }

/* GoEureka reel: violet, Poppins */
.r-goe { font-family: 'Poppins', sans-serif; color: #130b43; }
.r-goe .bg { position: absolute; inset: 0; background: linear-gradient(160deg, #ffffff 0%, #efeafd 55%, #dcd3fb 100%); }
.r-goe .bg::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(90deg, rgba(96,79,205,0.06) 1px, transparent 1px); background-size: 72px 100%; }
.r-goe h3 { font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 0; }
.r-goe .v { color: #604fcd; }
.gl { position: absolute; z-index: 3; background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.9); border-radius: 16px; box-shadow: 0 24px 60px rgba(79,114,205,0.22); padding: 14px 16px; font-size: 13px; }
.sc.on .gl.pop { animation: pop 650ms cubic-bezier(.3,1.5,.5,1) forwards, drift 7s ease-in-out 700ms infinite; animation-delay: var(--t, 0s), calc(var(--t, 0s) + 700ms); }
.gl b { display: block; font-size: 15px; }
.gl .opt { margin-top: 8px; padding: 7px 10px; border: 1.5px solid #604fcd; border-radius: 10px; background: #efeafd; font-weight: 600; }
.ring { width: 150px; height: 150px; }
.ring circle { fill: none; stroke-width: 14; }
.ring .tr { stroke: #e1e0f0; }
.ring .val { stroke: #2e7ff0; stroke-linecap: round; stroke-dasharray: 377; stroke-dashoffset: 377; transform: rotate(-90deg); transform-origin: center; }
.sc.on .ring .val { animation: ring 1.6s cubic-bezier(.2,.8,.2,1) 400ms forwards; }
@keyframes ring { to { stroke-dashoffset: 68; } }
.sc.on .spin-in { animation: spin-in 1.2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes spin-in { from { transform: rotate(-200deg) scale(0.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* Osso Buono reel: cream, red, Fraunces */
.r-osso { font-family: 'Inter', sans-serif; color: #f5efe0; }
.r-osso .serif { font-family: 'Fraunces', serif; font-weight: 400; }
.r-osso .grad { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.15), rgba(0,0,0,0) 40%, rgba(20,12,8,0.82)); }
.menu-row { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(42,31,26,0.18); }
.menu-row .dots { flex: 1; border-bottom: 2px dotted rgba(42,31,26,0.3); transform: translateY(-5px); }

/* Hanami reel: navy, gold, Cormorant */
.r-hanami { font-family: 'Cormorant Garamond', serif; color: #f5efe0; background: #0a1119; }
.gold { color: #d4af6e; }
.mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; }
.line-draw { position: absolute; width: 1px; background: #d4af6e; height: 0; }
.sc.on .line-draw { animation: draw 1.6s cubic-bezier(.2,.8,.2,1) 300ms forwards; }
@keyframes draw { to { height: 100%; } }
.mist { position: absolute; inset: 0; pointer-events: none; }
.mist i { position: absolute; width: 380px; height: 160px; border-radius: 50%; background: radial-gradient(ellipse, rgba(245,239,224,0.22), transparent 70%); filter: blur(18px); animation: mist 9s ease-in-out infinite; animation-delay: var(--t); }
@keyframes mist { 0%, 100% { transform: translate(-40px, 0); opacity: 0.3; } 50% { transform: translate(60px, -30px); opacity: 0.8; } }

/* Tropicana reel: black, yellow, Anton */
.r-trop { background: #000; color: #f4c542; font-family: 'JetBrains Mono', monospace; }
.anton { font-family: 'Anton', sans-serif; font-weight: 400; line-height: 0.85; }
.drop span { display: inline-block; opacity: 0; transform: translateY(-120%); }
.sc.on .drop span { animation: drop 600ms cubic-bezier(.3,1.4,.5,1) forwards; animation-delay: calc(var(--k) * 70ms + 150ms); }
@keyframes drop { to { opacity: 1; transform: none; } }
.ticker { position: absolute; left: 0; right: 0; overflow: hidden; white-space: nowrap; background: #f4c542; color: #000; font-weight: 700; font-size: 15px; letter-spacing: 0.12em; padding: 12px 0; }
.ticker span { display: inline-block; animation: tick 14s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }
.spec { position: absolute; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #f4c542; background: rgba(0,0,0,0.78); padding: 6px 10px; }
.sc .steam i { width: 84px; height: 130px; filter: blur(11px); }
.sc .embers i { width: 6px; height: 6px; }
.spec::before { content: ''; position: absolute; right: 100%; top: 50%; width: 0; height: 1px; background: #f4c542; margin-right: 10px; }
.sc.on .spec::before { animation: lineL 900ms ease forwards; animation-delay: var(--t, 0s); }
@keyframes lineL { to { width: 90px; } }

@media (prefers-reduced-motion: reduce) {
  .pile > *, .steam i, .embers i, .mist i, .ticker span { animation: none !important; }
  .ad::after, .ad-backdrop.leaving, .ad-backdrop.leaving .ad { transition: none !important; }
}
