/* Shared reset and motion for the Vollnote homepage designs. Colours, type and
   layout live in each design's own style.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Icons from shared/icons.svg. */
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- motion ---------- */

/* Fade-up for whole blocks. Gated on .js so the page reads without script. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Headline words rising one by one. */
.js [data-words] .w { display: inline-block; opacity: 0; }
.js .is-in [data-words] .w,
.js [data-words].is-in .w {
  animation: w-rise 1s var(--ease) calc(var(--words-delay, 0ms) + var(--i) * 60ms) both;
}
@keyframes w-rise {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* Generic entrances used inside [data-play] blocks. */
.js [data-play] .p-rise { opacity: 0; }
.js [data-play].is-in .p-rise { animation: p-rise 0.9s var(--ease) var(--d, 0s) both; }
@keyframes p-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js [data-words] .w, .js [data-play] .p-rise { opacity: 1 !important; transform: none !important; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
