:root {
  --bg: #f4efe7;
  --surface: rgba(255, 251, 245, 0.82);
  --surface-strong: #fffaf2;
  --text: #1f1a17;
  --muted: #665d56;
  --line: rgba(31, 26, 23, 0.1);
  --accent: #c65f2d;
  --accent-dark: #8a3c16;
  --shadow: 0 22px 60px rgba(94, 55, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(198, 95, 45, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(57, 110, 92, 0.14), transparent 28%),
    linear-gradient(180deg, #efe5d6 0%, var(--bg) 45%, #f7f2eb 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.3;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.hero,
.toolbar,
.link-card {
  backdrop-filter: blur(18px);
}

.hero {
  padding: 26px 34px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow);
  max-width: 1040px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  color: var(--accent-dark);
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
  line-height: 1;
  margin: 0;
}

h1 {
  max-width: 24ch;
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  line-height: 0.96;
}

.hero-copy {
  max-width: 820px;
  margin: 14px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover,
.button:focus-visible,
.tag:hover,
.tag:focus-visible,
.link-card a:hover,
.link-card a:focus-visible {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.toolbar {
  display: grid;
  gap: 18px;
  margin: 28px 0 0;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.search-field {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.search-field span {
  font-size: 0.92rem;
  font-weight: 500;
}

.search-field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

.tag-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.tag.active {
  background: var(--accent-dark);
  color: #fff;
  border-color: transparent;
}

.links-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.link-card {
  display: grid;
  gap: 14px;
  padding: 26px;
  border-radius: 24px;
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, opacity 180ms ease;
}

.link-card.hidden {
  display: none;
}

h2 {
  font-size: 1.6rem;
}

.link-card p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.link-card a {
  display: inline-flex;
  width: fit-content;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, color 160ms ease;
}

@media (max-width: 920px) {
  .links-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 26px;
  }

  h1 {
    max-width: 18ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0 48px;
  }

  .hero,
  .toolbar,
  .link-card {
    border-radius: 20px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}
