/* Vibe Coding for Beginners — Boman Education
   Night-sky academy: deep navy, warm gold, editorial serif display. */

:root {
  --ink: #0a0e1a;
  --ink-2: #10162a;
  --ink-3: #1a2340;
  --line: rgba(232, 198, 106, 0.14);
  --line-2: rgba(255, 255, 255, 0.07);
  --gold: #e8c66a;
  --gold-soft: #f0d78f;
  --cream: #f4efe4;
  --body: #b9c0d4;
  --body-dim: #7d8499;
  --green: #34d399;
  --red: #f87171;
  --blue: #60a5fa;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
}

/* Atmosphere: layered radial glows + grain */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(232,198,106,0.07), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(96,165,250,0.06), transparent 55%),
    linear-gradient(160deg, #0a0e1a 0%, #0d1326 55%, #0a0e1a 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; opacity: 0.35; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, .brand { font-family: var(--font-display); color: var(--cream); font-weight: 600; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.08; letter-spacing: -0.01em; }
h1 em, h2 em { color: var(--gold); font-style: italic; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.2; }
a { color: var(--gold-soft); text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- top nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0; border-bottom: 1px solid var(--line-2);
}
.brand { font-size: 1.15rem; letter-spacing: 0.01em; }
.brand .dot { color: var(--gold); }
.nav .right { display: flex; gap: 22px; align-items: center; font-size: 0.95rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 14px 30px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #d4a940);
  color: #241a05; transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 24px rgba(232, 198, 106, 0.18);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(232, 198, 106, 0.28); }
.btn.ghost {
  background: transparent; color: var(--gold-soft);
  border: 1px solid var(--line); box-shadow: none;
}
.btn.small { padding: 9px 18px; font-size: 0.9rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ---------- landing hero ---------- */
.hero { padding: 90px 0 70px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.kicker {
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.hero p.lead { font-size: 1.2rem; margin: 22px 0 34px; max-width: 34em; }
.hero-side {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(170deg, var(--ink-3), var(--ink-2));
  padding: 30px; position: relative; overflow: hidden;
}
.hero-side::before {
  content: ""; position: absolute; top: -40px; right: -40px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(232,198,106,0.25), transparent 65%);
}
.price { font-family: var(--font-display); font-size: 3rem; color: var(--cream); }
.price small { font-size: 1rem; color: var(--body-dim); font-family: var(--font-body); }
.tick { list-style: none; margin: 18px 0 26px; }
.tick li { padding: 7px 0 7px 30px; position: relative; }
.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- module cards (landing + dashboard) ---------- */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 40px 0 80px; }
.mod-card {
  border: 1px solid var(--line-2); border-radius: var(--radius);
  background: rgba(26, 35, 64, 0.45); padding: 24px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  position: relative; display: block; color: inherit;
}
.mod-card:hover { border-color: var(--line); transform: translateY(-3px); }
.mod-card .num {
  font-family: var(--font-display); font-size: 0.85rem; color: var(--gold);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 10px; display: block;
}
.mod-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.mod-card .tagline { font-size: 0.95rem; color: var(--body-dim); }
.mod-card .meta { margin-top: 14px; font-size: 0.85rem; color: var(--body-dim); display: flex; justify-content: space-between; }
.mod-card.locked { opacity: 0.55; filter: saturate(0.6); }
.mod-card.locked::after {
  content: "🔒  Pass the previous quiz to unlock"; position: absolute; inset: auto 0 0 0;
  padding: 8px 24px; font-size: 0.8rem; color: var(--gold-soft);
  background: rgba(10, 14, 26, 0.85); border-radius: 0 0 var(--radius) var(--radius);
}
.progress-track { height: 5px; background: var(--line-2); border-radius: 99px; margin-top: 14px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); border-radius: 99px; transition: width 0.5s ease; }

/* ---------- lesson page ---------- */
.lesson-head { padding: 34px 0 8px; }
.lesson-head .crumbs { font-size: 0.85rem; color: var(--body-dim); margin-bottom: 10px; }
.player {
  width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); background: #000;
  border: 1px solid var(--line-2); display: block; margin: 22px 0 8px;
}
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin: 18px 0 30px; }

