:root {
  --ink: #163d38;
  --ink-soft: #49645f;
  --forest: #0e6658;
  --forest-dark: #0b4e44;
  --cream: #f7f4ea;
  --paper: #fffdf8;
  --lime: #ddeb83;
  --orange: #f3a737;
  --line: #d8dfd7;
  --shadow: 0 18px 55px rgba(17, 61, 55, 0.1);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand strong {
  color: var(--forest);
}

.brand-mark {
  width: 34px;
  fill: var(--orange);
}

.header-link {
  font-size: 0.91rem;
  font-weight: 700;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 610px;
  padding: 76px max(24px, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, 0.98fr);
  align-items: center;
  background:
    radial-gradient(circle at 12% 10%, rgba(221, 235, 131, 0.32), transparent 25%),
    var(--cream);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 710px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Manrope", system-ui, sans-serif;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.2rem, 6.4vw, 6.15rem);
}

.hero-intro {
  max-width: 580px;
  margin: 30px 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  color: #fff;
  background: var(--forest);
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.primary-action:hover {
  background: var(--forest-dark);
  transform: translateY(-2px);
}

.hero-art {
  width: min(100%, 580px);
  justify-self: end;
}

.hero-art svg {
  display: block;
  width: 100%;
  filter: drop-shadow(0 24px 40px rgba(14, 102, 88, 0.08));
}

.catalogue {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 110px 0 120px;
}

.catalogue-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.catalogue-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.35rem);
}

.search {
  width: min(100%, 330px);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.search:focus-within {
  border-color: var(--forest);
  outline: 3px solid rgba(14, 102, 88, 0.12);
}

.search svg {
  width: 19px;
  fill: none;
  stroke: var(--forest);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search input {
  width: 100%;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
}

.results-summary {
  margin: 25px 0 20px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.course-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.course-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.course-card[hidden] {
  display: none;
}

.course-link {
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.course-visual {
  min-height: 194px;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(221, 235, 131, 0.68), rgba(169, 220, 136, 0.4)),
    var(--cream);
}

.course-card:nth-child(3n + 2) .course-visual {
  background:
    linear-gradient(135deg, rgba(243, 167, 55, 0.38), rgba(247, 244, 234, 0.7)),
    var(--cream);
}

.course-card:nth-child(3n + 3) .course-visual {
  background:
    linear-gradient(135deg, rgba(14, 102, 88, 0.22), rgba(221, 235, 131, 0.48)),
    var(--cream);
}

.course-visual img {
  width: min(100%, 230px);
  max-height: 130px;
  object-fit: contain;
  transition: transform 220ms ease;
}

.course-card:hover .course-visual img {
  transform: scale(1.04);
}

.course-monogram {
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  color: #fff;
  background: var(--forest);
  border-radius: 50%;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
}

.course-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px;
}

.course-label {
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.course-card h2 {
  margin: 10px 0 12px;
  font-size: 1.55rem;
  line-height: 1.17;
}

.course-card p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.course-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -8px 0 24px;
  padding: 0;
  list-style: none;
}

.course-topics li {
  padding: 5px 9px;
  color: var(--forest-dark);
  background: #eef4e4;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.course-action {
  margin-top: auto;
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 800;
}

.course-action span {
  display: inline-block;
  margin-left: 5px;
  transition: transform 160ms ease;
}

.course-card:hover .course-action span {
  transform: translateX(4px);
}

.empty-state {
  padding: 70px 20px;
  text-align: center;
}

.empty-state h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

.empty-state p {
  color: var(--ink-soft);
}

.empty-state button {
  padding: 10px 16px;
  color: #fff;
  background: var(--forest);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

footer {
  min-height: 170px;
  padding: 50px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: rgba(255, 255, 255, 0.72);
  background: var(--ink);
  font-size: 0.88rem;
}

footer p {
  margin: 0;
}

footer strong {
  color: #fff;
}

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

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 72px;
    padding-bottom: 20px;
  }

  .hero-art {
    width: min(100%, 500px);
    margin: -25px auto 0;
    justify-self: center;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 74px;
  }

  .header-link {
    display: none;
  }

  .hero {
    padding-top: 56px;
  }

  h1 {
    font-size: clamp(2.75rem, 13vw, 4.4rem);
  }

  .hero-art {
    margin-top: -10px;
  }

  .catalogue {
    padding: 80px 0;
  }

  .catalogue-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  footer {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
