/* ============================================================
   Tasklands — pixel-art landing page
   Limited warm-fantasy palette, chunky hard-edged "pixel" depth.
   ============================================================ */

:root {
  --cream: #f6ecd4;
  --cream-2: #efe1c0;
  --ink: #2b2230;
  --ink-soft: #4a3f52;
  --stone: #756781;
  --forest: #2e7d4f;
  --forest-dark: #1f5c39;
  --sky: #9cd3ea;
  --royal: #3a5bd9;
  --gold: #f3ad1f;
  --gold-dark: #c9810f;
  --danger: #c0392b;

  --border: 4px solid var(--ink);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-sm: 4px 4px 0 var(--ink);

  --font-pixel: "Press Start 2P", monospace;
  --font-retro: "VT323", monospace;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  /* subtle pixel-grid texture */
  background-image:
    linear-gradient(rgba(43, 34, 48, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 34, 48, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
}

img { image-rendering: pixelated; image-rendering: crisp-edges; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-pixel); line-height: 1.35; }

a { color: var(--royal); }

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 0.5rem; top: -3rem;
  background: var(--gold); color: var(--ink);
  font-family: var(--font-pixel); font-size: 0.6rem;
  padding: 0.6rem 0.8rem; border: var(--border); z-index: 50;
  transition: top 0.15s;
}
.skip-link:focus { top: 0.5rem; }

/* Honeypot — off-screen, not display:none (so bots still fill it) */
.honeypot {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  cursor: pointer;
  border: var(--border);
  padding: 0.95rem 1.2rem;
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  text-align: center;
}
.btn--primary { background: var(--gold); }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow, .section-label {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--forest-dark);
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  background:
    linear-gradient(var(--sky), #bfe6f2 60%, var(--cream) 100%);
  padding-top: 3rem;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-bottom: 5rem;
}
.hero__title {
  font-size: clamp(1.2rem, 4.6vw, 2.2rem);
  margin: 0.2rem 0 1rem;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.5);
}
.hero__sub {
  font-size: 1.25rem;
  max-width: 32ch;
  margin: 0 0 1.6rem;
  color: var(--ink-soft);
}

.hero__art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 280px;
}
.art-castle {
  width: clamp(220px, 60vw, 420px);
  height: auto;
  filter: drop-shadow(8px 10px 0 rgba(43, 34, 48, 0.25));
  animation: float 5s ease-in-out infinite;
}
.art-knight { animation: bob 2.2s ease-in-out infinite; }
/* Absolute placement applies only to the knight standing at the castle base */
.hero__art .art-knight {
  width: clamp(90px, 22vw, 150px);
  height: auto;
  position: absolute;
  left: 4%;
  bottom: 0;
}

/* layered pixel hills along the hero base */
.hills {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 70px;
  background:
    linear-gradient(var(--forest) 0 0) bottom/100% 34px no-repeat,
    linear-gradient(var(--forest-dark) 0 0) bottom/100% 70px no-repeat;
  border-top: 4px solid var(--ink);
}

/* ---------- Waitlist form ---------- */
.waitlist-form { max-width: 540px; }
.field-row { display: flex; flex-direction: column; gap: 0.7rem; }
.waitlist-form input[type="text"],
.waitlist-form input[type="email"] {
  font-family: var(--font-retro);
  font-size: 1.4rem;
  padding: 0.55rem 0.8rem;
  border: var(--border);
  background: #fffdf7;
  color: var(--ink);
  box-shadow: var(--shadow-hard-sm);
  width: 100%;
}
.waitlist-form input:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: 2px;
}
.waitlist-form input[aria-invalid="true"] { border-color: var(--danger); }

