/*-- scss:defaults --*/

$font-family-sans-serif: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
$font-family-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;

$body-color: #1a1a1a;
$link-color: #1a4480;
$primary: #1a4480;

/*-- scss:rules --*/

body {
  font-family: $font-family-serif;
  color: $body-color;
}

h1, h2, h3, h4, h5, h6,
.navbar, .nav-link, .quarto-listing-category,
.category-tile, .category-tile-name {
  font-family: $font-family-sans-serif;
  letter-spacing: -0.01em;
}

h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h2 {
  font-weight: 600;
  margin-top: 2.5rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3rem;
}

blockquote {
  border-left: 3px solid $primary;
  background: #f7f8fa;
  padding: 1rem 1.25rem;
  font-style: normal;
  font-size: 1.1em;
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  padding: 3rem 0 2rem 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.hero .tagline {
  font-size: 1.2rem;
  line-height: 1.5;
  color: #444;
  max-width: 640px;
  margin-bottom: 0.5rem;
}

.hero .sub-tagline {
  font-size: 1rem;
  color: #777;
  font-style: italic;
}

/* ── Framework Finder ─────────────────────────────────── */

.finder-box {
  background: #f7f8fa;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0 2.5rem 0;
}

.finder-page {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.finder-input-row {
  margin-bottom: 1rem;
}

.finder-input-row p {
  display: flex;
  width: 100%;
  gap: 0.5rem;
  margin: 0;
  align-items: stretch;
}

.finder-input {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.1rem;
  font-size: 1.05rem;
  font-family: $font-family-serif;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
  min-height: 3.2rem;

  &:focus {
    border-color: $primary;
  }
}

.finder-btn {
  padding: 0.85rem 1.5rem;
  background: $primary;
  color: white;
  border: none;
  border-radius: 6px;
  font-family: $font-family-sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;

  &:hover {
    background: darken(#1a4480, 8%);
  }
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.example-chip {
  font-family: $font-family-sans-serif;
  font-size: 0.8rem;
  padding: 0.3rem 0.75rem;
  background: #eef1f6;
  color: #444;
  border: 1px solid #d0d8e8;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;

  &:hover {
    background: #dde3f0;
    border-color: $primary;
    color: $primary;
  }
}

.finder-results-area {
  min-height: 60px;
}

.finder-count {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.finder-no-results {
  color: #666;
  font-style: italic;
}

.finder-error {
  color: #c00;
}

.finder-result-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.finder-result-card {
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;

  &:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: $primary;
    text-decoration: none;
    color: inherit;
  }
}

.finder-result-category {
  font-family: $font-family-sans-serif;
  font-size: 0.75rem;
  color: $primary;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.finder-result-title {
  margin: 0 0 0.3rem 0;
  font-size: 1.05rem;
  color: #222;
}

.finder-result-explain {
  margin: 0;
  color: #555;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ── Category tiles ───────────────────────────────────── */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 3rem 0;
}

.category-tile {
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s;

  &:hover {
    border-color: $primary;
    text-decoration: none;
  }
}

.category-tile-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: $primary;
  margin-bottom: 0.25rem;
}

.category-tile-count {
  font-family: $font-family-sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.5rem;
}

.category-tile-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
}

/* ── See-all link ─────────────────────────────────────── */

.see-all-link {
  display: inline-block;
  font-family: $font-family-sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: $primary;
  margin-top: 0.5rem;
  margin-bottom: 2.5rem;
}

/* ── Framework page card meta (hidden — category clear from context) */

.card-meta {
  display: none;
}

/* ── Related frameworks mini-cards ───────────────────── */

#related-frameworks + ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

#related-frameworks + ul li {
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
}

#related-frameworks + ul li:hover {
  border-color: $primary;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#related-frameworks + ul li a {
  font-family: $font-family-sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: $primary;
  display: block;
  margin-bottom: 0.2rem;
}

#related-frameworks + ul li p,
#related-frameworks + ul li {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.4;
  margin: 0;
}

.attribution {
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #eee;
  margin-top: 3rem;
  padding-top: 1rem;
  font-style: italic;
}

/* ── Listings ─────────────────────────────────────────── */

.quarto-listing-default .listing-item {
  border-bottom: 1px solid #eee;
  padding: 0.9rem 0;
}

.section-divider {
  border: 0;
  border-top: 1px solid #eee;
  margin: 2.5rem 0 1.5rem 0;
}

/* Grid card images */
.quarto-grid-item img {
  object-fit: cover;
  width: 100%;
  border-radius: 4px 4px 0 0;
}

.quarto-grid-item {
  transition: transform 0.15s, box-shadow 0.15s;
  border-radius: 6px;
}

.quarto-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.quarto-grid-item .card-title {
  font-family: $font-family-sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: $primary;
  margin-top: 0.5rem;
}

.quarto-grid-item .card-text {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.45;
}

.quarto-grid-item .listing-category {
  font-family: $font-family-sans-serif;
  font-size: 0.72rem;
  background: #eef1f6;
  color: #555;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quarto-grid-item .card-body {
  padding: 1rem;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .hero .tagline { font-size: 1.05rem; }
  .finder-input-row p { flex-direction: column; }
  .finder-btn { width: 100%; }
  .finder-input {
    width: 100%;
    font-size: 1rem;
    padding: 0.9rem 1rem;
  }
  .finder-box { padding: 1rem; }
  .example-chips { gap: 0.4rem; }
  .example-chip { font-size: 0.75rem; }
  .category-grid { grid-template-columns: 1fr; }
}
