/* The Learning Pit Stop — pit-lane theme */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=Syne:wght@500;600;700;800&display=swap');

:root {
  --brand-primary: #f97316;
  --brand-secondary: #facc15;
  --brand-accent: #fbbf24;
  --brand-signal: #38bdf8;
  --brand-dark: #181b21;
  --brand-darker: #0a0c0f;
  --bg-card: rgba(249, 115, 22, 0.07);
  --text-primary: #f4f4f5;
  --text-muted: #a1a1aa;
  --success: #4ade80;
  --error: #f87171;
  --radius: 10px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --glow-orange: 0 0 40px rgba(249, 115, 22, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-optical-sizing: auto;
  background-color: var(--brand-darker);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -15%, rgba(249, 115, 22, 0.12), transparent 55%),
    linear-gradient(168deg, var(--brand-darker) 0%, #12151c 45%, #0d0f14 100%);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Layout */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(8, 10, 14, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.logo-pit {
  color: var(--brand-primary);
}

nav { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
nav a { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
nav a:hover { color: var(--brand-accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #ea580c 100%);
  color: #0a0a0a;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.35), var(--glow-orange);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(249, 115, 22, 0.45), var(--glow-orange);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--brand-accent);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--brand-accent); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(249, 115, 22, 0.25);
}

.subject-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.subject-card .icon { font-size: 2.5rem; }
.subject-card h3 { color: var(--brand-accent); margin-bottom: 0.25rem; font-family: 'Syne', sans-serif; }
.subject-card p { color: var(--text-muted); font-size: 0.9rem; }

/* Dashboard stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat {
  text-align: center;
  padding: 1rem;
  background: rgba(249, 115, 22, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--brand-accent); font-family: 'Syne', sans-serif; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* Forms */
input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: white;
  font-size: 1rem;
  font-family: inherit;
  cursor: pointer;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; color: var(--text-muted); font-size: 0.9rem; }

/* Lesson / Questions */
.question-card {
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--brand-primary);
}

.question-card.correct { border-left-color: var(--success); }
.question-card.incorrect { border-left-color: var(--error); }

.options { display: flex; flex-direction: column; gap: 0.5rem; }

.option {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.option:hover { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.35); }
.option.selected { border-color: var(--brand-primary); background: rgba(249, 115, 22, 0.15); }
.option.correct { border-color: var(--success); background: rgba(74, 222, 128, 0.12); }
.option.incorrect { border-color: var(--error); background: rgba(248, 113, 113, 0.12); }

.feedback { margin-top: 1rem; padding: 1rem; border-radius: 8px; font-size: 0.95rem; }
.feedback.correct { background: rgba(74, 222, 128, 0.15); color: #86efac; }
.feedback.incorrect { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }

/* Progress bar */
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 4px;
  transition: width 0.3s;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 999px;
  font-size: 0.85rem;
  margin: 0.25rem;
}

.badges-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Level labels */
.level-starter { color: #fcd34d; }
.level-builder { color: #fb923c; }
.level-scholar { color: #f97316; }
.level-mentor { color: #ef4444; text-shadow: 0 0 12px rgba(239, 68, 68, 0.4); }

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2rem;
  align-items: stretch;
  padding: 3.5rem 1.5rem;
}

.hero::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2rem;
  width: 100%;
  height: 4px;
  opacity: 0.35;
  background: repeating-linear-gradient(
    90deg,
    #fafafa 0px,
    #fafafa 14px,
    #18181b 14px,
    #18181b 28px
  );
  pointer-events: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: 1.12;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--brand-accent) 55%, var(--brand-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 1.75rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-panel::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius) + 2px);
  padding: 1px;
  background: linear-gradient(145deg, rgba(249, 115, 22, 0.4), transparent 40%, rgba(56, 189, 248, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-panel h2 {
  margin-bottom: 0.75rem;
  color: var(--brand-accent);
  font-size: 1.15rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

.feature-list {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-list li::marker { color: var(--brand-primary); }

.home-section {
  padding: 1.5rem 1.5rem 4rem;
}

.section-title {
  text-align: center;
  margin-bottom: 0.35rem;
  color: var(--brand-accent);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

.subjects-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.site-footer a {
  color: var(--brand-signal);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.5rem;
  }
  .hero-buttons { justify-content: center; }
  nav { gap: 0.65rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
