/* BAGCK
   Light grey / near-black / white rhythm from directionless.webflow.io,
   studio-grey product clips from shupatto.com, cream + ink from the BAGCK logo.
   One accent: madder red, taken from the block-print lining. */

:root {
  --ink: #121212;
  --ink-2: #3b3b3b;
  --grey: #dbdbdb;          /* directionless light section */
  --studio: #e9ebea;        /* shupatto studio backdrop */
  --studio-2: #e1e4e2;
  --cream: #fcf7eb;         /* logo ground */
  --paper: #f2efe6;         /* text on dark */
  --madder: #b23f28;        /* accent, from the lining print */

  --f-text: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --f-brand: 'Jost', 'Futura', 'Century Gothic', sans-serif;
  --f-stamp: 'Anton', 'Impact', 'Arial Narrow', sans-serif;

  --gut: clamp(16px, 2.8vw, 40px);
  --big: clamp(22px, 2.06vw, 40px);       /* directionless paragraph size */
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --ui: var(--ink);

  /* z-index scale: canvas sits above section backgrounds, text that must
     clear the 3D sits above the canvas, fixed chrome above everything. */
  --z-canvas: 2;
  --z-over: 3;
  --z-ui: 50;
  --z-cursor: 60;
  --z-drip: 80;
  --z-loader: 100;
}

body[data-theme='dark'] { --ui: var(--paper); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--studio);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
main { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p { margin: 0; font-weight: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--cream); }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: var(--gut); top: 12px; z-index: calc(var(--z-loader) + 1);
  background: var(--ink); color: var(--cream); padding: 10px 16px;
  font: 500 13px/1 var(--f-brand); letter-spacing: .12em; text-transform: uppercase;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--madder); outline-offset: 3px; }

.wm { width: 100%; height: auto; aspect-ratio: 4148 / 680; fill: currentColor; overflow: visible; }
.wm use { width: 100%; height: 100%; }

/* ---------------------------------------------------------------- loader */
.loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  background: var(--cream); color: var(--ink);
  display: grid; place-items: center;
}
.loader__inner { width: min(46vw, 560px); }
.loader__logo { clip-path: inset(0% 100% 0% 0%); }
.no-js .loader { display: none; }

/* --------------------------------------------------------------- canvas */
.gl {
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  z-index: var(--z-canvas); pointer-events: none;
}

/* ------------------------------------------------------------ fixed UI */
.ui { color: var(--ui); transition: color .5s ease; }
.ui__logo {
  position: fixed; left: var(--gut); bottom: 30px; z-index: var(--z-ui);
  width: 112px; display: block; color: inherit;
  transform-origin: 0 100%;
}
.ui__nav {
  position: fixed; right: var(--gut); bottom: 30px; z-index: var(--z-ui);
}
.ui__nav ul { display: flex; gap: clamp(18px, 2.2vw, 34px); }
.ui__nav a, .end__foot a {
  position: relative; display: inline-block; text-decoration: none;
  font: 500 12px/1 var(--f-brand); letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 0;
}
.ui__nav a::after, .end__foot a::after {
  content: ''; position: absolute; left: 50%; bottom: -8px;
  width: 7px; height: 6px; margin-left: -3.5px; border-radius: 50%;
  background: currentColor; transform: scale(0); transition: transform .45s var(--ease-out);
}
.ui__nav a:hover::after, .ui__nav a.is-on::after, .end__foot a:hover::after { transform: scale(1); }

