:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #fff;
  --pad: 28px;
  --hero-scroll: 0;
  --cook-scroll: 0;
  --sequence-progress: 0;
  --page-progress: 0;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

main {
  background: var(--bg);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 2px;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.14);
}

.scroll-progress::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--fg);
  transform: scaleX(var(--page-progress));
  transform-origin: left center;
  will-change: transform;
}

@supports (animation-timeline: scroll()) {
  .scroll-progress::after {
    animation: scroll-progress linear both;
    animation-timeline: scroll(root block);
    transform: scaleX(0);
  }

  @keyframes scroll-progress {
    to {
      transform: scaleX(1);
    }
  }
}

.panel {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 88px var(--pad);
  align-content: center;
  overflow: clip;
}

.hero h1,
.cook h2 {
  width: min(100%, 1180px);
  margin: 0;
  color: var(--fg);
  font-size: 8.8rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.86;
  text-transform: lowercase;
  text-wrap: balance;
  will-change: transform, opacity, filter;
}

.hero h1 {
  opacity: calc(1 - var(--hero-scroll) * 0.72);
  filter: blur(calc(var(--hero-scroll) * 5px));
  transform:
    translate3d(0, calc(var(--hero-scroll) * -82px), 0)
    scale(calc(1 + var(--hero-scroll) * 0.08));
}

.cook {
  align-content: end;
}

.cook h2 {
  margin-bottom: 5svh;
  opacity: calc(0.18 + var(--cook-scroll) * 0.82);
  filter: blur(calc((1 - var(--cook-scroll)) * 5px));
  transform:
    translate3d(0, calc((1 - var(--cook-scroll)) * 92px), 0)
    scale(calc(0.92 + var(--cook-scroll) * 0.08));
}

[data-panel] > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 620ms var(--ease);
}

[data-panel].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

[data-panel].is-visible.hero > *,
[data-panel].is-visible.cook > * {
  transition: none;
}

.sequence {
  position: relative;
  min-height: 1360svh;
  background: var(--bg);
}

.sequence__sticky {
  position: sticky;
  top: 0;
  display: grid;
  height: 100svh;
  place-items: center;
  overflow: hidden;
  background: var(--bg);
}

.sequence__canvas {
  --virtual-width: min(68vw, calc(82svh * 0.5625), 700px);
  --stage-width: min(96vw, calc(var(--virtual-width) * 3.1605));
  display: block;
  width: var(--stage-width);
  height: auto;
  aspect-ratio: 16 / 9;
  opacity: 1;
  will-change: opacity;
}

.sequence img {
  --virtual-width: min(68vw, calc(82svh * 0.5625), 700px);
  --stage-width: min(96vw, calc(var(--virtual-width) * 3.1605));
  display: block;
  width: var(--stage-width);
  height: calc(var(--stage-width) * 0.5625);
  object-fit: contain;
  background: var(--bg);
}

.offer {
  min-height: 100svh;
  align-content: center;
}

.offer__inner {
  display: grid;
  width: min(100%, 1180px);
  gap: 44px;
}

.offer h2 {
  margin: 0;
  color: var(--fg);
  font-size: 8rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.88;
  text-transform: lowercase;
  text-wrap: balance;
}

.offer__stage {
  position: relative;
  width: min(100%, 760px);
  height: 260px;
  z-index: 20;
}

.offer__button {
  position: absolute;
  top: 0;
  display: inline-grid;
  width: 196px;
  height: 68px;
  place-items: center;
  border: 1px solid var(--fg);
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  text-transform: lowercase;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease;
  will-change: transform;
}

.offer__button--yes {
  left: 0;
}

.offer__button--no {
  left: 236px;
  cursor: default;
  z-index: 2147483000;
  pointer-events: none;
  transform: translate3d(var(--no-x, 0px), var(--no-y, 0px), 0);
}

.offer__button--no.is-floating {
  position: fixed;
  top: var(--no-base-top, 0px);
  left: var(--no-base-left, 0px);
}

.offer__button--yes:hover,
.offer__button--yes:focus-visible {
  background: var(--fg);
  color: var(--bg);
}

.offer__button--no:hover {
  background: transparent;
  color: var(--fg);
}

.offer__button:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 5px;
}

@media (max-width: 760px) {
  :root {
    --pad: 18px;
  }

  .panel {
    padding-block: 72px;
  }

  .hero h1,
  .cook h2,
  .offer h2 {
    font-size: 3.7rem;
  }

  .offer__inner {
    gap: 34px;
  }

  .offer__stage {
    width: min(100%, 340px);
    height: 220px;
  }

  .offer__button {
    width: 148px;
    height: 58px;
  }

  .offer__button--no {
    left: 172px;
  }

  .sequence {
    min-height: 1240svh;
  }

  .sequence__canvas,
  .sequence img {
    --virtual-width: min(92vw, calc(82svh * 0.5625));
    --stage-width: min(96vw, calc(var(--virtual-width) * 3.1605));
  }

}

@media (min-width: 761px) and (max-width: 1100px) {
  .hero h1,
  .cook h2,
  .offer h2 {
    font-size: 6.4rem;
  }
}

@media (min-width: 1500px) {
  .hero h1,
  .cook h2,
  .offer h2 {
    font-size: 10rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .hero h1,
  .cook h2,
  .offer h2 {
    filter: none !important;
    transform: none !important;
  }

  .offer__button {
    transition-duration: 0.001ms !important;
  }
}
