/* Fonts */
@font-face {
  font-family: "Wittgenstein";
  src: url("/fonts/Wittgenstein.woff2");
}

/* Custom Properties */
:root {
  --clr-accent-100: #E5E4EB;
  --clr-accent-400: #636392;
  --clr-primary-400: #880000;
  --clr-secondary-400: #E1E3E5;
  --clr-neutral-100: #FFFEFD;
  --clr-neutral-300: #DDD;
  --clr-neutral-500: #9EA1A3;
  --clr-neutral-900: #222A2F;

  --ff-primary: "Times New Roman", Times, serif;
  --ff-display: "Wittgenstein", serif;

  --ff-body: var(--ff-primary);
  --ff-heading: var(--ff-primary);
  --ff-title: var(--ff-primary);
  --ff-logo: var(--ff-display);

  --fw-normal: 400;
  --fw-semi-bold: 500;
  --fw-bold: 700;

  --fs-200: .8125rem;
  --fs-300: .9rem;
  --fs-400: 1rem;
  --fs-450: 1.2rem;
  --fs-500: 1.3rem;
  --fs-600: 1.5rem;
  --fs-700: 1.8rem;
  --fs-800: 2.1rem;
  --fs-850: 2.75rem;
  --fs-900: 3rem;

  --fs-small: var(--fs-300);
  --fs-body: var(--fs-450);
  --fs-title: var(--fs-800);
  --fs-primary-heading: var(--fs-700);
  --fs-secondary-heading: var(--fs-600);
  --fs-button: var(--fs-body);

  --fs-logo: var(--fs-850);
  --fs-nav: var(--fs-body);

  --size-100: .25rem;
  --size-200: .5rem;
  --size-300: .75rem;
  --size-400: 1rem;
  --size-500: 1.5rem;
  --size-600: 2rem;
  --size-700: 3rem;
  --size-800: 4rem;
  --size-900: 5rem;
}

/* Non-mobile Properties */
@media (min-width: 46em) {
  :root {
    --fs-small: var(--fs-300);
    --fs-body: var(--fs-500);
    --fs-title: var(--fs-900);
    --fs-primary-heading: var(--fs-800);
    --fs-secondary-heading: var(--fs-700);
    --fs-button: var(--fs-500);

    --fs-logo: var(--fs-900);
  }
}

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

/* Remove defaults */
* {
  margin: 0;
  padding: 0;
  font: inherit;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
html,
body {
  height: 100%;
}
body {
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture,
svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    font-style: italic;
    background-repeat: no-repeat;
    background-size: cover;
    shape-margin: 0.75rem;
    object-fit: cover;
    margin: 0;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
   scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

.text-accent-400 { color: var(--clr-accent-400); }
.text-primary-400 { color: var(--clr-primary-400); }
.text-secondary-400 { color: var(--clr-secondary-400); }
.text-neutral-100 { color: var(--clr-neutral-100); }
.text-neutral-900 { color: var(--clr-neutral-900); }

.bg-accent-400 { background-color: var(--clr-accent-400); }
.bg-primary-400 { background-color: var(--clr-primary-400); }
.bg-secondary-400 { background-color: var(--clr-secondary-400); }
.bg-neutral-100 { background-color: var(--clr-neutral-100); }
.bg-neutral-900 { background-color: var(--clr-neutral-900); }

.fw-normal { font-weight: var(--fw-normal) }
.fw-bold { font-weight: var(--fw-bold) }
.fw-semi-bold { font-weight: var(--fw-semi-bold) }

.fs-small { font-size: var(--fs-small) }
.fs-body { font-size: var(--fs-body) }
.fs-title { font-size: var(--fs-title) }
.fs-primary-heading { font-size: var(--fs-primary-heading) }
.fs-secondary-heading { font-size: var(--fs-secondary-heading) }
.fs-button { font-size: var(--fs-button) }

.fs-nav { font-size: var(--fs-nav) }

.container {
  --max-width: 1110px;
  --h-padding: 1rem;

  width: min(var(--max-width), 100% - (var(--h-padding) * 2));
  margin-inline: auto;
}

.hover-opacity {
  &:hover {
    opacity: .5;
  }
}

.no-x-overflow {
  overflow-x: clip;
}

.center {
  text-align: center;
}

.logo {
  font-family: var(--ff-logo);
  font-size: var(--fs-primary-heading);
}

/* General styling */
body {
  font-size: var(--fs-body);
  font-family: var(--ff-body);
  color: var(--clr-neutral-900);
  background-color: var(--clr-neutral-300);
}

a {
  color: var(--clr-neutral-900);
  text-decoration: none;
}

blockquote {
	margin: 0;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1em;
}

figcaption {
  opacity: 50%;
}

.button {
  border: 0;
  text-decoration: none;
  border-radius: 100vmax;
  line-height: 1;
  padding: .5em 1.2em;
  font-weight: var(--fw-bold);
  font-size: var(--fs-button);
  color: var(--clr-neutral-100);
  background-color: var(--clr-primary-400);
  cursor: pointer;

  &:hover,
  &:focus-visible {
    background-color: var(--clr-accent-400);
  }
}

.content {
  & h1 {
    font-weight: var(--fw-bold);
    font-size: var(--fs-primary-heading);
    line-height: calc(1 * var(--fs-primary-heading));
    margin-top: 0.67em;
    margin-bottom: 0.67em;
    font-family: var(--ff-heading);
  }
  & h2 {
    font-weight: var(--fw-bold);
    font-size: var(--fs-secondary-heading);
    line-height: calc(1 * var(--fs-secondary-heading));
    margin-top: 0.83em;
    margin-bottom: 0.83em;
    font-family: var(--ff-heading);
  }
  & ul { 
    list-style: initial;
    margin: initial;
    padding: 0 0 0 40px;
  }
  & ol { 
    list-style-type: decimal;
    list-style-position: outside;
    margin: initial;
    padding: 0 0 0 40px;
  }
  & li {
    display: list-item;
  }

  & p {
    line-height: calc(1.3 * var(--fs-body));
    margin-top: calc(0.32 * var(--fs-body));
    margin-bottom: calc(0.33 * var(--fs-body));
    text-wrap: pretty;
  }

  & a {
    color: var(--clr-accent-400);
    
    &:hover {
      color: var(--clr-primary-400);
    }
  }

  & em {
    font-style: italic;
  }

  & strong {
    font-weight: var(--fw-bold);
  }

  .essay {
    --max-width: 65ch;
    --h-padding: 0rem;

    width: min(var(--max-width), 100% - (var(--h-padding) * 2));
    margin-inline: auto;

    padding-bottom: var(--size-500);
  }
}

.image-block {
  display: block;
  margin-top: 0.67em;
  margin-bottom: 0.67em;
}