@view-transition {
  navigation: auto;
}

/* @font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/OpenSans-VariableFont_wdth,wght.ttf") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
} */

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/SourceSans3-VariableFont_wght.ttf") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/SourceSans3-Italic-VariableFont_wght.ttf") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/SourceSerif4-VariableFont_opsz,wght.ttf") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("../fonts/SourceSerif4-Italic-VariableFont_opsz,wght.ttf") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

.serif {
  font-family: "Source Serif 4", serif;
  font-optical-sizing: auto;
  font-weight: inherit;
  font-style: normal;
}

.sans {
  font-family: "Source Sans 3", serif;
  font-optical-sizing: auto;
  font-weight: inherit;
  font-style: normal;
}

:root {
  --base-font-size: 1.125rem;
  --bs-gutter-x: 0px;

  /* Fallback to HSL */
  --color-1: hsl(45, 66%, 90%);
  --color-2: hsl(50, 55%, 81%);
  --color-3: hsl(50, 48%, 69%);
  --color-4: hsl(50, 47%, 53%);
  --color-5: hsl(50, 38%, 41%);
  --color-6: hsl(50, 37%, 25%);
}

@supports (color: oklch(0.5 0.1 90)) {
  :root {
    --color-1: oklch(0.94 0.04 95);
    --color-2: oklch(0.86 0.06 90);
    --color-3: oklch(0.75 0.11 90);
    --color-4: oklch(0.61 0.17 90);
    --color-5: oklch(0.45 0.14 90);
    --color-6: oklch(0.28 0.09 90);
  }
}

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

body {
  line-height: 150%;
  font-display: swap;
  font-kerning: auto;
  font-family: "Source Sans 3", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
  /*hyphens: auto;
  overflow-wrap: break-word;*/
  white-space: normal;
  font-size: 1.125rem;
  text-wrap: pretty;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  display: flex;
  inline-size: 100%;
  justify-content: space-between;
  align-items: center;
  block-size: 4rem;
  color: var(--color-4);
  box-shadow: 0 0 2.25rem rgba(0, 0, 0, 0.1);
  padding-inline: 1rem;
}

nav {
  /*position: fixed;
  top: 4rem;*/
  left: 0;
  block-size: fit-content;
  inline-size: 100%;
  background-color: #ffffff;
  /*opacity: 0;*/
  /* pointer-events: none; */
  /*animation-duration: 0.25s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.5, 1);
  animation-fill-mode: forwards;
  z-index: 20;*/
  padding-inline-start: 1.5rem;
}

nav ul {
  list-style-type: "";
  padding: 0.5rem;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
  
  border: 1px solir red;
}

nav li {
  /*display: block;*/
}

nav li a {
  display: block;
  padding-block: 0.25rem;
}

nav[data-hidden="false"] {
  opacity: 1;
  animation-name: showNavigation;
}

nav[data-hidden="true"] {
  animation-name: hideNavigation;
}

main {
  margin-block-start: 3rem;
  padding-inline: 1rem;
}

footer {
  margin-block-start: 3rem;
  padding-inline: 1rem;
  border-block-start: 1px solid gray;
}

footer {
  font-size: 0.85rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: pretty;
  max-inline-size: min(70ch, 40rem);
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
  margin-trim: block;
  margin: 0;
  padding: 0 0 1 0;
}

h1 {
  font-size: clamp(1.125rem, 1.8vw + 1rem, 1.5rem);
  font-weight: 550;
  padding-block-end: 2rem;
}

h2 {
  font-size: clamp(1rem, 1.6vw + 0.75rem, 1.25rem);
  font-weight: 500;
  color: var(--color-5);
}

h3 {
  font-style: italic;
  font-size: clamp(1rem, 1.4vw + 0.5rem, 1.125rem);
  font-weight: 400;
  color: var(--color-4);
}

p {
  font-weight: 400;
  font-feature-settings: "liga", "clig";
  font-variation-settings: "wght" 400;
  margin-block-end: 1.5rem;
  max-inline-size: 120ch;
  padding: 0;
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.125rem);
  line-height: 1.5;
}

p img {
  margin-block-end: 2rem;
  display: block;
  max-inline-size: 100%;
}

main img {
  max-inline-size: 100% !important;
}

abbr,
.smcp {
  font-feature-settings: "smcp", "c2sc";
}

@supports (font-variant-caps: all-small-caps) {
  abbr,
  .smcp {
    font-size: 2.1ex;
    font-weight: 500; /* 540 if variable */
    font-feature-settings: normal;
    font-variant-caps: all-small-caps;
    font-feature-settings: normal;
    position: relative;
    vertical-align: baseline;
    line-height: 0;
    /* text-transform: none; */
    /* letter-spacing: 0; */
  }
}

ol,
ul {
  /*list-style-position: outside;*/
  /* margin-inline-start: -2rem; */
  margin-bottom: 1.5rem;
  max-inline-size: 120ch;
  /*padding: 0;*/
}

li {
  line-height: 1.5;
  margin-bottom: 0.5rem;
  font-weight: 400;
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.125rem);
}

.pull {
  margin-left: -0.44em;
}

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative; /* strange z-index behaviour */
  vertical-align: baseline;
}

sup {
  top: -0.5em;
  font-feature-settings: "sups" 1;
}

sub {
  bottom: -0.25em;
  font-feature-settings: "subs" 1;
}

foo-ter h2 {
  font-weight: 550 !important;
  text-transform: uppercase;
}

header a,
nav a {
  text-decoration: none;
  color: var(--color-5);
}

main {
  padding-inline: 1.5rem;
}

main a:any-link,
footer a:any-link {
  text-decoration-thickness: 0.05em;
  text-underline-offset: 0.15em;
  text-decoration-skip-ink: auto;
  color: var(--color-4);
}

@media (hover: hover) {
  a:any-link:hover {
    color: var(--color-5);
  }

  button[data-trigger="drawer"]:hover {
    background-color: var(--color-2);
    color: var(--color-6);
  }
}

button[data-trigger="drawer"] {
  position: fixed;
  right: 0;
  block-size: 4rem;
  aspect-ratio: 1/1;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 650;
  background-color: var(--color-1);
  color: var(--color-5);
  transition-delay: 0;
  transition-duration: 250ms;
  transition-property: background-color, color;
  writing-mode: horizontal-tb;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  letter-spacing: inherit;
}

.logo {
  /* font-size: 0.85rem; */
  font-weight: 650;
  padding-inline-start: 0.5rem;
}

@keyframes showNavigation {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hideNavigation {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@supports (display: grid) {
  body {
    display: grid;
    grid-template-areas:
      "hea-der"
      "nav-igation"
      "main"
      "foo-ter";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto;
  }

  hea-der {
    grid-area: hea-der;
  }

  navi-gation {
    grid-area: nav-igation;
  }

  main {
    grid-area: main;
  }

  foo-ter {
    grid-area: foo-ter;
  }
}
