/* Shell & Home agent: home page + 404. */

/* the hero slides under the sticky header; the last section meets the footer edge-to-edge */
.home { margin-top: calc(-1 * var(--header-h)); margin-bottom: calc(-1 * var(--section)); overflow-x: clip; }

/* ============ hero ============ */
.hero {
  --sy: 0; --px: 0; --py: 0;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100svh);
  display: flex; align-items: flex-end;
}
.hero__collage { position: absolute; inset: 0; z-index: 0; }
.hero__ph {
  --ds: -.2; --dx: 14px; --dy: 10px;
  position: absolute; margin: 0;
  /* pointer tilt (JS, spring-smoothed) on transform; scroll depth on translate (CSS scroll timeline, or --sy from JS) */
  transform: translate3d(calc(var(--px) * var(--dx)), calc(var(--py) * var(--dy)), 0);
  translate: 0 calc(var(--sy) * var(--ds) * 1px);
  will-change: transform, translate;
}
@supports (animation-timeline: scroll()) {
  @media all {
    .hero__ph { translate: none; animation: hero-depth linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }
    .hero__copy { translate: none !important; transform: none !important; animation: hero-copy linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
    .hero__tag { animation: hero-tag linear both; animation-timeline: scroll(root); animation-range: 0 120vh; }
  }
}
@keyframes hero-depth { to { translate: 0 calc(var(--ds) * 120vh); } }
@keyframes hero-copy { to { translate: 0 12vh; opacity: .15; } }
@keyframes hero-tag { to { translate: 0 calc(-.18 * 120vh); } }
.hero__mask { position: relative; overflow: hidden; width: 100%; height: 100%; background: var(--surface); border-radius: var(--radius); }
.hero__mask img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.03); }
.hero__mask::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 10, 11, .35), transparent 45%); pointer-events: none; }

/* mobile collage */
.hero__ph--1 { --ds: -.18; --dx: 18px; right: 5vw; top: calc(var(--header-h) + 2svh); width: 56vw; aspect-ratio: 3 / 4; z-index: 2; }
.hero__ph--2 { --ds: -.34; --dx: -22px; left: 5vw; top: calc(var(--header-h) + 28vw); width: 33vw; aspect-ratio: 4 / 5; z-index: 3; }
.hero__ph--3 { --ds: -.5; --dx: 30px; right: 9vw; top: calc(var(--header-h) + 64vw); width: 23vw; aspect-ratio: 1; z-index: 3; }
.hero__ph--4 { --ds: -.08; --dx: -10px; left: 12vw; top: calc(var(--header-h) + 4vw); width: 20vw; aspect-ratio: 3 / 4; z-index: 1; opacity: .7; }

.hero__shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(10, 10, 11, .86) 30%, rgba(10, 10, 11, .1) 62%, transparent 75%);
}
.hero__copy { position: relative; z-index: 4; padding-bottom: clamp(36px, 7svh, 84px); transform: translate3d(0, calc(var(--sy) * .12px), 0); }
.hero__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; color: var(--text-2); }
.hero__pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(194, 54, 79, .6); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(194, 54, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(194, 54, 79, 0); } }
.hero__title { font-size: clamp(62px, 17.5vw, 188px); line-height: .86; margin-top: 18px; }
.hero__ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__ln > span { display: inline-block; }
.hero__ln em { padding-right: .04em; }
.hero__ln:nth-child(2) { padding-left: .55em; }
.hero__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; margin-top: 26px; }
.hero__lede { max-width: 36ch; color: var(--text-2); font-size: var(--fs-md); font-weight: 300; }
.hero__cta svg { transition: transform var(--dur) var(--ease-out); }
.hero__cta:hover svg { transform: translateX(5px); }
.hero__tag { display: none; }
.hero__cue, .hero__coord { display: none; }
@media (max-width: 699px) { .hero__hide-sm { display: none; } }

