@font-face {
  font-family: "marcovisaregular";
  src: url("../fonts/marcovisa-webfont.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ink: #080808;
  --red: #ee262c;
  --orange: #f3792d;
  --sky: #11a9e7;
  --purple: #a64fa1;
  --green: #25b45b;
  --indigo: #4e50c9;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: #fff;
  color: var(--ink);
  font-family: "marcovisaregular", Arial, sans-serif;
  text-transform: uppercase;
}
a {
  color: inherit;
}
.svg-effects {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.red {
  color: var(--red);
}
.orange {
  color: var(--orange);
}
.sky {
  color: var(--sky);
}
.purple {
  color: var(--purple);
}
.green {
  color: var(--green);
}
.indigo {
  color: var(--indigo);
}
main {
  padding: 0 24px;
}
.hero,
.chapter,
.outro {
  text-align: center;
}
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  max-width: 1160px;
  margin: 0 auto;
  padding: 50px 0 140px;
}
.hero h1 {
  margin: 0 0 24px;
  font-family: 'MarcovisaMenu', sans-serif;
  font-size: 90px;
  font-weight: 500;
  line-height: 1.2;
}
.hero-deck {
  margin-top: 0;
  font-size: clamp(1.5rem, 2.3vw, 2.45rem);
  line-height: 1.08;
}
.hero-story {
  margin-top: clamp(14px, 2vh, 20px);
  font-size: clamp(1.2rem, 1.8vw, 1.75rem);
  line-height: 1.12;
}
.story-group {
  margin: 0;
}
.story-group + .story-group {
  margin-top: .55em;
}
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--sky);
  font-size: clamp(.95rem, 1.25vw, 1.2rem);
  line-height: 1;
}
.scroll-cue-arrow {
  width: 25px;
  height: 34px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: cue-bounce 1.45s ease-in-out infinite;
}
@keyframes cue-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue-arrow {
    animation: none;
  }
}

.chapter {
  position: relative;
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(26px, 2.8vw, 42px) 0;
}
.chapter[data-color="green"] {
  color: var(--green);
  --accent: var(--green);
}
.chapter[data-color="sky"] {
  color: var(--sky);
  --accent: var(--sky);
}
.chapter[data-color="purple"] {
  color: var(--purple);
  --accent: var(--purple);
}
.chapter[data-color="red"] {
  color: var(--red);
  --accent: var(--red);
}
.chapter[data-color="orange"] {
  color: var(--orange);
  --accent: var(--orange);
}
.chapter[data-color="indigo"] {
  color: var(--indigo);
  --accent: var(--indigo);
}
.chapter h2 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.65rem);
  font-weight: 400;
  line-height: 1.05;
}
.chapter-lead {
  margin: 12px auto 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.1vw, 2.15rem);
  line-height: 1.12;
}

.services {
  margin: clamp(16px, 1.8vw, 22px) auto 0;
  padding: 0;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.85vw, 1.9rem);
  line-height: 1.17;
  list-style: none;
}
.services li {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: .08em auto;
  transition: transform .2s ease;
}

.service-mark {
  position: absolute;
  right: calc(100% + .28em);
  top: 50%;
  width: .6em;
  height: .6em;
  fill: var(--accent);
  overflow: visible;
  transform: translateY(-50%) rotate(-9deg);
  pointer-events: none;
}
.services li[data-mark="dot"] .service-mark {
  width: .32em;
  height: .32em;
}
.services li[data-mark="arrow"] .service-mark {
  width: .8em;
  height: .56em;
}
.service-mark-right {
  right: auto;
  left: calc(100% + .28em);
  transform: translateY(-50%) rotate(12deg);
}
.services li[data-mark="arrow"] .service-mark-right {
  transform: translateY(-50%) rotate(9deg) scaleX(-1);
}
.js-ready .service-mark {
  opacity: 0;
}
.js-ready .service-mark.is-visible {
  opacity: 1;
}
.services li::after {
  content: "";
  position: absolute;
  right: -2%;
  bottom: -.15em;
  left: -2%;
  height: .24em;
  background: var(--accent);
  -webkit-mask: url("./assets/brush-underline.svg") center / 100% 100% no-repeat;
  mask: url("./assets/brush-underline.svg") center / 100% 100% no-repeat;
  clip-path: inset(0 100% 0 0);
  transform: rotate(-1.5deg);
  pointer-events: none;
  transition: clip-path .28s ease;
}
@media (hover: hover) {
  .services li:hover {
    transform: translateX(4px) rotate(-1deg);
  }
  .services li:hover::after {
    clip-path: inset(0 0 0 0);
  }
}

