/* ═══════════════════════════════════════════════════════════
   NORTH & KEY — atelier for architecture & interiors
   Mineral register: graphite / fog / steel. Grotesk-led
   monumental type. Film + photography full-bleed.
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink: #141719;            /* graphite */
  --char: #1a1e21;           /* cold charcoal surface */
  --fog: #e6e9e9;            /* cool bone */
  --fog-dim: #9fabb0;        /* zinc */
  --accent: #7f9aa8;         /* oxidised steel */
  --line-fog: rgba(230, 233, 233, 0.14);
  --line-ink: rgba(20, 23, 25, 0.16);

  --display: "Syne", "Futura", sans-serif;
  --sans: "Instrument Sans", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;

  --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: initial; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink);
  color: var(--fog);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--ink); }

.mono {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* italics don't exist in Syne — emphasis is tonal */
em { font-style: normal; color: var(--accent); }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.sec-index {
  color: var(--accent);
  margin-right: 1.25rem;
}
.sec-index::after {
  content: "";
  display: inline-block;
  width: 3rem;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 1.25rem;
  opacity: 0.6;
}

/* ═══════════════ GRAIN ═══════════════ */

.grain {
  position: fixed;
  inset: -100px;
  z-index: 120;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-38px, 22px); }
  50% { transform: translate(24px, -30px); }
  75% { transform: translate(-16px, -12px); }
  100% { transform: translate(0, 0); }
}

/* ═══════════════ CURSOR ═══════════════ */

.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 150;
  pointer-events: none;
  mix-blend-mode: difference;
}
.cursor__dot {
  position: absolute;
  top: -4px; left: -4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fog);
  transition: transform 0.45s var(--ease-out), opacity 0.3s;
}
.cursor__label {
  position: absolute;
  top: 14px; left: 14px;
  color: var(--fog);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.cursor.is-view .cursor__dot { transform: scale(5.5); }
.cursor.is-view .cursor__label { opacity: 1; transform: translateY(0); }
.cursor.is-hidden .cursor__dot { transform: scale(0); }
@media (hover: none) { .cursor { display: none; } }

/* ═══════════════ NAV ═══════════════ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.75rem clamp(1.5rem, 4vw, 4rem);
  mix-blend-mode: difference;
  transition: transform 0.8s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}
.nav__brand-amp { color: var(--accent); }
.nav__links { display: flex; gap: 2.5rem; }
.nav__link {
  position: relative;
  padding: 0.25rem 0;
  overflow: hidden;
  display: inline-block;
}
.nav__link::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 100%;
  color: var(--accent);
}
.nav__link { transition: transform 0.5s var(--ease-out); }
.nav__link:hover { transform: translateY(-100%); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--line-fog);
  border-radius: 99px;
  transition: border-color 0.5s var(--ease-out);
}
.nav__cta:hover { border-color: var(--accent); }
.nav__cta-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__cta-text { display: none; }
  .nav__cta { padding: 0.8rem; }
}

/* ═══════════════ HERO — pinned film scrub ═══════════════ */

.hero { position: relative; }
.hero__pin {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero__media { position: absolute; inset: 0; }
.hero__poster,
.hero__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06) brightness(0.94);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(20, 23, 25, 0.85) 0%, rgba(20, 23, 25, 0.18) 40%, rgba(20, 23, 25, 0.32) 100%),
    linear-gradient(to right, rgba(20, 23, 25, 0.45) 0%, rgba(20, 23, 25, 0) 55%);
}

.hero__type {
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  right: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(2.5rem, 6vh, 5rem);
  z-index: 2;
}
.hero__eyebrow {
  color: var(--fog-dim);
  margin-bottom: clamp(1.25rem, 2.5vh, 2rem);
}
.hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, min(7.2vw, 12vh), 7.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  max-width: 14ch;
}
.hero__foot-note {
  max-width: 36ch;
  color: var(--fog-dim);
  font-size: 0.95rem;
  margin-top: clamp(1.5rem, 3vh, 2.5rem);
}