@media (min-width: 700px) {
  .hero__ph--1 { right: 6vw; top: calc(var(--header-h) + 4vh); width: 40vw; }
  .hero__ph--2 { left: auto; right: 44vw; top: 30vh; width: 22vw; }
  .hero__ph--3 { right: 2.5vw; top: 58vh; width: 15vw; }
  .hero__ph--4 { left: auto; right: 58vw; top: calc(var(--header-h) + 3vh); width: 12vw; }
  .hero__foot { flex-direction: row; align-items: center; gap: 40px; }
  .hero__shade { background: linear-gradient(to top, var(--bg) 0%, rgba(10, 10, 11, .7) 26%, transparent 60%), linear-gradient(to right, rgba(10, 10, 11, .6), transparent 55%); }
}
@media (min-width: 1100px) {
  .hero { min-height: max(700px, 100svh); }
  .hero__ph--1 { right: 7vw; top: calc(var(--header-h) + 5vh); width: 27vw; }
  .hero__ph--2 { right: 30vw; top: 40vh; width: 14.5vw; }
  .hero__ph--3 { right: 2.5vw; top: 63vh; width: 11.5vw; }
  .hero__ph--4 { right: 41vw; top: calc(var(--header-h) + 6vh); width: 8.5vw; }
  .hero__title { font-size: clamp(110px, 10.6vw, 200px); }
  .hero__tag {
    display: flex; flex-direction: column; gap: 4px; position: absolute; z-index: 4;
    left: 66vw; top: calc(var(--header-h) + 5vh + 36vw + 16px); max-width: 14vw;
    transform: translate3d(0, calc(var(--sy) * -.18px), 0);
  }
  .hero__coord {
    display: block; position: absolute; z-index: 4; left: var(--gutter); top: calc(var(--header-h) + 5vh);
    font-size: var(--fs-2xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--faint); line-height: 2;
  }
  .hero.is-intro .hero__coord { animation: fade-up 1.1s var(--ease-out) both; animation-delay: 1.2s; }
  .hero__tag-b { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
  .hero__tag .mono { font-size: var(--fs-2xs); color: var(--muted); }
  .hero__tag:hover .hero__tag-b { font-style: italic; }
  .hero__cue {
    display: flex; flex-direction: column; align-items: center; gap: 10px; position: absolute; z-index: 4;
    right: var(--gutter); bottom: 28px; font-size: var(--fs-2xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted);
    writing-mode: vertical-rl;
  }
  .hero__cue i { display: block; width: 1px; height: 54px; background: var(--line-strong); position: relative; overflow: hidden; }
  .hero__cue i::after { content: ""; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--gold); animation: cue 2.2s var(--ease-in-out) infinite; }
}
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* intro (first load only): the lead photo lifts its curtain, the others follow; the eyebrow is typed out
   left to right, the statement rises line by line out of its masks, then the lede and the call to action */