/* --------------------------------------------------------------- hero */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 58%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%),
    linear-gradient(180deg, #eceeec 0%, #e6e8e6 55%, #dcdfdd 100%);
  --mark-w: min(30vw, 440px);
}
.hero__block {
  position: absolute; z-index: var(--z-over);
  left: var(--gut); right: var(--gut); top: 16vh; bottom: 24vh;
  pointer-events: none;
}
.hero__word {
  position: absolute; left: 0; top: 0;
  font: 500 clamp(30px, 4.4vw, 84px)/1 var(--f-brand);
  letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  will-change: transform;
}
.hero__row {
  position: absolute; z-index: var(--z-over);
  top: 26px; left: var(--gut); right: var(--gut);
  display: flex; justify-content: space-between; align-items: baseline;
  font: 500 13px/1 var(--f-brand); letter-spacing: .32em; text-transform: uppercase;
}
.hero__slot { display: inline-block; min-width: 1px; }
.hero__slot .hero__word { position: relative; font-size: inherit; letter-spacing: inherit; }
.hero__view {
  position: absolute; left: 50%; top: 50%;
  width: min(70vw, 1000px); height: min(74vh, 700px);
  transform: translate(-50%, -48%);
}
.hero__copy {
  position: absolute; z-index: var(--z-over);
  left: var(--gut); bottom: calc(30px + var(--mark-w) * .164 + 34px);
  display: grid; gap: 14px; justify-items: start;
}
.hero__title {
  font: 500 clamp(18px, 1.5vw, 26px)/1.15 var(--f-text); letter-spacing: -.02em;
  max-width: 16em;
}
.cta {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 12px/1 var(--f-brand); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; padding: 14px 20px; background: var(--ink); color: var(--cream);
  transition: transform .2s ease, background-color .3s ease;
}
.cta::after { content: ''; width: 18px; height: 1px; background: currentColor; transition: width .4s var(--ease-out); }
.cta:hover::after { width: 30px; }
.cta:active { transform: translateY(1px) scale(.99); }

/* -------------------------------------------------------------- story */
.story { position: relative; background: var(--grey); }
.story__inner { padding: 16vh var(--gut) 0; }
.story__p {
  font: 500 var(--big)/1.1 var(--f-text); letter-spacing: -.028em;
  text-indent: 2.4em; max-width: 17.2em;
}
.story__p div { text-indent: 0; }
.story__p > div:first-child, .story__p > div:first-child > div { text-indent: 2.4em; }
.story__p--b { margin-top: 10vh; }
.but {
  display: flex; align-items: flex-end; justify-content: flex-end;
  margin: 6vh 4vw 0 auto; width: max-content;
  font: 400 clamp(110px, 15vw, 280px)/.82 var(--f-stamp);
  text-transform: uppercase; letter-spacing: -.01em;
  filter: url(#rough);
}
.but__dots { font-size: .32em; letter-spacing: .06em; line-height: 1; margin-left: .05em; }
.story__center {
  font: 500 var(--big)/1.12 var(--f-text); letter-spacing: -.028em;
  text-align: center; margin: 34vh auto 0; max-width: 18em;
}

.pressure {
  position: relative; height: 100vh; overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start;
  margin-top: 16vh;
}
.pressure__face { position: relative; width: min(94vw, 150vh); margin-top: 3vh; flex: none; }
.pressure__sketch { width: 100%; height: auto; }
.pressure__stamps {
  position: absolute; left: 25%; top: 8.4%; width: 50%; height: 46%;
}
.pressure__stamps span {
  position: absolute; left: var(--x); top: var(--y);
  font: 400 clamp(34px, 4.9vw, 92px)/.9 var(--f-stamp);
  text-transform: uppercase; white-space: nowrap; letter-spacing: .005em;
  transform: rotate(var(--r)); filter: url(#rough); opacity: 0;
}

/* ---------------------------------------------------------- drip bars */
.drip {
  position: fixed; inset: 0 0 auto 0; height: 0; z-index: var(--z-drip);
  display: flex; align-items: flex-start; pointer-events: none;
}
.drip-bar { flex: 1 1 0; height: 0; background: var(--ink); margin-right: -1px; }
.drip-cap--rounded { border-radius: 0 0 999px 999px; }
.drip-cap--pointy { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 7vw)); }

/* --------------------------------------------------------------- dark */
.dark { position: relative; background: var(--ink); color: var(--paper); padding-top: 26vh; }
.dark__lines {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, 1fr);
  pointer-events: none;
}
.dark__lines i { border-right: 1px solid rgba(242, 239, 230, .13); }
.dark__p {
  position: relative; font: 500 var(--big)/1.1 var(--f-text); letter-spacing: -.028em;
  margin-left: calc(100vw / 12 * .66); max-width: 17em;
}
.dark__stage { position: relative; z-index: var(--z-over); height: 100vh; margin-top: 18vh; }
.dark__view { position: absolute; left: 8vw; right: 8vw; top: 4vh; bottom: 14vh; }
.dark__q {
  position: absolute; left: 0; right: 0; bottom: 10vh; text-align: center;
  font: 500 var(--big)/1.1 var(--f-text); letter-spacing: -.028em;
}
.pixel {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, 1fr);
  align-content: start; pointer-events: none; overflow: hidden;
}
.pixel i { background: var(--cream); visibility: hidden; opacity: 0; }

