/* QuizLane landing-page layout glue.
   Component styling comes from @quizlane/ui (styles.css). This file only composes
   layout around those components, reaching for the same var(--ql-*) design tokens. */

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--ql-color-surface); }
a { color: inherit; }

.qx-page { font-family: var(--ql-font-sans); color: var(--ql-color-text); }

.qx-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--ql-space-5);
}

/* ---- Header ---- */
.qx-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--ql-color-border);
}
.qx-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ql-space-4);
  height: 64px;
}
.qx-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--ql-space-2);
  font-weight: var(--ql-font-weight-bold);
  font-size: var(--ql-font-size-lg);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.qx-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--ql-radius-sm);
  background: var(--ql-color-brand);
  color: var(--ql-color-brand-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: var(--ql-font-weight-bold);
}
.qx-navlinks { display: flex; align-items: center; gap: var(--ql-space-6); }
.qx-navlinks a {
  text-decoration: none;
  color: var(--ql-color-text-muted);
  font-weight: var(--ql-font-weight-medium);
  font-size: var(--ql-font-size-md);
}
.qx-navlinks a:hover { color: var(--ql-color-text); }

/* ---- Sections ---- */
.qx-section { padding: var(--ql-space-7) 0; }
.qx-section--tight { padding: var(--ql-space-6) 0; }
.qx-section__head { text-align: center; max-width: 60ch; margin: 0 auto var(--ql-space-6); }
.qx-section__title {
  font-size: var(--ql-font-size-2xl);
  font-weight: var(--ql-font-weight-bold);
  margin: 0 0 var(--ql-space-3);
  line-height: 1.15;
}
.qx-section__sub { font-size: var(--ql-font-size-lg); color: var(--ql-color-text-muted); margin: 0; }

/* Hero wrapper — let the Hero component breathe at the top */
.qx-hero { padding-top: var(--ql-space-6); }
.qx-hero-extras {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ql-space-2);
  justify-content: center;
}

/* ---- Grids ---- */
.qx-grid { display: grid; gap: var(--ql-space-4); }
.qx-grid--cats { grid-template-columns: repeat(4, 1fr); }
.qx-grid--features { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.qx-grid--stats { grid-template-columns: repeat(4, 1fr); }
.qx-grid--steps { grid-template-columns: repeat(3, 1fr); }

/* ---- Product demo ---- */
.qx-demo {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--ql-space-6);
  align-items: start;
}
.qx-demo__aside { display: flex; flex-direction: column; gap: var(--ql-space-4); }
.qx-demo__widgets { display: flex; flex-wrap: wrap; gap: var(--ql-space-3); }

/* ---- Steps ---- */
.qx-step { display: flex; flex-direction: column; gap: var(--ql-space-3); }
.qx-step__num {
  width: 40px; height: 40px;
  border-radius: var(--ql-radius-full);
  background: var(--ql-color-brand);
  color: var(--ql-color-brand-fg);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: var(--ql-font-weight-bold);
  font-size: var(--ql-font-size-lg);
}
.qx-step__title { font-size: var(--ql-font-size-lg); font-weight: var(--ql-font-weight-semibold); margin: 0; }
.qx-step__body { color: var(--ql-color-text-muted); margin: 0; }

/* ---- CTA band ---- */
.qx-cta {
  background: linear-gradient(135deg, var(--ql-color-brand), var(--ql-color-brand-strong));
  color: var(--ql-color-brand-fg);
  border-radius: var(--ql-radius-lg);
  padding: var(--ql-space-7) var(--ql-space-5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ql-space-4);
}
.qx-cta__title { font-size: var(--ql-font-size-2xl); font-weight: var(--ql-font-weight-bold); margin: 0; }
.qx-cta__sub { font-size: var(--ql-font-size-lg); opacity: 0.92; margin: 0; max-width: 52ch; }
.qx-cta .ql-btn--primary { background: #fff; color: var(--ql-color-brand-strong); }
.qx-cta .ql-btn--primary:hover { background: var(--ql-color-brand-soft); }
.qx-cta .ql-btn--secondary { background: rgba(255,255,255,0.16); color: #fff; }
.qx-cta .ql-btn--secondary:hover { background: rgba(255,255,255,0.26); }

/* ---- Footer ---- */
.qx-footer {
  border-top: 1px solid var(--ql-color-border);
  background: var(--ql-color-surface-muted);
  padding: var(--ql-space-6) 0;
  margin-top: var(--ql-space-7);
}
.qx-footer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--ql-space-4);
}
.qx-footer__cats { color: var(--ql-color-text-muted); font-size: var(--ql-font-size-sm); max-width: 60ch; }
.qx-footer__legal { color: var(--ql-color-text-muted); font-size: var(--ql-font-size-sm); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .qx-demo { grid-template-columns: 1fr; }
  .qx-grid--cats { grid-template-columns: repeat(2, 1fr); }
  .qx-grid--stats { grid-template-columns: repeat(2, 1fr); }
  .qx-grid--steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .qx-navlinks { display: none; }
  .qx-section { padding: var(--ql-space-6) 0; }
  .qx-grid--cats { grid-template-columns: 1fr; }
}

/* ---- Skip link (keyboard) ---- */
.qx-skip {
  position: absolute;
  left: var(--ql-space-3);
  top: -48px;
  z-index: 60;
  background: var(--ql-color-brand);
  color: var(--ql-color-brand-fg);
  padding: var(--ql-space-2) var(--ql-space-4);
  border-radius: var(--ql-radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}
.qx-skip:focus { top: var(--ql-space-3); }

/* ---- Focus visibility (keyboard only) ---- */
:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--ql-color-brand);
  outline-offset: 2px;
  border-radius: var(--ql-radius-sm);
}
.qx-cta .ql-btn:focus-visible { outline-color: var(--ql-color-accent); }