.hero.is-intro .hero__ln > span { animation: ln-up 1.25s var(--ease-out) both; animation-delay: calc(var(--l) * 130ms + 520ms); }
.hero.is-intro .hero__mask { animation: unveil 1.4s var(--ease-morph) both; animation-delay: calc(var(--k) * 170ms + 60ms); }
.hero.is-intro .hero__mask img { animation: settle 2.4s var(--ease-out) both; animation-delay: calc(var(--k) * 170ms + 60ms); }
.hero.is-intro .hero__foot,
.hero.is-intro .hero__tag,
.hero.is-intro .hero__cue { animation: fade-up 1.1s var(--ease-out) both; animation-delay: 1.1s; }
.hero.is-intro .hero__tag { animation-delay: 1.3s; }
.hero.is-intro .hero__eyebrow { animation: type-in 1.1s steps(28, end) both; animation-delay: .3s; }
.hero.is-intro .hero__pulse { animation: pulse-in .6s var(--ease-out) .3s both, pulse 2.4s var(--ease-out) 1.4s infinite; }
@keyframes ln-up { from { transform: translateY(110%) rotate(3deg); } }
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.28); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes type-in { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pulse-in { from { transform: scale(0); } }
@supports (animation-timeline: scroll()) {
  @media all {
    .hero.is-intro .hero__tag {
      animation: fade-up 1.1s var(--ease-out) 1.3s both, hero-tag linear both;
      animation-timeline: auto, scroll(root); animation-range: normal, 0 120vh;
    }
  }
}

/* ============ marquee ============ */
.mq { position: relative; overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(16px, 2vw, 26px); }
.mq::before, .mq::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12vw; z-index: 1; pointer-events: none; }
.mq::before { left: 0; background: linear-gradient(to right, var(--bg), transparent); }
.mq::after { right: 0; background: linear-gradient(to left, var(--bg), transparent); }
.mq__track { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.mq:hover .mq__track { animation-play-state: paused; }
.mq__run { display: flex; align-items: center; flex: none; }
.mq__item {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-size: clamp(30px, 4vw, 60px); line-height: 1.1;
  color: var(--text-2); transition: color var(--dur) var(--ease-out);
}
.mq__item:hover { color: var(--text); }
.mq__item sup { font-style: normal; font-size: var(--fs-2xs); color: var(--gold); margin-left: 6px; transform: translateY(-1.2em); }
.mq__item::after { content: ""; width: 7px; height: 7px; margin-inline: clamp(22px, 3vw, 48px); border: 1px solid var(--gold); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) and (scripting: none) { .mq__track { animation: none; } }

/* ============ manifesto ============ */
.mani { padding-block: var(--section); display: grid; gap: 28px; }
.mani__text { font-size: clamp(32px, 4.4vw, 76px); line-height: 1.04; max-width: 22ch; }
.mani__text em { color: var(--gold); }
.mani__stats { display: grid; gap: 0; margin-top: clamp(20px, 4vw, 56px); }
.mani__stats > div { display: flex; align-items: baseline; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line); }
.mani__stats dt { font-family: var(--font-mono); font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -.02em; min-width: 4.2ch; }
.mani__stats dd { color: var(--muted); font-size: var(--fs-sm); }
@media (min-width: 1100px) {
  .mani { grid-template-columns: 3fr 9fr; column-gap: 48px; }
  .mani__eyebrow { padding-top: 1.4em; }
  .mani__stats { grid-column: 2; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .mani__stats > div { flex-direction: column; gap: 8px; }
}

/* ============ new arrivals rail ============ */
.rail { padding-block: 0 calc(var(--section) * .75); }
.rail__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: clamp(22px, 3vw, 40px); }
@media (max-width: 699px) { .rail__head > :first-child { flex-basis: 100%; } }
.rail__title { font-size: var(--fs-2xl); margin-top: 10px; }
.rail__ctrl { display: flex; align-items: center; gap: 10px; }
.rail__all { font-size: var(--fs-xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--text-2); margin-right: 14px; white-space: nowrap; }
.rail__btn {
  display: none; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line-strong); border-radius: 50%;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.rail__btn:hover:not(:disabled) { background: var(--text); color: var(--bg); }
