/**
 * SQL Easy - landing page styles.
 * Loaded only on the homepage via the page.css front-matter hook.
 */

.hero {
  position: relative;
  padding: 72px 32px 56px;
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--c-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--c-border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 25% 30%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 25% 30%, #000 30%, transparent 70%);
  opacity: .55;
  pointer-events: none;
}
.hero .inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: start;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 16px 0 20px;
  font-family: var(--font-mono);
  text-wrap: pretty;
}
.hero h1 .accent { color: var(--c-primary); }
.hero .lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--c-dim);
  max-width: 540px;
  margin: 0 0 28px;
}
.hero .stats {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 13px;
  color: var(--c-dim);
  font-family: var(--font-mono);
}
.hero .stats b { color: var(--c-text); font-weight: 700; }
.hero .cta-row {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px;
}

/* Animated SQL editor card in the hero */
.demo {
  background: var(--c-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  align-self: start;
}
.demo .head {
  display: flex; align-items: center;
  height: 32px; padding: 0 12px;
  border-bottom: 1px solid var(--c-border);
  background: var(--c-panel2);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--c-faint);
}
.demo .head .dot { color: var(--c-primary); margin-right: 8px; }
.demo .head .right { margin-left: auto; }
.demo pre {
  margin: 0; padding: 18px 20px;
  font-family: var(--font-mono); font-size: 14px;
  line-height: 1.6; min-height: 130px; white-space: pre-wrap;
  color: var(--c-text);
}
.demo .toolbar {
  border-top: 1px solid var(--c-border);
  padding: 10px 18px;
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--c-dim);
}
.demo .toolbar .ok { color: var(--c-success); }
.demo .toolbar .right { margin-left: auto; color: var(--c-faint); }
.demo table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 12px; }
.demo .resultwrap { border-top: 1px solid var(--c-border); padding: 6px 18px 12px; background: var(--c-bg); }
.demo th, .demo td { text-align: left; padding: 5px 8px; border: 0; }
.demo th { color: var(--c-faint); font-weight: 500; border-bottom: 1px solid var(--c-border); }
.demo td { color: var(--c-text); border-bottom: 1px dashed var(--c-border); }

@keyframes blink-caret { 50% { opacity: 0 } }
.blinker {
  display: inline-block; width: 8px; height: 17px;
  vertical-align: -3px; margin-left: 2px;
  background: var(--c-primary);
  animation: blink-caret 1s steps(1) infinite;
}

/* Generic full-width section used across the page */
.section { padding: 56px 32px; border-bottom: 1px solid var(--c-border); }
.section .inner { max-width: 1200px; margin: 0 auto; }
.section.alt { background: var(--c-panel2); }
.section h2 {
  font-size: clamp(28px, 3.5vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 4px 0 28px;
  font-family: var(--font-mono);
}
.section--narrow .inner { max-width: 880px; }

/* Curriculum preview row */
.curriculum-head {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.curriculum-head__lead { margin: 0; color: var(--c-dim); }

.lesson-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.lesson-card {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 14px 16px;
  display: block;
  color: var(--c-text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.lesson-card:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: var(--c-primary);
  box-shadow: 0 6px 20px var(--c-glow);
}
.lesson-card .num {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--c-faint);
  margin-bottom: 6px;
}
.lesson-card .title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.lesson-card--more {
  background: linear-gradient(135deg, var(--c-glow), transparent);
  border-color: var(--c-primary);
}
.lesson-card--more .num { color: var(--c-primary); font-weight: 700; }
.lesson-card--more .title { color: var(--c-primary); }

/* Lightweight progress card for returning visitors */
.home-progress {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 720px;
}
.home-progress__row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.home-progress .meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--c-dim);
}
.home-progress .meta b { color: var(--c-text); font-weight: 700; }
.home-progress .progress-bar {
  height: 6px; background: var(--c-panel2); border-radius: 3px; overflow: hidden;
}
.home-progress .progress-bar .bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--c-primary), #a78bfa);
  transition: width 0.4s ease;
}
.home-progress .cta {
  align-self: flex-start;
  font-size: 13px; font-weight: 600;
  color: var(--c-primary);
}

/* Sample-exercise preview card */
.sample-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sample-card__meta {
  font-size: 12px; margin-bottom: 8px;
}
.sample-card__title { margin: 0 0 12px; }
.sample-card__prompt {
  font-size: 14.5px;
  color: var(--c-dim);
  line-height: 1.6;
  margin: 0 0 16px;
}
.sample-card__chrome {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  overflow: hidden;
}
.sample-card__chrome .url-bar { border-radius: 0; }
.sample-card__chrome .url-bar > .spacer { width: 48px; }
.sample-card__pre {
  margin: 0;
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.6;
}
.sample-card__match {
  border-top: 1px solid var(--c-border);
  padding: 8px 14px;
  font-size: 11px;
  color: var(--c-success);
  font-family: var(--font-mono);
}

/* Testimonials */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.testimonials figure {
  margin: 0; padding: 24px 22px;
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
}
.testimonials blockquote {
  margin: 0; font-size: 15px; line-height: 1.55; color: var(--c-text);
}
.testimonials figcaption {
  margin-top: 18px; display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--c-dim);
}
.testimonials figcaption .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), var(--c-kw));
  opacity: .7;
}
.testimonials figcaption .who { color: var(--c-text); font-weight: 600; }
.testimonials figcaption .what {
  font-size: 12px; font-family: var(--font-mono); color: var(--c-faint);
}

/* "Why learn SQL" copy section */
.why-section h3 { margin-top: 36px; }
.why-section .lead-p { font-size: 17px; line-height: 1.65; }
.why-section ul { line-height: 1.8; }
.why-section .faq-q { margin-top: 18px; }

/* Mobile */
@media (max-width: 860px) {
  .hero { padding: 36px 16px 28px; }
  .hero .inner { grid-template-columns: 1fr; gap: 28px; }
  .hero .cta-row { gap: 10px; margin-bottom: 24px; }
  .hero .cta-row .btn-lg { font-size: 0.95rem; padding: 0.7rem 1.1rem; }
  .hero .stats {
    margin-top: 24px;
    gap: 14px 22px;
    padding-top: 20px;
    border-top: 1px solid var(--c-border);
  }
  .hero h1 { margin: 12px 0 16px; }
  .section { padding: 36px 16px; }
  .section h2 { font-size: 26px; }
  .curriculum-head { flex-direction: column; align-items: stretch; }
  .lesson-card { padding: 12px 14px; }
  .sample-card { grid-template-columns: 1fr; }
}
