:root {
  --black: #121210;
  --white: #E0E0E0;
  --grotesk: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

html { scroll-padding-top: 80px; overscroll-behavior-y: none; }
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

html { background: var(--black); }

body {
  font-family: var(--grotesk);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  overscroll-behavior-y: none;
  cursor: none;
}

a, button, [role="button"], input, select, textarea, label { cursor: none; }
a { color: inherit; text-decoration: none; }


/* ── Custom cursor ──────────────────────────────── */
.cursor {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  width: 54px;
  height: 54px;
  background: var(--white);
  border: 1px solid var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--black);
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  transition: width 0.18s ease, height 0.18s ease, opacity 0.2s ease;
}
.cursor.expanded { width: 70px; height: 70px; }
@media (hover: none) { .cursor { display: none; } }



/* ── Stamp ──────────────────────────────────────── */
/* ── Loading screen ───────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--black);
  color: var(--white);
  cursor: default;
}
#loader-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: fit-content;
}
.loader-stamp {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900;
  font-stretch: condensed;
  font-size: clamp(3rem, 11vw, 9rem);
  letter-spacing: -0.01em;
  line-height: 1;
  background: var(--white);
  color: var(--black);
  padding: clamp(10px, 1.5vw, 20px) clamp(16px, 2.5vw, 36px);
}
.loader-bar-track {
  width: 100%;
  height: 22px;
  border: 1px solid var(--white);
  overflow: hidden;
  box-sizing: border-box;
  margin-top: 16px;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--white);
}

.stamp {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  font-stretch: condensed;
  letter-spacing: -0.01em;
  line-height: 1;
  background: var(--white);
  color: var(--black);
  padding: 8px 12px;
  mix-blend-mode: difference;
  transition: opacity 0.3s ease;
}


/* ── Progress marker ────────────────────────────── */
.progress-marker {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  font-family: var(--mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-end;
  color: var(--white);
  mix-blend-mode: difference;
  transition: opacity 0.4s ease;
}
.progress-marker .dot {
  border: 1px solid currentColor;
  padding: 6px 14px;
  opacity: 0.35;
  transition: opacity 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.progress-marker .dot:hover {
  opacity: 1;
  background: rgba(18, 18, 16, 0.25);
}
.progress-marker .dot.active {
  opacity: 1;
  background: var(--white);
  color: var(--black);
}


/* ── Stage / panels ─────────────────────────────── */
#stage { position: relative; height: 100vh; }

.panel-fixed {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px clamp(24px, 9.9vw, 200px);
  padding-right: max(clamp(24px, 9.9vw, 200px), 220px); /* keep content clear of right nav */
  opacity: 0;
  pointer-events: none;
}
.panel-fixed[data-panel="hero"] { opacity: 1; pointer-events: auto; }
.panel-fixed[data-bg="dark"] { background: var(--black); color: var(--white); }
.panel-fixed[data-bg="light"] { background: var(--white); color: var(--black); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .box {
  border: 1px solid currentColor;
  padding: 3px 8px;
}


/* ── Hero ───────────────────────────────────────── */
.hero-line {
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.01em;
  font-size: clamp(2.8rem, 8.5vw, 30rem);
  text-transform: uppercase;
  overflow: visible;
}
.hero-line .row {
  display: block;
  overflow: visible;
}
/* wclip clips the word from above while it slides in — overflow-visible on x so
   the text-shadow (down-right) isn't cut; padding-bottom gives shadow room */
.hero-line .wclip {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 10px;
  margin-bottom: -10px;
}
.hero-line .wgroup {
  display: inline-block;
  white-space: nowrap;
}


.hero-hint {
  position: absolute;
  bottom: 40px;
  left: clamp(24px, 9.9vw, 200px);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-hint::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
}


/* ── Who I am ───────────────────────────────────── */
.bio-copy {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.6;
}

/* ── Who I am — cinematic sequence ─────────────── */
.who-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.panel-fixed[data-panel="who"] .eyebrow {
  position: relative;
  z-index: 2;
}
.who-text {
  position: absolute;
  opacity: 0;
  white-space: pre-wrap;
}
.who-big {
  font-size: clamp(2.5rem, 5.5vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 72vw;
}
.who-small {
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  max-width: 36vw;
}
#whoT1 { }
#whoT2 { right: 220px; top: 2%; writing-mode: vertical-rl; max-height: 80vh; }
#whoT3 { left: 50%; top: 28%; transform: translateX(-50%); white-space: nowrap; }
#whoT4 { left: clamp(24px, 9.9vw, 200px); top: 14%; transform: rotate(180deg); transform-origin: left top; }
#whoT5 { left: 50%; top: 66%; transform: translateX(-50%); white-space: nowrap; }
#whoT7 { opacity: 0; }
#whoOverlay {
  position: fixed;
  inset: 0;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  z-index: 20;
}

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.skill-chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border: 1px solid currentColor;
  padding: 4px 10px;
}



/* ── What I do ──────────────────────────────────── */
.section-head {
  font-size: clamp(1.1rem, 1.9vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 0;
  margin-bottom: 0;
}

.what-outro {
  font-size: clamp(1.575rem, 1.925vw, 1.75rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-top: 28px;
  opacity: 0;
}



/* ── Work ───────────────────────────────────────── */
.work-label {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.sneak-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: currentColor;
  border: 1px solid currentColor;
}
.sneak-box {
  aspect-ratio: 3 / 4;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  position: relative;
  overflow: visible;
  opacity: 0;
  transform: scale(0.92);
  transform-origin: center;
  z-index: 1;
  transition: z-index 0s;
}
.sneak-box:hover {
  z-index: 2;
}
.panel-fixed[data-bg="dark"] .sneak-box { background: var(--black); }

.sneak-inner {
  position: absolute;
  inset: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.sneak-box:hover .sneak-inner {
  transform: scale(1.18);
}
.sneak-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.sneak-name {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 1;
  background: rgba(224, 224, 224, 0.75);
  color: rgba(18, 18, 16, 0.55);
  border: 1px solid var(--black);
  padding: 3px 8px;
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}


/* Carousel wrapper — only activates at small screens */
.sneak-carousel { position: relative; }

.sneak-arrows {
  display: none; /* hidden on desktop */
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
}
.sneak-prev,
.sneak-next {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  cursor: none;
  font-family: var(--mono);
  font-size: 14px;
  padding: 8px 16px;
  transition: background 0.15s, color 0.15s;
}
.sneak-prev:hover,
.sneak-next:hover { background: var(--black); color: var(--white); }
.sneak-prev:disabled,
.sneak-next:disabled { opacity: 0.25; pointer-events: none; }
.sneak-counter { opacity: 0.5; letter-spacing: 0.04em; }

@media (max-width: 768px) {
  .sneak-grid {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: transparent;
    border: none;
    gap: 0;
    touch-action: pan-x;
  }
  .sneak-grid::-webkit-scrollbar { display: none; }
  .sneak-box {
    min-width: 100%;
    scroll-snap-align: start;
    border: 1px solid currentColor;
    background: transparent;
    max-height: 55vh;
  }
  .sneak-box .sneak-img { height: 100%; object-fit: cover; }
  .sneak-box:hover .sneak-inner { transform: none; }
  .sneak-arrows { display: flex; }
}


/* ── Closing ────────────────────────────────────── */
.panel-fixed[data-panel="closing"] {
  align-items: flex-start;
}
.panel-fixed[data-panel="closing"]::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(224, 224, 224, 0.14) 1.4px, transparent 1.4px);
  background-size: 9px 9px;
  pointer-events: none;
}
.panel-fixed[data-panel="closing"] > * {
  position: relative;
  z-index: 1;
}
.closing-intro {
  font-size: clamp(2.5rem, 5.5vw, 6rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  opacity: 0;
  margin-bottom: 12px;
}
.closing-headline {
  font-size: clamp(3.5rem, 10vw, 30rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.closing-contact {
  font-family: var(--mono);
  font-size: 14px;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.closing-contact a:hover { text-decoration: underline; }
.closing-scroll-hint {
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.08em;
  margin-top: 48px;
  opacity: 0;
}


/* ── Zone 2 — case studies ──────────────────────── */
#zone2 {
  position: relative;
  z-index: 3;
  background: var(--white);
  color: var(--black);
  padding: 120px clamp(24px, 9.9vw, 200px) 60px;
  padding-right: max(clamp(24px, 9.9vw, 200px), 220px); /* keep content clear of right nav */
}
.zone2-head {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--black);
  margin-bottom: 64px;
  display: flex;
  justify-content: space-between;
}

.case-block { margin-bottom: 96px; }
.case-block:not(:first-child) { padding-top: 80px; }
.case-block-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--black);
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.case-block-top h3 { font-size: 2rem; font-weight: 700; line-height: 1; }

.case-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.case-tag {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid var(--black);
  padding: 3px 8px;
}

.case-images-pair {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 12px;
  margin-bottom: 8px;
  height: clamp(280px, 38vw, 580px);
}
.case-image {
  height: 100%;
  border: 1px solid var(--black);
  background: rgba(18, 18, 16, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.case-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 18, 16, 0);
  transition: background 0.25s ease;
  z-index: 2;
  pointer-events: none;
}
.case-image:hover::after {
  background: rgba(18, 18, 16, 0.25);
}

.case-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-images-pair .case-image:first-child img {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 75%;
  height: 75%;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.img-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  background: rgba(224, 224, 224, 0.5);
  color: rgba(18, 18, 16, 0.55);
  border: 1px solid var(--black);
  padding: 3px 8px;
  z-index: 1;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.case-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--black);
  padding: 10px 16px;
  margin-top: 16px;
  transition: background 0.15s, color 0.15s;
  background: transparent;
  color: var(--black);
  cursor: none;
  appearance: none;
  -webkit-appearance: none;
  text-decoration: none;
}
.case-link:hover { background: var(--black); color: var(--white); }




/* ── Brand guidelines modal ─────────────────────── */
.guidelines-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 80px 72px;
  box-sizing: border-box;
}
.guidelines-img-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.guidelines-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.guidelines-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  font-family: var(--mono);
  font-size: 18px;
  border: 1px solid var(--white);
  color: var(--white);
  background: transparent;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.guidelines-arrow:hover { background: var(--white); color: var(--black); }
.guidelines-counter {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--white);
  opacity: 0.5;
}

/* ── Footer ─────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--white);
  color: var(--black);
  font-family: var(--mono);
  font-size: 12px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 8px; }

footer {
  position: relative;
  z-index: 3;
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
  font-size: 11px;
  padding: 32px 8vw;
  display: flex;
  justify-content: space-between;
  opacity: 0.5;
  border-top: 1px solid rgba(224, 224, 224, 0.08);
}
.footer-link {
  color: inherit;
  text-decoration: none;
}
.footer-link:hover { text-decoration: underline; }


/* ── Case study modal ───────────────────────────── */
.case-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(18, 18, 16, 0.97);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.case-modal[hidden] { display: none; }

.case-modal-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 501;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  border: 1px solid var(--white);
  color: var(--white);
  background: transparent;
  padding: 8px 16px;
  cursor: none;
  transition: background 0.15s, color 0.15s;
}
.case-modal-close:hover {
  background: var(--white);
  color: var(--black);
}

