/* Homepage — layered depth + scroll-driven motion. Motion values come from home.js. */

.page--home main { overflow-x: clip; }
[data-y], [data-x], [data-r], [data-s], [data-o], [data-hx] { will-change: transform; }

/* ── Hero ─────────────────────────────────────────── */
.h-hero { position: relative; min-height: 105vh; min-height: 105svh; display: flex; align-items: flex-start; isolation: isolate; }
.h-hero__inner { position: relative; padding-top: var(--page-top); padding-bottom: 18vh; pointer-events: none; }
.h-hero__hello { margin-bottom: clamp(24px, 4vw, 48px); }
.h-title { margin: 0; font-weight: 500; font-size: clamp(44px, 7vw, 120px); line-height: .95; letter-spacing: -0.055em;
  color: #fff; mix-blend-mode: difference; }
.h-title__line { display: block; white-space: nowrap; }
.h-title__rot { color: #fff; font-style: italic; font-weight: 400; }
.h-title .rotator { display: inline; color: inherit; }
/* Orbit: chromatic rings to the right of the headline (drawn in motion.js); sits under the title so the title's difference blend inverts over it */
.h-orbit { position: absolute; top: 12%; right: 0; width: min(44vw, 720px); aspect-ratio: 1; pointer-events: none; }
.h-orbit canvas { display: block; width: 100%; height: 100%; }
@media (max-width: 700px) { .h-orbit { width: 90vw; top: 30%; right: -30vw; opacity: .5; } }

/* ── Selected work: horizontal track pinned while you scroll ── */
.h-work { position: relative; }               /* height set by JS */
.h-work__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 3vh, 40px); overflow: hidden; }
.h-work__head { display: flex; align-items: center; gap: 24px; }
.h-work__head .tagline { flex: 1; margin: 0; }
.h-work__count { font-size: 14px; }
.h-work__track { display: flex; gap: clamp(20px, 3vw, 48px); padding-inline: var(--gutter); width: max-content; }
.h-card { position: relative; flex: none; width: clamp(290px, 62vw, 1040px); display: grid; grid-template-rows: auto auto; gap: 20px; text-decoration: none; color: var(--fg); }
.h-card__num { position: absolute; top: 0; left: 0; z-index: 2; display: grid; place-items: center; width: clamp(34px, 2.8vw, 46px); aspect-ratio: 1; background: #fff; color: #000; font-size: 14px; border-radius: 6px 0 0 0; }
.h-card__img { position: relative; overflow: hidden; border-radius: 6px; height: min(56vh, 36vw); min-height: 220px; background: #111; }
.h-card__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); transition: filter .4s; }
.h-card:hover .h-card__img img { filter: brightness(1.12); }
.h-card__text { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; align-items: baseline; }
.h-card__title { margin: 0; font-size: clamp(22px, 2.6vw, 42px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.15; }
.h-card:hover .h-card__title { text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-skip-ink: none; }
.h-card__meta { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 13px; color: var(--fg-50); }
.h-card__desc { grid-column: 1 / -1; margin: 0; max-width: 62ch; color: var(--fg-75); font-size: 15px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.h-card--all { width: clamp(240px, 34vw, 520px); align-content: center; justify-items: start; border: 1px solid var(--line); border-radius: 6px; padding: 40px; min-height: min(56vh, 36vw); align-self: start; }
.h-card__all { font-size: clamp(40px, 5vw, 84px); letter-spacing: -0.05em; line-height: 1; }
.h-card--all:hover { background: #fff; color: #000; }
.h-card--all:hover .mono { color: #000; }
.h-work__progress { height: 1px; background: var(--line); }
.h-work__progress i { display: block; height: 100%; width: 100%; background: var(--fg); transform-origin: left; transform: scaleX(0); }

/* ── About ────────────────────────────────────────── */
.h-about { padding-top: clamp(100px, 14vw, 220px); }
.h-about__grid { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(32px, 8vw, 140px); align-items: center; }
.h-about__text { margin: 0; font-size: clamp(26px, 3.2vw, 50px); line-height: 1.25; letter-spacing: -0.035em; font-weight: 500; }
.h-about__text .w { color: rgba(255,255,255,.14); transition: color .35s; }
.h-about__text .w.on { color: #fff; }
.h-about__img { margin: 0; overflow: hidden; border-radius: 6px; aspect-ratio: 3/4; }
.h-about__img img { width: 100%; height: 120%; object-fit: cover; filter: grayscale(1); margin-top: -10%; }

/* ── Writing ──────────────────────────────────────── */
.h-posts { padding-top: clamp(100px, 14vw, 220px); }
.h-posts__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.h-posts__list li { border-bottom: 1px solid var(--line); }
.h-posts__list a { display: grid; grid-template-columns: 170px 1fr auto; gap: 24px; align-items: baseline; padding: clamp(22px, 3vw, 40px) 0; text-decoration: none; }
.h-posts__title { font-size: clamp(22px, 3vw, 48px); letter-spacing: -0.04em; line-height: 1.1; font-weight: 500; }
.h-posts__arrow { font-size: clamp(22px, 3vw, 48px); transition: transform .3s; }
.h-posts__list a:hover .h-posts__arrow { transform: translateX(10px); }
.h-posts__list a:hover .h-posts__title { text-decoration: underline wavy; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-skip-ink: none; }

@media (max-width: 800px) {
  .h-title__rot { white-space: normal; }
  .h-about__grid { grid-template-columns: 1fr; }
  .h-about__img { max-width: 70%; }
  .h-posts__list a { grid-template-columns: 1fr auto; }
  .h-posts__list time { grid-column: 1 / -1; }
  .h-card { width: 82vw; }
  .h-card__img { height: 42vh; }
  .h-card--all { width: 70vw; min-height: 42vh; }
}

/* Reduced motion: no pinning, no movement — a plain vertical page */
@media (prefers-reduced-motion: reduce) {
  [data-y], [data-x], [data-r], [data-s], [data-hx] { transform: none !important; }
  .h-work { height: auto !important; }
  .h-work__sticky { position: static; height: auto; overflow: visible; }
  .h-work__track { width: auto; flex-direction: column; }
  .h-card, .h-card--all { width: 100%; }
  .h-work__progress, .h-work__count { display: none; }
  .h-about__text .w { color: inherit; }
}

/* ── Panel-language pieces ── */
.h-hero__intro { margin-bottom: clamp(48px, 8vw, 112px); }
.h-hero__intro .h-hero__hello { margin: 0; }
.h-chip { display: inline-block; justify-self: start; padding: .6em 1em; background: rgba(255,255,255,.1); color: var(--fg); font: 400 11px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.h-work__head .cs-label { margin: 0 auto 0 0; }
.h-about > .cs-label, .h-posts > .cs-label { margin-bottom: clamp(32px, 4vw, 56px); }

.h-chip + .h-chip { margin-left: -6px; }
