/* Throughly website. Typography does the work; hard black and off-white contrast.
   One typeface, text in black, white and grey only; colour comes from photographs. */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* Palette */
  --ink: #0f0f0e;
  --paper: #f2f0eb;
  --white: #f7f6f2;
  --muted-on-ink: #8e8a83;
  --soft-on-ink: #b5b1a9;
  --text-on-ink: #d9d5cd;
  --muted-on-paper: #66625c;
  --rule-on-ink: #2e2d2a;
  --rule-on-paper: #d5d1c8;
  --line-at-rest: #5a5752;
  --photo-dark: #2b2a27;
  --photo-light: #dad6cd;
  --photo-label-light: #5f5b55;
  --error-on-ink: #f2a58e;

  /* Type */
  --font: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --step-display: clamp(3.25rem, 1.6rem + 7.2vw, 8rem);
  --step-h2: clamp(2.75rem, 1.7rem + 4.6vw, 5.5rem);
  --step-h2-sm: clamp(2.5rem, 1.7rem + 3.4vw, 4.5rem);
  --step-lead: clamp(1.375rem, 1.05rem + 1.45vw, 2.25rem);
  --step-statement: clamp(1.75rem, 1.15rem + 2.6vw, 3.5rem);
  --step-quote-lg: clamp(2rem, 1.25rem + 3.4vw, 4.5rem);
  --step-quote: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --step-list: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
  --step-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --step-sub: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
  --step-close: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  --step-sign: clamp(2.5rem, 1.5rem + 4.4vw, 4.5rem);

  /* Space */
  --gutter: clamp(20px, 5.6vw, 80px);
  --section-y: clamp(72px, 7.8vw, 112px);
  --max: 1280px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

h1,
h2,
h3,
p,
figure,
blockquote,
ul {
  margin: 0;
}

h1,
h2 {
  text-wrap: balance;
}

p,
blockquote {
  text-wrap: pretty;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: 12px 16px;
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

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

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

/* Shared text styles */

/* Labels: short phrases that end in full stops. */
.eyebrow {
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.h2 {
  font-size: var(--step-h2);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.h2--sm {
  font-size: var(--step-h2-sm);
}

.sub {
  font-size: var(--step-sub);
  line-height: 1.4;
}

.link-arrow {
  display: inline-flex;
  gap: 0.4em;
  align-items: baseline;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow:hover {
  opacity: 0.75;
}

/* Sections */

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

.section--ink {
  background: var(--ink);
  color: var(--white);
}

.section--paper {
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
}

.section--ink .eyebrow,
.section--ink .sub {
  color: var(--muted-on-ink);
}

.section--paper .eyebrow,
.section--paper .sub {
  color: var(--muted-on-paper);
}

.section-head {
  display: grid;
  gap: 24px;
  margin-bottom: clamp(48px, 5vw, 72px);
}

/* Header */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.site-header.is-solid {
  background: var(--ink);
  border-bottom-color: var(--rule-on-ink);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.wordmark {
  display: block;
  text-decoration: none;
}

/* The logo: the lowercase "throughly." wordmark (brand/logo), drawn in the text colour. */
.logo {
  display: block;
  width: auto;
  height: clamp(22px, 1.1rem + 0.6vw, 30px);
  aspect-ratio: 8848 / 1980;
}

.site-header .link-arrow {
  font-size: clamp(0.875rem, 0.8rem + 0.2vw, 1rem);
}

/* Photos (placeholders until the shoot) */

.photo {
  position: relative;
  overflow: hidden;
  background: var(--photo-light);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo__label {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--photo-label-light);
}

/* Opening */

.hero {
  /* How far the shade behind the statement fades out above it. */
  --hero-fade: clamp(120px, 16vw, 240px);

  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, 60vw, 860px);
  padding-block: 144px clamp(48px, 6vw, 88px);
  background: var(--photo-dark);
  overflow: hidden;
}

.hero__photo,
.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__photo {
  z-index: -2;
}

.hero__photo img {
  object-fit: cover;
  object-position: 50% 30%;
}

/* The photo is busy, so words only sit on shade (ink, part transparent):
   a band along the top for the header, and a fall of shade behind the statement
   that follows it however the lines wrap. */
.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 72%, transparent), color-mix(in srgb, var(--ink) 60%, transparent) 52px, transparent 120px);
}

.hero__inner {
  position: relative;
  display: grid;
  gap: clamp(18px, 2vw, 28px);
}

.hero__inner::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--hero-fade)) calc(50% - 50vw) -100px;
  background: linear-gradient(to top, color-mix(in srgb, var(--ink) 82%, transparent), color-mix(in srgb, var(--ink) 68%, transparent) calc(100% - var(--hero-fade)), transparent);
}

