@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #eff0ec;
  --ink: #1a1d1f;
  --muted: #50565a;
  --accent: #1e4a55;
  --rule: #d4d7d1;
  --photo-filter: none;

  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --text: "Source Serif 4", "Iowan Old Style", "Charter", "Bitstream Charter", Georgia, serif;
  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* basalt at night: warm-cool charcoal, paper-toned ink, a lifted slate-teal */
    --ground: #121417;
    --ink: #e3e4df;
    --muted: #a2a8aa;
    --accent: #8fb8c0;
    --rule: #2b3034;
    --photo-filter: brightness(0.92) contrast(1.02);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.62;
  font-optical-sizing: auto;
  font-variant-numeric: lining-nums tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.hero,
main,
footer {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.hero {
  padding-top: clamp(3rem, 10vw, 7rem);
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: 1fr;
  grid-template-areas:
    "photo"
    "text"
    "quote";
}

.hero__photo { grid-area: photo; }
.hero__text { grid-area: text; align-self: end; }
.hero__quote { grid-area: quote; }

.hero__photo img {
  display: block;
  width: 132px;
  height: auto;
  border-radius: 2px;
  filter: var(--photo-filter);
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2.6rem, 1.6rem + 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
}

.hero__title {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}

.hero__quote {
  margin: 1rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  position: relative;
}

.hero__quote::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--accent);
}

.hero__quote p {
  margin: 0;
  font-family: var(--display);
  font-weight: 380;
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 72, "SOFT" 30, "WONK" 0;
  text-wrap: balance;
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1fr 176px;
    grid-template-areas:
      "text  photo"
      "quote quote";
  }
  .hero__photo img { width: 176px; }
  .hero__title { font-size: 1rem; }
}

/* ---------- body ---------- */

main {
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

section {
  padding-top: clamp(2.25rem, 6vw, 3.5rem);
}

h2 {
  margin: 0 0 1.1rem;
  font-family: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

p { margin: 0 0 1.1em; }

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rules li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
}

.rules li:last-child { border-bottom: 1px solid var(--rule); }

.more { margin: 1.1rem 0 0; }
.more a::after { content: "\00a0\2192"; }

.rules strong {
  display: block;
  margin-bottom: 0.15rem;
  font-family: var(--display);
  font-weight: 580;
  font-size: 1.12em;
  line-height: 1.3;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36, "SOFT" 0, "WONK" 0;
  color: var(--ink);
}

/* ---------- footer ---------- */

footer {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

footer > p:first-of-type {
  margin-bottom: 0.4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.contact {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
}

.contact li { padding: 0.15rem 0; }

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  transition: text-decoration-color 0.15s ease;
}

a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
  text-decoration: none;
}

.colophon {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--muted);
}

.colophon small { font-size: 0.8rem; }
.colophon .sep { font-size: 0.8rem; }

.mark {
  display: inline-block;
  width: 22px;
  height: 20px;
  background-color: var(--muted);
  -webkit-mask: url("/assets/raven-mark.png") center / contain no-repeat;
  mask: url("/assets/raven-mark.png") center / contain no-repeat;
}

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