/* claudenv landing — styles */

:root {
  --bg: #0a0a0a;
  --bg-elev: #161616;
  --fg: #e5e5e5;
  --fg-dim: #8a8a8a;
  --accent: #ff7a59;
  --accent-dim: #a04733;
  --success: #5fff7f;
  --border: #262626;

  --font: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad-x: clamp(1rem, 4vw, 2rem);
  --section-gap: clamp(3rem, 8vw, 5rem);
  --content-max: 720px;
  --demo-max: 960px;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-gap) var(--pad-x);
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

h1, h2, h3 {
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}

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

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

code, pre {
  font-family: var(--font);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.wordmark {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.wordmark::before {
  content: ">_ ";
  color: var(--accent);
}

.tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  margin: 0;
}
.subtagline {
  color: var(--fg-dim);
  margin: 0;
  max-width: 60ch;
}

.install {
  position: relative;
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.install pre {
  margin: 0;
  padding: 1rem 1.25rem;
  flex: 1;
  overflow-x: auto;
  font-size: 0.9rem;
  white-space: pre;
}
.install pre code::before {
  content: "$ ";
  color: var(--fg-dim);
}
.copy {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  color: var(--fg-dim);
  padding: 0 1rem;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.85rem;
  transition: color 150ms ease, background 150ms ease;
}
.copy:hover {
  color: var(--accent);
  background: rgba(255, 122, 89, 0.08);
}
.copy[data-copied="true"] {
  color: var(--success);
}

.badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.badges img { display: block; height: 20px; }

.ctas {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  text-align: center;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-dim);
  color: var(--fg);
}
.btn-secondary {
  border: 1px solid var(--border);
  color: var(--fg);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (min-width: 640px) {
  .ctas {
    flex-direction: row;
    width: auto;
  }
}

/* Terminal demo */
.demo-section {
  width: 100%;
  max-width: var(--demo-max);
  margin: 0 auto;
}
.terminal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.terminal-bar {
  background: #0f0f0f;
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
}
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.terminal-body {
  margin: 0;
  padding: 1.25rem 1.25rem 1.5rem;
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
  line-height: 1.55;
  min-height: 16em;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-body .prompt { color: var(--fg-dim); }
.terminal-body .input { color: var(--fg); }
.terminal-body .output { color: var(--fg-dim); }
.terminal-body .ok { color: var(--success); }
.terminal-body .caret {
  display: inline-block;
  width: 0.55ch;
  background: var(--accent);
  color: var(--accent);
  margin-left: 1px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink {
  to { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .terminal-body .caret { animation: none; }
}

/* Feature cards */
.features { width: 100%; }
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card-num {
  color: var(--accent-dim);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
.card h3 {
  font-size: 1.05rem;
  font-weight: 500;
}
.card p {
  margin: 0;
  color: var(--fg-dim);
  font-size: 0.95rem;
}
.card code {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 0.25rem;
  border-radius: 3px;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.footer .dim { color: var(--fg-dim); }
.footer-credit {
  margin: 0;
  color: var(--fg-dim);
}

/* Intro animation */
@media (prefers-reduced-motion: no-preference) {
  .hero {
    animation: fade-up 400ms ease-out both;
  }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }
}

/* Scroll target offset (anchor link from CTA to demo) */
.demo-section { scroll-margin-top: 1rem; }
