:root {
  font-size: 20px;
  --bg-color: #fff;
  --text-color: #333;
  --heading-color: #000;
  --pitch-color: #555;
  --footer-color: #999;
  --border-color: #eee;
  --btn-primary-bg: #000;
  --btn-primary-hover: #333;
  --btn-secondary-bg: #fff;
  --btn-secondary-color: #000;
  --btn-secondary-hover: #f5f5f5;
  --logo-filter: none;
  --color-me: #af5fd7;
  --color-me-muted: #875f87;
  --color-following: #008787;
  --color-following-muted: #005f5f;
  --color-dim-state: #888;
  --color-label: #af8700;
  --color-label-muted: #876800;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --heading-color: #f0f6fc;
    --pitch-color: #c9d1d9;
    --footer-color: #8b949e;
    --border-color: #30363d;
    --btn-primary-bg: #f0f6fc;
    --btn-primary-hover: #c9d1d9;
    --btn-secondary-bg: transparent;
    --btn-secondary-color: #f0f6fc;
    --btn-secondary-hover: #161b22;
    --logo-filter: invert(1);
    --color-me: #ff5fff;
    --color-me-muted: #af5faf;
    --color-following: #00af87;
    --color-following-muted: #005f5f;
    --color-dim-state: #6c6c6c;
    --color-label: #ffd700;
    --color-label-muted: #af8700;
  }
}

body.dark-mode {
  --bg-color: #0d1117;
  --text-color: #c9d1d9;
  --heading-color: #f0f6fc;
  --pitch-color: #c9d1d9;
  --footer-color: #8b949e;
  --border-color: #30363d;
  --btn-primary-bg: #f0f6fc;
  --btn-primary-hover: #c9d1d9;
  --btn-secondary-bg: transparent;
  --btn-secondary-color: #f0f6fc;
  --btn-secondary-hover: #161b22;
  --logo-filter: invert(1);
  --color-me: #ff5fff;
  --color-me-muted: #af5faf;
  --color-following: #00af87;
  --color-following-muted: #005f5f;
  --color-dim-state: #6c6c6c;
  --color-label: #ffd700;
  --color-label-muted: #af8700;
}

body.light-mode {
  --bg-color: #fff;
  --text-color: #333;
  --heading-color: #000;
  --pitch-color: #555;
  --footer-color: #999;
  --border-color: #eee;
  --btn-primary-bg: #000;
  --btn-primary-hover: #333;
  --btn-secondary-bg: #fff;
  --btn-secondary-color: #000;
  --btn-secondary-hover: #f5f5f5;
  --logo-filter: none;
  --color-me: #af5fd7;
  --color-me-muted: #875f87;
  --color-following: #008787;
  --color-following-muted: #005f5f;
  --color-dim-state: #888;
  --color-label: #af8700;
  --color-label-muted: #876800;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.25;
  color: var(--text-color);
  background: var(--bg-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.container {
  max-width: 600px;
  text-align: center;
  margin: 0 -1rem;
}

.theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--heading-color);
}

.theme-toggle:hover {
  border-color: var(--heading-color);
  transform: scale(1.1);
}

.theme-toggle svg {
  transition: transform 0.2s;
}

.logo {
  width: 80px;
  height: 80px;
  margin-bottom: 0.75rem;
  filter: var(--logo-filter);
  transition: filter 0.3s;
}

h1 {
  font-size: 2.25rem;
  line-height: 1.15;
  color: var(--heading-color);
}

.pitch {
  font-size: 1rem;
  font-weight: normal;
  color: var(--pitch-color);
  max-width: 600px;
  margin: 1rem auto 1.5rem auto;
}

.cta-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.25rem 1.5rem;
  min-width: 30%;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  text-align: center;
  text-wrap: nowrap;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--bg-color);
}

.btn-primary:hover {
  background: var(--btn-primary-hover);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-color);
  border: 1px solid var(--btn-secondary-color);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
}

footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--footer-color);
  font-size: 0.75rem;
  border-top: 1px solid var(--border-color);
}

/* Terminal mockup */
.terminal {
  --term-bg: #eef1f5;
  --term-dim: #999;
  --term-border: #d0d7de;
  background: var(--term-bg);
  border: 1px solid var(--color-following);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 640px;
  font-family: 'SF Mono', 'Fira Code', Consolas, 'Liberation Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.25;
}

@media (prefers-color-scheme: dark) {
  .terminal { --term-bg: #000000; --term-dim: #555d66; --term-border: #30363d; }
}

body.dark-mode .terminal { --term-bg: #000000; --term-dim: #555d66; --term-border: #30363d; }
body.light-mode .terminal { --term-bg: #eef1f5; --term-dim: #999; --term-border: #d0d7de; }

.term-bar {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-following);
  color: var(--color-following);
  font-size: 0.75rem;
  font-weight: 600;
}

.term-body {
  padding: 0.5rem 0.75rem;
}

.term-keys {
  padding: 0.75rem;
  border-top: 1px solid var(--term-border);
  color: var(--term-dim);
  font-size: 0.6275rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tl-entry {
  padding: 0.15rem 0;
}

.tl-head {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tl-icon {
  display: inline-block;
  width: 1.75em;
  font-weight: bold;
}

.tl-text {
  padding-left: 1.75em;
}

.tl-dim {
  color: var(--term-dim);
}

.tl-nested {
  margin-top: 0.5rem;
  padding-left: 1.75em;
  color: var(--term-dim);
}

.tl-sep {
  border: none;
  border-top: 1px solid var(--term-border);
  margin: 0.3rem 0;
}

.tl-me { color: var(--color-me); }
.tl-following { color: var(--color-following); }
.tl-state-dim { color: var(--color-dim-state); }
.tl-label { color: var(--color-label); font-style: italic; }

.tl-nested .tl-me { color: var(--color-me-muted); }
.tl-nested .tl-following { color: var(--color-following-muted); }
.tl-nested .tl-label { color: var(--color-label-muted); }

@keyframes tl-fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tl-entry {
  opacity: 0;
  animation: tl-fade 0.5s ease forwards;
}

.tl-sep {
  opacity: 0;
  animation: tl-fade 0.5s ease forwards;
}

@media (prefers-reduced-motion: reduce) {
  .tl-entry, .tl-sep { opacity: 1; animation: none; }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
  .terminal {
    font-size: 0.75rem;
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
  }
}
