/* ============ Taylor McLendon — Hold / Release ============ */

:root {
  --ink: #0b0b0d;
  --bone: #e9e6df;
  --mist: rgba(233, 230, 223, 0.62);
  --red: #b5222c;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
  --script: 'Mrs Saint Delafield', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

body.allow-cursor * { cursor: none !important; }

canvas#gl {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
}

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -60px;
  pointer-events: none;
  z-index: 30;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(3) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-24px, 14px); }
  66% { transform: translate(18px, -20px); }
  100% { transform: translate(0, 0); }
}

/* ---------- cursor ---------- */
.cursor { position: fixed; z-index: 60; pointer-events: none; top: 0; left: 0; }
.cursor-dot, .cursor-tail {
  position: absolute; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 7px; height: 7px; background: var(--bone); mix-blend-mode: difference; }
.cursor-tail {
  width: 30px; height: 30px;
  border: 1px solid rgba(233, 230, 223, 0.35);
  transition: width .45s ease, height .45s ease, background .45s ease;
}
body.holding .cursor-tail {
  width: 12px; height: 12px;
  background: rgba(233, 230, 223, 0.25);
}
@media (hover: none) { .cursor { display: none; } }

/* ---------- identity ---------- */
.identity {
  position: fixed; z-index: 40;
  top: 16vh; left: 0; right: 0;
  text-align: center;
  pointer-events: none;
  transition: opacity 1.6s ease, transform 1.6s ease;
}
.identity.gone { opacity: 0; transform: translateY(-3vh); }
.signature {
  font-family: var(--script);
  font-weight: 400;
  color: var(--red);
  font-size: clamp(64px, 12vw, 150px);
  line-height: 0.9;
  text-shadow: 0 2px 30px rgba(181, 34, 44, 0.25);
}
.role {
  margin-top: 1.4em;
  font-size: clamp(10px, 1.1vw, 13px);
  font-weight: 200;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--mist);
}

.wordmark {
  position: fixed; z-index: 48;
  top: 18px; left: 26px;
  font-family: var(--script);
  font-size: 34px;
  color: rgba(181, 34, 44, 0.85);
  opacity: 0;
  transition: opacity 1.4s ease, color .5s ease, transform .5s ease;
  pointer-events: none;
  background: none; border: none;
  padding: 8px;
  line-height: 1;
}
.wordmark.on { opacity: 1; pointer-events: auto; cursor: pointer !important; }
.wordmark.on:hover { color: rgba(214, 48, 60, 1); transform: scale(1.06); }

.viewscrim {
  position: fixed; z-index: 39;
  left: 0; right: 0; bottom: 0;
  height: 44vh;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(7, 7, 9, 0.62) 55%, rgba(7, 7, 9, 0.9));
  opacity: 0;
  transition: opacity 1.4s ease;
}
.viewscrim.on { opacity: 1; }

/* ---------- prompt ---------- */
.prompt {
  position: fixed; z-index: 40;
  bottom: 4.5vh; left: 0; right: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--mist);
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}
.prompt.on { opacity: 1; animation: breathe 3.4s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: .45; } 50% { opacity: .95; } }

/* ---------- title card ---------- */
.titlecard {
  position: fixed; z-index: 40;
  left: 0; right: 0; bottom: 12vh;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1.6s ease .3s, transform 1.6s ease .3s;
}
.titlecard.on { opacity: 1; transform: none; }
.work-title {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(22px, 3.2vw, 40px);
  text-shadow: 0 1px 22px rgba(0,0,0,.75);
}
.work-medium {
  display: block;
  margin-top: 0.9em;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--mist);
  text-shadow: 0 1px 14px rgba(0,0,0,.8);
  padding: 0 8vw;
  line-height: 1.9;
}

