/* Sketch story: whiteboard film in the style of the tldraw drawings */

html:has(.sk) {
  scroll-padding-top: 0;
}

.sk {
  position: relative;
  margin-top: -80px;
  background: var(--board);
}

/* Stage: only active with JavaScript */
.sk-stage {
  display: none;
}

.sk.is-live .sk-stage {
  --dot-size: 26px;
  --dot-x: 0px;
  --dot-y: 0px;
  display: block;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--board);
  background-image: radial-gradient(circle, var(--board-dot) 1.1px, transparent 1.3px);
  background-size: var(--dot-size) var(--dot-size);
  background-position: var(--dot-x) var(--dot-y);
}

.sk-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.sk-text {
  font-family: var(--font-sketch);
  white-space: pre;
}

.sk-glass-dot {
  animation: sk-glass-rise 2.1s ease-in-out infinite;
}

@keyframes sk-glass-rise {
  0% { opacity: 0; transform: translateY(0); }
  18% { opacity: 1; }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-110px); }
}

.sk-pen {
  transition: opacity 0.4s ease;
  filter: none;
}

.sk-hud {
  position: absolute;
  right: 24px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 7px 14px;
  font-family: var(--font-sketch);
  font-size: 14px;
  color: #6d7378;
  background: var(--paper-bright);
  border: 1.5px solid #cfccc2;
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
}

.sk-hud [data-sk-label] {
  color: var(--ink);
}

.sk-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--sk-yellow);
  transform: scaleX(0);
  transform-origin: left;
}

/* Chapters */
.sk-chapters {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.sk.is-live .sk-chapters {
  margin-top: -100vh;
  margin-top: -100svh;
}

.sk-ch {
  position: relative;
}

.sk-pin {
  padding: 120px 0 56px;
}

.sk-copy {
  pointer-events: auto;
  max-width: 560px;
}

.sk.is-live .sk-ch {
  height: 100vh;
  height: 100svh;
}

.sk.is-live .sk-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  padding: 90px 0 44px;
}

.sk.is-live .sk-pin > .shell {
  display: flex;
  margin-inline: auto;
}

.sk.is-live [data-side="right"] .sk-pin > .shell {
  justify-content: flex-end;
}

.sk.is-live .sk-copy {
  width: min(460px, 34vw);
  position: relative;
}

.sk.is-live .sk-copy::before {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: var(--board);
  border-radius: 32px;
  box-shadow: 0 0 24px 20px var(--board);
  opacity: 0.95;
}

.sk.is-live [data-side="hero"] .sk-copy {
  width: min(680px, 47vw);
  max-width: none;
}

/* Typography */
.sk-kicker {
  font-family: var(--font-sketch);
  font-size: 20px;
  line-height: 1.3;
  color: var(--blue);
  margin-bottom: 14px;
}

.sk-h1 {
  font-family: var(--font-display);
  font-size: var(--title-page);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}

.sk-hand {
  position: relative;
  display: inline-block;
  font-family: var(--font-sketch);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--sk-orange);
}

.sk-hand svg {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -0.08em;
  width: 104%;
  height: 0.28em;
  max-width: none;
  overflow: visible;
}

.sk-hand path {
  fill: none;
  stroke: var(--sk-yellow);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: sk-underline 0.9s 0.5s var(--ease) forwards;
}

@keyframes sk-underline {
  to { stroke-dashoffset: 0; }
}

.sk-h2 {
  font-family: var(--font-display);
  font-size: var(--title-section);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.sk-lead {
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--ink-soft);
}

.sk-lead + .sk-lead {
  margin-top: 12px;
}