.chapter-art {
  position: absolute;
  top: 28px;
  right: -100px;
  width: 112px;
  height: 112px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.chapter-art path:nth-child(2) {
  stroke-width: 8;
}
.chapter-art path:nth-child(3) {
  stroke-width: 7;
}
.chapter[data-side="left"] .chapter-art {
  right: auto;
  left: -100px;
}

.chapter-art .art-motion {
  transform-box: view-box;
  transform-origin: 60px 60px;
}
.art-spark .art-motion {
  animation: spark-turn 3.8s ease-in-out infinite;
}
.art-bubble .art-motion {
  transform-origin: 33px 54px;
  animation: bubble-talk 2.2s ease-in-out infinite;
}
.art-bubble .art-motion:last-child {
  animation-delay: -1.1s;
}
.art-eye .eye-look {
  animation: eye-look 4.8s ease-in-out infinite;
}
.art-eye .eye-look path:first-child {
  stroke-width: 8;
}
.art-eye .eye-look path:last-child {
  stroke-width: 7;
}
.art-frame .art-motion {
  animation: play-pulse 2.6s ease-in-out infinite;
}
.art-plane .plane-body {
  animation: plane-float 3.4s ease-in-out infinite;
}
.art-plane .plane-trail {
  stroke-width: 7;
  animation: plane-trail 3.4s ease-in-out infinite;
}
.art-spiral .art-motion {
  animation: spiral-turn 4.8s ease-in-out infinite;
}
.chapter-art .art-motion {
  animation-play-state: paused;
}
.chapter-art.is-in-view.is-drawn .art-motion {
  animation-play-state: running;
}
@keyframes spark-turn {
  0%, 100% {
    transform: rotate(-14deg) scale(.96);
  }
  50% {
    transform: rotate(20deg) scale(1.12);
  }
}
@keyframes bubble-talk {
  0%, 100% {
    transform: scaleX(1);
  }
  35% {
    transform: scaleX(.7);
  }
  65% {
    transform: scaleX(1.23);
  }
}
@keyframes eye-look {
  0%, 12%, 88%, 100% {
    transform: translateX(0);
  }
  28%, 40% {
    transform: translateX(-14px);
  }
  60%, 72% {
    transform: translateX(14px);
  }
}
@keyframes play-pulse {
  0%, 25%, 100% {
    transform: scale(1);
  }
  55% {
    transform: scale(.76);
  }
  75% {
    transform: scale(1.17);
  }
}
@keyframes plane-float {
  0%, 100% {
    transform: translate(0, 0) rotate(0);
  }
  50% {
    transform: translate(14px, -12px) rotate(-9deg);
  }
}
@keyframes plane-trail {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: translate(-8px, 6px);
    opacity: .25;
  }
}
@keyframes spiral-turn {
  0%, 100% {
    transform: rotate(-22deg);
  }
  50% {
    transform: rotate(32deg);
  }
}

.outro {
  --outro-text-size: clamp(1.18rem, 2.1vw, 2.2rem);
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(36px, 4vw, 60px) 0 80px;
  font-size: var(--outro-text-size);
  line-height: 1.15;
}
.outro .statement {
  font-size: clamp(1.5rem, 2.8vw, 2.8rem);
}
.outro .outro-group,
.outro .question {
  margin-top: calc(var(--outro-text-size) * .8);
}
.outro .question {
  color: var(--sky);
  font-size: clamp(1.65rem, 3.1vw, 3.2rem);
}
.outro .closing-link {
  position: relative;
  display: inline-block;
  margin-top: 1em;
  color: var(--ink);
  text-decoration-color: var(--sky);
  text-underline-offset: .18em;
  text-decoration-thickness: .09em;
}
.outro .closing-link:hover,
.outro .closing-link:focus-visible {
  color: var(--sky);
}
.closing-ring {
  position: absolute;
  inset: -18px -24px;
  width: calc(100% + 48px);
  height: calc(100% + 36px);
  overflow: visible;
  fill: none;
  stroke: var(--sky);
  stroke-width: 8;
  stroke-linecap: round;
  pointer-events: none;
}

.line {
  display: block;
  min-height: 1.06em;
}
.type {
  position: relative;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  vertical-align: top;
}
.type .ink {
  display: inline-block;
  white-space: nowrap;
}

.js-ready .letter {
  opacity: 0;
}
.js-ready .letter.is-visible {
  opacity: 1;
}
@media (max-width: 650px) {
  main {
    padding: 0 14px;
  }
  .hero {
    padding-top: 36px;
    padding-bottom: 110px;
  }
  .hero h1 {
    font-size: 76px;
    margin-bottom: 18px;
  }
  .hero-deck {
    margin-top: 0;
  }
  .hero-story {
    margin-top: 14px;
  }
  .scroll-cue {
    margin-top: 23px;
    font-size: .95rem;
  }
  .scroll-cue-arrow {
    width: 23px;
    height: 32px;
  }
  .chapter {
    padding: 30px 0;
  }
  .chapter h2 {
    font-size: clamp(1.45rem, 5.4vw, 2.2rem);
  }
  .chapter-lead {
    font-size: clamp(.98rem, 4.05vw, 1.3rem);
  }
  .services {
    font-size: clamp(.88rem, 3.7vw, 1.2rem);
  }
  .outro {
    --outro-text-size: clamp(.96rem, 3.9vw, 1.35rem);
    padding-bottom: 60px;
  }
  .outro .statement {
    font-size: clamp(1.1rem, 4.7vw, 1.5rem);
  }
  .outro .question {
    font-size: clamp(1.25rem, 5vw, 1.7rem);
  }
}

@media (max-width: 390px) {
  .hero-deck {
    font-size: 1.31rem;
  }
  .hero-story {
    font-size: 1.08rem;
  }
  .chapter h2 {
    font-size: 1.35rem;
  }
  .chapter-lead {
    font-size: .94rem;
  }
  .services {
    font-size: .82rem;
  }
  .outro {
    --outro-text-size: .91rem;
  }
}

@media (max-width: 1300px) {
  .chapter-art {
    right: 0;
    width: 86px;
    height: 86px;
  }
  .chapter[data-side="left"] .chapter-art {
    left: 0;
  }
}

@media (max-width: 650px) {
  .chapter-art,
  .chapter[data-side="left"] .chapter-art {
    position: static;
    display: block;
    width: 68px;
    height: 68px;
    margin: 0 auto 13px;
  }
  .closing-ring {
    inset: -12px -16px;
    width: calc(100% + 32px);
    height: calc(100% + 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-art .art-motion {
    animation: none;
  }
  .services li,
  .services li::after,
  .chapter-art path,
  .closing-ring path {
    transition: none;
  }
}
