/* getaereto.com: one research brief. No JavaScript, no third-party requests. */

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
/* Georgia scaled to Source Serif 4's metrics so the swap doesn't shift the layout */
@font-face {
  font-family: "Serif Fallback";
  src: local("Georgia");
  font-weight: 400;
  size-adjust: 108.4%;
  ascent-override: 95.5%;
  descent-override: 30.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Serif Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 600;
  size-adjust: 110.1%;
  ascent-override: 94.1%;
  descent-override: 30.4%;
  line-gap-override: 0%;
}

:root {
  color-scheme: light dark;

  --paper: #f6f4ef;
  --ink: #1b1a17;
  --ink-2: #5b574e;
  --rule: #d6d0c4;
  --accent: #8c2b1e;

  --serif: "Source Serif 4", "Serif Fallback", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --measure: 36rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151412;
    --ink: #ece7de;
    --ink-2: #a7a194;
    --rule: #38342e;
    --accent: #ee9a86;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-kerning: normal;
}

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

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

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

/* ---- page frame ------------------------------------------------------ */

.page {
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
  padding-block: clamp(1.25rem, 4vw, 2.5rem) 2rem;
}

/* Every block shares one grid: a margin column for numbers and marks, the
   reading column, and (on wide screens) an aside for the supporting figure. */
.row {
  display: grid;
  grid-template-columns: [main-start] minmax(0, 1fr) [main-end];
}
.row > * {
  grid-column: main;
}

.label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---- masthead ---------------------------------------------------------- */

.masthead {
  padding-bottom: clamp(3rem, 9vw, 5.5rem);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brief-head {
  row-gap: 1.25rem;
  padding-bottom: clamp(2.5rem, 7vw, 4rem);
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.125rem, 1.35rem + 3.4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.dek {
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  max-width: 34rem;
}

/* ---- findings ---------------------------------------------------------- */

.findings {
  list-style: none;
  padding: 0;
}

.finding {
  row-gap: 0.75rem;
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem 2.25rem;
}

.finding-no,
.finding h3 {
  font-family: var(--serif);
  font-size: 1.3125rem;
  line-height: 1.25;
}
.finding-no {
  font-weight: 400;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  margin-bottom: -0.4rem;
}
.finding h3 {
  font-weight: 600;
  text-wrap: balance;
}

.finding p {
  max-width: var(--measure);
}

.stat {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.stat-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 1.9rem + 1.6vw, 2.875rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat-value .unit {
  font-size: 0.5em;
  letter-spacing: 0;
  margin-left: 0.12em;
}
.stat-label {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 24rem;
}

/* ---- figure ------------------------------------------------------------ */

.fig {
  margin-top: 1.5rem;
  max-width: var(--measure);
}

.fig-plot {
  position: relative;
  padding-top: 1.5rem;
}

.fig-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.fig-dot {
  fill: var(--ink);
}
.fig-dot--before {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.25px;
  vector-effect: non-scaling-stroke;
}
.fig-axis,
.fig-tick {
  stroke: var(--ink-2);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.fig-zero {
  stroke: var(--ink-2);
  stroke-width: 1px;
  stroke-dasharray: 2 3;
  vector-effect: non-scaling-stroke;
}
.fig-median {
  stroke: var(--accent);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}

.fig-ticks {
  position: relative;
  height: 1.25rem;
  margin-top: 0.3rem;
}
.fig-ticks span,
.fig-med {
  position: absolute;
  top: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.fig-ticks span {
  color: var(--ink-2);
  transform: translateX(-50%);
}
.fig-med {
  color: var(--accent);
  transform: translateX(-50%);
}

/* positions from tools/figure.py */
.fig-tm30 { left: 2%; }
.fig-t0 { left: 26%; }
.fig-t30 { left: 50%; }
.fig-t60 { left: 74%; }
.fig-t90 { left: 98%; }
.fig-med { left: 39.6%; }

.fig figcaption {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.fig-no {
  font-weight: 600;
  color: var(--ink);
}

/* ---- back matter ------------------------------------------------------- */

.section {
  row-gap: 1rem;
  border-top: 1px solid var(--rule);
  padding-block: 1.75rem 2.25rem;
}

.notes {
  padding-left: 1.4rem;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: var(--measure);
}
.notes li {
  padding-left: 0.2rem;
}
.notes li::marker {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.offer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.25rem 2.5rem;
  max-width: var(--measure);
}
.offer h3 {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.about {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  max-width: var(--measure);
}
.monogram {
  flex: none;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}
.about p + p {
  margin-top: 0.6rem;
}

.colophon {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* ---- not found --------------------------------------------------------- */

.lost {
  row-gap: 1rem;
  padding-bottom: 4rem;
}

/* ---- wider screens: numbers hang in the margin ------------------------- */

@media (min-width: 46em) {
  body {
    font-size: 1.0625rem;
  }
  .row {
    grid-template-columns: [margin-start] 3.5rem [margin-end] 1.5rem [main-start] minmax(0, 36rem) [main-end];
    max-width: 41rem; /* the tracks above, so rules end where the text does */
  }
  .row > .in-margin {
    grid-column: margin;
  }
  .finding-no {
    grid-row: 1;
  }
  .finding h3 {
    grid-row: 1;
  }
  .finding-no {
    margin-bottom: 0;
  }
  .about {
    display: contents;
  }
  .about > * {
    grid-column: main;
  }
  .about > .monogram {
    grid-column: margin;
    grid-row: 2;
    margin-top: 0.15rem;
  }
}

/* ---- wide screens: the supporting number moves to an aside ------------- */

@media (min-width: 72em) {
  .row {
    grid-template-columns:
      [margin-start] 4.5rem [margin-end] 2rem
      [main-start] minmax(0, 36rem) [main-end] 3.5rem
      [aside-start] minmax(0, 14rem) [aside-end];
    max-width: 60rem;
  }
  .brief-head h1 {
    grid-column: main-start / aside-end;
  }
  .finding .stat {
    grid-column: aside;
    grid-row: 1 / span 2;
    margin-top: 0.1rem;
    align-self: start;
  }
}

.wordmark-link {
  color: inherit;
  text-decoration: none;
}
