:root {
  --paper: #fdecd7;
  --ink: #15140f;
  --ink-soft: #504638;
  --line: rgba(21, 20, 15, 0.14);
  --signal: #a73526;
  --white: #fdecd7;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body.is-loading {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(253, 236, 215, 0.96);
  backdrop-filter: blur(18px);
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loader__inner {
  width: min(360px, calc(100vw - 48px));
}

.loader__label,
.loader__count {
  display: block;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loader__track {
  height: 8px;
  margin: 14px 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.72);
}

.loader__bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--ink), var(--signal));
  transition: width 160ms ease-out;
}

.brand-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  max-width: 100%;
  padding: clamp(18px, 3vw, 34px) clamp(20px, 5vw, 72px) clamp(28px, 4vw, 52px);
  pointer-events: none;
}

.brand-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: clamp(124px, 18vh, 176px);
  background:
    linear-gradient(180deg, rgba(253, 236, 215, 0.92), rgba(253, 236, 215, 0.66) 58%, rgba(253, 236, 215, 0));
  border-bottom: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  mask-image: linear-gradient(to bottom, #000 0%, #000 72%, transparent 100%);
  pointer-events: none;
}

.brand {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  pointer-events: auto;
}

.brand__logo {
  width: clamp(148px, 15vw, 238px);
  height: auto;
  display: block;
  filter: drop-shadow(0 14px 24px rgba(21, 20, 15, 0.12));
}

.brand__team {
  margin-left: 3px;
  color: var(--ink-soft);
  font-size: clamp(0.78rem, 1.1vw, 0.94rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scroll-story {
  width: 100%;
  max-width: 100%;
  height: 700vh;
  min-height: 4400px;
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
}

.sticky-scene {
  position: sticky;
  top: 0;
  display: grid;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  grid-template-columns: minmax(310px, 0.82fr) minmax(520px, 1.18fr);
  align-items: center;
  min-height: 100vh;
  padding:
    clamp(172px, 22vh, 230px)
    clamp(20px, 5vw, 72px)
    clamp(38px, 7vh, 78px);
  gap: clamp(36px, 5vw, 86px);
  isolation: isolate;
  transform: translateZ(0);
  will-change: transform;
}

.story-copy {
  position: relative;
  min-height: clamp(500px, 62vh, 650px);
  overflow: hidden;
  perspective: 1000px;
  mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
}

.story-copy::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(21, 20, 15, 0.14) 12%,
    rgba(167, 53, 38, 0.42) 50%,
    rgba(21, 20, 15, 0.14) 88%,
    transparent
  );
}

.story-copy::after {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  width: 7px;
  height: 56px;
  border-radius: 999px;
  background: var(--signal);
  opacity: 0.5;
  transform: translateY(-50%);
}

.copy-scene {
  position: absolute;
  inset: 0 auto auto 0;
  width: min(520px, 100%);
  padding-left: 24px;
  transform-origin: left center;
  opacity: 0;
  will-change: transform, opacity, filter;
}

.copy-scene h1,
.copy-scene h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.55rem, 4.6vw, 5.8rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: 0;
}

.copy-scene p:not(.scene-kicker) {
  max-width: 44ch;
  margin: clamp(18px, 2.2vw, 28px) 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.18vw, 1.12rem);
  font-weight: 740;
  line-height: 1.52;
}

.scene-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scene-kicker::before {
  content: "";
  width: 34px;
  height: 2px;
  background: currentColor;
}

.scene-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.scene-specs li {
  padding: 10px 0;
  border-top: 1px solid rgba(21, 20, 15, 0.16);
}

.scene-specs span,
.scene-specs strong {
  display: block;
}

