/* AI Launch Radar — styles
   Plain CSS, no frameworks. Colors and sizes are defined as variables below. */

:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --ink: #0b1f1d;
  --ink-soft: #4a5d5a;
  --ink-faint: #6b7d7a;
  --line: #dfe7e5;
  --accent: #0f766e;
  --accent-strong: #0b5a54;
  --accent-soft: #e3f4f1;
  --radar: #2dd4bf;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 31, 29, 0.05), 0 4px 14px rgba(11, 31, 29, 0.04);
  --shadow-hover: 0 2px 4px rgba(11, 31, 29, 0.06), 0 10px 24px rgba(11, 31, 29, 0.09);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

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

h1, h2, h3, p { margin: 0; }

a { color: var(--accent); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Visible focus for every interactive element */
:focus-visible {
  outline: 3px solid var(--radar);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 248, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
}
.nav-link:hover { color: var(--accent); background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 56px 0 64px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--radar);
  border: 1px solid rgba(45, 212, 191, 0.4);
  border-radius: 999px;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 820px;
}
.hero-text {
  margin-top: 16px;
  max-width: 620px;
  font-size: 1.08rem;
  color: #c4d4d1;
}

.search {
  position: relative;
  margin-top: 28px;
  max-width: 640px;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 46px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid transparent;
  border-radius: 12px;
}
.search input::placeholder { color: var(--ink-faint); }
.search input:disabled { opacity: 0.7; cursor: not-allowed; }

/* ---------- Controls ---------- */
.catalog { padding: 28px 0 56px; }

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.field select {
  height: 42px;
  min-width: 220px;
  max-width: 100%;
  padding: 0 12px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c7d3d0;
  border-radius: 10px;
}
.field select:disabled { opacity: 0.6; cursor: not-allowed; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--accent); border-color: #b5d6d1; }
.btn-ghost:hover { background: var(--accent-soft); }
.btn[hidden] { display: none; }

/* ---------- Results header ---------- */
.results-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin: 28px 0 6px;
}
.results-header h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
.results-count { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }
.results-note { margin-bottom: 14px; font-size: 0.88rem; color: var(--ink-faint); }
.results-note[hidden] { display: none; }

/* ---------- Grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.grid[hidden] { display: none; }

.card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-hover); border-color: #c3d6d2; }

.card-title {
  font-size: 1.08rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-domain {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  overflow-wrap: anywhere;
}
.card-summary {
  margin-top: 12px;
  font-size: 0.93rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.card-body { flex: 1 1 auto; min-width: 0; padding-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.chip-more { color: var(--ink-soft); background: #eef2f1; }

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}
.card-meta div { display: flex; gap: 6px; }
.card-meta dt { color: var(--ink-faint); }
.card-meta dd { margin: 0; font-weight: 600; color: var(--ink); }

.card-cta { padding-top: 16px; }
.card-cta .btn { width: 100%; }

/* ---------- Skeleton loading ---------- */
.skeleton .sk {
  background: linear-gradient(90deg, #e9efed 25%, #f3f6f5 50%, #e9efed 75%);
  background-size: 200% 100%;
  border-radius: 6px;
  animation: shimmer 1.4s linear infinite;
}
.sk-title { height: 20px; width: 70%; }
.sk-domain { height: 12px; width: 40%; margin-top: 10px; }
.sk-line { height: 12px; margin-top: 10px; }
.sk-line.short { width: 60%; }
.sk-chip { height: 22px; width: 110px; margin-top: 16px; border-radius: 999px !important; }
.sk-btn { height: 42px; margin-top: 20px; border-radius: 10px !important; }

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton .sk { animation: none; }
  html { scroll-behavior: auto; }
  .card { transition: none; }
}

/* ---------- Empty / error message ---------- */
.message {
  max-width: 520px;
  margin: 24px auto 0;
  padding: 36px 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.message[hidden] { display: none; }
.message-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
}
.message.is-error .message-icon { color: var(--danger); background: #fdecea; }
.message h3 { font-size: 1.15rem; }
.message p { margin-top: 8px; color: var(--ink-soft); }
.message .btn { margin-top: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0 36px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.footer-inner { display: grid; gap: 8px; }
.footer-note { font-size: 0.82rem; color: var(--ink-faint); max-width: 760px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 44px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .controls { flex-direction: column; align-items: stretch; }
  .field select { width: 100%; min-width: 0; }
  .controls .btn { width: 100%; }
}