/* -------------------------------------------------------------- shift */
.shift {
  position: relative; height: 100vh; background: var(--cream);
  display: flex; align-items: center; justify-content: center; padding: 0 var(--gut);
}
.shift__layout {
  display: flex; flex-direction: column; align-items: center; gap: .55em;
  font: 500 clamp(24px, 2.5vw, 46px)/1.1 var(--f-text); letter-spacing: -.03em;
}
.shift__line { display: flex; flex-wrap: wrap; justify-content: center; gap: .22em; }
.shift__b { background-color: var(--ink); padding: .04em .06em; }

/* --------------------------------------------------------------- care */
.care {
  position: relative; background: var(--cream); overflow: hidden;
  padding: 26vh var(--gut) 36vh;
}
.care__svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.care__path { fill: none; stroke: var(--madder); stroke-width: clamp(56px, 6vw, 110px); stroke-linecap: butt; stroke-linejoin: round; }
.care__t {
  position: relative; font: 400 clamp(28px, 3.1vw, 60px)/1.08 var(--f-text); letter-spacing: -.035em;
}
.care__t--a { text-align: right; max-width: 14.5em; margin-left: auto; }
.care__t--b { max-width: 15em; margin-top: 34vh; }
.care__t--c { text-align: right; max-width: 12em; margin: 34vh 0 0 auto; }

