/* ==========================================================================
   FACTORY 360 — onepager
   Design grid: 1920px artboard. 1 design px = var(--u).
   ========================================================================== */

@font-face {
  font-family: "Helvetica Now Display";
  src: url("../fonts/hnd-extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --soft: #ecf1f4;      /* Soft white — headings, logo */
  --white: #fff;        /* body copy */
  --grey: #d6dbde;      /* Wet grey */
  --u: calc(100vw / 1920);
  --font: "Helvetica Now Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --k: 1;
  --fs-title: calc(116.88 * var(--k) * var(--u));
  --fs-body: calc(32.56 * var(--u));
  --fs-label: calc(32.56 * var(--k) * var(--u));
  --fs-nav: calc(16 * var(--k) * var(--u));
  --fs-micro: calc(14 * var(--k) * var(--u));
  --lh-body: calc(32.56 * var(--u));
  --pad: calc(20 * var(--u));
  --gap: calc(20 * var(--u));
  --nav-h: calc(64 * var(--u));
  --sticky-top: calc(96 * var(--u));
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.87, 0, 0.13, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--black);
  color: var(--white);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-weight: 800;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 800; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--soft); color: var(--black); }

:focus-visible { outline: 2px solid var(--soft); outline-offset: 4px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--soft); color: var(--black);
  padding: 10px 14px; font-size: 14px; line-height: 1;
  transition: top .3s var(--ease-out);
}
.skip:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Split-text helpers (filled by JS)
   -------------------------------------------------------------------------- */
.w, .ch { display: inline-block; vertical-align: top; overflow: hidden; }
.wd { display: inline-block; white-space: nowrap; vertical-align: top; }
.w { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.ch { padding-bottom: 0.08em; margin-bottom: -0.08em; }
.wi, .chi { display: inline-block; will-change: transform; }
.js .reveal-chars .chi { transform: translate3d(0, 110%, 0); }
.js .reveal-fade { opacity: 0; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 var(--pad);
  pointer-events: none;
  mix-blend-mode: difference;
  color: var(--white);
  transition: transform .7s var(--ease-out);
}
.nav > * { pointer-events: auto; }
.nav.is-hidden { transform: translate3d(0, -130%, 0); }
.nav:focus-within { transform: none; }

.nav-logo {
  display: flex;
  align-items: center;
  gap: calc(7.7 * var(--u));
  margin-top: calc(18.6 * var(--u));
  color: var(--soft);
}
.nav-mark { display: block; width: calc(25.4 * var(--u)); height: calc(25.4 * var(--u)); flex: none; will-change: transform; }
.nav-wm { display: block; width: calc(104 * var(--u)); flex: none; line-height: 0; }
.nav-wm .wm { display: block; width: 100%; height: auto; }

.nav-links {
  display: flex;
  gap: calc(66 * var(--u));
  margin-top: calc(24.4 * var(--u));
  font-size: var(--fs-nav);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.nav-links a { position: relative; display: block; overflow: hidden; }
.nav-links a span { display: block; transition: transform .6s var(--ease-out); }
.nav-links a span::after {
  content: attr(data-t);
  position: absolute; left: 0; top: 100%;
}
.nav-links a:hover span,
.nav-links a:focus-visible span { transform: translateY(-100%); }

.js .nav { opacity: 0; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  background: var(--black);
  isolation: isolate;
  touch-action: pan-y;
}
.hero-stage { position: absolute; inset: 0; }

.hero-bg {
  position: absolute;
  inset: 0;
  visibility: hidden;
  clip-path: polygon(50% 50%, 50% 50%, 50% 50%);
  overflow: hidden;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: 50% 46%;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.06) 40%, rgba(0,0,0,.28) 100%);
}

.ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 1000px;
  height: 1000px;
  transform-origin: 50% 50%;
  pointer-events: none;
}
.spin { position: absolute; inset: 0; transform-origin: 50% 50%; }
.seg {
  position: absolute;
  left: 357.75px;
  top: 0;
  width: 284.5px;
  height: 137.5px;
  transform-origin: 142.25px 500px;
}
.ring-img .seg { overflow: hidden; background: #0b0b0b; }
.ring-img .seg img { width: 100%; height: 100%; object-fit: cover; }
.ring-mark .seg i {
  position: absolute;
  inset: 0;
  background: var(--soft);
  transform-origin: 0% 50%;
}

.tl {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  color: var(--soft);
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: var(--tl-fs, 28px);
  line-height: 1.06;
  letter-spacing: -0.01em;
}
.tl .ln { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.tl .ln > span { display: inline-block; will-change: transform; }

.js .hero-stage { visibility: hidden; }

.hero-index {
  position: absolute;
  left: 50%;
  bottom: calc(28 * var(--u));
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}
.hero-index button {
  position: relative;
  width: 34px;
  height: 22px;
}
.hero-index button::before,
.hero-index button i {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  margin-top: -1px;
  background: rgba(236, 241, 244, .28);
}
.hero-index button i {
  background: var(--soft);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.hero-scroll {
  position: absolute;
  right: var(--pad);
  bottom: calc(28 * var(--u));
  font-size: var(--fs-micro);
  line-height: 22px;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--soft);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-scroll i {
  display: block;
  width: 1px;
  height: 22px;
  background: rgba(236,241,244,.3);
  position: relative;
  overflow: hidden;
}
.hero-scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--soft);
  animation: scrollhint 2.2s var(--ease-io) infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}
.js .hero-index, .js .hero-scroll { opacity: 0; }

/* --------------------------------------------------------------------------
   Sections & grid
   -------------------------------------------------------------------------- */
.wrap { padding: 0 var(--pad); }
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
}

.title {
  font-size: var(--fs-title);
  line-height: calc(116.88 * 0.85 * var(--u));
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--soft);
  white-space: nowrap;
}
.title sup {
  display: inline-block;
  font-size: calc(38.96 * var(--k) * var(--u));
  line-height: 1;
  letter-spacing: -0.02em;
  vertical-align: top;
  position: relative;
  top: calc(1 * var(--u));
  margin-left: calc(4 * var(--u));
}
.title sup .ch { padding-bottom: 0.12em; margin-bottom: -0.12em; }
.sticky { position: sticky; top: var(--sticky-top); transition: top .7s var(--ease-out); }
html.nav-off { --sticky-top: calc(24 * var(--u)); }
.m-br { display: none; }

.label {
  font-size: var(--fs-label);
  line-height: calc(32.56 * 0.85 * var(--u));
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--soft);
}
.copy p + p { margin-top: var(--lh-body); }
.copy .br { display: block; }

.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 930 / 523;
  background: #0a0a0a;
}
.media-inner { position: absolute; left: 0; right: 0; top: -9%; bottom: -9%; }
.media img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
.js .media { clip-path: inset(100% 0 0 0); }

/* About ----------------------------------------------------------------- */
.about { padding-top: calc(234 * var(--u)); }
.about .title-cell { min-height: 100%; }
.about .copy { color: var(--white); }

/* Services -------------------------------------------------------------- */
.services { padding-top: calc(245 * var(--u)); }
.services-head { padding-bottom: calc(294 * var(--u)); }
.service { padding-bottom: calc(240 * var(--u)); }
.service .title-cell { position: relative; }
.service .content { padding-top: calc(43 * var(--u)); }
.service .label { min-height: calc(56 * var(--u)); }
.service .media { margin-top: calc(60 * var(--u)); }
.service .copy { margin-top: calc(61 * var(--u)); }
.service--left .title-cell { order: 1; }
.service--left .content { order: 2; }
.service--right .title-cell { order: 2; }
.service--right .content { order: 1; }

