/* Doko scroll kit styles companion (cortex-scroll-kit@5 attribute API).
   Without JavaScript, or under prefers-reduced-motion, none of this applies and the page reads
   normally: every hidden state lives behind html.sk-on. */

/* Split headlines: each word rises out of its own mask. */
sk-span { display: inline; }
.sk-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0 0.08em 0.1em;
  margin: 0 -0.08em -0.1em;
}
.sk-split-done .sk-word, .sk-split.sk-done .sk-word { overflow: visible; }
.sk-word__in { display: inline-block; }
html.sk-on .sk-split .sk-word__in {
  transition: opacity 900ms ease, translate 1100ms cubic-bezier(0.16, 1, 0.3, 1), rotate 1100ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--sk-w, 0) * 55ms);
}
html.sk-on .sk-split:not(.is-in) .sk-word__in { opacity: 0; translate: 0 118%; rotate: 3deg; }

/* Hero intro: copy and buttons rise in after the headline; the media settles. */
html.sk-on .sk-intro:not(.sk-done) {
  transition: opacity 1000ms cubic-bezier(0.16, 1, 0.3, 1), translate 1000ms cubic-bezier(0.16, 1, 0.3, 1), filter 1000ms ease;
  transition-delay: calc(320ms + var(--sk-i, 0) * 110ms);
}
html.sk-on .sk-intro:not(.is-in) { opacity: 0; translate: 0 38px; filter: blur(7px); }
html.sk-on .sk-intro-media:not(.sk-done) { transition: opacity 1200ms ease, scale 1400ms cubic-bezier(0.16, 1, 0.3, 1); }
html.sk-on .sk-intro-media:not(.is-in) { opacity: 0; scale: 1.06; }

/* 1. Reveal: items rise and come into focus, one after another. */
html.sk-on .sk-item:not(.sk-done) {
  transition: opacity 1000ms cubic-bezier(0.16, 1, 0.3, 1), translate 1000ms cubic-bezier(0.16, 1, 0.3, 1), scale 1000ms cubic-bezier(0.16, 1, 0.3, 1), filter 900ms ease, clip-path 1100ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--sk-i, 0) * 110ms);
}
html.sk-on .sk-item:not(.is-in):not([data-reveal="mask"]) { opacity: 0; translate: 0 58px; filter: blur(9px); }
html.sk-on .sk-item[data-reveal="fade"]:not(.is-in) { translate: none; }
html.sk-on .sk-item[data-reveal="left"]:not(.is-in) { translate: -70px 0; }
html.sk-on .sk-item[data-reveal="right"]:not(.is-in) { translate: 70px 0; }
html.sk-on .sk-item[data-reveal="scale"]:not(.is-in) { translate: none; scale: 0.9; }

/* data-reveal="mask": a panel unmasks upward while its content settles from a slight zoom. */
html.sk-on .sk-item[data-reveal="mask"]:not(.is-in) { clip-path: inset(100% 0 0 0); }
html.sk-on .sk-item[data-reveal="mask"].is-in:not(.sk-done) { clip-path: inset(0 0 0 0); }
html.sk-on .sk-item[data-reveal="mask"]:not(.sk-done) :where(img, picture, video, .ph) {
  transition: scale 1350ms cubic-bezier(0.16, 1, 0.3, 1);
}
html.sk-on .sk-item[data-reveal="mask"]:not(.is-in) :where(img, picture, video, .ph) { scale: 1.16; }

