/* site.css : styles for the landing page (index.html) and the import page (import.html).
   Colors, fonts, .nav, .btn, .pill, .card and .display come from base.css. */

html { scroll-behavior: smooth; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { text-wrap: balance; font-size: 40px; line-height: 1.15; margin: 12px 0 12px; }
.section-head p { color: var(--muted); font-size: 16px; margin: 0; }
.grey { color: #8a8a8f; }

/* ---------- Hero ---------- */
.hero {
  text-align: center; padding: 72px 0 56px;
  /* light grid behind the headline, fading out at the bottom */
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero h1 { font-size: 60px; line-height: 1.12; margin: 22px 0 22px; }
.hero h1 span { display: block; color: #8a8a8f; }
.hero-sub { max-width: 560px; margin: 0 auto 30px; font-size: 16.5px; color: var(--muted); }
.hero-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 12.5px; color: var(--faint); }
.btn-lg { padding: 13px 22px; font-size: 14.5px; }

/* ---------- Workspace mock (pure HTML/CSS) ---------- */
.mock-section { margin-top: -8px; }
.mock {
  display: grid; grid-template-columns: 52px 1fr 340px;
  height: 460px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; box-shadow: 0 2px 4px rgba(16, 24, 40, 0.04), 0 24px 60px rgba(16, 24, 40, 0.10);
}
.mock-rail { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; border-right: 1px solid var(--border); }
.mock-rail img { width: 20px; height: 20px; margin-bottom: 6px; }
.rail-icon { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #8a8a8f; }
.rail-icon.on { background: var(--surface-2); color: var(--heading); }
.rail-icon svg { width: 16px; height: 16px; }
.mock-main { padding: 16px 22px; overflow: hidden; min-width: 0; }
.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs b { color: var(--heading); font-weight: 600; }
.table-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; color: #525252; }
.tab.on { background: var(--accent-soft); border-color: #c9d8fb; color: var(--accent); font-weight: 500; }
.mock-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mock-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.mock-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mock-table tr.hit td { background: var(--accent-soft); }
.key { font-size: 10px; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.mock-meta { margin-top: 12px; font-size: 12px; color: var(--faint); }

.mock-chat { display: flex; flex-direction: column; border-left: 1px solid var(--border); min-width: 0; }
.chat-head { padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; color: var(--heading); }
.chat-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.bubble-user { align-self: flex-end; max-width: 85%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px 14px 4px 14px; padding: 9px 13px; font-size: 13px; color: var(--heading); }
.bubble-ai { font-size: 13px; color: var(--text); }
.bubble-ai .who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.orb-dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #b9a5ff, var(--purple)); }
.sql-box { margin-top: 10px; background: #fbfbfc; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: 11.5px/1.6 var(--font-mono); color: #3f3f46; }
.sql-box .kw { color: var(--accent); font-weight: 500; }
.sql-box .tag { display: inline-block; font: 600 10px var(--font); color: var(--green); background: var(--green-soft); padding: 1px 6px; border-radius: 4px; margin-bottom: 6px; }
.chat-input { display: flex; align-items: center; gap: 8px; margin: 0 14px 14px; padding: 8px 8px 8px 14px; border: 1px solid var(--border-strong); border-radius: 12px; font-size: 13px; color: var(--faint); }
.chat-input span { flex: 1; }
.orb {
  width: 34px; height: 34px; border-radius: 50%; border: 0; flex: none;
  display: grid; place-items: center; color: #fff; cursor: default;
  background: radial-gradient(circle at 30% 28%, #c9b8ff, var(--purple) 70%);
  box-shadow: 0 0 0 4px var(--purple-soft);
}
.orb svg { width: 15px; height: 15px; }

/* ---------- Stats strip ---------- */
.stats { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; }
.stat { padding: 34px 28px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: 0; }
.stat .num { font-size: 36px; line-height: 1; }
.stat p { margin: 10px 0 0; color: var(--muted); font-size: 13.5px; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { padding: 24px; }
.step .no { font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 3px 8px; display: inline-block; }
.step h3 { font-size: 17px; margin: 18px 0 8px; color: var(--heading); }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }
.step em { display: block; margin-top: 14px; font: normal 12px var(--font-mono); color: #525252; background: var(--surface-2); border-radius: 6px; padding: 8px 10px; }

/* ---------- Features ---------- */
.features { max-width: 820px; margin: 0 auto; padding: 8px 28px; }
.feature { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.feature:last-child { border-bottom: 0; }
.feature-icon { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.feature-icon svg { width: 18px; height: 18px; }
.feature h3 { margin: 0; font-size: 15.5px; color: var(--heading); }
.feature p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.feature > div { flex: 1; min-width: 0; }
.badge { flex: none; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; padding: 4px 9px; border-radius: 6px; color: var(--green); background: var(--green-soft); }

/* ---------- Architecture ---------- */
.flow { display: flex; align-items: stretch; justify-content: center; gap: 0; flex-wrap: wrap; row-gap: 14px; }
.node { flex: 1 1 150px; max-width: 190px; padding: 16px; text-align: center; }
.node b { display: block; font-size: 14px; color: var(--heading); }
.node small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.node.ai { background: var(--purple-soft); border-color: #ded6ff; }
.node.db { background: var(--green-soft); border-color: #c9ecd6; }
.arrow { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10.5px; color: var(--muted); text-align: center; }
.arrow::after { content: ""; display: block; width: 100%; height: 1px; background: var(--border-strong); margin-top: 4px; }
.arrow { position: relative; }
.arrow::before { content: ""; position: absolute; right: 0; bottom: calc(50% - 6px); border: 4px solid transparent; border-left: 6px solid var(--border-strong); border-right: 0; }
.back-note { text-align: center; margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.sql-files { margin-top: 36px; padding: 28px; }
.sql-files h3 { margin: 0 0 4px; font-size: 17px; color: var(--heading); }
.sql-files > p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; }
.file-list code { font-size: 12.5px; padding: 6px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.file-list code.app { background: var(--accent-soft); border-color: #c9d8fb; color: var(--accent-hover); }

/* ---------- Final CTA + footer ---------- */
.cta { margin: 96px 0 0; padding: 56px 24px; text-align: center; background: var(--heading); border-radius: 22px; color: #fff; }
.cta h2 { font-size: 42px; line-height: 1.15; margin: 0 0 12px; color: #fff; }
.cta p { margin: 0 0 28px; color: #a9a9b0; font-size: 16px; }
.cta .hero-buttons .btn-secondary { background: transparent; color: #fff; border-color: #55555b; }
.cta .hero-buttons .btn-secondary:hover { background: #2b2b2e; }
.footer { padding: 40px 0 48px; text-align: center; font-size: 13px; color: var(--faint); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Import page ---------- */
.import { padding: 64px 0 80px; }
.import-head { text-align: center; max-width: 560px; margin: 0 auto 40px; }
.import-head h1 { font-size: 48px; line-height: 1.1; margin: 14px 0 12px; }
.import-head p { margin: 0; color: var(--muted); font-size: 16px; }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.option { padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.option.recommended { border-color: #bcd0fb; }
.option-top { display: flex; align-items: center; justify-content: space-between; }
.option-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.option-icon svg { width: 20px; height: 20px; }
.option h2 { font-size: 18px; margin: 0; color: var(--heading); }
.option p { margin: 0; color: var(--muted); font-size: 13.5px; }
.option .btn { width: 100%; margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips code { font-size: 12px; padding: 3px 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.dropzone {
  display: block; text-align: center; padding: 20px 12px; cursor: pointer;
  border: 1.5px dashed var(--border-strong); border-radius: 10px; background: var(--surface-2);
  font-size: 13px; color: var(--muted); transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { display: block; color: var(--heading); font-weight: 500; word-break: break-all; }
.dropzone input { display: none; }
.error { margin: 0; min-height: 0; font-size: 13px; color: var(--red); word-break: break-word; }
.error:empty { display: none; }
.note-box { margin-top: 24px; padding: 18px 22px; display: flex; gap: 14px; background: var(--accent-soft); border-color: #d6e2fc; font-size: 13.5px; color: #3f3f46; }
.note-box b { color: var(--heading); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .options { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .mock { grid-template-columns: 52px 1fr; }
  .mock-chat { display: none; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .section { padding-top: 64px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 36px; }
  .section-head h2 { font-size: 30px; }
  .mock { grid-template-columns: 1fr; height: auto; }
  .mock-rail { display: none; }
  .mock-main { padding: 14px; overflow-x: auto; }
  .mock-chat { display: flex; border-left: 0; border-top: 1px solid var(--border); }
  .chat-body { padding: 14px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px 16px; border-bottom: 1px solid var(--border); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n + 2) { border-bottom: 0; }
  .steps { grid-template-columns: 1fr; }
  .features { padding: 4px 16px; }
  .feature { align-items: flex-start; }
  .flow { flex-direction: column; align-items: center; }
  .node { max-width: 320px; width: 100%; flex: none; }
  .arrow { flex: none; height: 40px; width: 1px; }
  .arrow::after { width: 1px; height: 100%; margin: 0; }
  .arrow::before { right: auto; bottom: 0; left: -3px; border: 4px solid transparent; border-top: 6px solid var(--border-strong); border-bottom: 0; }
  .arrow span { position: absolute; left: 12px; white-space: nowrap; top: 12px; }
  .cta h2 { font-size: 30px; }
  .cta { border-radius: 16px; }
  .import { padding-top: 40px; }
  .import-head h1 { font-size: 36px; }
  .nav-right .btn-ghost { display: none; }
}
