/* =============================================
   PART 05 — AI TOOLS DIRECTORY
   part05.css — Part-specific styles only
   ============================================= */

/* ── Category colour palette (used via JS inline --cat-color) ── */
:root {
  --cat-general:      #0E8A68; /* teal */
  --cat-developer:    #4A90D9; /* blue */
  --cat-research:     #C47D0E; /* amber */
  --cat-image:        #D85A30; /* coral-red */
  --cat-video:        #7B5EA7; /* purple */
  --cat-voice:        #2E7D52; /* green */
  --cat-slides:       #D4750A; /* orange */
  --cat-meetings:     #7A8A99; /* slate */
  --cat-accessibility:#6B7280; /* gray */
}

/* ── Hero: shorter than previous parts ── */
.hero-short { min-height: 60vh; }
.hero-right--counters {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.75rem;
  padding: 3rem 4rem;
}
.stat-block {}
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--teal-lt);
  line-height: 1;
  display: block;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-top: 0.3rem;
  display: block;
}

/* ── Generic pill types ── */
.cat-pill {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.cat-pill--sm { font-size: 0.58rem; padding: 2px 7px; }

.tag-pill {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  background: var(--ink-12);
  color: var(--ink-40);
  border-radius: 3px;
  border: 1px solid var(--rule);
}
.tag-pill--sm { font-size: 0.56rem; padding: 1px 5px; }
.tag-more { background: rgba(20,18,16,0.04); color: rgba(20,18,16,0.3); }

.pricing-badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
}
.badge--free     { background: var(--teal-bg);   color: var(--teal-mid); }
.badge--freemium { background: var(--amber-bg);   color: #8A5800; }
.badge--limited  { background: var(--ink-12);     color: var(--ink-40); }

/* ── Section 2: Featured tools ── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.feat-card {
  border: 1px solid var(--rule);
  border-top: 3px solid transparent;
  border-radius: 6px;
  padding: 1.5rem;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-top-color 0.2s ease;
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(20,18,16,0.09);
  border-top-color: var(--cat-color, var(--teal));
}
.feat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.feat-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}
.feat-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.feat-card-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-40);
  flex-grow: 1;
  margin: 0;
}
.feat-card-note {
  font-size: 0.82rem;
  font-style: italic;
  color: rgba(20,18,16,0.52);
  border-left: 3px solid var(--cat-color, var(--teal));
  padding-left: 0.75rem;
  margin: 0;
  line-height: 1.6;
}
.feat-card-link {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.5rem;
  letter-spacing: 0.02em;
}
.feat-card-link:hover { text-decoration: underline; }

/* ── Show all button ── */
.show-all-wrap { text-align: center; margin-top: 2.5rem; }
.show-all-btn {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: transparent;
  border: 2px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.show-all-btn:hover,
.show-all-btn.open { background: var(--teal); color: var(--white); }

/* ── Full directory (collapsible) ── */
.full-directory {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.full-directory.open { max-height: 9999px; }
.full-directory-inner { padding: 2.5rem 0 0; }

/* ── Filter tabs row ── */
.filter-tabs-row {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding-bottom: 1.25rem;
  scrollbar-width: none;
}
.filter-tabs-row::-webkit-scrollbar { display: none; }

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--rule);
  border-radius: 20px;
  background: transparent;
  color: var(--ink-40);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.filter-tab:hover { border-color: var(--teal); color: var(--teal); }
.filter-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.tab-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  opacity: 0.65;
}

/* ── Compact card grid ── */
.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.compact-card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1rem;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  position: relative;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.compact-card:hover { border-color: rgba(20,18,16,0.18); }

.compact-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}
.compact-card-name {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.expand-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  background: transparent;
  color: var(--ink-40);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.expand-btn:hover,
.expand-btn.open {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-bg);
}
.compact-card-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.compact-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.compact-card-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-40);
  margin: 0;
}
.compact-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: rgba(20,18,16,0.25);
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.3rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  transition: color 0.15s ease;
}
.compact-ext-link:hover { color: var(--teal); }