.scene-specs span {
  color: rgba(21, 20, 15, 0.56);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.scene-specs strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(0.82rem, 0.95vw, 0.96rem);
  font-weight: 920;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.visual-column {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.canvas-shell {
  position: relative;
  width: min(55vw, 860px);
  aspect-ratio: 16 / 9;
  overflow: visible;
  background: var(--paper);
}

#scrollCanvas {
  display: block;
  width: 100%;
  height: 100%;
  transform: translateZ(0);
  will-change: contents;
}

.closing {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: clamp(80px, 12vw, 150px) clamp(20px, 6vw, 96px);
  background: var(--paper);
  color: var(--ink);
}

.closing p {
  margin: 0 0 24px;
  color: var(--signal);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.closing h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: 0;
}

@media (max-width: 980px) {
  .scroll-story {
    height: 720vh;
    min-height: 5200px;
  }

  .sticky-scene {
    grid-template-columns: 1fr;
    align-content: start;
    padding-top: 132px;
    gap: 22px;
  }

  .visual-column {
    order: 1;
    justify-content: center;
    align-self: start;
  }

  .story-copy {
    order: 2;
    width: 100%;
    min-height: 430px;
  }

  .copy-scene h1,
  .copy-scene h2 {
    max-width: 12ch;
    font-size: clamp(2.2rem, 8.2vw, 4.15rem);
  }

  .copy-scene p:not(.scene-kicker) {
    max-width: 52ch;
  }

  .canvas-shell {
    width: min(100%, 680px);
    height: auto;
  }
}

@media (max-width: 620px) {
  .brand-header {
    display: flex;
    justify-content: center;
    padding: 18px 18px 34px;
    text-align: center;
  }

  .brand-header::before {
    height: 132px;
  }

  .brand {
    align-items: center;
    gap: 7px;
  }

  .brand__logo {
    width: 138px;
  }

  .brand__team {
    margin-left: 0;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }

  .sticky-scene {
    width: 100%;
    max-width: 100vw;
    min-height: 100svh;
    padding: 142px max(18px, env(safe-area-inset-left)) 20px max(18px, env(safe-area-inset-right));
    gap: 24px;
    justify-items: center;
    overflow: hidden;
  }

  .visual-column {
    display: grid;
    width: 100%;
    max-width: 100%;
    place-items: center;
    overflow: hidden;
  }

  .canvas-shell {
    justify-self: center;
    width: min(82vw, 360px);
    max-height: 30vh;
    margin-left: auto;
    margin-right: auto;
  }

  .story-copy {
    width: min(100%, 354px);
    max-width: calc(100vw - 36px);
    min-height: 430px;
    text-align: center;
    mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 91%, transparent);
  }

  .story-copy::before {
    top: 0;
    bottom: auto;
    left: 50%;
    width: 92px;
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(167, 53, 38, 0.52), transparent);
  }

  .story-copy::after {
    display: none;
  }

  .copy-scene {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    padding: 22px 0 0;
    transform-origin: center center;
  }

  .scene-kicker {
    justify-content: center;
    gap: 9px;
    margin-bottom: 14px;
    font-size: 0.62rem;
    letter-spacing: 0.11em;
  }

  .scene-kicker::before,
  .scene-kicker::after {
    content: "";
    width: 24px;
    height: 1px;
    background: currentColor;
    opacity: 0.62;
  }

  .copy-scene h1,
  .copy-scene h2 {
    max-width: none;
    font-size: clamp(2.05rem, 9.2vw, 3rem);
    line-height: 0.96;
  }

  .copy-scene p:not(.scene-kicker) {
    max-width: 32ch;
    margin: 14px auto 0;
    font-size: 0.88rem;
    line-height: 1.46;
  }

  .scene-specs {
    grid-template-columns: 1fr;
    gap: 0;
    width: min(68vw, 252px);
    margin: 20px auto 0;
  }

  .scene-specs li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
    gap: 14px;
    padding: 8px 0;
    text-align: left;
  }

  .scene-specs span {
    flex: 0 0 auto;
    font-size: 0.56rem;
    letter-spacing: 0.08em;
  }

  .scene-specs strong {
    max-width: 54%;
    font-size: 0.76rem;
    line-height: 1.2;
    text-align: right;
    word-break: normal;
    overflow-wrap: anywhere;
  }

  .closing h2 {
    font-size: clamp(2.35rem, 12vw, 4.1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .loader,
  .loader__bar {
    transition: none;
  }
}