.case-modal-body {
  padding: 100px clamp(24px, 9.9vw, 200px) 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.case-modal-img {
  width: 100%;
  display: block;
}


/* Hide stamp in zone 2 — it's fixed top-left and always overlaps scrolling content */
body.in-zone2 .stamp { opacity: 0; pointer-events: none; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {

  /* Panels — 84px top clears the stamp (bottom ≈58px) with ~26px breathing room */
  .panel-fixed { padding: 84px 6vw; }
  .progress-marker { display: none; }

  /* Section 02 — clip overflowing stage elements */
  .panel-fixed[data-panel="who"] { overflow: hidden; }

  /* Sections 03 + 04 — pin content to top so stamp never overlaps eyebrow */
  .panel-fixed[data-panel="what"],
  .panel-fixed[data-panel="work"] {
    justify-content: flex-start;
    padding-top: 84px;
  }

  /* Section 03 — compress content to fit all phone heights */
  .panel-fixed[data-panel="what"] { overflow: hidden; }
  .panel-fixed[data-panel="what"] .skills-row { margin-top: 16px; gap: 6px; }
  .panel-fixed[data-panel="what"] .skill-chip { padding: 3px 8px; }
  .panel-fixed[data-panel="what"] .what-outro { font-size: 1.1rem; line-height: 1.4; margin-top: 16px; }
  .who-big  { font-size: clamp(1.6rem, 7vw, 2.5rem); max-width: 88vw; }
  .who-small { max-width: 80vw; }
  #whoT2 { right: 4vw; }
  #whoT3 { white-space: normal; width: 88vw; }
  #whoT5 { white-space: normal; width: 88vw; }

  /* Zone 2 — remove 220px nav-clearance on right (no nav on mobile) */
  #zone2 {
    padding: 72px 6vw 48px;
  }
  .zone2-head { margin-bottom: 40px; }
  .case-block { margin-bottom: 64px; }
  .case-block:not(:first-child) { padding-top: 48px; }
  .case-block-top h3 { font-size: 1.5rem; }
  .case-images-pair {
    grid-template-columns: 1fr;
    height: auto;
    gap: 8px;
  }
  .case-image { height: clamp(200px, 60vw, 360px); }
  .case-links { flex-direction: column; align-items: flex-start; }

  /* Guidelines modal — image on top, arrows side-by-side below */
  .guidelines-stage {
    display: grid;
    grid-template-areas: "img img" "prev next";
    grid-template-rows: 1fr 48px;
    grid-template-columns: 1fr 1fr;
    align-items: unset;
    justify-content: unset;
    padding: 60px 16px 72px;
    gap: 12px 0;
  }
  .guidelines-img-wrap { grid-area: img; }
  .guidelines-arrow {
    position: static;
    transform: none;
    width: 100%;
    height: 48px;
    font-size: 16px;
    background: transparent;
  }
  .guidelines-prev { grid-area: prev; left: auto; }
  .guidelines-next { grid-area: next; right: auto; }
}
