@font-face {
  font-family: 'Vollkorn';
  src: url('/static/type/Vollkorn.woff2') format('woff2'), url('/static/type/Vollkorn.woff') format('woff');
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vollkorn';
  src: url('/static/type/Vollkorn-Italic.woff2') format('woff2'),
    url('/static/type/Vollkorn-Italic.woff') format('woff');
  font-style: italic;
  font-display: swap;
}

:root {
  --foreground: #333;
  --background: #fcfaf2;
  --accent: #c90707;

  --step--2: clamp(0.78rem, calc(0.77rem + 0.03vw), 0.8rem);
  --step--1: clamp(0.94rem, calc(0.92rem + 0.11vw), 1rem);
  --step-0: clamp(1.13rem, calc(1.08rem + 0.22vw), 1.25rem);
  --step-1: clamp(1.35rem, calc(1.28rem + 0.37vw), 1.56rem);
  --step-2: clamp(1.62rem, calc(1.5rem + 0.58vw), 1.95rem);
  --step-3: clamp(1.94rem, calc(1.77rem + 0.87vw), 2.44rem);
  --step-4: clamp(2.33rem, calc(2.08rem + 1.25vw), 3.05rem);
  --step-5: clamp(2.8rem, calc(2.45rem + 1.77vw), 3.82rem);
}

/* MARK: CSS Reset
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
body {
  scroll-behavior: smooth;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/* MARK: Basics
*/

body {
  background: var(--background);
  color: var(--foreground);

  font-family: 'Vollkorn', serif;
  font-variation-settings: 'wght' 400;
  font-feature-settings: 'dlig' on, 'hlig' on, 'lnum' on, 'ss03' on, 'ss05' on, 'ss14' on, 'ss17' on, 'tnum' on,
    'zero' on;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  margin-bottom: 0.15em;
  font-size: var(--step-1);
}
h2 {
  margin-bottom: 0.25em;
  font-size: var(--step-3);
}
h3 {
  margin-bottom: 0.25em;
  font-size: var(--step-2);
}

p {
  margin: 0 0 1.5em 0;
  font-size: var(--step-1);
  line-height: 1.5em;
}

blockquote {
  position: relative;
  margin: 0 0 2.5em 2em;
  font-style: italic;
  font-size: var(--step-1);
}
blockquote:before {
  margin-right: -0.2rem;
  content: '“';
}
blockquote:after {
  margin-left: -0.2rem;
  content: '”';
}
blockquote cite {
  position: absolute;
  display: block;
  margin: 0.5em 0 0 0;
  color: var(--accent);
  font-style: normal;
  font-size: 0.7em;
  text-transform: uppercase;
}
blockquote cite:before {
  content: '—';
}

hr {
  margin: 1em 0 1em 0;
  border: 0;
  text-align: center;
}
hr:before {
  content: '-.-';
}

/* MARK: Layout
*/

header {
  margin-bottom: 1em;
}

h1 {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

svg {
  background-color: var(--foreground);
}

#logo {
  fill: var(--background);
  text-transform: uppercase;
}

nav {
  margin: 1em;
  font-size: var(--step-2);
}

nav a {
  text-decoration: none;
  color: var(--accent);
  font-variation-settings: 'wght' 600;
}

nav ul {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  list-style: none;
  gap: 1em;
}

main {
  padding: 0 1em;

  p:first-letter {
    color: var(--accent);
  }
}

footer p {
  max-width: 100%;
  text-wrap: nowrap;
  margin-left: 1rem;
  font-size: var(--step--1);
  text-overflow: ellipsis;
}

/* MARK: Responsivity
*/

@media (min-width: 35rem) {
  body {
    display: grid;
    grid-template-rows: calc(100vh - 2rem) 2rem;
    grid-template-columns: 38vw auto;
    grid-template-areas:
      'head main'
      'footer main';
  }
  header {
    grid-area: head;
    height: 100vh;
  }
  svg {
    width: 38vw;
    transform-origin: left top;
    transform: translateY(47vw) rotate(-90deg);
  }
  nav {
    grid-area: nav;
    margin-left: 10vw;
    ul {
      flex-flow: column nowrap;
    }
  }
  main {
    grid-area: main;
    padding: 1em 2em;
    overflow: auto;
  }
  main p {
    max-width: 30em;
  }
  main blockquote {
    max-width: 28em;
  }
  footer {
    grid-area: footer;
  }
}
