/* ==========================================================================
   home.css — homepage only: horizontal section system, hero, work grid,
   about, contact, nav timeline, corner links, cursor
   ========================================================================== */

/* ── Horizontal section system (enhanced only; without JS the sections stack) ── */
.js,
.js body {
  height: 100%;
  overflow: hidden;
}

.js .viewport {
  position: fixed;
  inset: var(--frame-size);
  overflow: hidden;
}

.js .track {
  position: relative;
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
  transition: transform 1.5s cubic-bezier(.65, 0, .35, 1);
}

.js .track.is-instant {
  transition: none;
}

.section {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
}

.js .section {
  flex: none;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  width: calc(100vw - var(--frame-size) * 2);
}

.divider-line {
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 1px;
  z-index: 3;
  background: rgba(240,239,232,.1);
}

.js .divider-line {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-smooth);
}

.js .section.in-view .divider-line {
  transform: scaleX(1);
}


/* ── Shared section typography (about + contact) ─────────────────────────── */

.section-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px var(--gutter) 100px;
}

.section-headline {
  margin-bottom: 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 9vw, 134px);
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--off-white);
}

.word-wrap {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
}

.word-space {
  display: inline-block;
  width: .26em;
}

.h-char {
  display: inline-block;
}

.js .h-char {
  transform: translateY(115%);
  transition: transform 1.3s var(--ease-smooth);
  transition-delay: min(calc(var(--char-index, 0) * 38ms), 850ms);
}

.js .section.in-view .h-char {
  transform: translateY(0);
}

.section-body {
  max-width: 480px;
  font-size: clamp(12px, 1.1vw, 15px);
  line-height: 1.85;
  color: rgba(240,239,232,.7);
}

.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--off-white);
}

.cta-line {
  width: 32px;
  height: 1px;
  background: var(--accent);
  transition: width .5s var(--ease-expo);
}

.section-cta:is(:hover, :focus-visible) .cta-line {
  width: 56px;
}


/* ── Reveal-on-enter for text blocks ─────────────────────────────────────── */

.js .section-body,
.js .section-cta,
.js .about-right,
.js .contact-list,
.js .hero-copy {
  opacity: 0;
  transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out);
}

.js .section-body {
  transform: translateY(12px);
  transition-delay: .72s;
}

.js .section-cta {
  transform: translateY(10px);
  transition-duration: 1s;
  transition-delay: .9s;
}

.js .about-right {
  transform: translateY(12px);
  transition-delay: .7s;
}

.js .contact-list {
  transform: translateY(12px);
  transition-delay: .65s;
}

.js .hero-copy {
  transform: translateY(8px);
  transition-duration: .9s;
  transition-delay: .3s;
}

.js .section.in-view :is(
  .section-body,
  .section-cta,
  .about-right,
  .contact-list,
  .hero-copy
) {
  opacity: 1;
  transform: translateY(0);
}


/* ── Section 1: hero ─────────────────────────────────────────────────────── */

.section--hero {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.js .section--hero {
  width: 100vw;
  margin-left: calc(var(--frame-size) * -1);
  overflow: visible;
}

.hero-poster {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding-bottom: 80px;
}

.hero-heading {
  line-height: 0;
}

.hero-wordmark {
 display: block;
  width: 100%;
  height: auto;
  ;
}

.hero-wordmark text {
  fill: var(--wordmark);
  font-family: var(--display);
  font-size: 476px;
  font-weight: 750;
}

.hero-copy {
  width: 100%;
  padding: 0 var(--gutter);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.08vw, 57px);
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--off-white);
}


/* ── Section 2: work grid ────────────────────────────────────────────────── */

.work {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

.work-main {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding:
    calc(var(--frame-size) + clamp(14px, 1.6vw, 24px))
    clamp(18px, 2.5vw, 40px)
    calc(var(--frame-size) + clamp(22px, 4vw, 64px));
}

.work-header {
  flex: 0 0 auto;
  margin-bottom: clamp(8px, 1vw, 18px);
}

.work-title {
  max-width: 100%;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--off-white);
}

.work-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(5px, .55vw, 9px);
  align-content: end;
  align-items: end;
  padding-bottom: clamp(3px, .5vw, 8px);
}


/* ── Section 3: about ────────────────────────────────────────────────────── */

.section--about .section-inner {
  padding: 40px 44px 100px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;

  align-items: start;

  gap: 72px;
}


/* LEFT COLUMN */

.about-grid > div:first-child {
  align-self: start;
}

