@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('dm-sans.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('instrument-serif.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --ink: #232e23;
  --muted: #50584d;
  --accent: #334b37;
  --paper: #f8f6f0;
  --line: #d9dbd0;
  --display: 'Instrument Serif', Georgia, serif;
  --body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.55 var(--body); }
button, input { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #9f562f; outline-offset: 4px; }
section[id] { scroll-margin-top: 1.25rem; }

.wrap { width: min(100% - 5rem, 75rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 2; padding: .5rem .75rem; background: white; transform: translateY(-150%); }
.skip:focus { transform: none; }

.site-header { background: #f9f7f0; }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.header-inner { min-height: 5.2rem; }
.wordmark { display: grid; color: inherit; text-decoration: none; font: 400 2.05rem/.95 var(--display); }
.wordmark span { margin-top: .42rem; font: 700 .64rem/1.3 var(--body); letter-spacing: .14em; text-transform: uppercase; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }
nav a, .footer-inner > a:last-child { font-size: .9rem; font-weight: 700; text-decoration: none; padding-block: .5rem; }
nav a:hover, .footer-inner > a:last-child:hover { text-decoration: underline; text-underline-offset: .28em; }

.hero {
  color: #fffaf0;
  background: linear-gradient(90deg, rgb(18 29 17 / .52) 0%, rgb(18 29 17 / .24) 52%, transparent 78%),
    #202d20 url('hero.webp') center center / cover no-repeat;
}
.hero-inner { min-height: clamp(29rem, 37vw, 39rem); display: flex; flex-direction: column; justify-content: center; align-items: start; padding-block: 3rem; }
.hero h1 { margin: 0; font: 400 clamp(3.85rem, 7.6vw, 7.3rem)/.88 var(--display); letter-spacing: -.025em; }
.hero p { margin: 1.6rem 0 1.8rem; max-width: 30rem; font-size: clamp(1rem, 1.4vw, 1.15rem); color: #f4f2e7; }
.hero-link { display: inline-flex; align-items: center; gap: 1.3rem; padding: .8rem 1.14rem; border-radius: .4rem; background: #efe6c9; color: #243324; text-decoration: none; font-size: .9rem; font-weight: 700; }
.hero-link:hover { background: #fff5d9; }
.hero-link:focus-visible { outline-color: #fff5d9; }

.directory { padding-block: clamp(2.8rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem); }
.directory-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.15rem 3rem; }
.directory h2, .about h2 { margin: 0; font: 400 clamp(2.7rem, 5vw, 4.2rem)/.95 var(--display); }
.directory-heading p { margin: .65rem 0 0; color: var(--muted); }
.search { position: relative; width: min(100%, 23rem); }
.search input { width: 100%; min-height: 3.2rem; padding: .66rem 1rem .66rem 2.8rem; border: 1px solid #a4aea0; border-radius: .45rem; background: #fffdfa; color: var(--ink); }
.search input::placeholder { color: #596457; opacity: 1; }
.search-icon { position: absolute; top: 1rem; left: 1rem; width: .9rem; height: .9rem; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; right: -.32rem; bottom: -.17rem; width: .43rem; height: 2px; background: var(--accent); transform: rotate(45deg); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.85rem; }
.filters button, .empty button { min-height: 2.75rem; padding: .4rem .95rem; border: 1px solid #a8b2a4; border-radius: 3rem; background: transparent; color: var(--accent); font-size: .87rem; font-weight: 700; cursor: pointer; }
.filters button:hover, .empty button:hover { background: #e8eee1; }
.filters button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent); color: #fffdf5; }
.result-count { margin: 1.2rem 0 .7rem; color: var(--muted); font-size: .85rem; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .95rem; }
.result-count[hidden] + .cards { margin-top: 1.5rem; }
.card { display: flex; flex-direction: column; align-items: start; padding: clamp(1.15rem, 2.4vw, 1.65rem); min-height: 15rem; border: 1px solid var(--line); border-radius: .6rem; background: #fffdfa; }
.card-top { display: flex; align-items: center; gap: .65rem; color: var(--accent); font-size: .74rem; font-weight: 700; }
.card-mark { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .45rem; background: #e3ebdf; font: 1.12rem/1 var(--body); }
.card[data-category='tools'] .card-mark { color: #734228; background: #f2e3d5; }
.card[data-category='guides'] .card-mark { color: #574973; background: #ece6f0; }
.card h3, .empty h3 { margin: .85rem 0 .35rem; font: 400 2rem/1.02 var(--display); }
.card p { margin: 0 0 .95rem; color: var(--muted); font-size: .94rem; }
.card a, .about a { display: inline-flex; align-items: baseline; gap: .55rem; padding-block: .35rem; color: var(--accent); font-size: .87rem; font-weight: 700; text-underline-offset: .22em; }
.card a { margin-top: auto; }
.card a:hover, .about a:hover { color: #80502f; }
.empty { padding: 2rem; text-align: center; border: 1px solid var(--line); border-radius: .6rem; background: #fffdfa; }
.empty p { margin: .5rem 0 1.1rem; }

.about { background: #e8ede1; border-block: 1px solid #d9e0d3; }
.about-inner { display: grid; grid-template-columns: 1fr 1.5fr; gap: 1.25rem 3rem; padding-block: clamp(2.7rem, 6vw, 4.5rem); }
.about p { max-width: 39rem; margin: 0 0 .65rem; color: #3d4a3b; }
.site-footer { color: #f6f2e8; background: #263629; }
.footer-inner { min-height: 7rem; padding-block: 1.4rem; }
.site-footer button { border: 0; padding: .5rem 0; color: inherit; background: transparent; font-size: .9rem; font-weight: 700; cursor: pointer; }
.site-footer button:hover { text-decoration: underline; text-underline-offset: .28em; }
.privacy { max-width: 46rem; padding-block: clamp(2.6rem, 7vw, 6rem); }
.privacy h1 { margin: 0 0 1.1rem; font: 400 clamp(3rem, 8vw, 5.4rem)/.9 var(--display); }
.privacy h2 { margin: 2rem 0 .5rem; font: 400 2.35rem/1 var(--display); }
.privacy p { margin: 0 0 1rem; color: var(--muted); }
.consent { position: fixed; inset: auto 1rem 1rem auto; z-index: 3; width: min(24rem, calc(100% - 2rem)); padding: 1.1rem 1.25rem; border: 1px solid #a4aea0; border-radius: .65rem; background: #fffdfa; box-shadow: 0 8px 32px #232e232e; }
.consent h2 { margin: 0 0 .4rem; font: 400 1.85rem/1 var(--display); }
.consent p { margin: 0 0 .7rem; color: var(--muted); font-size: .88rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.consent button { min-height: 2.75rem; padding: .45rem .75rem; border: 1px solid var(--accent); border-radius: .45rem; background: #fffdfa; color: var(--accent); font-size: .85rem; font-weight: 700; cursor: pointer; }
.consent button:last-child { background: var(--accent); color: #fffdfa; }

@media (max-width: 58rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 42rem) {
  .wrap { width: calc(100% - 2.25rem); }
  .header-inner { min-height: 4.35rem; }
  .wordmark { font-size: 1.65rem; }
  .wordmark span { font-size: .53rem; }
  nav { gap: .1rem .85rem; }
  nav a { font-size: .83rem; }
  .hero {
    background-image: linear-gradient(90deg, rgb(19 29 17 / .78), rgb(19 29 17 / .48) 55%, rgb(19 29 17 / .14)), url('hero.webp');
    background-position: center, 63% center;
  }
  .hero-inner { min-height: 27rem; }
  .hero h1 { font-size: clamp(3.25rem, 13vw, 5rem); }
  .hero p { max-width: 23rem; }
  .directory-heading { align-items: start; flex-direction: column; }
  .search { width: 100%; }
  .filters { margin-top: 1rem; }
  .about-inner { grid-template-columns: 1fr; }
  .footer-inner { align-items: start; flex-direction: column; gap: .55rem; }
}

@media (max-width: 33rem) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: auto; }
}
