:root {
  --board: #1e3a34;
  --board-dark: #162b26;
  --chalk: #f2efe4;
  --chalk-dim: #b9c9c0;
  --amber: #e3b23c;
  --amber-dim: #a9822f;
  --rule: rgba(242, 239, 228, 0.14);
  --paper: #f6f2e8;
  --ink: #1e2b28;
  --ink-dim: #52655f;

  --font-display: "Space Grotesk", sans-serif;
  --font-chalk: "Kalam", cursive;
  --font-body: "IBM Plex Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ---------- Header / chalkboard hero ---------- */

.board {
  background:
    radial-gradient(ellipse at 20% -10%, rgba(242,239,228,0.05), transparent 55%),
    var(--board);
  color: var(--chalk);
  padding: 0 0 3rem;
  border-bottom: 10px solid var(--board-dark);
}

.topbar {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  margin-right: auto;
}

.nav-link {
  text-decoration: none;
  color: var(--chalk-dim);
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--amber); border-color: var(--amber); }

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 2.5rem;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--amber);
  margin: 0 0 1.1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 1.3rem;
  line-height: 1.15;
}

.chalk-word {
  font-family: var(--font-chalk);
  font-weight: 700;
  color: var(--amber);
  display: inline-block;
  transition: opacity 0.35s ease, filter 0.35s ease;
}
.chalk-word.erasing { opacity: 0; filter: blur(4px); }
.chalk-word.writing { animation: write-in 0.5s ease both; }
@keyframes write-in {
  from { opacity: 0; filter: blur(4px); transform: translateY(2px); }
  to   { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.cursor { color: var(--amber-dim); }

.hero-sub {
  color: var(--chalk-dim);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 3px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--amber);
  color: var(--board-dark);
  border: 1px solid var(--amber);
}
.btn-primary:hover { background: #edc665; }

.btn-ghost {
  background: transparent;
  color: var(--chalk);
  border: 1px solid var(--rule);
}
.btn-ghost:hover { border-color: var(--chalk-dim); }

.btn-large { padding: 1rem 2.2rem; font-size: 1.02rem; }

.hero-note {
  color: var(--chalk-dim);
  font-size: 0.85rem;
  opacity: 0.85;
}

.chalk-tray {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  max-width: 800px;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}
.chalk-tray li {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--board);
  background: var(--chalk);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  opacity: 0.92;
}

/* ---------- Lesson / how it works ---------- */

main { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem; }

.section-label {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--amber-dim);
  margin: 0 0 0.5rem;
}

section h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin: 0 0 2rem;
}

.lesson { padding: 4.5rem 0 1rem; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.steps li { display: flex; gap: 1rem; align-items: flex-start; }

.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--paper);
  background: var(--board);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.steps h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0.15rem 0 0.4rem;
}
.steps p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; }

/* ---------- Notes / features ---------- */

.notes { padding: 4rem 0; }

.chalk-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px dashed #cfc6ae;
}
.chalk-notes li {
  padding: 1.1rem 0;
  border-bottom: 1px dashed #cfc6ae;
  font-size: 1rem;
  position: relative;
  padding-left: 1.6rem;
}
.chalk-notes li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--amber-dim);
}

/* ---------- Setup ---------- */

.setup { padding: 4rem 0; }

.setup-steps {
  list-style: none;
  counter-reset: setup;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.setup-steps li {
  counter-increment: setup;
  border-left: 3px solid var(--board);
  padding-left: 1.3rem;
  position: relative;
}
.setup-steps li::before {
  content: counter(setup);
  position: absolute;
  left: -0.85rem;
  top: 0;
  background: var(--board);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.setup-steps h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}
.setup-steps p { margin: 0.3rem 0; color: var(--ink-dim); }
.setup-steps a { color: var(--amber-dim); text-decoration: underline; }

.fine-print { font-size: 0.85rem; color: var(--ink-dim); opacity: 0.9; }

pre {
  background: var(--board);
  color: var(--chalk);
  padding: 0.85rem 1.1rem;
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.9rem;
  margin: 0.6rem 0;
}
code { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ---------- Download ---------- */

.download {
  padding: 4rem 0 5rem;
  text-align: center;
  border-top: 1px dashed #cfc6ae;
}
.download p {
  color: var(--ink-dim);
  max-width: 480px;
  margin: 0 auto 1.7rem;
}

.platform-downloads {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.board-footer {
  background: var(--board-dark);
  color: var(--chalk-dim);
  text-align: center;
  padding: 1.6rem 1.5rem;
  font-size: 0.85rem;
}

.site-footer {
  background: var(--board-dark);
  color: var(--chalk-dim);
  text-align: center;
  padding: 2rem 1.5rem 1.8rem;
  font-size: 0.85rem;
}
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-bottom: 0.9rem;
}
.footer-nav a {
  color: var(--chalk-dim);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.85rem;
}
.footer-nav a:hover { color: var(--amber); }
.site-footer p { margin: 0; opacity: 0.85; }

/* ---------- Legal / prose pages ---------- */

.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.6rem);
  margin: 0 0 0.5rem;
}
.legal-page .updated {
  color: var(--ink-dim);
  font-size: 0.9rem;
  margin: 0 0 2.5rem;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 2.2rem 0 0.8rem;
}
.legal-page p, .legal-page li {
  color: var(--ink);
  line-height: 1.7;
  font-size: 1.02rem;
}
.legal-page ul, .legal-page ol { padding-left: 1.4rem; }
.legal-page li { margin-bottom: 0.5rem; }
.legal-page a { color: var(--board); text-decoration: underline; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1.5rem 0 2.5rem;
  max-width: 520px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-row label {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--ink-dim);
}
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--ink);
  padding: 0.65rem 0.8rem;
  border: 1px solid #d8cfb4;
  border-radius: 6px;
  background: #fff;
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

/* Honeypot — invisible to real visitors, still reachable by bots that
   fill in every field blindly. Positioned off-screen rather than
   display:none, since some bots specifically skip display:none fields. */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.form-status-success {
  background: #e8f3ea;
  border: 1px solid #b7dcc0;
  color: #1e5c30;
}
.form-status-error {
  background: #fbeee0;
  border: 1px solid #eccfa3;
  color: #6b4a1f;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chalk-word { transition: none; }
}

/* ---------- Focus visibility ---------- */

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
