/* GRPL design system: iron and ember. Web build, version 2.0.
   Four colours, three type voices, one octagon. Rationed on purpose. */

:root {
  --grpl-ink: #141414;
  --grpl-bone: #F2EFE9;
  --grpl-steel: #8C8C86;
  --grpl-ember: #C93400;
  --max: 1200px;
  --gutter: clamp(24px, 3vw, 32px);
  --ease: cubic-bezier(.22, .61, .2, 1);
}

/* Type voices */
@font-face {
  font-family: 'Termina';
  src: url('../fonts/Termina-Demi.woff2') format('woff2'),
       url('../fonts/Termina-Demi.woff') format('woff');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Termina';
  src: url('../fonts/Termina-Medium.woff2') format('woff2'),
       url('../fonts/Termina-Medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo-Variable.woff2') format('woff2-variations'),
       url('../fonts/Archivo-Variable.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-stretch: 62.5% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Regular.woff2') format('woff2'),
       url('../fonts/IBMPlexMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2'),
       url('../fonts/IBMPlexMono-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--grpl-ink);
  background: var(--grpl-bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
::selection { background: var(--grpl-ink); color: var(--grpl-bone); }
.s-ink ::selection { background: var(--grpl-bone); color: var(--grpl-ink); }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
section { position: relative; }
.s-ink { background: var(--grpl-ink); color: var(--grpl-bone); }
.s-bone { background: var(--grpl-bone); color: var(--grpl-ink); }

/* Voices */
.termina {
  font-family: 'Termina', 'Archivo', sans-serif;
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: 0;
}
.mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}
.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grpl-steel);
}
.kicker.ember { color: var(--grpl-ember); }

h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.01em; line-height: 1.12; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: clamp(22px, 2.4vw, 26px); font-weight: 600; line-height: 1.3; }
.lede { font-size: clamp(18px, 1.8vw, 21px); line-height: 1.55; max-width: 34em; }
.steel { color: var(--grpl-steel); }
.measure { max-width: 38em; }
p + p { margin-top: 1em; }

/* The single ember rule: one per artefact */
.ember-rule { width: 64px; height: 2px; background: var(--grpl-ember); border: 0; }
.hairline { border: 0; border-top: 1px solid rgba(140, 140, 134, .35); }
.s-ink .hairline { border-top-color: rgba(242, 239, 233, .14); }

/* Header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: var(--grpl-ink); color: var(--grpl-bone);
  border-bottom: 1px solid rgba(242, 239, 233, 0);
  transition: border-color .3s var(--ease);
}
.top.scrolled { border-bottom-color: rgba(242, 239, 233, .12); }
.top-bar { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top-logo img { height: 26px; width: auto; }
.top-nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.top-nav a {
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--grpl-bone);
  padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.top-nav a:hover { border-bottom-color: var(--grpl-steel); }
.top-nav a[aria-current="page"] { border-bottom-color: var(--grpl-bone); }

.btn {
  display: inline-block;
  font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 600;
  color: var(--grpl-bone); background: transparent;
  border: 1px solid var(--grpl-bone);
  padding: 12px 26px; text-decoration: none; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { background: var(--grpl-bone); color: var(--grpl-ink); }
.btn.on-bone { color: var(--grpl-ink); border-color: var(--grpl-ink); }
.btn.on-bone:hover { background: var(--grpl-ink); color: var(--grpl-bone); }
.btn.big { padding: 16px 34px; font-size: 16px; }

.nav-toggle { display: none; }

/* Hero */
.hero {
  min-height: 92vh; display: flex; align-items: center;
  padding-top: 120px; padding-bottom: 72px; overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }
.hero .termina {
  font-size: clamp(30px, 5.2vw, 68px);
  margin: 26px 0 30px; max-width: 15em;
}
.hero .sub { color: var(--grpl-steel); font-size: clamp(17px, 1.7vw, 20px); max-width: 33em; margin-bottom: 44px; }
.hero-oct {
  position: absolute; z-index: 1; pointer-events: none;
  top: -18vh; right: -16vw; width: clamp(420px, 52vw, 880px); height: auto;
  opacity: .16;
}
.hero-oct path { stroke-width: 1.1; }
.hero-cue {
  position: absolute; left: var(--gutter); bottom: 28px; z-index: 2;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--grpl-steel);
}

/* Page hero (inner pages) */
.page-hero { padding: 176px 0 84px; }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 18em; margin-top: 22px; }
.page-hero .lede { margin-top: 26px; }
.page-hero.hero-termina h1 { font-family: 'Termina', 'Archivo', sans-serif; font-weight: 600; line-height: 1.16; letter-spacing: 0; font-size: clamp(26px, 3.8vw, 48px); }

/* Sections */
.sect { padding: clamp(72px, 10vw, 128px) 0; }
.sect-head { display: flex; align-items: flex-start; gap: 28px; margin-bottom: clamp(36px, 5vw, 64px); }
.sect-head h2 { max-width: 18em; }
.sect-head .head-body { flex: 1; }
.sect-head .kicker { display: block; margin-bottom: 16px; }