.rail__btn:disabled { opacity: .25; cursor: default; }
.rail__track {
  list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: 64vw; gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__item { scroll-snap-align: start; min-width: 0; }
@media (min-width: 700px) { .rail__track { grid-auto-columns: 36vw; gap: 18px; } .rail__btn { display: grid; } }
@media (min-width: 1100px) { .rail__track { grid-auto-columns: clamp(260px, 22vw, 360px); gap: 22px; } }
@media (min-width: 1680px) { .rail__track { padding-inline: calc((100vw - var(--maxw)) / 2 + var(--gutter)); } }

/* ============ houses index ============ */
.houses { padding-block: var(--section); border-top: 1px solid var(--line); }
.houses__head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 64px); }
.houses__title { font-size: var(--fs-2xl); }
.houses__hint { color: var(--muted); font-size: var(--fs-sm); }
.houses__list { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .28em; row-gap: 0; font-family: var(--font-display); }
.houses__li { font-size: clamp(22px, 3vw, 50px); line-height: 1.08; }
.houses__li.is-major { font-size: clamp(42px, 7vw, 124px); line-height: .98; letter-spacing: var(--track-tight); }
.houses__li:not(:last-child)::after { content: "/"; color: var(--faint); margin-left: .22em; font-style: italic; }
.houses__a { color: var(--text); transition: color var(--dur) var(--ease-out); }
.houses__n { font-family: var(--font-mono); font-size: max(9px, .18em); color: var(--gold); margin-left: .25em; vertical-align: super; letter-spacing: 0; }
.houses__a:hover .houses__name, .houses__a:focus-visible .houses__name { font-style: italic; }
.houses__list.is-hovering .houses__a { color: var(--faint); }
.houses__list.is-hovering .houses__a.is-on { color: var(--text); }
.houses__float {
  position: fixed; left: 0; top: 0; z-index: 40; width: 240px; height: 300px; pointer-events: none;
  border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  opacity: 0; clip-path: inset(100% 0 0 0);
  transition: opacity var(--dur) var(--ease-out), clip-path 700ms var(--ease-morph);
}
/* two stacked photos (home-motion.js): the next house crossfades in over the last one */
.houses__float img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.12);
  transition: opacity 520ms var(--ease-out), transform 1.1s var(--ease-out);
}
.houses__float img.is-front { opacity: 1; transform: scale(1); }
.houses__float.is-on { opacity: 1; clip-path: inset(0 0 0 0); }
@media (min-width: 1100px) { .houses__head { grid-template-columns: 3fr 6fr 3fr; align-items: end; } .houses__hint { text-align: right; } }

/* ============ categories ============ */
.cats { padding-block: var(--section); border-top: 1px solid var(--line); }
.cats__head { margin-bottom: clamp(28px, 4vw, 64px); }
.cats__title { font-size: var(--fs-2xl); margin-top: 12px; }
.cats__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 14px; }
.cat { position: relative; display: flex; flex-direction: column; gap: 12px; }
.cat__img { position: relative; display: block; overflow: hidden; background: var(--surface); border-radius: var(--radius); aspect-ratio: 3 / 4; }
/* tiles unveil (curtain lifts, photo settles from a zoom); on hover a slow push-in and the label glides */
.cat__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); transition: transform 1.6s var(--ease-out), opacity var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out); filter: saturate(.85); }
.cat .cat__img { clip-path: inset(100% 0 0 0); transition: clip-path var(--dur-reveal) var(--ease-morph); transition-delay: calc(var(--i, 0) * 60ms + 120ms); }
.cat.is-in .cat__img { clip-path: inset(0 0 0 0); }
.cat.is-in .cat__img img { transform: scale(1); }
.cat__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 10, 11, .28), transparent 40%); box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; transition: opacity var(--dur-slow) var(--ease-out); }
.cat.is-in:hover .cat__img img, .cat.is-in:focus-visible .cat__img img { transform: scale(1.07); filter: saturate(1); transition-duration: 2.2s, var(--dur-slow), var(--dur-slow); }
.cat:hover .cat__img::after { opacity: .4; }
.cat__meta { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; }
.cat__i, .cat__n { font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .08em; transition: color var(--dur) var(--ease-out); }
.cat__n { color: var(--gold); }
.cat__label { font-size: clamp(24px, 2.6vw, 44px); line-height: 1; transition: transform 600ms var(--ease-soft); }
.cat:hover .cat__label, .cat:focus-visible .cat__label { font-style: italic; transform: translateX(12px); }
.cat:hover .cat__i { color: var(--accent); }
@media (prefers-reduced-motion: reduce) and (scripting: none) { .cat__img img { transform: none; } .cat .cat__img { clip-path: none; } }
.cat--1 { grid-column: 1 / -1; }
.cat--1 .cat__img { aspect-ratio: 4 / 5; }
.cat--3 { margin-top: 48px; }
.cat--4 { grid-column: 1 / -1; }
.cat--4 .cat__img { aspect-ratio: 16 / 10; }
@media (min-width: 700px) {
  .cats__grid { grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 3vw, 48px) clamp(16px, 2vw, 32px); }
  .cat { grid-column: span 6; }
  .cat--1 { grid-column: 1 / 7; grid-row: 1 / 3; }
  .cat--1 .cat__img { aspect-ratio: auto; flex: 1; min-height: 420px; }
  .cat--2 { grid-column: 8 / 13; grid-row: 1; margin-top: 8vw; }
  .cat--2 .cat__img { aspect-ratio: 4 / 3; }
  .cat--3 { grid-column: 8 / 12; grid-row: 2; margin-top: 0; }
  .cat--3 .cat__img { aspect-ratio: 1; }
  .cat--4 { grid-column: 3 / 10; grid-row: 3; margin-top: 2vw; }
  .cat--4 .cat__img { aspect-ratio: 21 / 10; }
  .cat--5 { grid-column: 10 / 13; grid-row: 3; margin-top: 10vw; }
  .cat--6 { grid-column: 1 / 5; grid-row: 4; }
  .cat--1 .cat__label { font-size: clamp(34px, 4vw, 72px); }
}

