/* ═══════════════════════════════════════
   layout.css
   ═══════════════════════════════════════ */

.ambient {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, rgba(255,94,26,0.06) 0%, transparent 70%);
}
.ambient.shifted {
  background:
    radial-gradient(ellipse 40% 60% at 12% 50%, rgba(255,94,26,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 50%, rgba(255,140,66,0.04) 0%, transparent 70%);
}

header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(20px);
}

main {
  position: fixed;
  top: 64px; bottom: 0; left: 0; right: 0;
  display: grid;
  grid-template-columns: 1fr 0fr;
  transition: grid-template-columns 0.65s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  background: linear-gradient(160deg, #0F0F0F 0%, #1A1A1A 100%);
}
main.split {
  grid-template-columns: 440px 1fr;
}

/* ── LEFT PANEL ── */
#left-panel {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  border-right: 1px solid transparent;
  transition: border-color 0.65s, padding 0.65s, align-items 0.3s;
  overflow: hidden;
}
main.split #left-panel {
  border-right-color: rgba(255,255,255,0.06);
  align-items: flex-start;
  justify-content: flex-start;
  padding: 32px 24px;
  overflow-y: auto;
}
#left-panel::-webkit-scrollbar { width: 3px; }
#left-panel::-webkit-scrollbar-thumb { background: #2A2A42; border-radius: 2px; }

/* ── SEARCH HERO ── */
.search-hero {
  width: 70%;
  text-align: center;
}
main.split .search-hero {
  width: 100%;
  text-align: left;
}

/* ── HERO TITLE ── */
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: 52px; font-weight: 800;
  line-height: 1.1; letter-spacing: -2px;
  margin-bottom: 20px;
  color: #FFFFFF;
  transition: font-size 0.5s, margin 0.5s;
}
.hero-title .highlight {
  color: var(--primary);
}
main.split .hero-title {
  font-size: 19px; letter-spacing: -0.3px;
  margin-bottom: 6px; color: #FFFFFF;
}

/* ── HERO SUB ── */
.hero-sub {
  width: 60%;
  margin: 0 auto 24px;
  font-size: 16px; color: #CCCCCC;
  line-height: 1.7;
  transition: opacity 0.4s, max-height 0.4s, margin 0.4s;
  max-height: 100px; overflow: hidden;
}
main.split .hero-sub {
  opacity: 0; max-height: 0; margin-bottom: 0; width: 100%;
}

/* ── COMMUNITY COUNTER ── */
.community-counter {
  margin-bottom: 20px;
  transition: opacity 0.4s, max-height 0.4s, margin 0.4s;
  max-height: 40px; overflow: hidden;
}
main.split .community-counter { opacity: 0; max-height: 0; margin-bottom: 0; }

/* ── USE-CASE PILLS ── */
.usecase-pills {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
  transition: opacity 0.4s, max-height 0.4s, margin 0.4s;
  max-height: 60px; overflow: hidden;
}
main.split .usecase-pills {
  justify-content: flex-start;
  opacity: 0; max-height: 0; margin-bottom: 0;
}

/* ── TRUST LINE ── */
.trust-line {
  display: flex; align-items: center;
  justify-content: center;
  gap: 24px; margin-bottom: 24px;
  flex-wrap: wrap;
  transition: opacity 0.4s, max-height 0.4s, margin 0.4s;
  max-height: 30px; overflow: hidden;
}
main.split .trust-line {
  justify-content: flex-start;
  opacity: 0; max-height: 0; margin-bottom: 0;
}

/* ── RIGHT PANEL ── */
#right-panel {
  position: relative; z-index: 5;
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.5s 0.3s, transform 0.5s 0.3s;
  pointer-events: none;
  background: #111111;
}
main.split #right-panel {
  opacity: 1; transform: translateX(0);
  pointer-events: all;
}

.results-header {
  padding: 18px 28px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0; gap: 12px;
}
.results-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  color: #FFFFFF;
}
.result-count {
  font-size: 12px; font-family: 'DM Mono', monospace;
  color: #888; font-weight: 400;
}
.results-actions { display: flex; align-items: center; gap: 8px; }

#results-list {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
#results-list::-webkit-scrollbar { width: 4px; }
#results-list::-webkit-scrollbar-track { background: transparent; }
#results-list::-webkit-scrollbar-thumb { background: #2A2A42; border-radius: 2px; }
#results-list::-webkit-scrollbar-thumb:hover { background: #3A3A5A; }

.footer-note {
  position: fixed; bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 11px; color: #555;
  letter-spacing: 0.5px; pointer-events: none;
  z-index: 50; white-space: nowrap;
}

/* ── RESPONSIVE ── */
/* ── MOBILE ── */
@media (max-width: 768px) {
  header { padding: 0 20px; }

  #left-panel {
    padding: 24px 20px;
    justify-content: flex-start;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .search-hero { width: 100%; text-align: center; }

  .hero-title { font-size: 32px; letter-spacing: -1px; margin-bottom: 12px; }

  .hero-sub { width: 100%; font-size: 14px; margin-bottom: 16px; }

  .trust-line { gap: 10px; max-height: 60px; }

  .usecase-pills { max-height: 120px; }

  .community-counter { max-height: 40px; }

  main.split { grid-template-columns: 1fr; }
  main.split #left-panel { display: none; }
  main.split #right-panel { opacity: 1; transform: none; pointer-events: all; }
}