/* =====================================================================
   XOORA — Home page
   ===================================================================== */

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 40px 0 8px;
}
.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
@media (min-width: 900px) {
  .hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 24px;
    min-height: 420px;
  }
}

.hero-copy h1 {
  font-size: 2.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 14px;
}
@media (min-width: 40rem) { .hero-copy h1 { font-size: 2.625rem; } }
@media (min-width: 75rem) { .hero-copy h1 { font-size: 3.125rem; } }

.hero-brand {
  background: linear-gradient(120deg, var(--accent), var(--violet) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: 26px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-actions .btn { height: 3rem; padding: 0 1.375rem; font-size: 0.9375rem; }

.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.hero-art img {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(47, 111, 237, 0.18));
  animation: float-y calc(6s * var(--speed, 1)) ease-in-out infinite;
}
.hero-art-ring {
  position: absolute;
  width: min(88%, 380px);
  aspect-ratio: 1;
  border: 1.5px dashed var(--border-strong);
  border-radius: 50%;
  animation: spin-slow calc(30s * var(--speed, 1)) linear infinite;
}
.hero-art-ring::before,
.hero-art-ring::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  top: -4px; left: calc(50% - 4px);
  box-shadow: 0 0 12px var(--cyan);
}
.hero-art-ring::after { top: auto; bottom: -4px; background: var(--violet); box-shadow: 0 0 12px var(--violet); }

@media (prefers-reduced-motion: reduce) {
  .hero-art img { animation: none; }
  .hero-art-ring { animation: none; }
}

/* ---------------- Stats ---------------- */
.stats-section { padding: 20px 0 48px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { font-family: var(--font-display); font-size: 1.1875rem; font-weight: 800; line-height: 1.2; }
@media (min-width: 40rem) { .stat-value { font-size: 1.375rem; } }
.stat-label { font-size: 0.7812rem; color: var(--text-secondary); font-weight: 600; }

/* ---------------- Quick access ---------------- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
@media (min-width: 768px) { .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.quick-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-md); }
.quick-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.quick-icon svg { width: 16px; height: 16px; }
.quick-title { font-family: var(--font-display); font-weight: 700; font-size: 0.9062rem; }
.quick-desc { font-size: 0.7812rem; color: var(--text-secondary); line-height: 1.5; }
.quick-arrow {
  position: absolute;
  top: 16px; right: 14px;
  width: 15px; height: 15px;
  color: var(--text-tertiary);
  transition: transform var(--t-fast), color var(--t-fast);
}
.quick-card:hover .quick-arrow { transform: translateX(2px); color: var(--accent); }

.onboard-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(120deg, var(--accent-soft), var(--violet-soft));
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: border-color var(--t-fast);
}
.onboard-banner:hover { border-color: var(--accent); }
.onboard-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.onboard-icon svg { width: 19px; height: 19px; }
.onboard-copy { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.onboard-copy strong { font-family: var(--font-display); font-size: 0.9062rem; }
.onboard-copy span { font-size: 0.7812rem; color: var(--text-secondary); }
.onboard-banner .link-arrow { flex-shrink: 0; }
@media (max-width: 560px) { .onboard-banner .link-arrow span { display: none; } }

/* ---------------- Section alt background ---------------- */
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------------- API search ---------------- */
.api-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0 14px;
  height: 46px;
  margin-bottom: 24px;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
}
.api-search svg { width: 17px; height: 17px; color: var(--text-tertiary); flex-shrink: 0; }
.api-search input {
  border: none; outline: none; background: transparent;
  font: inherit; font-size: 0.875rem; color: var(--text-primary);
  width: 100%; height: 100%;
}
.api-search input::placeholder { color: var(--text-tertiary); }

/* ---------------- API groups / cards ---------------- */
.api-group { margin-bottom: 26px; }
.api-group:last-child { margin-bottom: 0; }
.api-group-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.api-group-title::after { content: ''; height: 1px; flex: 1; background: var(--border); }

.api-list { display: flex; flex-direction: column; gap: 10px; }
.api-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.api-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.api-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.api-card-icon svg { width: 17px; height: 17px; }
.api-card-body { flex: 1; min-width: 0; }
.api-card-name { font-family: var(--font-display); font-weight: 700; font-size: 0.9062rem; margin-bottom: 0.125rem; }
.api-card-desc { font-size: 0.7812rem; color: var(--text-secondary); margin-bottom: 0.375rem; }
.api-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.api-card-path {
  font-family: var(--font-mono);
  font-size: 0.7188rem;
  color: var(--text-tertiary);
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}
.api-card-action { flex-shrink: 0; }
.api-empty { padding: 1.875rem 0; text-align: center; color: var(--text-secondary); font-size: 0.875rem; }

/* ---------------- Playground ---------------- */
.playground {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 960px) {
  .playground { display: grid; grid-template-columns: 300px 1fr; padding: 22px; gap: 22px; align-items: start; }
}

.field { margin-bottom: 14px; }
.field-label {
  display: block;
  font-size: 0.7812rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8438rem;
  appearance: none;
  cursor: pointer;
}
.select-wrap select:focus { border-color: var(--accent); }
.select-chevron {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.playground-params { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.playground-params input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font: inherit;
  font-size: 0.8438rem;
  color: var(--text-primary);
}
.playground-params input:focus { border-color: var(--accent); }
.playground-params input.is-invalid { border-color: var(--danger); }
.param-hint { font-size: 0.75rem; color: var(--text-tertiary); margin-top: -0.25rem; }

.playground-meta {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.playground-meta > div {
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.playground-meta span { display: block; font-size: 0.6562rem; color: var(--text-tertiary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.playground-meta strong { font-family: var(--font-mono); font-size: 0.8125rem; }
.playground-meta strong.is-ok { color: var(--success); }
.playground-meta strong.is-error { color: var(--danger); }

.playground-panels { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.playground-panels .code-body { max-height: 340px; overflow: auto; }
.playground-response-image { padding: 16px; }
.playground-response-image img { max-width: 100%; border-radius: 8px; }
