@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/EBGaramond-Italic-VariableFont_wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --paper: #f6efe2;
  --paper-deep: #eadcc6;
  --surface: #fffaf1;
  --ink: #2d2118;
  --muted: #6f5b48;
  --line: #d8c2a5;
  --accent: #8c4f2e;
  --accent-dark: #673a24;
  --dark: #241914;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --site-container: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(246, 239, 226, 0.91), rgba(246, 239, 226, 0.91)), url("../img/textures/paper.jpg");
  background-repeat: repeat;
  background-size: auto, 720px 405px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.02;
}

.site-container {
  width: min(var(--site-container), calc(100% - 32px));
  margin-inline: auto;
}

.global-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(216, 194, 165, 0.72);
  background: rgba(246, 239, 226, 0.91);
  backdrop-filter: blur(14px);
}

.global-header__inner {
  position: relative;
  display: flex;
  min-height: 80px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.global-brand {
  flex: 0 0 auto;
}

.global-brand img {
  width: 190px;
  height: auto;
}

.nav-menu {
  margin-left: auto;
}

.nav-menu__toggle {
  display: none;
  list-style: none;
}

.nav-menu__toggle::-webkit-details-marker {
  display: none;
}

.global-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(22px, 2.2vw, 34px);
  color: var(--muted);
  font: 600 16px/1 var(--sans);
}

.global-nav a {
  text-decoration: none;
  transition: color 160ms ease;
}

.global-nav a:hover,
.global-nav a:focus-visible {
  color: var(--accent-dark);
  text-decoration: none;
}

.course-header__nav {
  gap: clamp(14px, 1.55vw, 24px);
  font-family: var(--serif);
}

.course-header .global-brand img {
  width: auto;
  height: 46px;
}

.course-home-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--accent-dark);
  white-space: nowrap;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.course-home-link:hover,
.course-home-link:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 250, 241, 0.66);
}

.course-home-link span {
  font-size: 1.2em;
  font-weight: 400;
}

.course-nav-divider {
  width: 1px;
  height: 42px;
  flex: 0 0 1px;
  margin-inline: 4px;
  background: var(--line);
}

.eyebrow {
  color: var(--accent-dark);
  font: 700 12px/1.3 var(--sans);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

#courses,
#about,
#programs,
#choose-course,
#contacts,
#faq {
  scroll-margin-top: 96px;
}

.site-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 16px/1 var(--sans);
  text-decoration: none;
  transition: transform 180ms ease, background-color 180ms ease;
}

.site-button:hover {
  transform: translateY(-2px);
}

.site-button--primary {
  color: #fff9ef;
  background: var(--accent-dark);
  box-shadow: 0 12px 26px rgba(103, 58, 36, 0.2);
}

.site-button--secondary {
  border-color: var(--line);
  color: var(--accent-dark);
  background: rgba(255, 250, 241, 0.54);
}

.site-button--secondary:hover,
.site-button--secondary:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 250, 241, 0.9);
}

.site-footer {
  padding: 42px 0;
  color: #d9c7ad;
  background: var(--dark);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(130px, 0.45fr) minmax(230px, 0.8fr);
  gap: clamp(30px, 6vw, 80px);
  align-items: start;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-column--details {
  justify-items: end;
  text-align: right;
}

.footer-inner img {
  width: 210px;
  height: auto;
}

.footer-inner p,
.footer-inner a {
  color: inherit;
  font: 400 14px/1.5 var(--sans);
}

.footer-inner a {
  width: fit-content;
  text-decoration-color: rgba(217, 199, 173, 0.45);
  text-underline-offset: 3px;
}

.footer-site-links,
.footer-links {
  display: grid;
  gap: 7px;
}

.footer-links {
  justify-items: end;
  margin-top: 6px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  .global-header__inner {
    min-height: 68px;
  }

  .global-brand img {
    width: 158px;
  }

  .nav-menu__toggle {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent-dark);
    background: rgba(255, 250, 241, 0.54);
    cursor: pointer;
    font: 700 14px/1 var(--sans);
  }

  .nav-menu__toggle:hover,
  .nav-menu__toggle:focus-visible,
  .nav-menu[open] .nav-menu__toggle {
    border-color: var(--accent);
    background: rgba(255, 250, 241, 0.88);
  }

  .global-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: grid;
    align-items: stretch;
    justify-content: stretch;
    gap: 2px;
    padding: 10px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    background: rgba(255, 250, 241, 0.98);
    box-shadow: 0 18px 38px rgba(73, 48, 31, 0.14);
    font-size: 16px;
  }

  .nav-menu:not([open]) > .global-nav {
    display: none;
  }

  .global-nav a {
    display: flex;
    min-height: 46px;
    align-items: center;
    padding: 0 14px;
    border-radius: 5px;
    text-align: left;
  }

  .global-nav a:hover,
  .global-nav a:focus-visible {
    background: rgba(216, 194, 165, 0.2);
  }

  .course-home-link {
    border-color: transparent;
    border-radius: 5px;
  }

  .course-nav-divider {
    width: auto;
    height: 1px;
    margin: 5px 14px;
  }
}

@media (max-width: 780px) {
  .global-header__inner {
    min-height: 66px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-column--details,
  .footer-links {
    justify-items: start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
