/* ============================================================
   CarHistoryX — Simple landing page (light, focused, friendly).
   Used by index.php in addition to plate-vin.css.
   ============================================================ */

:root {
  --sx-bg:       #f6f8fb;
  --sx-bg-2:     #ffffff;
  --sx-ink:      #0f172a;
  --sx-ink-2:    #475569;
  --sx-muted:    #64748b;
  --sx-line:     #e5e9f0;
  --sx-line-2:   #eef1f6;
  --sx-brand:    #2563eb;       /* friendly blue */
  --sx-brand-2:  #1d4ed8;
  --sx-brand-50: #eff6ff;
  --sx-accent:   #10b981;
  --sx-warn:     #f59e0b;
  --sx-radius:   14px;
  --sx-shadow:   0 1px 2px rgba(15,23,42,.04), 0 8px 24px -8px rgba(15,23,42,.08);
  --sx-shadow-2: 0 4px 8px rgba(15,23,42,.06), 0 24px 60px -24px rgba(15,23,42,.18);
}

/* Reset overrides for the index page only */
body.sx-body {
  background: var(--sx-bg);
  color: var(--sx-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.sx-body * { box-sizing: border-box; }
body.sx-body a { color: var(--sx-brand); text-decoration: none; }
body.sx-body a:hover { color: var(--sx-brand-2); text-decoration: underline; }

.sx-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- NAV ---------- */
.sx-nav {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sx-line);
  position: sticky; top: 0; z-index: 50;
}
.sx-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.sx-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--sx-ink); font-size: 18px;
  letter-spacing: -0.02em;
}
.sx-brand:hover { text-decoration: none; color: var(--sx-ink); }
.sx-brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 6px 16px -6px rgba(37,99,235,.6);
}
.sx-nav-links { display: flex; align-items: center; gap: 6px; }
.sx-nav-link {
  color: var(--sx-ink-2); font-weight: 500; font-size: 14px;
  padding: 8px 12px; border-radius: 8px; transition: background .15s;
}
.sx-nav-link:hover { background: var(--sx-bg); color: var(--sx-ink); text-decoration: none; }
.sx-nav-cta {
  background: var(--sx-brand); color: #fff !important; font-weight: 600;
  padding: 9px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 4px 12px -4px rgba(37,99,235,.5);
}
.sx-nav-cta:hover { background: var(--sx-brand-2); text-decoration: none; }

@media (max-width: 720px) {
  .sx-nav-links .sx-nav-link[data-secondary] { display: none; }
}

/* ---------- HERO ---------- */
.sx-hero {
  padding: 60px 0 70px;
  background:
    radial-gradient(1000px 500px at 50% -10%, #dbeafe 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--sx-bg) 100%);
}
.sx-hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.sx-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sx-brand); background: var(--sx-brand-50);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
}
.sx-eyebrow i { font-size: 14px; }
.sx-hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.15;
  margin: 0 0 14px; color: var(--sx-ink);
}
.sx-hero h1 .sx-grad {
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sx-hero p.sx-sub {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--sx-ink-2); margin: 0 auto 28px; max-width: 580px;
}

/* ---------- The single focal card ---------- */
.sx-card {
  background: var(--sx-bg-2);
  border: 1px solid var(--sx-line);
  border-radius: 22px;
  padding: 22px;
  max-width: 620px; margin: 0 auto;
  box-shadow: var(--sx-shadow-2);
  text-align: left;
}
.sx-card-form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.sx-input-wrap {
  position: relative; display: flex; align-items: center;
  background: #fff; border: 1.5px solid var(--sx-line);
  border-radius: 14px; padding: 0 14px 0 16px;
  transition: border-color .15s, box-shadow .15s;
}
.sx-input-wrap:focus-within {
  border-color: var(--sx-brand);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.sx-input-wrap > i { color: var(--sx-muted); font-size: 20px; flex-shrink: 0; }
.sx-input-wrap input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
  padding: 16px 10px; font-size: 16px; color: var(--sx-ink);
  font-family: 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  text-transform: uppercase; letter-spacing: 1.5px;
}
.sx-input-wrap input::placeholder {
  color: var(--sx-muted); font-family: inherit;
  text-transform: none; letter-spacing: normal; font-weight: 400;
}
.sx-input-counter {
  color: var(--sx-muted); font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding-left: 8px;
}

.sx-btn-primary {
  appearance: none; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff; font-weight: 700; font-size: 16px;
  padding: 16px 22px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 20px -6px rgba(37,99,235,.55);
  transition: transform .12s ease, box-shadow .15s ease;
}
.sx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(37,99,235,.6); }
.sx-btn-primary:active { transform: translateY(0); }
.sx-btn-primary:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.sx-btn-primary i { font-size: 20px; }

