:root {
  --ink: #13212b;
  --muted: #5a6b78;
  --accent: #f26f5b;
  --accent-deep: #cb4b37;
  --surface: #ffffff;
  --surface-soft: #f5f1eb;
  --glass: rgba(255, 255, 255, 0.85);
  --shadow: 0 24px 60px rgba(19, 33, 43, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fef6e9 0%, #f6f0e6 40%, #e7f0ee 100%);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-footer {
  border-top: 1px solid rgba(19, 33, 43, 0.08);
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding-bottom: 2rem;
}

.hero-shell::before,
.hero-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.2;
  filter: blur(0px);
  z-index: 0;
}

.hero-shell::before {
  width: 480px;
  height: 480px;
  background: #f7b894;
  top: -180px;
  right: -120px;
}

.hero-shell::after {
  width: 520px;
  height: 520px;
  background: #9ad1c7;
  bottom: -120px;
  left: -180px;
}

.container {
  position: relative;
  z-index: 1;
  padding-bottom: 0;
}

.brand-mark {
  font-family: "Fraunces", serif;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-exponent {
  font-size: 0.6em;
  vertical-align: super;
  margin-left: 0.06em;
  letter-spacing: 0;
}

.brand-lockup-text {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-badge {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 700;
  line-height: 1;
}

.brand-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 720px;
  margin: 0;
}

.hero-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: clamp(2.4rem, 4vw, 3.2rem);
  width: auto;
}

.search-panel {
  margin-top: 2.5rem;
  padding: 2rem 2.2rem;
  background: var(--glass);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: padding 0.25s ease, margin 0.25s ease, box-shadow 0.25s ease;
}

.search-panel .form-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.input-group-text {
  background: var(--surface);
  border: none;
  padding-inline: 1.2rem;
}

.search-icon {
  font-size: 1.2rem;
  color: var(--accent-deep);
}

.form-control {
  border: none;
  box-shadow: none;
  font-size: 1.1rem;
  padding: 1rem 1.2rem;
}

.form-control:focus {
  box-shadow: none;
}

.search-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pill {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--accent-deep);
  font-weight: 600;
}

.results-panel {
  margin-top: 2.5rem;
}

.results-panel.is-hidden {
  display: none;
}

.search-panel.compact {
  margin-top: 1.2rem;
  padding: 0.7rem 1.2rem;
  box-shadow: 0 14px 40px rgba(19, 33, 43, 0.12);
}

.search-panel.compact .form-control {
  padding-block: 0.45rem;
  font-size: 0.98rem;
}

.search-panel.compact + .results-panel {
  margin-top: 1.4rem;
}

@media (min-width: 992px) {
  .hero-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .brand-subtitle {
    max-width: 480px;
    text-align: right;
  }
}

.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.results-header h2 {
  font-family: "Fraunces", serif;
  font-size: 1.7rem;
  margin: 0;
}

#results-count {
  font-weight: 600;
  color: var(--muted);
}

.results-list {
  display: grid;
  gap: 1rem;
}

.catalog-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: none;
}

.catalog-link::after {
  content: "→";
  transition: transform 0.2s ease;
}

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

.catalog-link:hover::after {
  transform: translateX(4px);
}

.search-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.2rem;
}

.bookmark-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: none;
}

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

.bookmark-link .bi {
  font-size: 1rem;
}

.result-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(19, 33, 43, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(19, 33, 43, 0.16);
}

.result-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 24px 50px rgba(242, 111, 91, 0.22);
  transform: translateY(-2px);
}

.result-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.result-description {
  color: var(--muted);
  margin: 0;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #ecf2f0;
  color: #1c5b56;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.65rem;
}

.empty-state {
  padding: 1.5rem;
  border: 1px dashed rgba(19, 33, 43, 0.2);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.55);
}

@media (max-width: 768px) {
  .search-panel {
    padding: 1.6rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .search-links {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}
