/* =========================================================================
   MILO — shared structure. Concepts set the tokens below and their own
   layout; this file only carries behaviour-related styling (slides,
   reveals, concept bar) so every concept moves alike.
   Tokens: --bg --bg2 --fg --fg2 --line --acc --acc-ink --r --ease --pad
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--fg); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .8s var(--ease), color .8s var(--ease); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
:root { --ease: cubic-bezier(.22, .61, .36, 1); --ease-io: cubic-bezier(.7, 0, .2, 1); --r: 0px; --pad: clamp(20px, 5vw, 88px); --logo: #C10016; }
::selection { background: var(--acc); color: var(--acc-ink, #fff); }
:focus-visible { outline: 1px solid var(--acc); outline-offset: 4px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--fg); color: var(--bg); padding: 10px 14px; text-decoration: none; transition: top .3s; }
.skip:focus { top: 12px; }
[data-m="logo"] { display: inline-block; }
.logomark { height: 100%; width: auto; }
.logomark path { fill: var(--logo); }
[data-m="icon"] svg, .ico svg { width: 1.1em; height: 1.1em; }
[data-m="theme"] svg { width: 20px; height: 20px; }

/* ---------- render slideshow (crossfade + slow zoom) ---------- */
.slides { position: relative; overflow: hidden; background: #0c0b0a; isolation: isolate; }
.slides .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s var(--ease); }
.slides .slide.is-on { opacity: 1; z-index: 1; }
.slides .slide.was-on { opacity: 0; z-index: 0; }
.slides img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.0); transform-origin: var(--zo, 50% 60%); }
.slides .slide.is-on img, .slides .slide.was-on img { animation: kb 14s linear both; }
@keyframes kb { from { transform: scale(1.0); } to { transform: scale(1.09); } }
.slides-count { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; }
.slides-count .sc-sep { width: 28px; height: 1px; background: currentColor; opacity: .6; }
.grade { position: relative; }

@keyframes slowzoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* ---------- reveals ---------- */
.ready [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease) calc(var(--i, 0) * 90ms), transform 1.2s var(--ease) calc(var(--i, 0) * 90ms); }
.ready [data-reveal].in { opacity: 1; transform: none; }
.ready [data-reveal="mask"] { opacity: 1; transform: none; }
.ready [data-reveal="mask"] > * { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s var(--ease-io) calc(var(--i, 0) * 110ms); }
.ready [data-reveal="mask"].in > * { clip-path: inset(0 0 0 0); }
.ready [data-reveal="line"] { opacity: 1; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-io); }
.ready [data-reveal="line"].in { transform: scaleX(1); }
.ready [data-reveal="fade"] { transform: none; }
.ready [data-reveal="lines"] { opacity: 1; transform: none; }
.mask-lines > span { display: block; overflow: hidden; }
.mask-lines > span > span { display: block; transform: translateY(105%); transition: transform 1.2s var(--ease-io) calc(var(--d, 0) * 120ms + 150ms); }
.ready .mask-lines.in > span > span, .mask-lines.in > span > span { transform: none; }

/* ---------- concept bar (presentation chrome) ---------- */
.cbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 110; display: flex; align-items: stretch; height: 46px; background: #0e0d0c; color: #ece6dc; border: 1px solid rgba(236, 230, 220, .16); border-radius: 2px; font: 500 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .08em; }
.cbar a { text-decoration: none; display: flex; align-items: center; }
.cbar-b { width: 46px; justify-content: center; transition: background-color .6s var(--ease); }
.cbar-b:hover, .cbar-m:hover { background: rgba(236, 230, 220, .08); }
.cbar-b svg { width: 18px; height: 18px; }
.cbar-m { gap: 12px; padding: 0 16px; border-left: 1px solid rgba(236, 230, 220, .14); border-right: 1px solid rgba(236, 230, 220, .14); white-space: nowrap; }
.cbar-m svg { width: 15px; height: 15px; opacity: .7; }
.cbar-i { font-variant-numeric: tabular-nums; }
.cbar-i i { font-style: normal; opacity: .45; margin: 0 3px; }
.cbar-n { text-transform: uppercase; letter-spacing: .16em; opacity: .75; }

@media (max-width: 760px) {
  .cbar { bottom: 10px; height: 44px; }
  .cbar-n { display: none; }
  body { padding-bottom: 70px; }
}

/* ---------- header hide-on-scroll helper ---------- */
[data-m="header"] { transition: transform .8s var(--ease), background-color .8s var(--ease), border-color .8s var(--ease); }
[data-m="header"].hide { transform: translateY(-110%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .slides .slide.is-on img { animation: none; }
  .ready [data-reveal], .ready [data-reveal="mask"] > * { opacity: 1; transform: none; clip-path: none; }
  .mask-lines > span > span { transform: none; }
}
