/* Clutch website
   Layout: full-bleed photographic bands (night, alpenglow) alternate with ivory
   editorial bands on a 12-column grid. One typeface, Archivo, used at two widths:
   expanded caps for identity and labels, normal width for statements and text.
   The 12-degree shear of the mark is the only graphic motif. */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin-var.woff2") format("woff2-variations"),
       url("assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* colour */
  --obsidian: #101010;
  --ivory: #f5f3ee;
  --stone: #d7d3cb;
  --graphite: #66625c;          /* text-safe graphite: 5.5:1 on ivory */
  --graphite-line: #77736d;     /* brief's graphite, for rules and marks only */
  --sand: #b49a7a;              /* on obsidian only */
  --ivory-soft: rgb(245 243 238 / 0.66);
  --ivory-faint: rgb(245 243 238 / 0.14);

  /* type */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --step-label: 0.75rem;
  --step-body: clamp(1.0625rem, 0.98rem + 0.3vw, 1.25rem);
  --step-statement: clamp(2rem, 1.2rem + 3.4vw, 4.5rem);
  --step-hero: clamp(2.6rem, 1.3rem + 5.6vw, 7.25rem);

  /* space */
  --gutter: clamp(20px, 5vw, 88px);
  --band: clamp(96px, 14vw, 220px);
  --max: 1520px;
  --shear: -12deg;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--ivory);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
picture { display: block; }
h1, h2, p, ol { margin: 0; }
ol { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: max(var(--gutter), env(safe-area-inset-left, 0px));
  top: 12px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ivory);
  color: var(--obsidian);
  font-size: 0.875rem;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- shared type ---------- */

.label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--step-label);
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--graphite);
}
.label--dark { color: var(--ivory-soft); }

/* one stroke of the mark: 3.75 x 1, sheared 12 degrees */
.stroke {
  flex: none;
  width: 30px;
  height: 8px;
  background: currentColor;
  transform: skewX(var(--shear));
}

.statement {
  font-size: var(--step-statement);
  font-weight: 300;
  font-stretch: 100%;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
  max-width: 17ch;
}

/* ---------- masthead ---------- */

.masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding-top: env(safe-area-inset-top, 0px);
}
.masthead__inner {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  padding-block: clamp(20px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.masthead__brand { color: var(--ivory); display: block; }
.masthead__brand svg { height: clamp(18px, 1.6vw, 24px); width: auto; }
.masthead__nav { display: flex; gap: clamp(20px, 3vw, 48px); }
.masthead__nav a {
  font-size: var(--step-label);
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory-soft);
  padding-block: 8px;
  transition: color 0.3s ease;
}
.masthead__nav a:hover { color: var(--ivory); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: max(600px, 100svh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--obsidian);
}
.hero__media { position: absolute; inset: 0; }
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 57% 62%;
  animation: settle 3.2s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.hero::after {
  /* deepen only the foreground the type sits on */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgb(16 16 16 / 0.85), rgb(16 16 16 / 0));
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  padding-bottom: clamp(40px, 7vw, 96px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 28px;
  align-items: end;
}
.hero__title {
  grid-column: 1 / span 9;
  font-size: var(--step-hero);
  font-weight: 300;
  line-height: 0.98;
  letter-spacing: -0.035em;
  animation: rise 1.6s 0.25s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.hero__line { display: block; }
/* "Collective strength" is set heavier than "Independent ventures" */
.hero__line--strong { font-weight: 500; }
.hero__lede {
  grid-column: 10 / span 3;
  max-width: 30ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ivory-soft);
  padding-bottom: 0.6em;
  animation: rise 1.6s 0.45s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { transform: translateY(18px); } to { transform: none; } }

/* ---------- philosophy ---------- */

.philosophy {
  background: var(--ivory);
  color: var(--obsidian);
  padding-block: var(--band) calc(var(--band) * 0.6);
}
.philosophy__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 40px;
}
.philosophy__grid > .label { grid-column: 1 / span 3; align-self: start; padding-top: 0.9em; }
.philosophy__body { grid-column: 4 / span 9; min-width: 0; }
.philosophy__text {
  margin-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px clamp(24px, 4vw, 64px);
  max-width: 62rem;
  color: var(--graphite);
}
.plate {
  margin-top: calc(var(--band) * 0.7);
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background: var(--stone);
}
.plate img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }

