/* ==========================================================================
   Bruce Gi — shared styles
   ========================================================================== */
:root {
  --bg: #ecebe6;
  --bg-2: #e2e0d9;
  --fg: #141414;
  --dim: rgba(20, 20, 20, .52);
  --line: rgba(20, 20, 20, .14);
  --accent: #2b4bff;
  --ph: #d9d7cf;            /* image placeholder */
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: 24px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 1100px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; background: var(--bg); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.label { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: .05em; line-height: 1.4; }
.dim { color: var(--dim); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

/* SplitText masks: extra room below the baseline so descenders aren't clipped */
.ln-mask, .wd-mask, .ch-mask { padding-bottom: .14em; margin-bottom: -.14em; }

/* ---------- Header ---------- */
.hd { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; justify-content: space-between; align-items: flex-start; padding: 22px var(--gutter); pointer-events: none; }
.hd > * { pointer-events: auto; }
.hd__brand { font-weight: 600; font-size: 15px; letter-spacing: -.01em; line-height: 1.2; }
.hd__brand small { display: block; font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.hd__nav { display: flex; gap: 22px; }
.hd__nav a { position: relative; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.hd__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.hd__nav a:hover::after, .hd__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.hd__nav a.is-active { color: var(--accent); }
.hd__menu { display: none; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.hd--solid { background: var(--bg); padding-bottom: 14px; }
.hd--blend { mix-blend-mode: difference; color: #fff; }
.hd--blend .hd__brand small { color: rgba(255,255,255,.6); }
.hd--blend .hd__nav a.is-active { color: #fff; }

@media (max-width: 720px) {
  .hd__nav { display: none; }
  .hd__menu { display: block; }
}

/* ---------- Mobile menu ---------- */
.menu { position: fixed; inset: 0; z-index: 70; background: var(--fg); color: var(--bg); visibility: hidden; clip-path: inset(0 0 100% 0); display: flex; flex-direction: column; justify-content: space-between; padding: 22px var(--gutter) 28px; }
.menu__top { display: flex; justify-content: space-between; }
.menu__top button { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.menu__links { list-style: none; }
.menu__links li { overflow: hidden; }
.menu__links a { display: flex; align-items: baseline; gap: 14px; font-size: clamp(48px, 16vw, 96px); font-weight: 500; letter-spacing: -.05em; line-height: 1; padding: 4px 0; }
.menu__links a span { font-family: var(--mono); font-size: 11px; letter-spacing: .05em; color: rgba(236,235,230,.5); }
.menu__foot { display: flex; justify-content: space-between; color: rgba(236,235,230,.5); }

/* ---------- Curtain (page transitions) ---------- */
.curtain { position: fixed; inset: 0; z-index: 100; background: var(--fg); color: var(--bg); display: grid; place-items: center; pointer-events: none; }
.curtain__word { font: 500 clamp(32px, 5vw, 72px)/1.3 var(--sans); letter-spacing: -.04em; overflow: hidden; }
.curtain__word span { display: block; }
html.no-js .curtain { display: none; }

/* ---------- Cursor label ---------- */
.cur { position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none; display: none; }
.cur__pill { transform: translate(-50%, -50%) scale(0); background: var(--fg); color: var(--bg); border-radius: 99px; padding: 7px 12px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .cur { display: block; } }

/* ---------- Page scaffolding ---------- */
.page { padding-top: 140px; }
.page-head { padding: 0 var(--gutter); margin-bottom: 64px; }
.page-head .label { margin-bottom: 18px; color: var(--dim); }
.page-title { font-size: clamp(64px, 14vw, 240px); font-weight: 500; letter-spacing: -.06em; line-height: .84; }
.page-title sup { font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: .05em; vertical-align: top; position: relative; top: .9em; margin-left: .4em; color: var(--dim); }
.lede { max-width: 34em; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; letter-spacing: -.01em; }

.media { position: relative; overflow: hidden; background: var(--ph); }
.media img { width: 100%; height: 100%; object-fit: cover; }

.btn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--fg); border-radius: 99px; padding: 12px 20px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; position: relative; overflow: hidden; isolation: isolate; transition: color .5s var(--ease); }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: translateY(101%); transition: transform .5s var(--ease); z-index: -1; border-radius: inherit; }
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid::before { background: var(--accent); }
.btn--solid:hover { color: #fff; }

.link-u { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease); }
.link-u:hover { background-size: 0 1px; background-position: 100% 100%; }

/* ---------- Footer ---------- */
.ft { margin-top: 160px; padding: 0 var(--gutter) 24px; border-top: 1px solid var(--line); }
.ft__cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 72px 0 96px; flex-wrap: wrap; }
.ft__cta h2 { font-size: clamp(40px, 6vw, 96px); font-weight: 500; letter-spacing: -.05em; line-height: .92; max-width: 10em; }
.ft__cta h2 em { font-style: normal; color: var(--dim); }
.ft__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 40px; }
.ft__cols h3 { color: var(--dim); margin-bottom: 10px; font-weight: 400; }
.ft__cols ul { list-style: none; }
.ft__cols li { font-size: 14px; line-height: 1.8; }
.ft__mark { font-size: clamp(80px, 21.5vw, 420px); font-weight: 500; letter-spacing: -.07em; line-height: .78; white-space: nowrap; overflow: hidden; padding-top: .04em; }
.ft__bottom { display: flex; justify-content: space-between; padding-top: 20px; color: var(--dim); }
@media (max-width: 720px) { .ft__cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 80; visibility: hidden; }
.lb__bg { position: absolute; inset: 0; background: var(--bg); opacity: 0; }
.lb__img { position: absolute; top: 50%; left: 50%; object-fit: cover; transform-origin: 0 0; background: var(--ph); }
.lb__info { position: absolute; left: var(--gutter); bottom: var(--gutter); max-width: 360px; }
.lb__title { font-weight: 500; font-size: clamp(32px, 4vw, 60px); letter-spacing: -.04em; line-height: .95; }
.lb__meta { margin-top: 14px; color: var(--dim); display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; }
.lb__meta b { color: var(--fg); font-weight: 500; }
.lb__series { display: inline-block; margin-top: 14px; color: var(--accent); }
.lb__close { position: absolute; top: 22px; right: var(--gutter); }
.lb__count { position: absolute; top: 22px; left: var(--gutter); }
.lb__nav { position: absolute; right: var(--gutter); bottom: var(--gutter); display: flex; gap: 18px; }
.lb__fade { opacity: 0; }
@media (max-width: 720px) {
  .lb__info { right: var(--gutter); }
  .lb__nav { bottom: auto; top: 54px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