/* ---------------------------------------------------------- the bag */
.bag { position: relative; background: var(--studio); }
.bag__pin { position: relative; height: 100vh; overflow: hidden; }
.bag__track { display: flex; height: 100%; width: max-content; will-change: transform; }
.clip {
  position: relative; flex: 0 0 66vw; height: 100%; overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 60%, rgba(255,255,255,.5), rgba(255,255,255,0) 72%),
    linear-gradient(180deg, #edefed, #e3e6e4 70%, #dde0de);
}
.clip--b {
  background:
    radial-gradient(90% 70% at 50% 60%, rgba(255,255,255,.42), rgba(255,255,255,0) 72%),
    linear-gradient(180deg, #e6e8e6, #dcdfdd 70%, #d6d9d7);
  box-shadow: inset 1px 0 0 rgba(18,18,18,.05);
}
.clip__body { position: absolute; inset: 0; will-change: transform; }
.clip__view { position: absolute; inset: 0; }
.clip__copy {
  position: absolute; z-index: var(--z-over); top: 22vh; right: 9%;
  text-align: right; font: 400 clamp(16px, 1.3vw, 23px)/1.32 var(--f-brand); letter-spacing: .05em;
}
.clip__copy span, .clip__copy strong { display: block; }
.clip__copy strong { font-weight: 600; }
.clip--b .clip__copy { right: auto; left: 9%; text-align: left; }
.clip--photo .clip__body { inset: 0 -18%; }
.clip__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clip__copy--light { color: var(--cream); right: calc(9% + 18%); text-shadow: 0 1px 18px rgba(0,0,0,.25); }

.bag__cats {
  position: absolute; z-index: var(--z-over); top: 4.6vh; left: var(--gut);
  font: 400 12px/1.5 var(--f-brand); letter-spacing: .08em;
}
.bag__cats li { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; }
.bag__cats li.is-on { opacity: 1; }
.bag__cats strong { font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.bag__delim { margin-left: .1em; }
.bag__counter {
  position: absolute; z-index: var(--z-over); top: 4.6vh; right: var(--gut);
  display: flex; gap: .45em; font: 400 12px/1.5 var(--f-brand); letter-spacing: .08em;
}
.bag__counter-win { display: inline-block; height: 1.5em; overflow: hidden; text-align: right; }
.bag__counter-col { display: flex; flex-direction: column; }
.bag__counter-col span { height: 1.5em; }
.bag__bar {
  position: absolute; z-index: var(--z-over); bottom: 12px; left: 50%;
  width: 180px; height: 2px; margin-left: -90px; background: rgba(18,18,18,.1);
}
.bag__bar i { position: absolute; left: 0; top: 0; width: 46px; height: 100%; background: rgba(18,18,18,.5); }

.cursor {
  position: fixed; left: 0; top: 0; z-index: var(--z-cursor);
  pointer-events: none; opacity: 0; transition: opacity .3s ease;
}
.cursor__ring {
  width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  border: 1px solid var(--ink); display: grid; place-items: center;
  transition: transform .35s var(--ease-out);
}
.cursor__label { font: 500 10px/1 var(--f-brand); letter-spacing: .18em; text-transform: uppercase; }
.cursor.is-on { opacity: 1; }
.cursor.is-down .cursor__ring { transform: scale(.82); }
@media (pointer: fine) { .bag__pin.has-cursor { cursor: none; } }

/* ----------------------------------------------------------- drawing */
.draw {
  position: relative; background: var(--cream);
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 4vw; align-items: center; padding: 22vh var(--gut) 20vh;
}
.draw__title { font: 500 clamp(30px, 3.2vw, 58px)/1.04 var(--f-text); letter-spacing: -.035em; max-width: 9em; }
.draw__body { margin-top: 26px; max-width: 34ch; color: var(--ink-2); font-size: 17px; line-height: 1.5; }
.draw__fig { margin: 0; }
.draw__svg { width: 100%; height: auto; overflow: visible; }
.draw__svg .ln { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.draw__svg .ln--thin { stroke-width: 1.2; opacity: .55; }
.draw__svg .ln--dash { stroke-width: 1; opacity: .45; stroke-dasharray: 26 8 4 8; }
.draw__svg .dl { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .6; }
.draw__svg text {
  font: 500 23px var(--f-brand); letter-spacing: .04em; fill: var(--ink); text-anchor: middle;
}

/* ------------------------------------------------------------ places */
.places { position: relative; height: 520vh; background: var(--cream); }
.places__sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; padding: 0 var(--gut); }
.places__h {
  grid-area: 1 / 1; text-align: center;
  font: 500 clamp(44px, 7.6vw, 150px)/1 var(--f-text); letter-spacing: -.045em;
}
.js .places__h { visibility: hidden; }

/* --------------------------------------------------------------- end */
.end {
  position: relative; min-height: 100vh; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18vh var(--gut) 104px;
}
.end__mark { width: min(64vw, 920px); }
.wm--split use { transform-box: fill-box; }
.end__tag {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); margin-top: clamp(16px, 2.4vw, 36px);
  font: 500 clamp(11px, 1.25vw, 19px)/1 var(--f-brand); letter-spacing: .34em; text-transform: uppercase;
}
.end__tag span { margin-right: -.34em; }
.end__tag i { width: clamp(36px, 7vw, 120px); height: 1px; background: currentColor; }
.end__lede { margin-top: 9vh; max-width: 40ch; color: var(--ink-2); font-size: 18px; line-height: 1.5; }
.end__form { margin-top: 34px; width: min(560px, 100%); text-align: left; display: grid; gap: 10px; }
.end__label { font: 500 12px/1 var(--f-brand); letter-spacing: .16em; text-transform: uppercase; }
.end__row { display: flex; }
.end__input {
  flex: 1; min-width: 0; height: 58px; padding: 0 18px;
  border: 1px solid var(--ink); border-right: 0; border-radius: 0; background: transparent;
  font-size: 17px;
}
.end__input::placeholder { color: #6b6b6b; }
.end__input[aria-invalid='true'] { border-color: var(--madder); }
.end__btn {
  height: 58px; padding: 0 26px; border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--cream); cursor: pointer; white-space: nowrap;
  font: 500 12px/1 var(--f-brand); letter-spacing: .18em; text-transform: uppercase;
  transition: background-color .3s ease, transform .15s ease;
}
.end__btn:hover { background: #2a2a2a; }
.end__btn:active { transform: translateY(1px); }
.end__btn[disabled] { opacity: .6; cursor: progress; }
.end__msg { min-height: 1.5em; font-size: 15px; color: var(--ink-2); }
.end__msg.is-error { color: var(--madder); }
.end__msg.is-ok { color: var(--ink); }
.end__foot {
  margin-top: auto; padding-top: 14vh; width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font: 500 12px/1 var(--f-brand); letter-spacing: .16em; text-transform: uppercase;
}
.end__foot ul { display: flex; gap: 28px; }

/* ------------------------------------------------------------ tablet */
@media (max-width: 1023px) {
  .pixel { grid-template-columns: repeat(6, 1fr); }
  .dark__lines { grid-template-columns: repeat(6, 1fr); }
  .clip { flex-basis: 78vw; }
}

/* ------------------------------------------------------------ mobile */
@media (max-width: 767px) {
  body { font-size: 16px; }
  :root { --big: clamp(21px, 5.6vw, 28px); }
  .ui__logo { width: 84px; bottom: 18px; }
  .ui__nav { bottom: 18px; }
  .ui__nav ul { gap: 14px; }
  .ui__nav a { font-size: 10.5px; letter-spacing: .12em; }

  .hero { --mark-w: 40vw; }
  .hero__block { top: 14vh; bottom: 38vh; }
  .hero__word { font-size: clamp(26px, 8.4vw, 44px); }
  .hero__row { top: 18px; font-size: 10.5px; letter-spacing: .2em; }
  .hero__view { width: 100vw; height: 56vh; top: 44%; }
  .hero__copy { bottom: calc(18px + var(--mark-w) * .164 + 34px); }

  .story__inner { padding-top: 12vh; }
  .story__p { max-width: none; text-indent: 1.6em; }
  .but { font-size: 34vw; margin-right: 0; }
  .story__center { max-width: 14em; margin-top: 24vh; }
  .pressure__face { width: 196vw; margin-top: 16vh; }
  .pressure__stamps span { font-size: 10.5vw; }

  .dark { padding-top: 18vh; }
  .dark__p { margin: 0 var(--gut); max-width: none; }
  .dark__view { left: 0; right: 0; }
  .pixel { grid-template-columns: repeat(4, 1fr); }
  .dark__lines { grid-template-columns: repeat(4, 1fr); }

  .shift__layout { font-size: 7.4vw; }
  .care { padding: 18vh var(--gut) 26vh; }
  .care__path { stroke-width: 15vw; }
  .care__t { font-size: clamp(25px, 7vw, 34px); }
  .care__t--a, .care__t--b, .care__t--c { max-width: none; }
  .care__t--b, .care__t--c { margin-top: 22vh; }

  .bag__pin { height: auto; overflow: visible; }
  .bag__track { flex-direction: column; width: 100%; transform: none !important; }
  .clip { flex: none; width: 100%; height: 82vh; height: 82svh; }
  .clip__body { transform: none !important; }
  .clip--photo .clip__body { inset: 0; }
  .clip__view { inset: 16% 0 0 0; }
  .clip__copy, .clip--b .clip__copy { top: 9vh; left: var(--gut); right: auto; text-align: left; }
  .clip__copy--light { left: var(--gut); right: auto; }
  .bag__cats, .bag__counter, .bag__bar { display: none; }

  .draw { grid-template-columns: 1fr; gap: 8vh; padding: 16vh var(--gut); }
  .places { height: 460vh; }
  .places__h { font-size: 11vw; }
  .end { padding-top: 14vh; padding-bottom: 96px; }
  .end__mark { width: 84vw; }
  .end__row { flex-direction: column; gap: 10px; }
  .end__input { flex: none; height: 54px; border-right: 1px solid var(--ink); }
  .end__btn { height: 54px; }
  .end__foot { flex-direction: column; align-items: flex-start; }
}

/* ----------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .shift__b { background-color: transparent; }
  .pressure__stamps span { opacity: .9; }
  .js .places__h { visibility: visible; position: relative; }
  .places { height: auto; }
  .places__sticky { position: relative; height: auto; display: grid; gap: 4vh; padding: 16vh var(--gut); }
  .places__h { grid-area: auto; }
  .bag__pin { height: auto; overflow: visible; }
  .bag__track { flex-direction: column; width: 100%; }
  .clip { flex: none; width: 100%; height: 86vh; }
  .bag__cats, .bag__counter, .bag__bar { display: none; }
  .cursor { display: none; }
}