/* ---------- the name (weave) ---------- */

.name {
  background: var(--obsidian);
  padding-top: var(--band);
}
.name__intro { display: grid; gap: 36px; }
.statement--dark { color: var(--ivory); max-width: 20ch; }

.weave { position: relative; }
.weave__stage { padding-block: clamp(56px, 8vw, 120px) var(--band); }
.weave__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 48px;
  align-items: center;
}
.weave__mark {
  grid-column: 1 / span 6;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 1;
  justify-self: center;
  overflow: visible;
}
.weave__strokes rect { fill: var(--ivory); }
.weave__steps {
  grid-column: 8 / span 5;
  display: grid;
  gap: clamp(28px, 4vh, 48px);
  min-width: 0;
}
.weave__step { display: grid; gap: 10px; transition: opacity 0.6s ease; }
.weave__word {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: var(--step-label);
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--sand);
}
.weave__word::before {
  content: "";
  width: 30px;
  height: 8px;
  background: currentColor;
  transform: skewX(var(--shear));
  transition: transform 0.6s ease, width 0.6s ease;
}
.weave__line {
  font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-wrap: pretty;
}

/* Scroll-driven version, enabled by main.js when motion is welcome */
.weave.is-live { height: 380vh; }
.weave.is-live .weave__stage {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 0;
}
.weave.is-live .weave__step { opacity: 0.5; }   /* ~5:1 on obsidian */
.weave.is-live .weave__step.is-active { opacity: 1; }
.weave.is-live .weave__step:not(.is-active) .weave__word::before { width: 14px; }

/* ---------- close ---------- */
/* First light on the towers, which doubles as the footer. */

.close {
  position: relative;
  min-height: max(600px, 100svh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--obsidian);
}
.close__media { position: absolute; inset: 0; }
.close__media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; }
.close::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(to top, rgb(16 16 16 / 0.92) 18%, rgb(16 16 16 / 0));
}
.close__inner {
  position: relative;
  z-index: 1;
  display: grid;
  row-gap: clamp(56px, 8vw, 120px);
  padding-bottom: calc(clamp(40px, 5vw, 64px) + env(safe-area-inset-bottom, 0px));
}
.close__title {
  font-size: var(--step-statement);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 16ch;
  text-wrap: balance;
}
.close__sign {
  padding-top: 24px;
  border-top: 1px solid var(--ivory-faint);
  font-size: var(--step-label);
  font-weight: 500;
  font-stretch: 125%;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ivory-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .hero__title { grid-column: 1 / -1; }
  .hero__lede { grid-column: 1 / span 7; }
  .weave__mark { grid-column: 1 / span 5; }
  .weave__steps { grid-column: 7 / span 6; }
}

@media (max-width: 760px) {
  .masthead__nav { gap: 20px; }
  .masthead__nav a { letter-spacing: 0.16em; }
  .hero__media img { object-position: 62% 60%; }
  .hero__lede { grid-column: 1 / -1; }
  .philosophy__grid > .label,
  .philosophy__body { grid-column: 1 / -1; }
  .philosophy__grid > .label { padding-top: 0; }
  .philosophy__text { grid-template-columns: 1fr; }
  .plate { aspect-ratio: 4 / 3; }

  .weave__grid { row-gap: 28px; }
  .weave__mark { grid-column: 1 / -1; max-width: min(64vw, 40svh); }
  .weave__steps { grid-column: 1 / -1; gap: 18px; }
  .weave__line { font-size: 1.0625rem; }
  .weave.is-live .weave__stage { align-items: flex-start; padding-top: 9svh; }
  .weave.is-live .weave__grid { row-gap: 5svh; }

  .close__media img { object-position: 24% 40%; }
}

@media (max-width: 420px) {
  .masthead__brand svg { height: 16px; }
  .masthead__nav a { font-size: 0.6875rem; letter-spacing: 0.12em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