.form-status {
  font-family: var(--font-retro);
  font-size: 1.25rem;
  min-height: 1.5rem;
  margin: 0.8rem 0 0;
}
.form-status[data-state="error"] { color: var(--danger); }
.form-status[data-state="success"] { color: var(--forest-dark); font-weight: bold; }
/* Self-contained chips so the typo suggestion is legible on ANY section bg */
.form-status .suggest-btn {
  font-family: var(--font-retro); font-size: 1.05rem; line-height: 1.1;
  background: var(--gold); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  text-decoration: none; cursor: pointer;
  padding: 0.12rem 0.5rem; margin: 0 0.2rem; display: inline-block;
}
.form-status .suggest-btn:hover { transform: translate(-1px, -1px); }
.form-status[data-state="hint"] { color: inherit; }
/* CTA sits on royal blue — status/hint text must be light there */
.section--cta .form-status { color: #fff; }
.microcopy { font-size: 0.95rem; color: var(--stone); margin: 0.7rem 0 0; }

/* success celebration card replacing the form */
.joined {
  border: var(--border);
  background: #fffdf7;
  box-shadow: var(--shadow-hard);
  padding: 1.4rem;
  text-align: center;
}
.joined h3 { font-size: 0.95rem; margin: 0 0 0.6rem; color: var(--forest-dark); }
.joined p { margin: 0; font-size: 1.1rem; color: var(--ink-soft); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 3.5rem 0; }
.section h2 { font-size: clamp(1rem, 3.4vw, 1.4rem); margin: 0 0 1.8rem; }
.section--idea { background: var(--cream); }
.section--how { background: var(--cream-2); }
.section--advisors { background: var(--forest); color: #fff; }
.section--advisors h2 { color: #fff; }
.section--advisors .section-label { color: #d6f0df; }
.section--who { background: var(--cream); }
.section--cta { background: var(--royal); color: #fff; text-align: center; }
.section--cta h2 { color: #fff; font-size: clamp(1rem, 3.6vw, 1.5rem); }
.section--faq { background: var(--cream-2); }

.lede { font-size: 1.2rem; max-width: 52ch; }

/* idea beats */
.beats { display: grid; gap: 1.4rem; }
.beat {
  border: var(--border);
  background: #fffdf7;
  box-shadow: var(--shadow-hard);
  padding: 1.4rem;
}
.beat__icon { font-size: 2.2rem; line-height: 1; }
.beat h3 { font-size: 0.82rem; margin: 0.8rem 0 0.5rem; color: var(--forest-dark); }
.beat p { margin: 0; color: var(--ink-soft); }

/* how-it-works steps */
.steps { list-style: none; counter-reset: none; display: grid; gap: 1.4rem; padding: 0; margin: 0; }
.step {
  border: var(--border);
  background: #fffdf7;
  box-shadow: var(--shadow-hard);
  padding: 1.4rem 1.4rem 1.4rem 1.4rem;
  position: relative;
}
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem;
  font-family: var(--font-pixel); font-size: 0.8rem;
  background: var(--gold); color: var(--ink);
  border: var(--border); box-shadow: var(--shadow-hard-sm);
  margin-bottom: 0.7rem;
}
.step h3 { font-size: 0.82rem; margin: 0 0 0.5rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* advisors */
.advisors__inner { display: grid; gap: 1.6rem; align-items: center; }
.advisors__art { width: clamp(120px, 30vw, 170px); height: auto; animation: bob 2.4s ease-in-out infinite; }
.section--advisors .lede { color: #eafff2; }

/* who-grid */
.who-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1rem;
}
.who-grid li {
  border: var(--border); background: #fffdf7;
  box-shadow: var(--shadow-hard-sm);
  padding: 1rem 1.1rem; font-size: 1.15rem;
}

/* cta form (on royal bg) keeps same component styling */
.cta__form { margin: 1.4rem auto 0; }
.section--cta .microcopy { color: #cdd7ff; }

/* FAQ */
.faq { display: grid; gap: 0.9rem; }
.faq details {
  border: var(--border); background: #fffdf7;
  box-shadow: var(--shadow-hard-sm);
  padding: 0.4rem 1.1rem;
}
.faq summary {
  font-family: var(--font-pixel); font-size: 0.72rem;
  cursor: pointer; padding: 0.8rem 0; color: var(--ink);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: " +"; color: var(--forest); float: right; }
.faq details[open] summary::after { content: " –"; }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--cream); padding: 2.5rem 0; text-align: center; }
.footer__brand { font-family: var(--font-pixel); font-size: 0.9rem; margin: 0 0 0.5rem; }
.footer__note { margin: 0 0 0.8rem; color: #c9bcd0; }
.footer__meta { font-size: 0.95rem; color: #9c8ea8; }
.footer__meta a { color: var(--gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 720px) {
  .field-row { flex-direction: row; flex-wrap: wrap; }
  .field-row input { flex: 1 1 12rem; }
  .field-row .btn { flex: 0 0 auto; }
  .beats, .steps { grid-template-columns: repeat(3, 1fr); }
  .who-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 880px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; padding-top: 1rem; }
  .advisors__inner { grid-template-columns: auto 1fr; }
}

/* ============================================================
   MOTION
   ============================================================ */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .art-castle, .art-knight, .advisors__art { animation: none; }
  .btn { transition: none; }
}

/* ============================================================
   DARK MODE  (no pure-white borders per workspace rule)
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --cream: #211b27;
    --cream-2: #2a2331;
    --ink: #f1e9da;            /* light text */
    --ink-soft: #cfc4d6;
    --stone: #9a8ca6;
    /* hard pixel shadow uses a deep tone, not the now-light --ink */
    --shadow-hard: 6px 6px 0 #0d0a11;
    --shadow-hard-sm: 4px 4px 0 #0d0a11;
    --border: 4px solid #5a4d63;   /* muted, never white */
  }
  body {
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  }
  .hero { background: linear-gradient(#1c3a4a, #21303a 60%, var(--cream) 100%); }
  .hero__title { text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4); }
  .btn, .beat, .step, .faq details, .who-grid li, .joined,
  .waitlist-form input[type="text"], .waitlist-form input[type="email"] {
    background: #2f2738;
    color: var(--ink);
  }
  .btn--primary, .step__num { background: var(--gold); color: #2b2230; }
  .waitlist-form input { background: #1c1722; }
  .section--advisors { background: var(--forest-dark); }
  .section--cta { background: #283a8f; }
  .footer { background: #15111a; }
}