.sk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.sk-services {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.sk-service {
  display: block;
  padding: 11px 18px;
  color: inherit;
  text-decoration: none;
  background: var(--paper-bright);
  border: 2px solid currentColor;
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.sk-service:hover,
.sk-service:focus-visible {
  transform: translate(-2px, -2px) rotate(-0.4deg);
  box-shadow: 4px 4px 0 currentColor;
}

.sk-service strong {
  display: block;
  font-family: var(--font-sketch);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.25;
}

.sk-service span {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.sk-service--blue { color: #2f86d8; }
.sk-service--orange { color: var(--sk-orange); }
.sk-service--green { color: #2f8a49; }
.sk-service--violet { color: #ae3ec9; }

/* Services as a separate section after the story */
.sk-offers {
  scroll-margin-top: 80px;
}

.sk-offers .references-title {
  margin-top: 6px;
}

.sk-offers .sk-services {
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 32px;
}

.sk-offers .sk-service {
  padding: 20px 22px;
}

.sk-offers .sk-service strong {
  font-size: 26px;
  margin-bottom: 6px;
}

.sk-offers .sk-service span {
  font-size: 15px;
}

.sk-offers__more {
  margin-top: 28px;
}

@media (max-width: 1100px) {
  .sk-offers .sk-services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sk-offers .sk-services {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* One station per scroll */
html.sk-snap {
  scroll-snap-type: y mandatory;
}

html.sk-snap .sk-ch,
html.sk-snap .sk-offers,
html.sk-snap .references {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.references {
  scroll-margin-top: 80px;
}

.sk-nav {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, visibility 0.3s;
}

.sk-nav[hidden],
.sk-nav.is-away {
  opacity: 0;
  visibility: hidden;
}

.sk-nav[hidden] {
  display: none;
}

.sk-dots {
  display: flex;
  gap: 2px;
}

.sk-dot {
  position: relative;
  width: 24px;
  height: 24px;
  background: none;
  border: 0;
  cursor: pointer;
}

.sk-dot::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid var(--ink);
  border-radius: 58% 42% 55% 45% / 45% 58% 42% 55%;
  transition: background 0.25s ease, transform 0.25s var(--ease);
}

.sk-dot:hover::after {
  transform: scale(1.2);
}

.sk-dot.is-active::after {
  background: var(--sk-orange);
  border-color: var(--sk-orange);
  transform: scale(1.25);
}

.sk-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-family: var(--font-sketch);
  font-size: 19px;
  line-height: 1.2;
  color: var(--ink);
  cursor: pointer;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.sk-next:hover,
.sk-next:focus-visible {
  transform: translate(-2px, -2px) rotate(-0.5deg);
  box-shadow: 4px 4px 0 var(--ink);
}

.sk-next svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sk-skip {
  color: var(--muted);
  font-family: var(--font-sketch);
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.sk-skip:hover,
.sk-skip:focus-visible {
  color: var(--blue);
}

.sk-next:disabled {
  opacity: 0.45;
  cursor: default;
}

.sk-skip.is-hidden {
  display: none;
}

/* Reduced motion: finished drawings stacked vertically */
.sk-still-art {
  width: 100%;
  height: auto;
  margin-top: 28px;
}

.sk-still {
  display: none;
}

.sk.is-static .sk-still {
  display: block;
}

.sk-still-art text {
  font-family: var(--font-sketch);
}

@media (max-width: 960px) {
  .sk.is-live .sk-pin {
    align-items: flex-end;
    padding: 72px 0 14px;
  }

  .sk.is-live .sk-pin > .shell,
  .sk.is-live [data-side="right"] .sk-pin > .shell {
    justify-content: stretch;
  }

  .sk.is-live .sk-copy,
  .sk.is-live [data-side="hero"] .sk-copy {
    width: 100%;
    max-width: none;
  }

  .sk.is-live .sk-copy::before {
    inset: -14px -14px;
    border-radius: 18px;
    box-shadow: 0 10px 30px 8px var(--board);
    opacity: 0.94;
  }

  .sk.is-live .sk-optional {
    display: none;
  }

  .sk-kicker {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .sk-h1 {
    margin-bottom: 14px;
  }

  .sk-h2 {
    margin-bottom: 10px;
  }

  .sk-lead {
    font-size: 16px;
    line-height: 1.45;
  }

  .sk-actions {
    margin-top: 16px;
  }

  .sk.is-live .sk-services {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
  }

  .sk.is-live .sk-service {
    padding: 8px 12px;
  }

  .sk.is-live .sk-service span {
    display: none;
  }

  .sk-hud,
  .sk-dots,
  .sk-next {
    display: none;
  }

  .sk-nav {
    bottom: 10px;
  }

  .sk.is-live .sk-pin {
    padding-bottom: 50px;
  }

  .sk.is-live .sk-pin {
    align-items: flex-start;
    padding-top: 92px;
  }

  .sk.is-live [data-side="hero"] .sk-copy::before {
    opacity: 0;
  }

  .sk-skip {
    background: var(--paper-bright);
    border: 1.5px solid var(--line);
    border-radius: var(--wobble);
    font-size: 14px;
    padding: 3px 11px;
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sk-hand path {
    animation: none;
    stroke-dashoffset: 0;
  }
}
