/* educationrealty.app: one page, no script.
   The one drawn thing is the rope: three strands, one per app, twisted together beside the opening
   and turning off one at a time to each app. Everything else stays quiet around it. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2?v=a97804dc9fbe") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2?v=19f9c92546aa") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #eceff0;
  --ink: #161a23;
  --ink-soft: #485061;
  --rule: rgba(22, 26, 35, 0.18);
  /* One strand per app, taken from each app's own mark. */
  --code: #e5a50a;
  --note: #1f6a64;
  --cut: #2b61ff;
  /* The dark section. */
  --band: #161a23;
  --band-ink: #e9edf0;
  --band-soft: #a9b2c0;
  --band-rule: rgba(233, 237, 240, 0.22);

  --rope: 40px;     /* width the three strands take up */
  --gutter: 108px;  /* room kept for the rope to the left of the words */
  --strand: 4px;
  --knot: 14px;
  --app-pad: clamp(44px, 6vw, 84px);
  --edge: clamp(16px, 4vw, 56px); /* space between the page and the side of the window */

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Geist", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11141b;
    --ink: #e9edf0;
    --ink-soft: #a9b2c0;
    --rule: rgba(233, 237, 240, 0.2);
    --code: #f2b92e;
    --note: #3ba59b;
    --cut: #5b86ff;
    --band: #1b202c;
  }
}

@media (max-width: 760px) {
  :root {
    --rope: 26px;
    --gutter: 50px;
    --strand: 3px;
    --knot: 10px;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  /* Grows with the window, so the page is not a small column on a very wide screen. */
  font-size: clamp(1rem, 0.9rem + 0.3vw, 1.375rem);
  line-height: 1.55;
}

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

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.07em;
}
a:hover {
  text-decoration-thickness: 0.14em;
}
:focus-visible {
  outline: 3px solid var(--cut);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -200vw;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  z-index: 2;
}
.skip:focus {
  left: 8px;
}

.wrap {
  max-width: 1640px;
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* ---------- The opening, with the twisted rope beside it ---------- */

.lead {
  position: relative;
  padding-left: var(--gutter);
}

.rope {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--rope);
  /* One pixel past the bottom, so no hairline shows where the drawn rope hands over to the lines below. */
  height: calc(100% + 1px);
}
.rope path {
  fill: none;
  stroke-width: var(--strand);
  vector-effect: non-scaling-stroke;
}
.rope .case {
  stroke: var(--paper);
  stroke-width: calc(var(--strand) * 2.5);
}
.s-code {
  stroke: var(--code);
}
.s-note {
  stroke: var(--note);
}
.s-cut {
  stroke: var(--cut);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 32px;
  padding-block: 28px;
}
.brand {
  font-family: var(--display);
  font-size: 1.4em;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
}
.top nav a {
  text-decoration: none;
  font-weight: 500;
}
.top nav a:hover,
.top nav a[aria-current="page"] {
  text-decoration: underline;
}

.hero {
  padding-block: clamp(40px, 8vw, 120px) clamp(64px, 9vw, 136px);
}
h1 {
  max-width: 13ch;
  font-family: var(--display);
  font-size: clamp(2.5rem, 1.1rem + 6.2vw, 7.5rem);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  max-width: 58ch;
  margin-top: clamp(22px, 3vw, 40px);
  font-size: 1.2em;
  line-height: 1.5;
}

/* ---------- The three apps: each takes its strand off the rope ---------- */

