/* 4SAGE Website — clean, minimal, responsive */

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --accent: #2d6a4f;
  --accent-light: #40916c;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card-bg: #ffffff;
  --code-bg: #f3f4f6;
  --hero-bg: #1a1a1a;
  --hero-fg: #fafafa;
  --max-width: 48rem;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
}

/* Hero */
.hero {
  background: var(--hero-bg);
  color: var(--hero-fg);
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.hero .subtitle {
  font-size: 1rem;
  color: #9ca3af;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero .tagline {
  font-size: 1.35rem;
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.5;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 2rem;
  border-radius: 0.375rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background 0.2s;
}

.cta:hover {
  background: var(--accent-light);
}

/* Sections */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

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

h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  text-decoration: underline;
}

/* Cascade */
.cascade {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.levels {
  list-style: none;
  counter-reset: level;
  padding: 0;
}

.levels li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.levels li:last-child {
  border-bottom: none;
}

.levels li strong {
  flex-shrink: 0;
}

.levels li span {
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
  margin-left: 1rem;
}

/* Paths */
.paths {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.path {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.path h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

.path-label {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.prompt-box {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 1rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 1rem 0;
}

/* Dialogue Example */
.dialogue {
  margin-top: 1rem;
}

.dialogue .ai,
.dialogue .human {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}

.dialogue .ai {
  background: var(--code-bg);
  border-left: 3px solid var(--accent);
}

.dialogue .human {
  background: #fff;
  border-left: 3px solid var(--muted);
}

/* FAQ */
details {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

details:first-of-type {
  border-top: 1px solid var(--border);
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▸ ";
  color: var(--accent);
}

details[open] summary::before {
  content: "▾ ";
}

details p {
  margin-top: 0.75rem;
  color: var(--muted);
}

/* LLM Instructions */
#llm-instructions {
  background: var(--code-bg);
  border-top: 2px solid var(--border);
}

#llm-instructions pre {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.75rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 0.5rem 0 1rem;
}

#llm-instructions ol,
#llm-instructions ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

#llm-instructions li {
  margin-bottom: 0.35rem;
}

/* Footer */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.15rem;
  }

  .levels li {
    flex-direction: column;
  }

  .levels li span {
    text-align: left;
    margin-left: 0;
    margin-top: 0.15rem;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111827;
    --fg: #f3f4f6;
    --accent: #40916c;
    --accent-light: #52b788;
    --muted: #9ca3af;
    --border: #374151;
    --card-bg: #1f2937;
    --code-bg: #1f2937;
    --hero-bg: #0a0f1a;
    --hero-fg: #f3f4f6;
  }
}
