/* ==========================================================================
   NORTHLINE PROJECTS — base: tokens, fonts, reset, type, utilities
   ========================================================================== */

@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlowcond-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlowcond-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../assets/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* Colour: warm white, concrete greys, charcoal, a restrained rust */
  --warm: #f4f1ea;
  --paper: #ebe7df;
  --concrete: #dcd9d2;
  --concrete-2: #c6c3bb;
  --concrete-dk: #8d8a83;
  --char: #1b1c1e;
  --char-2: #26282b;
  --char-3: #33363a;
  --ink-2: #4c4e52;
  --mute: #74767a;
  --rust: #b5532b;
  --rust-dk: #96411f;
  --rust-lt: #e0916a;
  --line: rgba(27, 28, 30, 0.16);
  --line-strong: rgba(27, 28, 30, 0.4);
  --line-inv: rgba(244, 241, 234, 0.24);

  --font-display: "Barlow Condensed", "Arial Narrow", Arial, sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 4.4vw, 72px);
  --maxw: 1480px;
  --section-y: clamp(84px, 11vw, 176px);
  --header-h: 80px;

  --ease: cubic-bezier(0.22, 0.7, 0.14, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--warm);
}

body {
  margin: 0;
  background: var(--warm);
  color: var(--char);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

.js body {
  animation: page-in 0.8s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
  }
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

address {
  font-style: normal;
}

::selection {
  background: var(--rust);
  color: var(--warm);
}

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

.on-dark :focus-visible,
.hero :focus-visible,
.site-header:not(.is-scrolled) :focus-visible {
  outline-color: var(--rust-lt);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 500;
  padding: 0.85em 1.3em;
  background: var(--char);
  color: var(--warm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.on-dark {
  background: var(--char);
  color: var(--warm);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(3rem, 7.2vw, 6.6rem);
}

.display .rust,
.rust {
  color: var(--rust);
}

.on-dark .display .rust,
.hero .display .rust,
.on-dark .rust {
  color: var(--rust-lt);
}

/* Section label, like a drawing-sheet reference */
.label {
  display: flex;
  align-items: center;
  gap: 1.1em;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-2);
  line-height: 1;
}

.label b {
  font-weight: 600;
  color: var(--rust);
}

.label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}

.on-dark .label {
  color: rgba(244, 241, 234, 0.7);
}

.on-dark .label b {
  color: var(--rust-lt);
}

.on-dark .label::after {
  background: var(--line-inv);
}

.lede {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--char);
  max-width: 30em;
}

.on-dark .lede {
  color: var(--warm);
}

.body-text {
  color: var(--ink-2);
  max-width: 34em;
}

.on-dark .body-text {
  color: rgba(244, 241, 234, 0.74);
}

/* Registration mark: small crosshair used as an architectural accent */
.reg {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.reg::before,
.reg::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.reg::before {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.reg::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
}

/* --------------------------------------------------------------------------
   Reveals (only when JS is running)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Photography: a level, architectural wipe from the top */
.js [data-reveal="img"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 calc(100% - 2px) 0); /* a 2px sliver keeps IntersectionObserver aware of the element */
  transition: clip-path 1.3s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="img"] img {
  transform: scale(1.08);
  transition: transform 1.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="img"].is-in {
  clip-path: inset(0 0 0 0);
}

.js [data-reveal="img"].is-in img {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js body {
    animation: none;
  }

  .js [data-reveal],
  .js [data-reveal="img"],
  .js [data-reveal="img"] img {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}