/* Octagon section stamp */
.stamp { position: relative; width: 60px; height: 60px; flex: 0 0 60px; }
.stamp svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stamp span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: 'Termina', sans-serif; font-weight: 500; font-size: 20px; line-height: 1;
}

/* Octagon bullet */
.oct-li { display: flex; gap: 14px; align-items: baseline; }
.oct-li + .oct-li { margin-top: 14px; }
.oct-li .oct-b { flex: 0 0 9px; transform: translateY(-1px); }

/* Grids */
.grid { display: grid; gap: clamp(20px, 2.6vw, 32px); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* Enemy blocks */
.enemy { border-top: 1px solid rgba(20, 20, 20, .2); padding-top: 22px; }
.enemy h3 { font-weight: 800; font-size: 21px; margin-bottom: 10px; }
.enemy p { color: #4a4a46; font-size: 16px; }
.doctrine {
  font-weight: 800; letter-spacing: -.01em; line-height: 1.2;
  font-size: clamp(26px, 3.4vw, 40px); max-width: 20em;
}
.doctrine-block { margin-top: clamp(48px, 6vw, 84px); }
.doctrine-block .ember-rule { margin-bottom: 26px; }

/* Cards (moments, work, deliverables) */
.card {
  display: block; text-decoration: none;
  border: 1px solid rgba(20, 20, 20, .22);
  padding: clamp(24px, 2.6vw, 34px);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.card .mono-tag { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--grpl-steel); display: block; margin-bottom: 40px; }
.card h3 { font-weight: 800; font-size: clamp(19px, 1.8vw, 23px); margin-bottom: 12px; letter-spacing: -.01em; }
.card p { font-size: 15.5px; color: #4a4a46; }
.card .card-go { display: inline-block; margin-top: 26px; font-size: 14px; font-weight: 600; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.card:hover { background: var(--grpl-ink); color: var(--grpl-bone); border-color: var(--grpl-ink); }
.card:hover p { color: var(--grpl-steel); }
.card:hover .mono-tag { color: var(--grpl-ember); }
.s-ink .card { border-color: rgba(242, 239, 233, .22); }
.s-ink .card p { color: var(--grpl-steel); }
.s-ink .card:hover { background: var(--grpl-bone); color: var(--grpl-ink); border-color: var(--grpl-bone); }
.s-ink .card:hover p { color: #4a4a46; }

/* Method moves */
.move { border-top: 1px solid rgba(20, 20, 20, .2); padding-top: 24px; }
.s-ink .move { border-top-color: rgba(242, 239, 233, .16); }
.move .move-n { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .14em; color: var(--grpl-steel); display: block; margin-bottom: 16px; }
.move h3 { font-weight: 800; font-size: 21px; margin-bottom: 10px; }
.move p { font-size: 15.5px; color: #4a4a46; }
.s-ink .move p { color: var(--grpl-steel); }

/* Proof band */
.proof-band { padding: clamp(84px, 11vw, 140px) 0; }
.proof { text-decoration: none; display: block; }
.proof .n {
  font-weight: 800; letter-spacing: -.02em; line-height: 1;
  font-size: clamp(56px, 8.4vw, 118px);
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum';
  transition: font-variation-settings 0s;
}
.proof .n.ember { color: var(--grpl-ember); }
.proof .cap { display: block; margin-top: 16px; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--grpl-steel); }
.proof .cap b { color: var(--grpl-bone); font-weight: 500; }
.s-bone .proof .cap b { color: var(--grpl-ink); }

/* Quote */
.quote blockquote {
  font-weight: 600; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.4;
  letter-spacing: -.01em; max-width: 26em;
}
.quote cite { display: block; margin-top: 26px; font-style: normal; font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--grpl-steel); }

/* Sprint block / way in */
.way-in { padding: clamp(84px, 11vw, 140px) 0; }
.way-in.has-photo {
  background:
    linear-gradient(180deg, rgba(20, 20, 20, .86), rgba(20, 20, 20, .96) 70%),
    url('../img/worn-notepad.jpg') center / cover no-repeat;
  color: var(--grpl-bone);
}
.way-in .termina { font-size: clamp(24px, 3.4vw, 44px); margin: 22px 0 26px; }
.way-in .lede { margin-bottom: 40px; }
.quiet { margin-top: 28px; font-size: 15px; color: var(--grpl-steel); }
.quiet a { color: inherit; }

/* Figure */
.photo { position: relative; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.photo.ratio-wide { aspect-ratio: 21 / 9; }
.photo.ratio-std { aspect-ratio: 16 / 10; }
.photo.ratio-tall { aspect-ratio: 4 / 5; }
figcaption { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--grpl-steel); margin-top: 12px; }

/* Data block */
.data { border: 1px solid rgba(20, 20, 20, .22); }
.s-ink .data { border-color: rgba(242, 239, 233, .2); }
.data .row { display: flex; justify-content: space-between; gap: 18px; padding: 16px 20px; font-family: 'IBM Plex Mono', monospace; font-size: 14px; }
.data .row + .row { border-top: 1px solid rgba(20, 20, 20, .14); }
.s-ink .data .row + .row { border-top-color: rgba(242, 239, 233, .12); }
.data .row .k { color: var(--grpl-steel); }

/* Comparison rows */
.compare .row { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid rgba(20, 20, 20, .2); }
.compare .row .who { font-weight: 800; font-size: 17px; }
.compare .row p { color: #4a4a46; font-size: 16px; }

/* Week by week */
.week { border-top: 1px solid rgba(20, 20, 20, .2); padding: 26px 0; display: grid; grid-template-columns: 140px 1fr 1fr; gap: 24px; }
.week .wk { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .1em; color: var(--grpl-steel); text-transform: uppercase; }
.week h4 { font-size: 18px; margin-bottom: 8px; }
.week p { font-size: 15px; color: #4a4a46; }

/* Forms */
.call-embed { max-width: 500px; width: 100%; }
.call-embed iframe { display: block; width: 100%; height: 700px; border: 0; }
form.call { display: grid; gap: 14px; max-width: 420px; }
form.call input {
  font-family: 'Archivo', sans-serif; font-size: 16px;
  background: transparent; color: inherit;
  border: 1px solid rgba(242, 239, 233, .35);
  padding: 13px 16px; border-radius: 0; outline: none;
}
.s-bone form.call input { border-color: rgba(20, 20, 20, .35); }
form.call input:focus { border-color: currentColor; }
form.call ::placeholder { color: var(--grpl-steel); }

/* Case pages */
.case-n {
  font-weight: 800; letter-spacing: -.02em; line-height: 1;
  font-size: clamp(72px, 13vw, 180px);
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum';
}
.case-meta { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 30px; }
.case-meta div { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.case-meta .k { color: var(--grpl-steel); display: block; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }

/* Prose (essays, cases) */
.prose { max-width: 39em; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin: 1.8em 0 .6em; }
.prose h3 { font-size: 19px; margin: 1.4em 0 .5em; }
.prose p { margin: 0 0 1.1em; font-size: 17.5px; }
.prose ul { margin: 0 0 1.1em; padding-left: 1.2em; }
.prose li { margin: 0 0 .5em; font-size: 17.5px; }

/* Footer */
footer { background: var(--grpl-ink); color: var(--grpl-bone); padding: clamp(72px, 9vw, 110px) 0 40px; }
.foot-line { font-family: 'Termina', sans-serif; font-weight: 600; font-size: clamp(24px, 3.6vw, 44px); margin-bottom: clamp(48px, 6vw, 72px); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 40px; border-top: 1px solid rgba(242, 239, 233, .12); }
.foot-grid .flabel { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--grpl-steel); margin-bottom: 16px; }
.foot-grid a { display: block; text-decoration: none; font-size: 15px; color: var(--grpl-bone); margin-bottom: 10px; }
.foot-grid a:hover { color: var(--grpl-steel); }
.foot-mark { width: 64px; height: auto; margin-bottom: 22px; }
.foot-note { font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--grpl-steel); max-width: 34em; }
.foot-legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 56px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--grpl-steel); }
.foot-legal a { color: inherit; }

/* Reveal system. Hidden states apply only when the js flag is on the html element,
   so the site reads fully without JavaScript. */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }

/* Proof numerals settle from light to heavy, like weight coming on */
.js .n-settle { font-weight: 250; transition: font-weight 1.3s var(--ease) .15s; }
.js .n-settle.set { font-weight: 800; }

/* Octagon stroke draw */
.js .oct-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.9s var(--ease); }
.js .oct-draw.drawn path { stroke-dashoffset: 0; }
.js .oct-draw.drawn path:last-of-type { transition-delay: .25s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .js .oct-draw path { stroke-dashoffset: 0; transition: none; }
  .js .n-settle { font-weight: 800; transition: none; }
}

/* Responsive */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .week { grid-template-columns: 1fr; gap: 10px; }
  .compare .row { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 780px) {
  .g2, .g3 { grid-template-columns: 1fr; }
  .sect-head { flex-direction: column; gap: 18px; }
  .foot-grid { grid-template-columns: 1fr; }
  .top-nav {
    position: fixed; inset: 72px 0 auto 0; background: var(--grpl-ink);
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 10px var(--gutter) 28px;
    display: none; border-bottom: 1px solid rgba(242, 239, 233, .12);
  }
  .top-nav.open { display: flex; }
  .top-nav a { padding: 12px 0; font-size: 18px; }
  .top-nav .btn { margin-top: 14px; padding: 14px 28px; }
  .nav-toggle {
    display: block; background: none; border: 0; color: var(--grpl-bone);
    font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: .14em;
    text-transform: uppercase; cursor: pointer; padding: 8px 0;
  }
}
