/* Shared base: reset, smooth-scroll hooks, reveal animations, demo bar */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: clip; }
[hidden] { display: none !important; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* Reveals (only when JS is running so content is never hidden without it) */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out), clip-path 1.3s var(--ease-out), filter 1s var(--ease-out);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
.js [data-reveal="up"] { transform: translateY(36px); }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="scale"] { transform: scale(.94); }
.js [data-reveal="blur"] { transform: translateY(18px); filter: blur(10px); }
.js [data-reveal="clip"] { opacity: 1; clip-path: inset(100% 0 0 0); }
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
/* Open the clip past the edges so shadows are not cut off once revealed */
.js [data-reveal="clip"].in { clip-path: inset(-60px -60px -60px -60px); }

/* Line-by-line headline reveal: wrap words in <span class="line"><span>…</span></span> */
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; }
.js [data-lines] .line > span { transform: translateY(105%); transition: transform 1.2s var(--ease-out); }
.js [data-lines] .line:nth-child(2) > span { transition-delay: .09s; }
.js [data-lines] .line:nth-child(3) > span { transition-delay: .18s; }
.js [data-lines].in .line > span { transform: none; }
.js [data-lines] { opacity: 1 !important; transform: none !important; }

[data-panel].in { animation: panelIn .7s var(--ease-out); }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

[data-magnetic] { transition: transform .5s var(--ease-out); }

/* Thin bar shown on demo pages */
.demo-bar {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(20, 18, 16, .86); color: #f4efe8;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 500 13px/1 "Inter", system-ui, sans-serif; letter-spacing: .01em;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  white-space: nowrap;
}
.demo-bar a {
  text-decoration: none; padding: 9px 14px; border-radius: 999px;
  background: #f4efe8; color: #161412; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .3s;
}
.demo-bar a:hover { background: #fff; }
.demo-bar { transition: opacity .4s; }
.bag-open .demo-bar, .nav-open .demo-bar { opacity: 0; pointer-events: none; }
.embedded .demo-bar { display: none; }
.demo-bar.gone { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity .35s, transform .35s; }
.demo-bar .demo-x { width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; background: transparent; color: #f4efe8; display: grid; place-items: center; opacity: .7; }
.demo-bar .demo-x:hover { opacity: 1; background: rgba(244,239,232,.12); }
.demo-bar .demo-x svg { width: 14px; height: 14px; }
.demo-bar .tpl-name { opacity: .7; }
.demo-bar a.ghost { background: transparent; color: #f4efe8; box-shadow: inset 0 0 0 1px rgba(244,239,232,.35); }
.demo-bar a.ghost:hover { background: rgba(244,239,232,.12); }
.demo-bar svg { width: 14px; height: 14px; }
@media (max-width: 480px) { .demo-bar { font-size: 12px; gap: 10px; padding-left: 14px; } .demo-bar .hide-sm { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
