/* spec-kit-bdd landing page
   Dark-first palette borrowed from the project's hero graphic, with a
   light alternative. No build step, no framework — plain CSS. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

:root {
  /* dark palette (default) */
  --bg: #060b17;
  --bg-alt: #0b1220;
  --card-bg: #0d1526;
  --text: #e7e9f7;
  --text-muted: #9aa3c0;
  --border: rgba(255, 255, 255, 0.09);
  --code-bg: #0a1120;
  --code-text: #cdd6f4;

  --accent-purple: #a78bfa;
  --accent-green: #34d399;
  --accent-blue: #60a5fa;
  --accent-orange: #fbbf24;

  --btn-primary-bg: linear-gradient(135deg, #7c3aed, #a855f7);
  --btn-primary-text: #ffffff;
  --btn-ghost-border: rgba(255, 255, 255, 0.16);

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 12px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --bg-alt: #f5f6fb;
    --card-bg: #ffffff;
    --text: #14162b;
    --text-muted: #565b78;
    --border: rgba(15, 17, 35, 0.1);
    --code-bg: #f1f2f8;
    --code-text: #2a2d47;

    --accent-purple: #7c3aed;
    --accent-green: #059669;
    --accent-blue: #2563eb;
    --accent-orange: #b45309;

    --btn-ghost-border: rgba(15, 17, 35, 0.16);
    --shadow: 0 10px 30px rgba(20, 22, 43, 0.08);
  }
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --card-bg: #ffffff;
  --text: #14162b;
  --text-muted: #565b78;
  --border: rgba(15, 17, 35, 0.1);
  --code-bg: #f1f2f8;
  --code-text: #2a2d47;

  --accent-purple: #7c3aed;
  --accent-green: #059669;
  --accent-blue: #2563eb;
  --accent-orange: #b45309;

  --btn-ghost-border: rgba(15, 17, 35, 0.16);
  --shadow: 0 10px 30px rgba(20, 22, 43, 0.08);
}

:root[data-theme="dark"] {
  --bg: #060b17;
  --bg-alt: #0b1220;
  --card-bg: #0d1526;
  --text: #e7e9f7;
  --text-muted: #9aa3c0;
  --border: rgba(255, 255, 255, 0.09);
  --code-bg: #0a1120;
  --code-text: #cdd6f4;

  --accent-purple: #a78bfa;
  --accent-green: #34d399;
  --accent-blue: #60a5fa;
  --accent-orange: #fbbf24;

  --btn-ghost-border: rgba(255, 255, 255, 0.16);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-purple); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--card-bg);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  font-family: var(--font-mono);
  color: var(--accent-purple);
}
.brand-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  gap: 20px;
  margin-right: auto;
}
.site-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--btn-ghost-border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
.icon-moon { display: none; }
:root[data-theme="light"] .icon-sun { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: var(--shadow);
}
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--btn-ghost-border);
}
.btn-secondary:hover { border-color: var(--accent-purple); color: var(--accent-purple); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--btn-ghost-border);
  padding: 8px 14px;
  font-size: 0.9rem;
}
.btn-ghost:hover { border-color: var(--accent-purple); color: var(--accent-purple); }

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 24px;
  text-align: center;
}

.hero .visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.hero-image {
  width: 100%;
  max-width: 920px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto 28px;
  display: block;
}

.hero-tagline {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--border); }

.section-header { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-purple);
  margin-bottom: 10px;
}
.section-header h2 { font-size: 1.9rem; margin: 0 0 12px; }
.section-header p { color: var(--text-muted); margin: 0; }

/* ---------- Why ---------- */

.why-copy {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.why-copy p { margin: 0 0 18px; }
.why-copy strong { color: var(--text); }

/* ---------- Advantage cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 920px;
  margin: 0 auto;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin: 0 0 10px; font-size: 1.08rem; color: var(--accent); }
.card p { margin: 0 0 14px; color: var(--text-muted); font-size: 0.95rem; }
.card a { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }

.card--purple { --accent: var(--accent-purple); }
.card--green  { --accent: var(--accent-green); }
.card--blue   { --accent: var(--accent-blue); }
.card--orange { --accent: var(--accent-orange); }

/* ---------- How it works ---------- */

.flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.flow-step {
  --accent: var(--text-muted);
  flex: 1 1 150px;
  max-width: 190px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
}
.flow-step .flow-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
}
.flow-step p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.88rem; }
.flow-step--purple { --accent: var(--accent-purple); }
.flow-step--green  { --accent: var(--accent-green); }
.flow-step--blue   { --accent: var(--accent-blue); }
.flow-step--orange { --accent: var(--accent-orange); }

.flow-step--muted {
  background: transparent;
  border-style: dashed;
}

.flow-legend {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 40px;
}
.flow-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--text-muted);
  margin-right: 4px;
}

.flow-arrow {
  align-self: center;
  color: var(--text-muted);
  font-size: 1.3rem;
  padding: 0 2px;
}

.produces-table {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.produces-table th, .produces-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.produces-table th { color: var(--text-muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; }
.produces-table code { white-space: nowrap; }

/* ---------- Code blocks ---------- */

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
}
pre code {
  background: none;
  padding: 0;
  color: var(--code-text);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Getting started ---------- */

.steps {
  max-width: 720px;
  margin: 0 auto;
  counter-reset: step;
}
.step {
  position: relative;
  padding-left: 46px;
  margin-bottom: 32px;
}
.step:last-child { margin-bottom: 0; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--accent-purple);
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.step p { margin: 0 0 12px; color: var(--text-muted); }

.install-block { max-width: 720px; margin: 0 auto 48px; }
.install-block p { color: var(--text-muted); margin: 0 0 12px; }

/* ---------- Requirements ---------- */

.requirements {
  max-width: 480px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.requirements li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.requirements li:last-child { border-bottom: none; }
.requirements li::before {
  content: "✓";
  color: var(--accent-green);
  font-weight: 700;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: var(--bg-alt);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-inner p { margin: 0; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent-purple); }

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

@media (max-width: 720px) {
  .site-nav { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .flow { flex-direction: column; align-items: stretch; }
  .flow-step { max-width: none; }
  .flow-arrow { transform: rotate(90deg); }
  .section-header h2 { font-size: 1.55rem; }
}
