:root {
  --content-width: 980px;
  --wide-width: 1180px;

  --text: #222222;
  --text-soft: #333333;
  --muted: #5f6368;
  --line: #e8e3dc;
  --accent: #bf5700;
  --soft-bg: #faf8f5;
}

/* Base */

body {
  color: var(--text);
  font-size: 17px;
  line-height: 1.58;
}

main.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.quarto-title-block .title {
  display: none;
}

/* Navbar */

.navbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.navbar-title {
  font-weight: 650;
  letter-spacing: 0.01em;
}

/* Typography */

h1,
h2,
h3 {
  color: #171717;
  line-height: 1.2;
}

h1 {
  margin-top: 0;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
}

h2 {
  margin-top: 2.4rem;
  padding-top: 0.2rem;
  font-size: 1.45rem;
}

h3 {
  margin-top: 1.6rem;
  font-size: 1.08rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
}

.lede {
  max-width: 760px;
  color: var(--text-soft);
  font-size: 1.12rem;
}

.muted {
  color: var(--muted);
}

.kicker {
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.98rem;
}

/* Homepage hero */

.home-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 390px;
  max-width: var(--wide-width);
  margin: 2.2rem auto 3rem;
  padding: 3rem 3.4rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background-image: url("assets/img/hay_banner.png");
  background-size: cover;
  background-position: 58% center;
  box-shadow: 0 24px 70px rgba(34, 28, 20, 0.16);
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.76) 0%,
      rgba(0, 0, 0, 0.48) 38%,
      rgba(0, 0, 0, 0.20) 72%,
      rgba(0, 0, 0, 0.08) 100%
    );
}

.home-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  color: #ffffff;
}

.home-hero-content h1 {
  margin: 0 0 0.75rem;
  color: #ffffff;
  font-size: clamp(2.5rem, 5.4vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.home-hero-content p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
  line-height: 1.45;
}

.home-hero-content a {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, 0.42);
}

.home-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.home-hero-links a {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  padding: 0.32rem 0.74rem;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.home-hero-links a:hover {
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.18);
}

.home-intro {
  max-width: 850px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem;
  color: var(--text-soft);
  font-size: 1.15rem;
  line-height: 1.6;
}

/* Buttons */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.35rem;
}

.button-row a,
.card-link {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.82rem;
  background: #ffffff;
  color: #292929;
  text-decoration: none;
}

.button-row a:hover,
.card-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Cards and grids */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 2rem 0;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  background: #ffffff;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

/* Book layout */

.book-block {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
  margin: 1.5rem 0 2.2rem;
}

.book-block img {
  width: 145px;
  border: 1px solid var(--line);
}

/* Callouts and lists */

.callout {
  margin: 1.4rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--accent);
  background: var(--soft-bg);
}

.simple-list li {
  margin-bottom: 0.35rem;
}

/* Footer */

footer.footer {
  border-top: 1px solid var(--line);
}

/* Responsive */

@media (max-width: 820px) {
  .home-hero {
    min-height: 500px;
    margin-top: 1rem;
    padding: 2rem;
    background-position: 62% center;
  }

  .home-hero-overlay {
    background:
      linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.70) 0%,
        rgba(0, 0, 0, 0.45) 52%,
        rgba(0, 0, 0, 0.16) 100%
      );
  }

  .home-hero-content h1 {
    font-size: clamp(2.4rem, 11vw, 4rem);
  }

  .home-hero-links {
    gap: 0.5rem;
  }
}

@media (max-width: 760px) {
  .grid,
  .book-block {
    grid-template-columns: 1fr;
  }

  .book-block img {
    width: 170px;
  }
}