/* ============================================
   hrs — Marketing Site Styles
   ============================================ */

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

:root {
  --bg: #fafafa;
  --bg-alt: #f1f1f1;
  --text: #1a1a1a;
  --text-muted: #636363;
  --accent: #10b981;
  --accent-hover: #059669;
  --border: #e2e2e2;
  --code-bg: #1e1e2e;
  --code-text: #cdd6f4;
  --code-comment: #6c7086;
  --card-bg: #ffffff;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.04);
  --hero-bg: #f5f5f5;
  --link: #10b981;
  --term-bg: #0d1117;
  --term-text: #c9d1d9;
  --term-green: #3fb950;
  --term-blue: #58a6ff;
  --term-yellow: #d29922;
  --term-dim: #484f58;
  --term-magenta: #bc8cff;
  --term-cyan: #39d2e0;
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-alt: #1a1a1a;
  --text: #e4e4e4;
  --text-muted: #999999;
  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --border: #2a2a2a;
  --code-bg: #0a0a0a;
  --code-text: #cdd6f4;
  --card-bg: #1a1a1a;
  --card-shadow: 0 1px 2px rgba(0,0,0,0.3);
  --hero-bg: #141414;
  --link: #34d399;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace; }
img { max-width: 100%; height: auto; display: block; }

/* --- Layout --- */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }

/* --- Theme Toggle --- */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--card-shadow);
  z-index: 100;
  font-size: 1.1rem;
  transition: background 0.2s;
}
.theme-toggle:hover { background: var(--bg-alt); }
.theme-toggle .icon-sun, .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
:root:not([data-theme]) .theme-toggle .icon-moon { display: inline; }

/* --- Hero --- */
.hero {
  background: var(--hero-bg);
  padding: 3rem 0 5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

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

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0.5rem auto 2rem;
  max-width: 460px;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0.25rem;
}
.hero-nav a:hover { color: var(--text); text-decoration: none; }

.hero-nav__primary {
  background: var(--accent);
  color: #fff !important;
  padding: 0.5rem 1.5rem !important;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.2s;
}
.hero-nav__primary:hover { background: var(--accent-hover); }
.hero-nav__sep { color: var(--text-muted); user-select: none; }

.github-link svg { vertical-align: -2px; fill: currentColor; }

/* --- Terminal Mockup --- */
.terminal-wrap { max-width: 640px; margin: 0 auto; }

.terminal {
  background: var(--term-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.05);
  text-align: left;
}

[data-theme="dark"] .terminal {
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: #161b22;
  border-bottom: 1px solid #21262d;
}
.terminal-bar span { width: 12px; height: 12px; border-radius: 50%; }
.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar::after {
  content: "hrs";
  color: #484f58;
  font-size: 0.8rem;
  margin-left: auto;
  font-family: "SF Mono", "Fira Code", monospace;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: "SF Mono", "Fira Code", "JetBrains Mono", Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--term-text);
  white-space: pre;
  overflow-x: auto;
}

.t-prompt { color: var(--term-green); }
.t-cmd { color: #e6edf3; font-weight: 600; }
.t-h1 { color: var(--term-cyan); font-weight: 700; }
.t-cat { color: var(--term-magenta); }
.t-title { color: var(--term-cyan); font-weight: 600; }
.t-hours { color: var(--term-dim); }
.t-bullet { color: #8b949e; }
.t-sel { color: var(--term-green); font-weight: 700; }
.t-dim { color: var(--term-dim); }
.t-summary { color: var(--term-dim); font-style: italic; }

/* --- Section Rules --- */
.section-rule { border: none; border-top: 1px solid var(--border); margin: 0; }

/* --- Pitch / Content --- */
.pitch { padding: 4rem 0; }
.pitch h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; }

.accent {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.05em 0.4em;
  border-radius: 4px;
  transform: rotate(-1.5deg);
  text-decoration: none;
}
[data-theme="dark"] .accent { color: #111; }

.pitch-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2.5rem;
}

/* --- Feature Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.feature {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
}
.feature-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.feature h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.feature p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* --- Install --- */
.install { padding: 4rem 0; }
.install h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1.5rem; }
.install pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.install pre .comment { color: var(--code-comment); }
.install p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1rem; }

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.footer-nav a { color: var(--text-muted); font-size: 0.9rem; }
.footer-nav a:hover { color: var(--text); }
.footer-sep { color: var(--text-muted); user-select: none; }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

/* --- Docs Pages --- */
.docs-header {
  background: var(--hero-bg);
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.docs-header .breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.docs-header .breadcrumb a { color: var(--text-muted); }
.docs-header .breadcrumb a:hover { color: var(--text); }
.docs-header h1 { font-size: 1.75rem; font-weight: 700; }

.docs-body { padding: 3rem 0 4rem; }
.docs-body h2 {
  font-size: 1.4rem; font-weight: 700;
  margin-top: 2.5rem; margin-bottom: 0.75rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.docs-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.docs-body h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.docs-body p { margin-bottom: 1rem; }
.docs-body ul, .docs-body ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.docs-body li { margin-bottom: 0.35rem; }
.docs-body pre {
  background: var(--code-bg); color: var(--code-text);
  padding: 1.25rem 1.5rem; border-radius: 8px; overflow-x: auto;
  font-size: 0.85rem; line-height: 1.6; margin-bottom: 1.5rem;
}
.docs-body code {
  background: var(--bg-alt); padding: 0.15rem 0.4rem;
  border-radius: 4px; font-size: 0.85em;
}
.docs-body pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.docs-body table { border-collapse: collapse; margin-bottom: 1.5rem; width: 100%; font-size: 0.9rem; }
.docs-body th, .docs-body td {
  text-align: left; padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.docs-body th { font-weight: 600; font-size: 0.8rem; color: var(--text-muted); }
.docs-body strong { font-weight: 600; }
.docs-body hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.docs-body .doc-nav {
  display: flex; justify-content: space-between; margin-top: 2rem;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.docs-body .doc-nav a { font-size: 0.9rem; }

.docs-index { list-style: none; padding: 0; }
.docs-index li { margin-bottom: 0.75rem; }
.docs-index a { font-size: 1.05rem; font-weight: 500; }
.docs-index .desc { display: block; font-size: 0.9rem; color: var(--text-muted); }

/* --- Responsive --- */
@media (max-width: 640px) {
  .hero { padding: 2rem 0 3rem; }
  .hero h1 { font-size: 2.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .terminal-body { font-size: 0.72rem; padding: 1rem; }
}