/* On wide screens the statement takes the left side, so the shade eases off to the right. */
@media (min-width: 1000px) {
  .hero__inner::before {
    -webkit-mask-image: linear-gradient(to right, #000 60%, transparent 95%);
    mask-image: linear-gradient(to right, #000 60%, transparent 95%);
  }
}

.hero .eyebrow {
  color: #cfcac1;
}

.display {
  max-width: 14ch;
  font-size: var(--step-display);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

/* Introduction: the first words after the opening, set as one big statement */

.intro__text {
  display: grid;
  gap: clamp(20px, 2.4vw, 36px);
  max-width: 1120px;
}

.lead {
  font-size: var(--step-statement);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.lead--muted {
  color: var(--muted-on-paper);
}

.intro__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: clamp(48px, 6vw, 88px);
  padding-top: 28px;
  border-top: 1px solid var(--rule-on-paper);
}

.intro__foot .link-arrow {
  font-size: 1.125rem;
}

/* Where you might be: the six quotes set large, one at a time, then the wall of faces */

.quotes {
  display: grid;
  gap: clamp(56px, 7vw, 112px);
  margin: clamp(16px, 2vw, 24px) 0 0;
  padding: 0;
  list-style: none;
}

.quotes blockquote {
  max-width: 20ch;
  font-size: var(--step-quote-lg);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

/* On wide screens the quotes step from side to side, so each reads on its own. */
@media (min-width: 900px) {
  .quotes li:nth-child(even) {
    justify-self: end;
  }
}

.friction__photo {
  display: block;
  height: clamp(340px, 52vw, 760px);
  margin-block: clamp(80px, 10vw, 144px);
  overflow: hidden;
  background: var(--photo-dark);
}

.friction__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.closer {
  max-width: 1100px;
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--muted-on-ink);
}

.closer strong {
  font-weight: 800;
  color: var(--white);
}

/* What changes: the line runs through the four steps */

.changes {
  overflow-x: clip;
}

.steps {
  position: relative;
  display: grid;
  gap: 40px;
  padding: 0 0 0 36px;
  list-style: none;
}

.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
}

.steps::before {
  background: var(--rule-on-paper);
}

.steps::after {
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.steps.is-drawn::after {
  transform: none;
}

.step {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
}

.step::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--rule-on-paper);
  transition: background-color 0.4s ease var(--delay, 0s);
}

.steps.is-drawn .step::before {
  background: var(--ink);
}

.step:nth-child(2) {
  --delay: 0.45s;
}

.step:nth-child(3) {
  --delay: 0.9s;
}

.step:nth-child(4) {
  --delay: 1.35s;
}

.step__n {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-on-paper);
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-size: var(--step-h3);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--muted-on-paper);
}

.changes__closer {
  margin-top: clamp(48px, 5vw, 72px);
  font-size: var(--step-quote);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

@media (min-width: 1100px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px;
    padding: 40px 0 0;
  }

  .steps::before,
  .steps::after {
    top: 7px;
    bottom: auto;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    width: auto;
    height: 2px;
  }

  .steps::after {
    transform: scaleX(0);
    transform-origin: left;
  }

  .step::before {
    left: 0;
    top: -40px;
  }
}

/* Two photos side by side, edge to edge, split by a hairline. */

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: var(--paper);
}

.pair picture {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--photo-light);
}

.pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .pair picture {
    aspect-ratio: 1;
  }
}

/* How we help */

.help {
  display: grid;
  gap: clamp(48px, 5vw, 72px);
}

.help__intro {
  display: grid;
  gap: 28px;
  align-content: start;
}

.help__intro p {
  color: var(--muted-on-paper);
}

.help__intro .help__turn {
  font-weight: 700;
  color: var(--ink);
}

.help__list {
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule-on-paper);
}

