:root {
  --bg: #f7f1e6;
  --bg-raised: #fffaf0;
  --ink: #2a2420;
  --ink-soft: #6e6358;
  --accent: #bb4b26;
  --accent-dark: #95391a;
  --accent-soft: #f0d4bf;
  --line: #e2d6c2;
  --radius: 14px;
  --font-display: "Iowan Old Style", Constantia, Georgia, "Times New Roman", serif;
  --font-body: "Century Gothic", Futura, "Trebuchet MS", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark { color: var(--accent); flex-shrink: 0; }

.logo-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.header-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 10px 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.header-nav a:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- Intro ---------- */

.intro {
  padding: 56px 20px 32px;
  max-width: 820px;
}

.intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

.intro-lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0;
  max-width: 640px;
}

/* ---------- Filters ---------- */

.filters {
  padding: 8px 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-weight: 700;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--font-body);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.12s var(--ease);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.chip:active { transform: scale(0.97); }

.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ef;
}

.result-count {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ---------- Grid ---------- */

.grid {
  padding: 36px 20px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}

.card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 28px -14px rgba(42, 36, 32, 0.35);
}

.card-media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--accent-soft);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}

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

.card-media--plain {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-media--plain svg { width: 100%; height: 100%; }

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.card-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.2;
}

.card-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
}

.card-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card-country {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 600;
}

.card-links {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
}

.card-link-main, .card-link-sub {
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 0.92rem;
  transition: color 0.18s var(--ease);
}

.card-link-main {
  color: var(--accent-dark);
}

.card-link-main:hover { color: var(--accent); }

.card-link-sub {
  color: var(--ink-soft);
  font-size: 0.86rem;
  min-height: 36px;
  padding-top: 0;
}

.card-link-sub:hover { color: var(--ink); }

.empty-state {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 20px 80px;
  margin: 0;
  font-size: 1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 20px 40px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card-media img, .chip, .card-link-main, .card-link-sub, .header-nav a {
    transition: none;
  }
}