.about-headline {
  margin-bottom: 20px;

  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
}

.about-body {
  max-width: 560px;

  font-size: clamp(14px, 1.4vw, 20px);
}

.about-cta {
  font-size: 13px;
  letter-spacing: .18em;
}


/* RIGHT COLUMN */

.about-right {
  align-self: start;

  display: flex;
  flex-direction: column;
}

.about-portrait-wrap,
.about-facts {
  width: 80%;

  margin-left: auto;
}


/* PORTRAIT */

.about-portrait-wrap {
  margin-bottom: 20px;

  overflow: visible;
}

.about-portrait {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 48vh;

  margin-left: auto;

  object-fit: contain;
  object-position: top right;

  filter:
    brightness(.82)
    saturate(.88)
    contrast(1.05);
}


/* FACTS */

.about-facts {
  display: flex;
  flex-direction: column;
}

.about-fact {
  display: flex;

  justify-content: space-between;
  align-items: baseline;

  gap: 16px;

  padding: 11px 0;

  border-top:
    1px solid
    rgba(240, 239, 232, .1);
}

.about-fact:last-child {
  border-bottom:
    1px solid
    rgba(240, 239, 232, .1);
}

.fact-label {
  font-size: clamp(11px, .9vw, 13px);

  letter-spacing: .04em;
  text-transform: uppercase;

  color: rgba(240, 239, 232, .65);

  white-space: nowrap;

  font-weight: 400;
}

.fact-value {
  font-size: clamp(11px, .9vw, 13px);

  font-weight: 400;

  text-align: right;

  color: var(--off-white);
}


/* ── Section 4: contact ──────────────────────────────────────────────────── */

.section--contact .section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 72px;
}

.contact-headline {
  font-size: clamp(34px, 3vw, 50px);
  line-height: .95;
}

.contact-body {
  max-width: 560px;
  font-size: clamp(14px, 1.4vw, 20px);
}

.contact-list {
  list-style: none;
}

.contact-list li {
  border-top: 1px solid rgba(240,239,232,.12);
}

.contact-list li:last-child {
  border-bottom: 1px solid rgba(240,239,232,.12);
}

.contact-list a {
  display: block;
  padding: 13px 0;
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(240,239,232,.5);
  transition: color .3s ease, padding-left .3s ease;
}

.contact-list a:is(:hover, :focus-visible) {
  color: var(--off-white);
  padding-left: 6px;
}

.contact-list a:active {
  opacity: .8;
}


/* ── Nav timeline (bottom centre) ────────────────────────────────────────── */

.site-nav {
  position: fixed;
  z-index: 200;
  left: var(--frame-size);
  right: var(--frame-size);
  bottom: var(--frame-size);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  pointer-events: none;
}

.js .site-nav {
  animation: nav-in .9s var(--ease-expo) .1s both;
}

.nav-timeline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  width: 60vw;
  pointer-events: auto;
}

.js .nav-timeline {
  animation: fade-in .8s ease .4s both;
}

.tl-item {
  flex-shrink: 0;
  display: block;
  padding: 2px 8px;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
  transition: background .5s var(--ease-smooth), transform .2s ease;
}

.tl-item:hover {
  transform: scale(1.08);
}

.tl-item:active {
  transform: scale(.96);
}

.tl-label {
  display: block;
  height: 1.2em;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(240,239,232,.4);
  transition: color .5s var(--ease-smooth);
}

.tl-char {
  position: relative;
  display: inline-block;
  transition: transform .45s var(--ease-expo);
  transition-delay: calc(var(--char-index, 0) * 30ms);
}

.tl-char::after {
  content: attr(data-char);
  position: absolute;
  left: 0;
  top: 100%;
}

.tl-item:not(.is-active):is(:hover, :focus-visible) .tl-char {
  transform: translateY(-100%);
}

.tl-item.is-visited:not(.is-active) .tl-label {
  color: rgba(240,239,232,.55);
}

.tl-item:not(.is-active):is(:hover, :focus-visible) .tl-label {
  color: var(--off-white);
}

.tl-item.is-active {
  background: var(--accent);
}

.tl-item.is-active .tl-label {
  color: var(--near-black);
}

.tl-item:focus-visible {
  outline-offset: 1px;
}

.tl-segment {
  position: relative;
  flex: 1;
  height: 1px;
  margin: 0 4px;
  overflow: hidden;
  background: rgba(240,239,232,.12);
}

.tl-segment::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ease-expo) var(--seg-delay, 0ms);
}