.help__item {
  display: grid;
  gap: 8px;
  padding-block: 26px;
  border-top: 1px solid var(--rule-on-paper);
}

.help__title {
  font-size: var(--step-list);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.help__desc {
  font-size: 1.0625rem;
  color: var(--muted-on-paper);
}

.help__closer {
  max-width: 1100px;
  font-size: var(--step-close);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

@media (min-width: 1000px) {
  .help {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(48px, 8vw, 128px);
  }

  .help__closer {
    grid-column: 1 / -1;
  }
}

/* Working with us: the words on one side, the reflection on the other */

.work__photo {
  display: block;
  aspect-ratio: 4 / 5;
  margin: 0 calc(-1 * var(--gutter)) clamp(40px, 5vw, 64px);
  overflow: hidden;
  background: var(--photo-dark);
}

.work__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work__text {
  display: grid;
  gap: 24px;
  max-width: 40em;
  color: var(--text-on-ink);
}

/* The three principles as a thin list, like the one in How we help. */
.principles {
  margin-top: clamp(48px, 5vw, 64px);
  padding: 0;
  border-bottom: 1px solid var(--rule-on-ink);
  list-style: none;
}

.principles li {
  display: grid;
  gap: 8px;
  padding-block: 24px;
  border-top: 1px solid var(--rule-on-ink);
}

.principles h3 {
  font-size: var(--step-list);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.principles p {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--soft-on-ink);
}

@media (min-width: 1000px) {
  .work__grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
      "head photo"
      "text photo"
      "list photo";
    grid-template-rows: auto auto 1fr;
    column-gap: clamp(48px, 7vw, 112px);
    align-items: start;
  }

  .work__grid .section-head {
    grid-area: head;
  }

  .work__text {
    grid-area: text;
  }

  .principles {
    grid-area: list;
  }

  /* The photo stays in view while the words beside it scroll. */
  .work__photo {
    grid-area: photo;
    position: sticky;
    top: 104px;
    margin: 0;
  }
}

/* Who we are */

.people {
  display: grid;
  gap: 56px;
}

.person {
  display: grid;
  gap: 24px;
  align-content: start;
  max-width: 520px;
}

.person .photo {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 100%;
}

.person h3 {
  font-size: clamp(1.75rem, 1.5rem + 0.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.person p {
  margin-top: 10px;
  color: var(--muted-on-paper);
}

@media (min-width: 768px) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(24px, 6vw, 96px);
  }
}

/* Get in touch */

.contact {
  display: grid;
  gap: 56px;
}

.contact__intro {
  display: grid;
  gap: 28px;
  align-content: start;
}

.contact__intro p:not(.eyebrow) {
  font-size: var(--step-sub);
  line-height: 1.45;
  color: var(--soft-on-ink);
}

.contact__intro .contact__start {
  font-weight: 700;
  color: var(--white);
}

.form {
  display: grid;
  gap: 28px;
  align-content: start;
}

.field {
  display: grid;
  gap: 10px;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-on-ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-at-rest);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 1.125rem;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--white);
  box-shadow: 0 1px 0 0 var(--white);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.button {
  justify-self: start;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: #ffffff;
}

.button:focus-visible {
  outline-color: var(--white);
}

.button[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form__status {
  min-height: 1.5em;
  font-size: 1rem;
  color: var(--white);
}

.form__status.is-error {
  color: var(--error-on-ink);
}

.signoff {
  margin-top: clamp(80px, 9vw, 128px);
  font-size: var(--step-sign);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

/* Break the sign-off only between its three sentences. */
.signoff span {
  white-space: nowrap;
}

@media (min-width: 1000px) {
  .contact {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    column-gap: clamp(48px, 8vw, 144px);
  }
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--muted-on-ink);
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-on-ink);
  font-size: 0.875rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted-on-ink);
}

.site-footer a:hover {
  color: var(--white);
}

/* Simple pages: privacy, thanks, not found */

.page {
  padding-block: 160px var(--section-y);
}

.page__body {
  display: grid;
  gap: 24px;
  max-width: 68ch;
  margin-top: 40px;
  color: var(--text-on-ink);
}

.page__body h2 {
  margin-top: 16px;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
}

.page__body ul {
  display: grid;
  gap: 8px;
  padding-left: 1.2em;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