/* ============ how to order ============ */
.howto { background: var(--bg-2); border-top: 1px solid var(--line); padding-block: var(--section); }
.howto__in { display: grid; gap: clamp(40px, 5vw, 80px); }
.howto__head { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.howto__title { font-size: var(--fs-2xl); }
.howto__title em { color: var(--gold); }
.howto__lede { color: var(--text-2); max-width: 34ch; }
.howto__cta { margin-top: 10px; }
.howto__steps { list-style: none; display: grid; gap: 0; }
.howto__step { display: grid; grid-template-columns: 80px 1fr; grid-template-rows: auto 1fr; column-gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.howto__n {
  grid-row: 1 / 3; font-style: italic; font-size: 84px; line-height: .8;
  color: transparent; -webkit-text-stroke: 1px var(--gold);
}
.howto__st { font-family: var(--font-ui); font-size: var(--fs-lg); font-weight: 500; }
.howto__step p { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; }
@media (min-width: 1100px) {
  .howto__in { grid-template-columns: 5fr 7fr; }
  .howto__steps { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .howto__step { grid-template-columns: 1fr; grid-template-rows: auto; padding: 28px 0 40px; }
  .howto__n { grid-row: auto; font-size: 150px; margin-bottom: 20px; }
  .howto__steps .howto__step:nth-child(even) { transform: translateY(70px); }
  .howto__steps { padding-bottom: 70px; }
}

/* ============ error ============ */
.home--error { margin-top: 0; padding-block: 20vh; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.home--error .display { font-size: var(--fs-2xl); font-style: italic; }

/* ============ 404 ============ */
.nf { min-height: calc(100svh - var(--header-h)); display: grid; align-content: center; gap: 28px; padding-block: 48px; }
.nf__num { font-size: clamp(150px, 36vw, 540px); line-height: .8; letter-spacing: -.05em; display: flex; color: var(--surface-2); user-select: none; }
.nf__num em { color: var(--accent); font-style: italic; animation: drift 6s var(--ease-in-out) infinite alternate; }
@keyframes drift { from { transform: translateY(-2%) rotate(-3deg); } to { transform: translateY(3%) rotate(4deg); } }
/* the digits rise out of the frame one after another, then the 0 starts drifting */
.nf__num { overflow: clip; padding-bottom: .04em; }
.nf__num > * { display: inline-block; animation: ln-up 1.2s var(--ease-out) both; }
.nf__num > :nth-child(2) { animation: ln-up 1.2s var(--ease-out) 90ms both, drift 6s var(--ease-in-out) 1.3s infinite alternate; }
.nf__num > :nth-child(3) { animation-delay: 180ms; }
@media (prefers-reduced-motion: reduce) and (scripting: none) { .nf__num em, .nf__num > * { animation: none; } }
.nf__copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; max-width: 680px; }
.nf__title { font-size: var(--fs-2xl); }
.nf__text { color: var(--text-2); max-width: 44ch; }
.nf__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-top: 8px; }
.nf__home { font-size: var(--fs-xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--text-2); }
@media (min-width: 1100px) {
  .nf { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 64px; }
}