.tl-segment.is-filled::after {
  transform: scaleX(1);
}

.tl-segment.is-draining::after {
  transform: scaleX(0);
  transform-origin: right;
}

.nav-timeline.is-instant .tl-segment::after {
  transition: none;
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ── Corner links ────────────────────────────────────────────────────────── */

.corner {
  position: fixed;
  bottom: var(--frame-size);
  z-index: 200;
  height: 44px;
  display: flex;
  align-items: center;
  pointer-events: none;
  --corner-pad: var(--gutter);
}

.corner--left {
  left: var(--frame-size);
}

.corner--right {
  right: var(--frame-size);
}

.corner-link {
  pointer-events: auto;
  padding-inline: var(--corner-pad);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .05em;
  text-decoration: none;
  color: rgba(240,239,232,.4);
  transition: color .4s ease;
}

.corner-link:is(:hover, :focus-visible) {
  color: var(--off-white);
}


/* ── "View" cursor over the work grid ───────────────────────────────────── */

.view-cursor {
  position: fixed;
  z-index: 9000;
  display: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--off-white);
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  transition:
    transform .35s var(--ease-expo),
    width .35s var(--ease-expo),
    height .35s var(--ease-expo);
}

.view-cursor span {
  font-family: var(--display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--near-black);
}

@media (pointer: fine) {
  .js .view-cursor {
    display: flex;
  }
}

.view-cursor.is-active {
  transform: translate(-50%, -50%) scale(1);
}

.view-cursor.is-big {
  width: 72px;
  height: 72px;
}

/* ── Responsive: width ───────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .work-grid { gap: 5px; }
}

/* ── Mobile: native vertical homepage ────────────────────────────────────── */
@media (max-width: 768px) {
  .js,
  .js body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .js .viewport {
    position: relative;
    inset: auto;
    overflow: visible;
  }

  .js .track {
    display: block;
    width: 100%;
    height: auto;
    transform: none !important;
    transition: none;
    will-change: auto;
  }

  .section,
  .js .section {
    width: 100%;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .js .section--hero {
    width: 100%;
    margin-left: 0;
    overflow: hidden;
  }

  .hero-poster {
    min-height: 100svh;
    padding: 20px 0 104px;
  }

  .hero-copy {
    margin-top: auto;
    padding: 0 20px;
    font-size: clamp(28px, 8.5vw, 42px);
    line-height: 1.08;
  }

  .work { overflow: visible; }

  .work-main {
    height: auto;
    overflow: visible;
    padding: 72px 20px 112px;
  }

  .work-header { margin-bottom: 20px; }
  .work-title { font-size: clamp(28px, 8vw, 40px); }

  .work-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    gap: 12px;
    overflow: visible;
    padding-bottom: 0;
  }

  .work-card { min-height: 0; }

  .section-inner,
  .section--about .section-inner,
  .section--contact .section-inner {
    padding: 72px 20px 112px;
  }

  .section-headline,
  .about-headline,
  .contact-headline {
    font-size: clamp(42px, 13vw, 68px);
    line-height: .94;
  }

  .section-body,
  .about-body,
  .contact-body {
    max-width: none;
    font-size: 16px;
    line-height: 1.65;
  }

  .about-grid,
  .section--contact .section-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-portrait-wrap,
  .about-facts {
    width: 100%;
    margin-left: 0;
  }

  .about-portrait {
    width: 100%;
    max-height: none;
    margin-left: 0;
    object-position: top center;
  }

  .about-fact { padding: 14px 0; }
  .fact-label, .fact-value { font-size: 11px; }
  .contact-list a { padding: 16px 0; font-size: 12px; }
  .divider-line { left: 20px; right: 20px; }

  .site-nav {
    left: var(--frame-size);
    right: var(--frame-size);
    bottom: var(--frame-size);
    padding: 14px 10px;
  }

  .nav-timeline {
    left: 10px;
    right: 10px;
    width: auto;
    transform: none;
  }

  .tl-item { padding: 3px 5px; }
  .tl-label { font-size: 9px; letter-spacing: .08em; }
  .tl-segment { margin: 0 2px; }
  .corner { display: none; }
  .view-cursor { display: none !important; }

  .js .h-char,
  .js .section-body,
  .js .section-cta,
  .js .about-right,
  .js .contact-list,
  .js .hero-copy {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .hero-copy { font-size: clamp(25px, 8vw, 34px); }
  .section-headline,
  .about-headline,
  .contact-headline { font-size: clamp(38px, 12vw, 54px); }
}