.hero__meter {
  position: absolute;
  right: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(2.5rem, 6vh, 5rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
  text-align: right;
}
.hero__meter-caption { color: var(--accent); white-space: nowrap; }
.hero__meter-track {
  width: 9rem;
  height: 1px;
  background: var(--line-fog);
}
.hero__meter-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.hero__meter-count { color: var(--fog-dim); }
@media (max-width: 860px) {
  .hero__meter { display: none; }
  .hero__title { max-width: none; }
}

/* ═══════════════ INTERLUDE — pinned statement ═══════════════ */

.interlude { position: relative; }
.interlude__pin {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
}
.interlude__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.6) contrast(1.05) brightness(0.85);
  transform: scale(1.12);
  will-change: transform;
}
.interlude__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 25, 0.68);
}
.interlude__text {
  position: relative;
  z-index: 1;
  max-width: 34ch;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.3rem);
  line-height: 1.45;
  text-align: center;
  color: var(--fog);
}
.interlude__text .st-line { opacity: 0.15; }

/* ═══════════════ WORKS — pinned horizontal gallery ═══════════════ */

.works { position: relative; }
.works__pin {
  position: relative;
  overflow: hidden;
}
.works__track { display: block; }

.wpanel {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.wpanel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.06) brightness(0.94);
  transform: scale(1.08);
  will-change: transform;
}
.wpanel__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20, 23, 25, 0.85) 0%, rgba(20, 23, 25, 0.1) 45%, rgba(20, 23, 25, 0.25) 100%);
}

.wpanel--title {
  background: var(--ink);
  align-items: center;
}
.wpanel__titlebox { padding: 0 clamp(1.5rem, 5vw, 6rem); }
.works__eyebrow { color: var(--fog-dim); margin-bottom: 2rem; }
.works__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 7rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.works__note { color: var(--fog-dim); margin-top: 2rem; }

.wpanel__info {
  position: relative;
  z-index: 1;
  padding: 0 clamp(1.5rem, 4vw, 4rem) clamp(2.5rem, 7vh, 5rem);
  max-width: 44rem;
}
.wpanel--right { justify-content: flex-end; }
.wpanel--right .wpanel__info { text-align: right; }
.wpanel--right .work__fact { margin-left: auto; }

.work__index { color: var(--accent); margin-bottom: 1.25rem; }
.work__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  line-height: 1.04;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.work__name em { color: var(--fog-dim); }
.work__fact {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  max-width: 38ch;
  color: var(--fog);
  border-top: 1px solid var(--line-fog);
  padding-top: 1.25rem;
  margin-bottom: 1rem;
}
.work__fact-figure {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45em;
  line-height: 1;
  color: var(--accent);
}
.work__fact-unit {
  font-family: var(--mono);
  font-size: 0.75em;
  color: var(--accent);
  margin-right: 0.35em;
}
.work__meta { color: var(--fog-dim); }

.works__progress {
  position: absolute;
  left: clamp(1.5rem, 4vw, 4rem);
  right: clamp(1.5rem, 4vw, 4rem);
  bottom: 1.4rem;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 1.25rem;
}
.works__progress-label { color: var(--fog-dim); }
.works__progress-track {
  flex: 1;
  height: 1px;
  background: var(--line-fog);
}
.works__progress-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* horizontal mode — applied by JS on desktop with motion allowed */
.works--h .works__track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
}
.works--h .wpanel {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  flex: none;
}
.works--h .works__progress { display: flex; }

/* ═══════════════ METHOD ═══════════════ */

.method {
  position: relative;
  background: var(--fog);
  color: var(--ink);
}
.method__pin {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(4rem, 10vh, 7rem) clamp(1.5rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(3rem, 7vh, 5.5rem);
}
.method__eyebrow { color: rgba(20, 23, 25, 0.55); margin-bottom: 2rem; }
.method__eyebrow .sec-index { color: #5c7a8a; }
.method__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 5.2rem);
  line-height: 1.02;
  text-transform: uppercase;
}
.method__title em { color: #5c7a8a; }

.method__progress {
  height: 1px;
  background: var(--line-ink);
  margin-bottom: clamp(2.5rem, 5vh, 4rem);
}
.method__progress-fill {
  display: block;
  height: 100%;
  background: #5c7a8a;
  transform-origin: left;
  transform: scaleX(0);
}
.method__steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}
.method__step { position: relative; }
.method__num {
  display: block;
  color: #5c7a8a;
  margin-bottom: 1.25rem;
}
.method__step-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.1vw, 1.9rem);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.method__step-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(20, 23, 25, 0.75);
}
@media (max-width: 980px) {
  .method__steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .method__steps { grid-template-columns: 1fr; }
  .method__pin { min-height: 0; }
}