.app {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
  padding-left: var(--gutter);
  padding-block: calc(var(--app-pad) + 1px) calc(var(--app-pad) * 1.15);
  /* Each app overlaps the one above by a pixel, so the strands run on without a hairline gap. */
  margin-top: -1px;
  /* The strands that carry on past this app, drawn as full-height lines. */
  background-repeat: no-repeat;
  background-size: var(--strand) 100%;
  --x-cut: calc(var(--rope) * 0.2);
  --x-note: calc(var(--rope) * 0.5);
  --x-code: calc(var(--rope) * 0.8);
  --half: calc(var(--strand) / 2);
  /* How far down the name sits; the strand turns in at this height. */
  --drop: calc(var(--app-pad) + 1px + 0.62em);
}
.app--code {
  --mine: var(--code);
  --x: var(--x-code);
  background-image: linear-gradient(var(--cut), var(--cut)), linear-gradient(var(--note), var(--note));
  background-position: calc(var(--x-cut) - var(--half)) 0, calc(var(--x-note) - var(--half)) 0;
}
.app--note {
  --mine: var(--note);
  --x: var(--x-note);
  background-image: linear-gradient(var(--cut), var(--cut));
  background-position: calc(var(--x-cut) - var(--half)) 0;
}
.app--cut {
  --mine: var(--cut);
  --x: var(--x-cut);
}

/* The app's own strand: down from the top, round the corner, across to the knot. */
.app::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--x) - var(--half));
  width: calc(var(--gutter) - var(--x) + var(--half) - var(--knot) - 12px);
  height: var(--drop);
  border-left: var(--strand) solid var(--mine);
  border-bottom: var(--strand) solid var(--mine);
  border-bottom-left-radius: 22px;
}
.app::after {
  content: "";
  position: absolute;
  top: calc(var(--drop) - var(--half) - var(--knot) / 2);
  left: calc(var(--gutter) - var(--knot) - 14px);
  width: var(--knot);
  height: var(--knot);
  border-radius: 50%;
  background: var(--mine);
}

.app h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.75rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.app__line {
  margin-top: 0.5em;
  font-size: 1.22em;
  font-weight: 550;
  line-height: 1.3;
  text-wrap: balance;
}
.app__words > p:not(.app__line) {
  max-width: 54ch;
  margin-top: 0.9em;
  color: var(--ink-soft);
}

.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 1.2em;
  max-width: 54ch;
  margin-top: 1.5em;
  font-size: 0.92em;
}
.facts dt,
.facts dd {
  padding-block: 0.6em;
  border-top: 1px solid var(--rule);
}
.facts dt {
  color: var(--ink-soft);
}

.go {
  display: inline-block;
  margin-top: 1.5em;
  padding: 0.72em 1.2em;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.go:hover {
  text-decoration: underline;
}
/* The same button on the dark section. */
.go--band {
  margin-top: 0;
  background: var(--band-ink);
  color: var(--band);
}

.app__shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 480px) {
  /* Keeps the three app names on one row on a phone. */
  .top nav {
    gap: 6px 16px;
    font-size: 0.94em;
  }
}

/* ---------- The dark section: how the work gets done, and who is behind it ---------- */

.band {
  background: var(--band);
  color: var(--band-ink);
  padding-block: clamp(56px, 8vw, 120px);
}
/* The words here start on the same line down the page as the words above. */
.band .wrap {
  padding-left: calc(var(--edge) + var(--gutter));
}
@media (max-width: 760px) {
  .band .wrap {
    padding-left: var(--edge);
  }
}
.band h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.25rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.band :focus-visible {
  outline-color: var(--code);
}