/* 2. Pinned and horizontal: the stage sticks below the top bar while the track slides sideways. */
html.sk-on [data-scroll="pinned"] { position: relative; }
html.sk-on [data-scroll="pinned"] > .sk-pin {
  position: sticky;
  top: var(--sk-top, 0px);
  height: calc(100vh - var(--sk-top, 0px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html.sk-on [data-scroll="pinned"] [data-track] {
  display: flex;
  gap: clamp(16px, 2.4vw, 40px);
  padding-inline: clamp(16px, 5vw, 80px);
  will-change: translate;
}
html.sk-on [data-scroll="pinned"] [data-track] > * { flex: 0 0 auto; }
html.sk-on [data-scroll="pinned"] [data-track] > .is-near { border-color: var(--color-border-strong); }

/* 3. Parallax: data-speed layers drift against the scroll. */
html.sk-on [data-scroll="parallax"] { overflow: hidden; overflow: clip; }
html.sk-on [data-speed] { will-change: translate; }

/* 4. Scrollytelling: the media sticks while each step crosses the centre. */
html.sk-on [data-scroll="story"] {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
html.sk-on [data-story-media] {
  position: sticky;
  top: var(--sk-top, 0px);
  height: calc(100vh - var(--sk-top, 0px));
  display: grid;
  place-items: center;
  align-self: start;
}
html.sk-on [data-story-media] > * {
  grid-area: 1 / 1;
  max-height: 100%;
  opacity: 0;
  scale: 0.96;
  transition: opacity 700ms ease, scale 700ms ease;
}
html.sk-on [data-story-media] > .is-active { opacity: 1; scale: none; }
html.sk-on [data-story-steps] > * {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0.3;
  transition: opacity 450ms ease;
}
html.sk-on [data-story-steps] > .is-active { opacity: 1; }

/* Counting figures. */
.sk-count { font-variant-numeric: tabular-nums; }
.sk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Pointer effects. */
html.sk-on [data-tilt-hover] { will-change: transform; transition: transform 400ms cubic-bezier(0.16, 1, 0.3, 1); }

/* The kit's own layers keep their box whatever the pack says about its children. */
html.sk-on :is(.sk-spot, .sk-beam, .sk-skeleton) {
  position: absolute !important;
  margin: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  max-height: none !important;
  float: none !important;
  flex: none !important;
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
}

/* data-spotlight: a light and a lit rim under the pointer, between the card and its content. */
html.sk-on [data-spotlight] { isolation: isolate; }
html.sk-on .sk-spot {
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 350ms ease;
  background: radial-gradient(360px circle at var(--sk-x, 50%) var(--sk-y, 50%), color-mix(in srgb, var(--color-accent, #86E5F2) 14%, transparent), transparent 70%);
}
html.sk-on .sk-spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(240px circle at var(--sk-x, 50%) var(--sk-y, 50%), color-mix(in srgb, var(--color-accent, #86E5F2) 70%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
html.sk-on [data-spotlight]:hover > .sk-spot { opacity: 1; }

/* data-beam: a light running round the edge. */
@property --sk-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
html.sk-on .sk-beam {
  border-radius: inherit;
  padding: var(--sk-beam-width, 1.5px);
  pointer-events: none;
  background: conic-gradient(from var(--sk-angle), transparent 0% 60%, rgba(134, 229, 242, 0.8) 74%, #fff 81%, transparent 88% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
html.sk-on .sk-beam-on > .sk-beam { animation: sk-beam 5s linear infinite; }
@keyframes sk-beam { to { --sk-angle: 360deg; } }

/* data-bento: the cell under the pointer comes forward; the rest step back. */
@media (hover: hover) {
  html.sk-on .sk-bento:hover > *:not(:hover) { opacity: 0.62; scale: 0.988; filter: saturate(0.75); }
  html.sk-on .sk-bento > * { transition: opacity 300ms ease, scale 400ms cubic-bezier(0.16, 1, 0.3, 1), filter 300ms ease; }
  html.sk-on .sk-bento > *:hover { scale: 1.012; }
}

/* data-skeleton: shimmering lines, then the rows arrive. */
html.sk-on .sk-skel > :not(.sk-skeleton) { opacity: 0; }
html.sk-on [data-skeleton] > :not(.sk-skeleton) { transition: opacity 500ms ease; }
html.sk-on .sk-skeleton {
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 300ms ease;
  border-radius: 8px;
  background:
    linear-gradient(100deg, transparent 30%, color-mix(in srgb, currentColor 14%, transparent) 50%, transparent 70%) 0 0 / 250% 100%,
    linear-gradient(color-mix(in srgb, currentColor 12%, transparent) 0 0) 0 0 / 42% 18px no-repeat,
    linear-gradient(color-mix(in srgb, currentColor 9%, transparent) 0 0) 0 34px / 92% 12px no-repeat,
    linear-gradient(color-mix(in srgb, currentColor 9%, transparent) 0 0) 0 56px / 80% 12px no-repeat,
    linear-gradient(color-mix(in srgb, currentColor 9%, transparent) 0 0) 0 78px / 64% 12px no-repeat,
    linear-gradient(color-mix(in srgb, currentColor 9%, transparent) 0 0) 0 100px / 74% 12px no-repeat;
  animation: sk-skeleton 1.2s linear infinite;
}
@keyframes sk-skeleton {
  from { background-position: 150% 0, 0 0, 0 34px, 0 56px, 0 78px, 0 100px; }
  to { background-position: -150% 0, 0 0, 0 34px, 0 56px, 0 78px, 0 100px; }
}

/* The command menu. */
.sk-cmd {
  position: fixed;
  inset: 0;
  z-index: 2147482900;
  display: grid;
  place-items: start center;
  padding: 14vh 16px 16px;
  background: rgba(5, 7, 10, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.sk-cmd[hidden] { display: none; }
.sk-cmd__panel {
  width: min(560px, 100%);
  border-radius: 14px;
  overflow: hidden;
  background: #0C1016;
  color: #EDF1F4;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 1px #2C3744;
}
html.sk-on .sk-cmd__panel { animation: sk-cmd-in 260ms cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes sk-cmd-in { from { opacity: 0; scale: 0.97; translate: 0 -8px; } }
.sk-cmd__input {
  width: 100%;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid #1C242E;
  background: transparent;
  color: inherit;
  font: 500 16px/1.2 "Space Grotesk", system-ui, sans-serif;
  outline: none;
}
.sk-cmd__input:focus-visible { outline: 2px solid #86E5F2; outline-offset: -2px; }
.sk-cmd__list { max-height: min(50vh, 380px); overflow: auto; margin: 0; padding: 8px; list-style: none; }
.sk-cmd__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font: 500 15px/1.35 "Space Grotesk", system-ui, sans-serif;
  color: #C9D0D7;
}
.sk-cmd__item small { font: 500 11px/1.3 "Geist Mono", monospace; letter-spacing: 0.08em; color: #8E99A6; }
.sk-cmd__item.is-at { background: rgba(134, 229, 242, 0.12); color: #EDF1F4; }
.sk-cmd__empty { padding: 14px 12px; color: #8E99A6; font: 500 14px/1.3 "Space Grotesk", system-ui, sans-serif; }
.sk-cmd__foot {
  margin: 0;
  padding: 10px 20px;
  border-top: 1px solid #1C242E;
  font: 500 11.5px/1.3 "Geist Mono", monospace;
  letter-spacing: 0.08em;
  color: #6F7A87;
}

@media (max-width: 860px) {
  /* Phones: the pinned row becomes a swipeable scroller and the stage stops sticking. */
  html.sk-on [data-scroll="pinned"] { height: auto !important; }
  html.sk-on [data-scroll="pinned"] > .sk-pin {
    position: relative;
    height: auto;
    padding-block: 12px 24px;
    overflow: visible;
  }
  html.sk-on [data-scroll="pinned"] [data-track] {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-inline: var(--gutter, 20px);
    scrollbar-width: none;
  }
  html.sk-on [data-scroll="pinned"] [data-track]::-webkit-scrollbar { display: none; }
  html.sk-on [data-scroll="pinned"] [data-track] > * { scroll-snap-align: start; }
  html.sk-on [data-scroll="story"] { grid-template-columns: minmax(0, 1fr); gap: 0; }
  html.sk-on [data-story-media] { position: relative; height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sk-word { display: inline; overflow: visible; padding: 0; margin: 0; }
  .sk-word__in { display: inline; }
  html.sk-on [data-scroll="pinned"] { height: auto !important; }
  html.sk-on [data-scroll="pinned"] > .sk-pin { position: relative; height: auto; overflow: visible; }
  html.sk-on [data-scroll="pinned"] [data-track] { overflow-x: auto; translate: none !important; }
  html.sk-on [data-speed] { translate: none !important; }
  html.sk-on .sk-item, html.sk-on .sk-intro { opacity: 1 !important; translate: none !important; filter: none !important; scale: none !important; clip-path: none !important; }
  html.sk-on [data-story-media] > * { opacity: 1; scale: none; }
}
