/* Sheldon landing page — see docs/index.html */

:root {
  --bg: #020617;
  --bg-surface: #0a0f1e;
  --fg: #e2e8f0;
  --accent: #7df9ff;
  --accent-dim: #22d3ee;
  --muted: #64748b;
  --border: #1e293b;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

#starfield-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4rem 1rem;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-shadow: 0 0 20px var(--accent), 0 0 40px rgba(125, 249, 255, 0.3);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-shadow: 0 0 12px var(--accent-dim), 0 0 24px rgba(34, 211, 238, 0.2);
}

h3 {
  font-size: clamp(1rem, 2vw, 1.4rem);
  text-shadow: 0 0 8px rgba(125, 249, 255, 0.4);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--accent);
}

p {
  color: var(--fg);
  max-width: 65ch;
}

code, pre {
  font-family: var(--font-mono);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

code {
  padding: 0.1em 0.4em;
  font-size: 0.875em;
  color: var(--accent-dim);
}

pre {
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--fg);
}

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

::selection {
  background-color: rgba(125, 249, 255, 0.2);
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Hero ── */

#hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

#hero h1 {
  letter-spacing: 0.05em;
  text-shadow: 0 0 30px var(--accent), 0 0 60px rgba(125, 249, 255, 0.4), 0 0 120px rgba(125, 249, 255, 0.15);
  /* Stabilize layout while characters scramble through wider/narrower glyphs. */
  min-height: 1.1em;
}

/* Generic scramble state applied via JS to any [data-text] heading.
   The brighter glow makes the in-progress flip visually distinct from
   the resting state and settles when the text locks. */
.scrambling {
  text-shadow: 0 0 18px var(--accent), 0 0 36px var(--accent), 0 0 72px rgba(125, 249, 255, 0.6);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--accent-dim);
  max-width: 50ch;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.hero-body {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.75;
}

.cta-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 2rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, text-shadow 0.2s;
  box-shadow: 0 0 12px rgba(125, 249, 255, 0.2);
}

.cta-btn:hover {
  background-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(125, 249, 255, 0.5);
  text-shadow: none;
}

/* ── How it works ── */

#how-it-works {
  text-align: center;
}

#how-it-works h2 {
  margin-bottom: 3rem;
}

.pipeline {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background-color: var(--bg-surface);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.12), inset 0 0 12px rgba(34, 211, 238, 0.04);
  max-width: 220px;
  min-width: 160px;
  flex: 1;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.role:hover {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(125, 249, 255, 0.25);
}

.role-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.role-model {
  font-size: 0.75rem;
  color: var(--muted);
}

.role p {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  max-width: 100%;
  line-height: 1.55;
}

.flow-arrow {
  font-size: 1.8rem;
  color: var(--accent-dim);
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.5);
}

@media (max-width: 600px) {
  .pipeline {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .role {
    max-width: 100%;
    width: 100%;
  }
}

/* ── Features ── */

#features {
  text-align: center;
}

#features h2 {
  margin-bottom: 3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.card {
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background-color: rgba(10, 15, 30, 0.7);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.1), inset 0 0 10px rgba(34, 211, 238, 0.03);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(125, 249, 255, 0.22), inset 0 0 16px rgba(125, 249, 255, 0.05);
}

.card h3 {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 100%;
}

/* ── Commands ── */

#commands {
  text-align: center;
}

#commands h2 {
  margin-bottom: 3rem;
}

.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  text-align: left;
}

.cmd-group {
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--accent-dim);
  border-radius: 6px;
  background-color: rgba(10, 15, 30, 0.7);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.1), inset 0 0 10px rgba(34, 211, 238, 0.03);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cmd-group:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(125, 249, 255, 0.22), inset 0 0 16px rgba(125, 249, 255, 0.05);
}

.cmd-group-label {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(125, 249, 255, 0.4);
}

.cmd-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cmd-list li {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  padding-left: 0.25rem;
  border-left: 2px solid var(--accent-dim);
}

.cmd-list li code {
  color: var(--accent-dim);
  font-size: 0.8rem;
  padding: 0.05em 0.3em;
}

@media (max-width: 600px) {
  .commands-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Terminal ── */

#terminal {
  text-align: center;
}

#terminal h2 {
  margin-bottom: 2.5rem;
}

.terminal-window {
  position: relative;
  background-color: #040c16;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(125, 249, 255, 0.08), inset 0 0 20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  text-align: left;
  max-width: 720px;
  margin: 0 auto;
}

.terminal-window::before {
  content: "\25CF  \25CF  \25CF";
  display: block;
  padding: 0.6rem 1rem;
  background-color: #0a1220;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.4em;
}

.terminal-window pre {
  background: none;
  border: none;
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg);
  overflow-x: auto;
}

.terminal-window pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--fg);
}

.t-prompt {
  color: var(--accent);
  font-weight: 700;
  user-select: none;
}

.t-system {
  color: var(--muted);
}

/* ── Install ── */

#install {
  text-align: left;
}

#install h2 {
  margin-bottom: 1.5rem;
}

.install-intro {
  margin-bottom: 1.5rem;
  color: var(--fg);
  max-width: 70ch;
}

.install-code-wrap {
  background-color: #040c16;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 0 28px rgba(125, 249, 255, 0.07), inset 0 0 16px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.install-code-wrap pre {
  background: none;
  border: none;
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--fg);
  overflow-x: auto;
}

.install-code-wrap pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--accent-dim);
}

.install-note {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 70ch;
  margin-bottom: 0.75rem;
}

.install-verify {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 70ch;
}

/* ── Footer ── */

#footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.footer-credit {
  color: var(--muted);
  max-width: 60ch;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.85rem;
  transition: color 0.2s, text-shadow 0.2s;
}

.footer-nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}
