/* Mungo & Mijares
   Two colours, six type steps plus the number, twelve columns, one motion.
   Structure comes from space and mass. Nothing is drawn. */

/* ---------------------------------------------------------------- fonts */

@font-face {
  font-family: "Editorial New";
  src: url("/fonts/editorial-new-ultralight.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sohne";
  src: url("/fonts/sohne-buch.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sohne";
  src: url("/fonts/sohne-kraeftig.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------- tokens */

:root {
  --ink: #101010;
  --paper: #ffffff;

  --font-display: "Editorial New", Georgia, "Times New Roman", serif;
  --font-body: "Sohne", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;

  --t-label: 14px;
  --t-body: 17px;
  --t-lead: 21px;
  --t-display-s: clamp(24px, 1.32rem + 0.78vw, 32px);
  --t-display-m: clamp(30px, 1.3rem + 2.44vw, 55px);
  --t-display-l: clamp(40px, 1.86rem + 2.73vw, 68px);
  --t-number: clamp(88px, 4.08rem + 6.05vw, 150px);

  /* Deliberately unequal. Space before a section is what signals its
     importance, so the steps are far apart rather than evenly graded. */
  --s-vast: 300px;
  --s-major: 190px;
  --s-mid: 130px;
  --s-block: 84px;
  --s-pair: 40px;
  --s-tight: 20px;

  --container: 1400px;
  --gutter: 24px;
  --margin: 40px;
}

/* Mobile keeps the unevenness rather than halving everything to a mush. The
   big steps stay big, because on a phone the empty screen is the whole idea. */
@media (max-width: 899px) {
  :root {
    --margin: 24px;
    --s-vast: 170px;
    --s-major: 110px;
    --s-mid: 72px;
    --s-block: 44px;
    --s-pair: 24px;
    --s-tight: 16px;
  }
}

/* ---------------------------------------------------------------- reset */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  margin: 0;
}

p + p {
  margin-top: var(--s-tight);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

/* ---------------------------------------------------------------- links */

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 1px;
  text-decoration-skip-ink: auto;
}

a:focus-visible,
[tabindex]:focus-visible,
video:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.u-quiet-link {
  text-decoration-color: transparent;
}

.u-quiet-link:hover {
  text-decoration-color: var(--ink);
}

.u-skip {
  position: absolute;
  left: -9999px;
}

.u-skip:focus {
  left: var(--margin);
  top: var(--s-tight);
  z-index: 2;
  background: var(--paper);
  padding: 8px;
}

/* --------------------------------------------------------------- layout */

.container {
  width: min(var(--container), 100% - (var(--margin) * 2));
  margin-inline: auto;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--gutter);
  row-gap: var(--s-block);
}

/* Asymmetry is the default. Column placement only above the single-column
   breakpoint; below it everything is one column by definition. */
@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .col-1-2  { grid-column: 1 / 3; }
  .col-1-3  { grid-column: 1 / 4; }
  .col-1-4  { grid-column: 1 / 5; }
  .col-1-5  { grid-column: 1 / 6; }
  .col-1-7  { grid-column: 1 / 8; }
  .col-1-9  { grid-column: 1 / 10; }
  .col-2-10 { grid-column: 2 / 11; }
  .col-4-9  { grid-column: 4 / 10; }
  .col-5-10 { grid-column: 5 / 11; }
  .col-5-12 { grid-column: 5 / 13; }
  .col-6-12 { grid-column: 6 / 13; }
  .col-7-12 { grid-column: 7 / 13; }
  .col-9-12 { grid-column: 9 / 13; }
}

.section {
  margin-top: var(--s-major);
}

.section--near {
  margin-top: var(--s-mid);
}

.section--far {
  margin-top: calc(var(--s-major) + var(--s-mid));
}

.section--vast {
  margin-top: var(--s-vast);
}

.stack-block > * + * {
  margin-top: var(--s-block);
}

.stack-pair > * + * {
  margin-top: var(--s-pair);
}

.stack-tight > * + * {
  margin-top: var(--s-tight);
}

/* ----------------------------------------------------------- typography */

.t-label {
  font-family: var(--font-body);
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.4;
}

.t-meta {
  font-family: var(--font-body);
  font-size: var(--t-label);
  font-weight: 400;
  line-height: 1.5;
}

.t-body {
  font-size: var(--t-body);
  line-height: 1.55;
}

.t-lead {
  font-size: var(--t-lead);
  line-height: 1.5;
}

.t-display-s,
.t-display-m,
.t-display-l,
.t-number {
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
  /* optical, not metric, alignment to the grid edge */
  margin-left: -0.028em;
}

.t-display-s {
  font-size: var(--t-display-s);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.t-display-m {
  font-size: var(--t-display-m);
  line-height: 1.05;
  letter-spacing: -0.016em;
}

.t-display-l {
  font-size: var(--t-display-l);
  line-height: 1.02;
  letter-spacing: -0.018em;
}

.t-number {
  font-size: var(--t-number);
  line-height: 0.86;
  letter-spacing: -0.018em;
}

/* Measure never exceeds 65 characters. The single most important rule.
   Tuned against rendered line length, not the ch unit, which under-counts. */
.measure {
  max-width: 26.5em;
}

.measure-lead {
  max-width: 26em;
}

.measure-meta {
  max-width: 28em;
}

/* The brief's own value for the caption under the number. */
.measure-tight {
  max-width: 22em;
}

/* ---------------------------------------------------------------- media */

.figure {
  background: var(--ink);
  overflow: hidden;
}

.figure img,
.figure video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


.ratio-cinematic { aspect-ratio: 21 / 9; }
.ratio-portrait  { aspect-ratio: 3 / 4; }
.ratio-square    { aspect-ratio: 1 / 1; }

.bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.offset-lower {
  margin-top: var(--s-mid);
}

/* On a phone a margin around a photograph wastes the only space there is, so
   the rooms run to the edges and the type stays inset. The pair keeps its
   asymmetry through the collapse: one frame off the left, one off the right,
   rather than two identical stacked blocks. */
@media (max-width: 899px) {
  .m-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  .m-bleed-left {
    width: 88vw;
    margin-left: calc(0px - var(--margin));
  }
  .m-bleed-right {
    width: 88vw;
    margin-left: calc(12vw - var(--margin));
  }
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Development marker for an Overheard entry missing a field. Does not ship.
   Nothing on the site renders one at present. */
.pending {
  background: var(--ink);
  color: var(--paper);
  padding: 0 0.35em;
}

/* ------------------------------------------------------------------ nav */

.nav {
  padding-top: var(--s-pair);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gutter);
}

.nav__mark {
  font-family: var(--font-display);
  font-size: var(--t-display-s);
  line-height: 1;
  letter-spacing: -0.015em;
  text-decoration-color: transparent;
}

.nav__mark:hover {
  text-decoration-color: var(--ink);
}

.nav__links {
  display: flex;
  gap: var(--s-pair);
  font-size: var(--t-label);
  font-weight: 500;
}

@media (max-width: 599px) {
  .nav {
    display: block;
  }
  .nav__links {
    margin-top: var(--s-tight);
    gap: var(--s-tight);
    flex-wrap: wrap;
  }
}

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

.hero {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding-block: var(--s-major) var(--s-mid);
}

/* On a phone the first screen is composed as one frame: wordmark at the top,
   the line sitting low, the emptiness between them doing the work. */
@media (max-width: 899px) {
  .hero {
    align-content: end;
    padding-block: var(--s-mid) 20vh;
  }
}

#apply {
  scroll-margin-top: var(--s-pair);
}

/* --------------------------------------------------------------- pieces */

.email {
  font-family: var(--font-display);
  font-size: var(--t-display-m);
  line-height: 1.05;
  letter-spacing: -0.016em;
  margin-left: -0.028em;
  display: inline-block;
  word-break: break-word;
}

.entry {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: var(--gutter);
  row-gap: var(--s-tight);
}

@media (min-width: 900px) {
  .entry {
    grid-template-columns: repeat(12, 1fr);
  }
  .entry__type { grid-column: 1 / 3; }
  .entry__body { grid-column: 4 / 10; }
}

.footer {
  margin-top: var(--s-major);
  padding-bottom: var(--s-pair);
  font-size: var(--t-label);
}