/* Work ------------------------------------------------------------------ */
.work { padding-top: calc(18 * var(--u)); overflow-x: clip; }
main, .footer { overflow-x: clip; }
.work-inner { position: relative; }
.work-head { padding: 0 var(--pad); }
.carousel {
  position: relative;
  margin-top: calc(108 * var(--u));
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.carousel.is-drag { cursor: grabbing; }
.track { display: flex; gap: calc(28 * var(--u)); width: max-content; will-change: transform; }
.slide {
  position: relative;
  flex: none;
  height: calc(688 * var(--u));
  overflow: hidden;
  background: #0a0a0a;
}
.slide img {
  height: 100%;
  width: auto;
  pointer-events: none;
  transition: transform 1.4s var(--ease-out);
  transform: scale(1.001);
}
.slide:hover img { transform: scale(1.045); }
.js .carousel { opacity: 0; }

/* Contact --------------------------------------------------------------- */
.contact { padding-top: calc(381 * var(--u)); }
.contact .info { padding-top: calc(177 * var(--u)); }
.contact .info a { position: relative; display: inline-block; }
.contact .info a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: calc(-3 * var(--u));
  height: max(1px, calc(3 * var(--u)));
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .8s var(--ease-out);
}
.contact .info a:hover::after,
.contact .info a:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
.contact .label { line-height: calc(32.56 * 0.85 * var(--u)); }
.contact .ci { display: block; }
.contact .ci + .ci { margin-top: calc(16 * var(--u)); }

/* Footer ---------------------------------------------------------------- */
.footer { padding: calc(526 * var(--u)) var(--pad) calc(11 * var(--u)); overflow: hidden; }
.footer-wm { color: var(--soft); }
.footer-wm .wm { width: 100%; height: auto; overflow: hidden; }
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: calc(65 * var(--u));
  font-size: var(--fs-micro);
  line-height: 1;
  letter-spacing: 0;
}
.footer-bar a { text-transform: uppercase; letter-spacing: .01em; }
.js .footer-wm { visibility: hidden; }

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  :root {
    --u: 1px;
    --fs-title: min(calc((var(--cw, 100vw) - 32px) * 0.132), 80px);
    --fs-body: 18px;
    --lh-body: 20px;
    --fs-nav: 11px;
    --fs-micro: 11px;
    --pad: 16px;
    --gap: 16px;
    --nav-h: 56px;
    --sticky-top: 60px;
  }
  .nav { align-items: center; }
  .nav-logo { margin-top: 0; gap: 5px; }
  .nav-mark { width: 20px; height: 20px; }
  .nav-wm { width: 72px; }
  .nav-links { margin-top: 0; gap: 12px; }

  .grid2 { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .title { line-height: 0.88; letter-spacing: -0.02em; font-size: var(--fs-title); white-space: normal; }
  .title sup { font-size: 0.34em; top: 0.02em; }
  .m-br { display: inline; }
  .label { font-size: 17px; line-height: 16px; }
  .sticky { position: relative; top: auto; }
  html.nav-off { --sticky-top: 0px; }
  .title-cell .sticky {
    position: sticky;
    top: var(--sticky-top);
    z-index: 2;
    padding: 6px 0 10px;
    background: linear-gradient(180deg, #000 70%, rgba(0,0,0,0));
  }

  .about { padding-top: 96px; }
  .about .copy { margin-top: 28px; }
  .services { padding-top: 120px; }
  .services-head { padding-bottom: 56px; }
  .service { padding-bottom: 96px; }
  .service .content { padding-top: 22px; }
  .service .label { min-height: 0; }
  .service .media { margin-top: 18px; }
  .service .copy { margin-top: 20px; }
  .service--right .title-cell, .service--left .title-cell { order: 1; }
  .service--right .content, .service--left .content { order: 2; }

  .work { padding-top: 24px; }
  .carousel { margin-top: 28px; }
  .track { gap: 10px; }
  .slide { height: 58vw; }

  .contact { padding-top: 140px; }
  .contact .info { padding-top: 26px; }
  .contact .label { font-size: 20px; line-height: 20px; }
  .contact .ci + .ci { margin-top: 8px; }

  .footer { padding-top: 140px; padding-bottom: 14px; }
  .footer-bar { margin-top: 22px; }

  .hero-index { bottom: 22px; }
  .hero-scroll { display: none; }
}

@media (max-width: 374px) {
  .nav-wm { width: 62px; }
  .nav-links { gap: 9px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll i::after { animation: none; }
}