/* ── Tool detail drawer ── */
.tool-drawer {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--teal);
  border-radius: 0 6px 6px 0;
  overflow: hidden;
  animation: drawerIn 0.22s ease forwards;
  margin: 0;
}
@keyframes drawerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.drawer-inner { padding: 1.75rem 2rem; }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.drawer-head-left {}
.drawer-head-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.drawer-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0.3rem 0 0;
}
.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 1.25rem;
}
.drawer-visit-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--teal);
  color: var(--white);
  border-radius: 4px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.drawer-visit-btn:hover { background: var(--teal-mid); }
.drawer-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--rule);
  background: transparent;
  color: var(--ink-40);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.drawer-close-btn:hover { border-color: var(--ink); color: var(--ink); }
.drawer-body {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2.5rem;
}
.drawer-section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-bottom: 0.5rem;
}
.drawer-desc,
.drawer-pricing {
  font-size: 0.875rem;
  line-height: 1.72;
  color: rgba(20,18,16,0.7);
  margin: 0 0 1rem;
}
.drawer-pricing { margin-bottom: 0; }
.drawer-youth-note {
  font-size: 0.85rem;
  font-style: italic;
  color: rgba(20,18,16,0.62);
  border-left: 3px solid var(--teal);
  padding-left: 0.75rem;
  margin: 0;
  line-height: 1.65;
}

/* ── Highlight flash ── */
@keyframes highlightFlash {
  0%   { box-shadow: 0 0 0 3px var(--teal); }
  50%  { box-shadow: 0 0 0 8px rgba(14,138,104,0.25); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.highlight-flash { animation: highlightFlash 2s ease forwards; }

/* ── Section 4: Quick reference ── */
.qr-section { background: var(--ink); }
.qr-section .s-label { color: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.1); }
.qr-section .section-h2 { color: var(--white); }

.qr-list { display: flex; flex-direction: column; margin-top: 2.5rem; }
.qr-strip {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.qr-strip:first-child { border-top: 1px solid rgba(255,255,255,0.07); }
.qr-question {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.42);
  min-width: 240px;
  flex-shrink: 0;
  line-height: 1.5;
}
.qr-question strong {
  display: block;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.qr-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.qr-pill {
  background: var(--teal);
  color: var(--white);
  border-radius: 20px;
  padding: 5px 13px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease;
}
.qr-pill:hover { background: var(--teal-mid); }

/* ── Section 5: Pricing reality check ── */
.pricing-check-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: start;
}
.pricing-check-text p {
  font-size: 1rem;
  line-height: 1.78;
  color: var(--ink-40);
  margin-bottom: 1.25rem;
}
.pricing-check-text p:last-child { margin-bottom: 0; }
.pricing-stats-row {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.pricing-num {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  display: block;
}
.pricing-tier-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-40);
  margin-top: 0.2rem;
  display: block;
}
.pricing-bar {
  height: 10px;
  border-radius: 5px;
  display: flex;
  overflow: hidden;
  margin-bottom: 0.85rem;
}
.pricing-bar-seg { height: 100%; }
.pricing-bar-seg--free     { background: var(--teal);     flex: 18; }
.pricing-bar-seg--freemium { background: var(--amber-lt); flex: 24; }
.pricing-bar-seg--limited  { background: var(--ink-12);   flex: 8; }
.pricing-bar-labels {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.bar-label-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  color: var(--ink-40);
}
.bar-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Section 6: Teal quote ── */
.teal-quote-section {
  background: var(--teal);
  padding: 5rem var(--section-pad-h);
  text-align: center;
}
.teal-quote-inner { max-width: 720px; margin: 0 auto; }
.teal-quote-mark {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  line-height: 0.5;
  color: rgba(255,255,255,0.3);
  display: block;
  margin-bottom: 1.5rem;
}
.teal-quote-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.68;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.teal-quote-attr {
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.05em;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .compact-grid  { grid-template-columns: repeat(2, 1fr); }
  .pricing-check-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-right--counters { padding: 2.5rem; gap: 2rem; }
}
@media (max-width: 900px) {
  .qr-strip { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .qr-question { min-width: auto; }
  .drawer-body { grid-template-columns: 1fr; gap: 1.5rem; }
  .pricing-stats-row { gap: 1.5rem; }
}
@media (max-width: 640px) {
  .featured-grid { grid-template-columns: 1fr; }
  .compact-grid  { grid-template-columns: 1fr; }
  .hero-right--counters { display: none; }
  .pricing-num { font-size: 2.5rem; }
}