/* ═══════════════ PRACTICE — over the drawing board ═══════════════ */

.practice {
  position: relative;
  overflow: hidden;
  padding: clamp(10rem, 20vh, 16rem) clamp(1.5rem, 4vw, 4rem);
}
.practice__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5) contrast(1.05) brightness(0.8);
  transform: scale(1.1);
  will-change: transform;
}
.practice__scrim {
  position: absolute;
  inset: 0;
  background: rgba(20, 23, 25, 0.88);
}
.practice__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: clamp(2rem, 5vw, 6rem);
}
.practice__label { color: var(--fog-dim); padding-top: 0.9rem; }
.practice__statement {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  line-height: 1.45;
  max-width: 34ch;
}
.practice__statement .st-line { opacity: 0.15; }
.practice__facts {
  display: flex;
  gap: clamp(2.5rem, 6vw, 6rem);
  margin-top: clamp(3.5rem, 7vh, 5.5rem);
  border-top: 1px solid var(--line-fog);
  padding-top: 2.5rem;
}
.practice__fact { display: flex; flex-direction: column; gap: 0.6rem; }
.practice__fact-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  line-height: 1;
  color: var(--accent);
}
.practice__fact-label { color: var(--fog-dim); }
@media (max-width: 860px) {
  .practice__grid { grid-template-columns: 1fr; }
}

/* ═══════════════ CTA / CONTACT — over the dusk house ═══════════════ */

.contact {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line-fog);
  padding: clamp(9rem, 18vh, 15rem) clamp(1.5rem, 4vw, 4rem) 0;
}
.contact__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.65) contrast(1.05) brightness(0.85);
  transform: scale(1.08);
  will-change: transform;
}
.contact__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(20, 23, 25, 0.8) 0%, rgba(20, 23, 25, 0.62) 55%, rgba(20, 23, 25, 0.92) 100%);
}
.contact__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact__eyebrow { color: var(--fog-dim); margin-bottom: 3rem; justify-content: center; display: flex; }
.contact__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 9rem);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.contact__title-line { display: block; overflow: hidden; }
.contact__note {
  max-width: 44ch;
  color: var(--fog-dim);
  margin: 3rem 0 4rem;
}
.contact__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.6rem 2.6rem;
  border: 1px solid var(--line-fog);
  border-radius: 99px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  transition: border-color 0.6s var(--ease-out), color 0.6s var(--ease-out);
}
.contact__btn-fill {
  position: absolute;
  inset: 0;
  background: var(--fog);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.7s var(--ease-out);
}
.contact__btn:hover { color: var(--ink); border-color: var(--fog); }
.contact__btn:hover .contact__btn-fill { transform: translateY(0); }
.contact__btn-text, .contact__btn-ring { position: relative; z-index: 1; }
.contact__btn-ring {
  width: 2.4rem; height: 2.4rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s var(--ease-out);
}
.contact__btn-ring svg { width: 1rem; height: 1rem; }
.contact__btn:hover .contact__btn-ring { transform: translate(2px, -2px); }

/* ═══════════════ FOOTER ═══════════════ */

.footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(7rem, 14vh, 12rem);
  border-top: 1px solid var(--line-fog);
  padding: 3rem 0 3.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.footer__brand {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.footer__brand span { color: var(--accent); }
.footer__cols { display: flex; gap: clamp(2rem, 6vw, 6rem); flex-wrap: wrap; }
.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: var(--fog-dim);
}

/* ═══════════════ REDUCED MOTION — freeze on poster ═══════════════ */

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .hero__film { display: none; }              /* poster underlay remains */
  .wpanel__img, .interlude__bg, .practice__bg, .contact__bg { transform: none; }
  .interlude__text .st-line, .practice__statement .st-line { opacity: 1; }
}