/* ---------- interstitial ---------- */
.interstitial {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3.4vh;
  background: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease, visibility 0s linear 1.5s;
  text-align: center;
  padding: 0 8vw;
}
.interstitial.on {
  opacity: 1; visibility: visible;
  transition: opacity 1.5s ease;
}
.chapter-name {
  font-size: 11px;
  letter-spacing: 0.75em;
  text-transform: uppercase;
  color: rgba(233,230,223,0.4);
}
.chapter-line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 3.6vw, 46px);
  line-height: 1.45;
  max-width: 22em;
  color: var(--bone);
}
.interstitial.on .chapter-line { animation: settle 2.6s cubic-bezier(.2,.7,.2,1) both; }
.interstitial.on .chapter-name { animation: settle 2.6s cubic-bezier(.2,.7,.2,1) both .25s; }
@keyframes settle {
  from { opacity: 0; transform: translateY(-2.2vh); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- mural ---------- */
.mural {
  position: fixed; inset: 0; z-index: 44;
  overflow: hidden;
  background: #101014;
  opacity: 0;
  transition: opacity 2s ease;
}
.mural.on { opacity: 1; }
.mural::before, .mural::after {
  content: '';
  position: absolute; left: 0; right: 0;
  height: 22vh;
  z-index: 1;
  pointer-events: none;
}
.mural::before { top: 0; background: linear-gradient(rgba(11,11,13,0.82), transparent); }
.mural::after { bottom: 0; background: linear-gradient(transparent, rgba(11,11,13,0.82)); }
.mural-track {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, 0);
  will-change: transform;
  cursor: grab;
}
.mural-track:active { cursor: grabbing; }
.mural-track img {
  display: block;
  width: min(135vw, 1300px);
  user-select: none;
  -webkit-user-drag: none;
}
.mural-hint {
  position: absolute; z-index: 2;
  bottom: 7vh; left: 0; right: 0;
  text-align: center;
  font-size: 11px; letter-spacing: .4em; text-transform: uppercase;
  color: var(--mist);
  animation: breathe 3.4s ease-in-out infinite;
  transition: opacity 1s ease;
  pointer-events: none;
  text-shadow: 0 1px 12px rgba(0,0,0,.9);
}
.mural-hint.gone { opacity: 0; }
.mural-caption {
  position: absolute; z-index: 2;
  top: 5.5vh; left: 0; right: 0;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 1px 18px rgba(0,0,0,.9);
}
.studio-door {
  position: absolute; z-index: 3;
  bottom: 6vh; left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid rgba(233,230,223,0.35);
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  padding: 0.9em 2.2em;
  border-radius: 999px;
  letter-spacing: 0.06em;
  cursor: pointer;
  opacity: 0;
  animation: doorIn 1.8s ease forwards;
  backdrop-filter: blur(6px);
  background: rgba(11,11,13,0.35);
}
.door-arrow { margin-left: .7em; font-style: normal; opacity: .7; }
.studio-door:hover { border-color: var(--bone); }
@keyframes doorIn { to { opacity: 1; } }

/* ---------- studio ---------- */
.studio {
  position: fixed; inset: 0; z-index: 46;
  overflow-y: auto;
  background:
    radial-gradient(120% 90% at 50% 0%, #17161a 0%, var(--ink) 60%);
  opacity: 0;
  transition: opacity 2s ease;
}
.studio.on { opacity: 1; }
.studio-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 14vh 7vw 16vh;
  text-align: center;
}
.studio-inner img {
  width: min(58vw, 300px);
  border-radius: 2px;
  filter: grayscale(1) contrast(1.04);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.studio-sig { font-size: 72px; margin-top: 6vh; }
.studio-bio p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.9;
  color: rgba(233,230,223,0.88);
  margin-top: 2.2em;
  text-align: left;
}
.studio-h {
  margin-top: 10vh;
  font-size: 11px; font-weight: 300;
  letter-spacing: 0.5em; text-transform: uppercase;
  color: rgba(233,230,223,0.45);
}
.studio-ex {
  list-style: none;
  margin-top: 2.4em;
}
.studio-ex li {
  font-size: 13.5px;
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 2.4;
  color: rgba(233,230,223,0.75);
  border-bottom: 1px solid rgba(233,230,223,0.08);
  padding: 0.6em 0;
}
.studio-closing {
  margin-top: 11vh;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.6;
  color: var(--bone);
}
.again {
  margin-top: 8vh;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(233,230,223,0.35);
  color: var(--mist);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  padding: 0.8em 0.2em;
  cursor: pointer;
}
.again:hover { color: var(--bone); border-color: var(--bone); }

/* ---------- fallback (reduced motion / no WebGL) ---------- */
.fallback {
  position: fixed; inset: 0; z-index: 50;
  overflow-y: auto;
  background: var(--ink);
}
.fb-head { text-align: center; padding: 14vh 6vw 6vh; }
.fb-note {
  margin: 5vh auto 0;
  max-width: 34em;
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 2;
  color: rgba(233,230,223,0.55);
  border: 1px solid rgba(233,230,223,0.15);
  border-radius: 999px;
  padding: 1em 2em;
}
#fb-works { max-width: 900px; margin: 0 auto; padding: 0 6vw 10vh; }
#fb-works figure { margin: 12vh 0; text-align: center; }
#fb-works img { max-width: 100%; max-height: 82vh; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
#fb-works figcaption { margin-top: 2.2em; }
#fb-works .fb-line {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(22px, 3vw, 34px); margin: 16vh auto 0; max-width: 20em;
  text-align: center; color: var(--bone); line-height: 1.5;
}
.fb-foot { text-align: center; padding: 4vh 0 14vh; }

@media (max-width: 640px) {
  .identity { top: 13vh; }
  .prompt { bottom: 6vh; }
  .titlecard { bottom: 14vh; }
  .work-medium { font-size: 9px; letter-spacing: 0.26em; }
  .wordmark { top: 18px; left: 22px; font-size: 27px; }
}