.ways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(28px, 4vw, 56px);
}
.way {
  padding-top: 1.2em;
  border-top: 1px solid var(--band-rule);
}
.way h3 {
  font-family: var(--display);
  font-size: 1.3em;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.way p {
  margin-block: 0.8em 1em;
  color: var(--band-soft);
}
.way a,
.founder a {
  font-weight: 500;
}

.founder {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(28px, 5vw, 88px);
  align-items: center;
  margin-top: clamp(56px, 8vw, 120px);
  padding-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--band-rule);
}
.founder__head {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
}
.founder__head img {
  flex: 0 0 auto;
  width: clamp(84px, 9vw, 136px);
  height: auto;
  aspect-ratio: 2 / 3; /* the photo's own shape, so none of it is cut off */
  object-fit: cover;
  border-radius: 10px;
}
.founder__words p {
  max-width: 60ch;
  margin-top: 1em;
  color: var(--band-soft);
}
.founder__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  margin-top: 1.4em;
  padding: 0;
  list-style: none;
}
.founder__quote blockquote p {
  font-family: var(--display);
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.founder__quote blockquote p::before {
  content: "\201C";
}
.founder__quote blockquote p::after {
  content: "\201D";
}
.founder__quote figcaption {
  margin-top: 1.1em;
  color: var(--band-soft);
  font-size: 0.92em;
}

@media (max-width: 900px) {
  .ways,
  .founder {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- The founder's page ---------- */

.page-person .band .wrap {
  padding-left: var(--edge);
}

.person {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(24px, 5vw, 80px);
  padding-block: clamp(28px, 6vw, 96px) clamp(44px, 7vw, 104px);
}
.portrait {
  flex: 0 0 clamp(160px, 24vw, 400px);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto; /* without this the picture keeps its full pixel height and is cropped to a strip */
  aspect-ratio: 2 / 3; /* the photo's own shape, so none of it is cut off */
  object-fit: cover;
  border-radius: 12px;
}
.person__words {
  flex: 1 1 420px;
  min-width: 0;
}
.person h1 {
  max-width: none;
  font-size: clamp(2.5rem, 1.3rem + 5vw, 6rem);
}
.person__words > p:not(.lede) {
  max-width: 64ch;
  margin-top: 1em;
  color: var(--ink-soft);
}
.person__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 1.6em;
  padding: 0;
  list-style: none;
  font-weight: 500;
}

.block {
  padding-block: clamp(44px, 6vw, 96px);
  border-top: 1px solid var(--rule);
}
.block h2 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.25rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.works {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px) clamp(32px, 6vw, 96px);
  margin-top: clamp(28px, 4vw, 56px);
}
.work h3 {
  font-family: var(--display);
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.work p {
  max-width: 62ch;
  margin-block: 0.7em 0.9em;
  color: var(--ink-soft);
}
.work a,
.writing a {
  font-weight: 550;
}

.method__quote {
  margin-top: clamp(44px, 6vw, 88px);
  padding-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--band-rule);
  max-width: 30em;
}

.writing {
  margin-top: clamp(20px, 3vw, 40px);
  padding: 0;
  list-style: none;
}
.writing li {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 4px clamp(20px, 4vw, 56px);
  padding-block: 0.95em;
  border-top: 1px solid var(--rule);
}
.writing span {
  color: var(--ink-soft);
}

.cv {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 clamp(20px, 4vw, 64px);
  margin-top: clamp(20px, 3vw, 40px);
}
.cv dt,
.cv dd {
  padding-block: 0.9em;
  border-top: 1px solid var(--rule);
}
.cv dt {
  color: var(--ink-soft);
}
.cv dd {
  max-width: 72ch;
}
.cv__more {
  margin-top: 1.4em;
}

@media (max-width: 900px) {
  .works {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .portrait {
    flex-basis: min(64%, 260px);
  }
  .writing li,
  .cv {
    grid-template-columns: minmax(0, 1fr);
  }
  .cv dt {
    padding-bottom: 0;
  }
  .cv dd {
    padding-top: 0.2em;
    border-top: 0;
  }
}

/* ---------- Foot ---------- */

.foot {
  padding-block: 32px 44px;
  font-size: 0.9em;
  color: var(--ink-soft);
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 36px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  padding: 0;
  list-style: none;
}
.foot__note {
  margin-left: auto;
}
@media (max-width: 900px) {
  .foot__note {
    margin-left: 0;
  }
}

/* ---------- The "page not found" page ---------- */

.lost {
  padding-block: clamp(48px, 10vw, 140px);
}
.lost p {
  max-width: 50ch;
  margin-top: 1.2em;
  font-size: 1.15em;
}