.sx-card-foot {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 18px; color: var(--sx-muted); font-size: 13px;
}
.sx-card-foot span { display: inline-flex; align-items: center; gap: 6px; }
.sx-card-foot i { font-size: 16px; color: var(--sx-accent); }

/* ---------- Trust strip (tiny) ---------- */
.sx-trust {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 22px;
  color: var(--sx-muted); font-size: 13px;
}
.sx-trust span { display: inline-flex; align-items: center; gap: 6px; }
.sx-trust b { color: var(--sx-ink); font-weight: 700; }
.sx-trust i { color: var(--sx-warn); font-size: 16px; }

/* ---------- Includes strip ---------- */
.sx-section { padding: 56px 0; }
.sx-section.sx-soft { background: var(--sx-bg-2); border-top: 1px solid var(--sx-line); border-bottom: 1px solid var(--sx-line); }
.sx-section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.sx-section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800; letter-spacing: -0.01em; margin: 0 0 8px; color: var(--sx-ink);
}
.sx-section-head p { color: var(--sx-ink-2); margin: 0; font-size: 15px; }

.sx-includes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.sx-include {
  background: var(--sx-bg-2);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-radius);
  padding: 18px;
  display: flex; align-items: flex-start; gap: 12px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sx-include:hover { border-color: #c7d2fe; transform: translateY(-2px); box-shadow: var(--sx-shadow); }
.sx-include-icn {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--sx-brand-50); color: var(--sx-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.sx-include h3 { margin: 0 0 2px; font-size: 14px; font-weight: 700; color: var(--sx-ink); }
.sx-include p  { margin: 0; font-size: 13px; color: var(--sx-muted); line-height: 1.4; }

/* ---------- Steps ---------- */
.sx-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.sx-step {
  background: var(--sx-bg-2);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-radius);
  padding: 22px; text-align: center;
}
.sx-step-num {
  width: 38px; height: 38px; margin: 0 auto 10px;
  border-radius: 50%; background: var(--sx-brand-50); color: var(--sx-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.sx-step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--sx-ink); }
.sx-step p  { margin: 0; font-size: 14px; color: var(--sx-ink-2); }

/* ---------- FAQ (light, compact) ---------- */
.sx-faq { max-width: 760px; margin: 0 auto; }
.sx-faq details {
  background: var(--sx-bg-2);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-radius);
  padding: 14px 16px; margin-bottom: 10px;
}
.sx-faq summary {
  cursor: pointer; font-weight: 600; color: var(--sx-ink);
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  font-size: 15px;
}
.sx-faq summary::-webkit-details-marker { display: none; }
.sx-faq summary::after {
  content: "+"; color: var(--sx-brand); font-weight: 700; font-size: 20px; line-height: 1;
}
.sx-faq details[open] summary::after { content: "−"; }
.sx-faq details p { margin: 10px 0 0; color: var(--sx-ink-2); font-size: 14px; }

/* ---------- Footer ---------- */
.sx-footer {
  background: var(--sx-bg-2);
  border-top: 1px solid var(--sx-line);
  padding: 28px 0;
  margin-top: 12px;
}
.sx-foot-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px;
}
.sx-foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.sx-foot-links a { color: var(--sx-muted); font-size: 14px; }
.sx-foot-copy { color: var(--sx-muted); font-size: 13px; }

/* ---------- Plate / VIN switch — light theme overrides ---------- */
body.sx-body .pv-switch {
  background: var(--sx-bg);
  border-color: var(--sx-line);
  margin-bottom: 0;
  align-self: flex-start;
}
body.sx-body .pv-switch .pv-tab { color: var(--sx-ink-2); }
body.sx-body .pv-switch .pv-tab.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(37,99,235,.45);
}
body.sx-body .pv-plate-row { margin-bottom: 0; }
body.sx-body .pv-plate-input input,
body.sx-body .pv-state-input select {
  background: #fff;
  color: var(--sx-ink);
  border-color: var(--sx-line);
}
body.sx-body .pv-plate-input input:focus,
body.sx-body .pv-state-input select:focus {
  border-color: var(--sx-brand);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
body.sx-body .pv-plate-input > i { color: var(--sx-muted); }
body.sx-body .pv-state-input select option { color: var(--sx-ink); background: #fff; }
body.sx-body .pv-lookup-btn {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  box-shadow: 0 6px 14px -6px rgba(16,185,129,.55);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 560px) {
  .sx-hero { padding: 40px 0 50px; }
  .sx-card { padding: 18px; border-radius: 18px; }
  .sx-section { padding: 44px 0; }
}
