/* Effect references: https://github.com/kmikeym/motion-backgrounds (CC0-1.0).
   Motion direction: https://github.com/frankxai/awesome-motion-design-agent-skills (CC0-1.0).
   Palettes, layout and Whiteberry lettering are specific to this presentation. */
.demo-main { padding-block:clamp(40px,6vw,84px) clamp(45px,6vw,80px); }
.demo-intro { display:flex; align-items:flex-end; justify-content:space-between; gap:20px 40px; margin-bottom:clamp(25px,3.8vw,48px); flex-wrap:wrap; }
.demo-intro h1 { font-size:clamp(4.2rem,8.5vw,7.6rem); line-height:.93; letter-spacing:-.08em; }
.demo-intro h1 span { color:var(--accent); }
.demo-intro p { margin-top:18px; max-width:48ch; font-size:clamp(1rem,1.45vw,1.2rem); color:var(--muted); }
.demo-main [hidden] { display:none; }
.playback { flex:none; color:var(--ink); border-radius:40px; padding-inline:17px; gap:10px; }
.playback-icon { width:11px; height:12px; border-inline:3px solid currentColor; }
.demo-main[data-paused] .playback-icon { width:0; height:0; border:0; border-block:6px solid transparent; border-left:10px solid currentColor; }
.motion-note { color:var(--muted); font-size:.875rem; }
.effect-gallery { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(14px,2vw,25px); }
.sample {
  --logo:var(--tone-0); position:relative; isolation:isolate; overflow:hidden; container-type:inline-size;
  display:grid; grid-template-rows:1fr auto; min-height:clamp(250px,26vw,345px);
  border:1px solid var(--border); border-radius:15px; color:var(--caption); background:var(--ground);
}
.sample[data-tone="1"] { --logo:var(--tone-1); }
.sample[data-tone="2"] { --logo:var(--tone-2); }
.sample.aurore,.sample.horizon { grid-column:1 / -1; min-height:clamp(300px,31vw,435px); }
.art,.art > i,.art > svg { position:absolute; pointer-events:none; }
.art { inset:0; overflow:hidden; z-index:-1; }
.art i,.art b { display:block; }
.show-logo {
  padding:clamp(30px,6.1cqw,76px); align-self:center; display:flex; align-items:center;
  font:750 clamp(1.9rem,10.6cqw,6.8rem)/1 "Inter","Aptos","Helvetica Neue",Arial,sans-serif; letter-spacing:-.077em;
  color:var(--logo); text-shadow:0 2px 12px var(--shade); white-space:nowrap; user-select:none;
}
.show-logo .gem {
  --soft:var(--logo); --on-soft:var(--ground);
  width:.85em; height:.85em; margin-right:.24em; border-radius:23%; flex:none; font-size:inherit;
  box-shadow:0 .02em .14em var(--shade);
}
.show-dot { color:#985888; }
.sample-caption { padding:15px clamp(18px,4cqw,37px); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:6px 12px; background:var(--caption-ground); border-top:1px solid var(--border); }
.sample-caption h2 { letter-spacing:-.026em; font-size:clamp(1.04rem,2.7cqw,1.35rem); }
.sample-caption p { margin-top:4px; font-size:.83rem; line-height:1.35; }
.swatches { display:flex; flex:none; }
.swatch { display:grid; place-items:center; width:32px; height:36px; padding:0; border:0; border-radius:7px; background:transparent; color:var(--caption); }
.swatch span { position:relative; display:block; width:15px; height:15px; border:1px solid var(--border); border-radius:50%; }
.swatch[aria-pressed="true"] span::after { content:""; position:absolute; inset:-5px; border:1.5px solid currentColor; border-radius:50%; }
.tone-0 span { background:var(--tone-0); }
.tone-1 span { background:var(--tone-1); }
.tone-2 span { background:var(--tone-2); }
.swatch:focus-visible { outline:2px solid currentColor; outline-offset:0; }
.demo-contact { margin-top:32px; color:var(--soft); min-height:44px; text-decoration:underline; text-underline-offset:4px; }

/* Each scene uses one distinct visual effect. Artwork is motionless until visible. */
.sample .art * { animation-play-state:paused; }
.demo-main[data-playing] .sample.in-view .art * { animation-play-state:running; }
.aurore {
  --ground:#261121; --tone-0:#fbe2e1; --tone-1:#e2a2ba; --tone-2:#e9b3c4;
  --caption:#fbe2e1; --caption-ground:#2a1122e8; --border:#4d1934; --shade:#29112280;
}
.aurore .art { background:radial-gradient(ellipse at 65% 135%,#7b3557 0,transparent 48%),radial-gradient(ellipse at 87% 42%,#43172f 1%,transparent 43%),linear-gradient(130deg,#251020 4%,#361428 47%,#2b1223); }
.ribbons { width:115%; height:128%; left:-5%; top:-17%; animation:aurora-tide 8s ease-in-out infinite alternate; }
@keyframes aurora-tide { from { transform:translate(-2%, 2%) rotate(-5deg) scaleY(.92); } to { transform:translate(3%, -3%) rotate(5deg) scaleY(1.16); } }

.radar {
  --ground:#2a1122; --tone-0:#e7afc2; --tone-1:#fce5e3; --tone-2:#e3a6bc;
  --caption:#f5d4d8; --caption-ground:#2b1223eb; --border:#521a36; --shade:#271121;
}
.radar .art { background:radial-gradient(ellipse at 85% 43%,#43172f,transparent 57%),#2a1122; }
.radar-grid { inset:0; background-image:linear-gradient(#cc719a24 1px,transparent 1px),linear-gradient(90deg,#cc719a24 1px,transparent 1px); background-size:30px 30px; }
.radar-dial { width:71%; aspect-ratio:1; border-radius:50%; top:32%; right:-10%; transform:translateY(-50%); overflow:hidden; border:1px solid #de9ab573; background:repeating-radial-gradient(circle at center,transparent 0 17%,#de9ab57a 17.2% 17.5%,transparent 17.8% 22%); }
.radar-dial b { position:absolute; inset:0; border-radius:inherit; background:conic-gradient(from 20deg,transparent 0 285deg,#de9ab526 330deg,#de9ab57c 358deg,#ecbbc9aa 359deg,transparent); animation:radar-sweep 9s linear infinite; }
@keyframes radar-sweep { to { transform:rotate(1turn); } }

.ambre {
  --ground:#2d1224; --tone-0:#dd95b2; --tone-1:#f3ced4; --tone-2:#dd96b2;
  --caption:#efc3ce; --caption-ground:#2c1223ee; --border:#4f1934; --shade:#311326;
}
.ambre .art { background:radial-gradient(ellipse at 68% 40%,#471731 0%,#321326 45%,#251020 90%); }
.crt-grid { inset:0; background:repeating-linear-gradient(0deg,transparent 0 3px,#1b0e1b66 3px 4px),repeating-linear-gradient(90deg,transparent 0 3px,#e6aec119 3px 4px); }
.crt-roll { inset:0; height:32%; background:linear-gradient(0deg,transparent,#df9bb633 46%,#dc94b121 53%,transparent); animation:phosphor-pass 7s linear infinite; }
@keyframes phosphor-pass { from { transform:translateY(-100%); } to { transform:translateY(330%); } }

.nuages {
  --ground:#edbfcb; --tone-0:#351428; --tone-1:#3a152a; --tone-2:#39152a;
  --caption:#301325; --caption-ground:#edbfcbed; --border:#9e4f74; --shade:#f0c7d0ab;
}
.nuages .art { background:linear-gradient(165deg,#cb709a,#f5d4d8 67%,#e5aabf); }
.cloud-texture { width:139%; height:141%; left:-27%; top:-25%; animation:cloud-drift 14s ease-in-out infinite alternate; }
.halftone { inset:0; opacity:.32; background:radial-gradient(circle,#42162e 0 .75px,transparent 1px) 0 0 / 4px 4px; }
@keyframes cloud-drift { from { transform:translate(0,1%); } to { transform:translate(12%,-6%); } }

.etoiles {
  --ground:#2a1122; --tone-0:#e4a9be; --tone-1:#fde7e4; --tone-2:#e7b1c3;
  --caption:#f7d7da; --caption-ground:#2b1223ee; --border:#4f1934; --shade:#281121;
}
.etoiles .art { background:radial-gradient(ellipse at 86% 30%,#471831,transparent 45%),radial-gradient(ellipse at 49% 75%,#39142a,transparent 70%),#24101f; }
.stars-far,.stars-near { inset:-45% -25%; }
.stars-far { background-image:radial-gradient(circle at 17px 9px,#ebbac8 0 .9px,transparent 1.5px),radial-gradient(circle at 59px 35px,#d98bac 0 1px,transparent 1.6px); background-size:77px 61px,111px 83px; animation:stars-deep 18s ease-in-out infinite alternate; }
.stars-near { background-image:radial-gradient(circle at 15px 29px,#fee9e5 0 1.7px,#e2a3ba99 2.2px,transparent 3.6px),radial-gradient(circle at 74px 49px,#e6adc1 0 1.2px,transparent 2.7px); background-size:161px 125px,207px 133px; animation:stars-front 18s ease-in-out infinite alternate; }
@keyframes stars-deep { to { transform:translate(2%,-3%); } }
@keyframes stars-front { to { transform:translate(12%,-13%); } }

.horizon {
  --ground:#2a1123; --tone-0:#edbecb; --tone-1:#f2ccd3; --tone-2:#e7b0c2;
  --caption:#f8dadc; --caption-ground:#2c1223ee; --border:#511935; --shade:#281121;
}
.horizon .art { background:radial-gradient(ellipse at 75% 53%,#6d2b4b,transparent 47%),linear-gradient(#291122 0%,#41162e 46%,#6e2b4b 55%,#371429 57%,#291122 90%); }
.sun { width:clamp(78px,18%,195px); aspect-ratio:1; right:17%; bottom:45%; border-radius:50%; background:linear-gradient(#e5abbf 2%,#c56b94 46%,#b56087); mask-image:linear-gradient(#000 0 55%,transparent 55% 58%,#000 58% 66%,transparent 66% 70%,#000 70% 76%,transparent 76% 82%,#000 82% 86%,transparent 86% 93%,#000 93%); }
.floor { inset:55% 0 0; perspective:140px; overflow:hidden; }
.floor b { position:absolute; width:240%; height:340%; top:0; left:-70%; transform-origin:center top; transform:rotateX(66deg); background:linear-gradient(90deg,transparent calc(100% - 1.3px),#d581a6b3 0) 50% 0 / 46px 100%,repeating-linear-gradient(0deg,transparent 0 20px,#d37da3bb 20px 21px) 0 0 / 100% 21px; animation:horizon-travel 2.4s linear infinite; }
@keyframes horizon-travel { to { background-position:50% 0,0 21px; } }

[data-high-contrast] .sample-caption { background:#101019; color:white; }
[data-high-contrast] .show-logo { background:#101019; color:white; width:max-content; max-width:100%; padding:.15em .22em; margin-left:5%; }
[data-high-contrast] .show-logo .gem { --soft:white; --on-soft:#101019; }
[data-high-contrast] .show-dot { color:white; }
[data-high-contrast] .swatches { display:none; }
@media (max-width:760px) {
  .effect-gallery { grid-template-columns:1fr; }
  .sample { min-height:235px; }
  .sample.aurore,.sample.horizon { min-height:270px; }
  .show-logo { font-size:clamp(2.45rem,11.8cqw,5rem); padding:6cqw; }
}
@media (prefers-reduced-motion:reduce), (forced-colors:active) {
  .sample .art * { animation:none !important; }
}
[data-reduce-motion] .sample .art * { animation:none; }
@media (forced-colors:active) {
  .swatches { display:none; }
  .show-logo .gem { background:Canvas url(/favicon.svg) center/contain no-repeat; }
}

.sample {--tone-0:#fff3e8;--tone-1:#ff97bb;--tone-2:#d7afd3;--caption:#fff3e8;--caption-ground:#311528;--border:#85506d;--shade:#25121f;--ground:#331728;}
.sample.nuages .art {background:linear-gradient(135deg,#331728,#632c4b);}
.ondes .art {background:radial-gradient(ellipse at 73% 40%,#733957,#291625 70%);}
.wave {width:62%;aspect-ratio:1;right:-3%;top:-12%;border-radius:50%;background:repeating-radial-gradient(circle,transparent 0 11%,#ffa1c55c 11.5% 12%,transparent 12.4% 14%);animation:berry-wave 5s ease-in-out infinite alternate;}
@keyframes berry-wave {to{transform:scale(1.3);opacity:.6;}}
.facette .art {background:linear-gradient(135deg,#281323,#5a2641);}
.glass {inset:-20% -25%;background:linear-gradient(115deg,transparent 40%,#fa9fc230 48%,#fff3e898 50%,#98588852 51%,transparent 60%);animation:berry-glass 7s ease-in-out infinite alternate;}
@keyframes berry-glass {from{transform:translateX(-22%);}to{transform:translateX(24%);}}