.lesson-text {
  max-width: 760px; margin: 26px auto 80px; font-size: 1.06rem;
}
.lesson-text h2 { margin: 42px 0 14px; padding-top: 26px; border-top: 1px solid var(--line-2); }
.lesson-text h2:first-child { border: 0; margin-top: 0; padding-top: 0; }
.lesson-text p { margin: 14px 0; }
.lesson-text ul, .lesson-text ol { margin: 14px 0 14px 26px; }
.lesson-text strong { color: var(--cream); }
.lesson-text code { background: var(--ink-3); border: 1px solid var(--line-2); padding: 1px 7px; border-radius: 6px; font-size: 0.92em; color: var(--gold-soft); }

/* copy-prompt boxes */
.prompt-box {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(170deg, #131a30, #0e1425); margin: 22px 0; overflow: hidden;
}
.prompt-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; border-bottom: 1px solid var(--line-2);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.16em; color: var(--gold);
}
.copy-btn {
  background: var(--ink-3); color: var(--gold-soft); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 14px; font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.copy-btn:hover { background: var(--gold); color: #241a05; }
.prompt-box pre {
  padding: 18px; white-space: pre-wrap; word-break: break-word;
  font-family: "Cascadia Code", Consolas, monospace; font-size: 0.95rem; color: #dfe6f5; line-height: 1.55;
}
pre.code { background: #0e1425; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; overflow-x: auto; margin: 18px 0; font-size: 0.92rem; }

/* ---------- quiz ---------- */
.quiz-q { border: 1px solid var(--line-2); border-radius: var(--radius); background: rgba(26,35,64,0.45); padding: 24px; margin: 18px 0; }
.quiz-q h3 { font-size: 1.1rem; margin-bottom: 14px; font-family: var(--font-body); font-weight: 700; }
.quiz-opt { display: block; margin: 8px 0; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; transition: border-color 0.15s; }
.quiz-opt:hover { border-color: var(--gold); }
.quiz-opt input { margin-right: 10px; accent-color: var(--gold); }
.quiz-opt.right { border-color: var(--green); background: rgba(52, 211, 153, 0.08); }
.quiz-opt.wrong { border-color: var(--red); background: rgba(248, 113, 113, 0.08); }
.quiz-explain { margin-top: 12px; padding: 12px 16px; border-left: 3px solid var(--gold); background: rgba(232,198,106,0.06); font-size: 0.95rem; border-radius: 0 10px 10px 0; }
.quiz-result { text-align: center; padding: 34px; border: 1px solid var(--line); border-radius: var(--radius); margin: 26px 0; background: linear-gradient(170deg, var(--ink-3), var(--ink-2)); }
.quiz-result .score { font-family: var(--font-display); font-size: 3rem; color: var(--gold); }

/* ---------- forms / login ---------- */
.panel {
  max-width: 440px; margin: 90px auto; padding: 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(170deg, var(--ink-3), var(--ink-2));
}
.panel h2 { margin-bottom: 8px; }
.panel p { font-size: 0.98rem; margin-bottom: 22px; }
input[type="email"], input[type="text"], input[type="password"] {
  width: 100%; padding: 13px 16px; border-radius: 10px; margin-bottom: 14px;
  border: 1px solid var(--line-2); background: var(--ink); color: var(--cream);
  font-family: var(--font-body); font-size: 1rem;
}
input:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: transparent; }
.note { font-size: 0.88rem; color: var(--body-dim); }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.95rem; }
.flash.ok { background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.35); color: var(--green); }
.flash.err { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.35); color: var(--red); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line-2); padding: 30px 0 50px; font-size: 0.88rem; color: var(--body-dim); }

/* ---------- reveal animation ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.rise.d1 { animation-delay: 0.08s; } .rise.d2 { animation-delay: 0.16s; }
.rise.d3 { animation-delay: 0.24s; } .rise.d4 { animation-delay: 0.32s; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 50px 0 30px; }
  body { font-size: 16px; }
}
