/* Third Source. Layout: the Instagram ground, off-white type, and the three bars as the one bold element.
   Everything else stays quiet: one family, two greys, hairlines only where a list needs them. */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #0e0e0e;   /* the ground, same as the Instagram grid */
  --white: #f2f1ec;   /* the bars and the headlines, warm off-white */
  --ash: #8d8c86;     /* running text */
  --smoke: #5d5c58;   /* footnotes and dates */
  --line: #262624;    /* hairlines */
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 34rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap { max-width: 76rem; margin-inline: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgba(242, 241, 236, 0.4);
}
a:hover { text-decoration-color: var(--white); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 5;
  background: var(--white); color: var(--black);
  padding: 8px 14px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* The mark: three bars in the proportions of the profile picture. */
.mark { display: block; width: auto; fill: var(--white); }
.mark rect { transform-box: fill-box; transform-origin: 50% 100%; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand .mark { height: 15px; }
.wordmark { font-size: 0.8125rem; font-weight: 650; letter-spacing: 0.3em; text-transform: uppercase; line-height: 1; }
.top nav a { font-size: 0.9375rem; color: var(--ash); text-decoration: none; }
.top nav a:hover { color: var(--white); }
.top .long { display: none; }

/* Hero */
.hero { display: grid; gap: 36px; padding-block: 48px 104px; }
.hero .mark { height: 76px; }
h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.75rem, 1.2rem + 6.6vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.038em;
  text-wrap: balance;
  max-width: 12.5ch;
}
.lead {
  margin: 0;
  color: var(--ash);
  font-size: clamp(1.0625rem, 0.96rem + 0.45vw, 1.25rem);
  line-height: 1.55;
  max-width: var(--measure);
}
.cta { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 22px; }
.cta .primary {
  font-weight: 650; font-size: 1.125rem;
  text-decoration-color: var(--white); text-decoration-thickness: 2px; text-underline-offset: 0.3em;
}
.cta .alt { color: var(--ash); font-size: 0.9375rem; }

/* Sections */
.section { border-top: 1px solid var(--line); padding-block: clamp(64px, 9vw, 136px); }
.head { display: grid; gap: 18px; margin-bottom: clamp(44px, 5.5vw, 72px); }
h2 {
  margin: 0;
  font-weight: 760;
  font-size: clamp(1.875rem, 1.15rem + 2.9vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 17ch;
}
.head p { margin: 0; color: var(--ash); max-width: var(--measure); }
.last .head { margin-bottom: 0; }

/* How we work: three principles, each under one bar of the mark. */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.principles li { display: grid; grid-template-columns: 6px minmax(0, 1fr); column-gap: 22px; }
.principles .bar { grid-row: span 2; width: 6px; height: 46px; background: var(--white); }
.principles h3 { margin: 0 0 8px; font-size: 1.3125rem; font-weight: 680; letter-spacing: -0.014em; line-height: 1.2; }
.principles p { margin: 0; color: var(--ash); max-width: 30ch; }

/* What we run: three rows. */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; gap: 8px; padding-block: 28px; border-bottom: 1px solid var(--line); }
.rows h3 { margin: 0; font-size: clamp(1.25rem, 1.02rem + 0.9vw, 1.75rem); font-weight: 680; letter-spacing: -0.02em; line-height: 1.15; }
.rows p { margin: 0; color: var(--ash); max-width: 34rem; }

/* Contact */
.contact .label { margin: 0 0 18px; color: var(--ash); font-size: 1.0625rem; font-weight: 400; line-height: 1.6; letter-spacing: normal; max-width: none; }
.email {
  display: inline-block;
  font-weight: 760;
  font-size: clamp(1.3rem, 0.42rem + 4.1vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  text-decoration-color: var(--white);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.contact .note { margin: 22px 0 0; color: var(--ash); }

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  padding-block: 36px 52px;
  color: var(--smoke); font-size: 0.875rem;
}
.foot .brand { gap: 12px; }
.foot .brand .mark { height: 13px; }
.foot nav { display: flex; gap: 26px; }
.foot nav a { color: var(--ash); text-decoration: none; }
.foot nav a:hover { color: var(--white); }

/* Policy pages and the 404 */
.doc { padding-block: 40px 112px; max-width: 42rem; }
.doc h1 { font-size: clamp(2.5rem, 1.6rem + 3.8vw, 4.25rem); max-width: none; }
.doc .updated { margin: 18px 0 44px; color: var(--smoke); font-size: 0.9375rem; }
.doc h2 { margin: 40px 0 10px; font-size: 1.25rem; font-weight: 680; letter-spacing: -0.012em; line-height: 1.3; max-width: none; }
.doc p { margin: 0 0 14px; color: var(--ash); }
.doc p a { color: var(--white); }

@media (min-width: 760px) {
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(32px, 5vw, 80px); }
  .principles li { grid-template-columns: minmax(0, 1fr); row-gap: 26px; }
  .principles .bar { grid-row: auto; width: 7px; height: 68px; }
  .rows li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: baseline; padding-block: 38px; }
  .top .long { display: inline; }
  .top .short { display: none; }
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title mark" "lead mark" "cta mark";
    column-gap: 72px; row-gap: 36px;
    align-items: end;
    padding-block: 104px 152px;
  }
  .hero h1 { grid-area: title; }
  .hero .lead { grid-area: lead; }
  .hero .cta { grid-area: cta; }
  .hero .mark { grid-area: mark; height: clamp(200px, 18vw, 260px); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .mark rect { animation: rise 900ms cubic-bezier(0.2, 0.8, 0.1, 1) both; }
  .hero .mark rect:nth-child(2) { animation-delay: 140ms; }
  .hero .mark rect:nth-child(3) { animation-delay: 280ms; }
}
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
