/* ── AgentActa Landing ── */

:root {
  --base: #0a0e1a;
  --raised: #0f1424;
  --surface: #151b2e;
  --border: #1c2540;
  --border-hover: #2a3555;
  --text-1: #e4e9f2;
  --text-2: #8b95ae;
  --text-3: #5c6680;
  --accent: #6390f0;
  --accent-hover: #7ba0f5;
  --accent-glow: rgba(99, 144, 240, 0.12);
  --green: #4ade80;
  --amber: #fbbf24;
  --rose: #f472b6;

  --display: 'Instrument Sans', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--body);
  background: var(--base);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* ── Nav ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 4rem);
  height: 60px;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text-1);
}
.brand span {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topnav { display: flex; align-items: center; gap: 1.75rem; }
.topnav a {
  font-size: 0.85rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}
.topnav a:hover { color: var(--text-1); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: none;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-primary {
  background: var(--accent);
  color: var(--base);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 144, 240, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 5rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -25%;
  right: -15%;
  width: 65vw;
  height: 65vw;
  max-width: 750px;
  max-height: 750px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 144, 240, 0.07) 0%, transparent 65%);
  animation: drift 10s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -10%;
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.04) 0%, transparent 65%);
  animation: drift 12s ease-in-out 3s infinite alternate;
}

@keyframes drift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(2%, -3%); }
}

.hero-content {
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.hero-eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), #a78bfa, #f472b6, var(--accent), #a78bfa);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 2.5rem;
}

/* ── Terminal block ── */
.install-block {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 320px;
  margin-bottom: 2rem;
  overflow: hidden;
  transition: border-color 0.3s;
}
.install-block:hover { border-color: var(--border-hover); }

.install-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.install-dots { display: flex; gap: 6px; }
.install-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.install-dots span:nth-child(1) { background: #ff5f57; }
.install-dots span:nth-child(2) { background: #febc2e; }
.install-dots span:nth-child(3) { background: #28c840; }

.install-copy {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  color: var(--text-3);
  font-family: var(--body);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.install-copy:hover {
  color: var(--text-1);
  border-color: var(--border-hover);
}

.install-line {
  padding: 1rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.install-line .prompt { color: var(--accent); user-select: none; }

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 1.1s step-end infinite;
}

.hero-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Sections ── */
section { padding: clamp(4rem, 8vw, 7rem) 1.5rem; }
.section-wide { max-width: 1060px; margin: 0 auto; }

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-2);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 0.5rem;
}

/* ── Features ── */
.features-section { border-top: 1px solid var(--border); }

.features-grid {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
}

.feature-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.feature-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, var(--accent) 50%, transparent 90%);
  opacity: 0.35;
}

.feature-text h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.feature-text p {
  color: var(--text-2);
  line-height: 1.7;
  font-size: 0.95rem;
}

.feature-terminal {
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--text-2);
  overflow-x: auto;
}
.t-blue { color: var(--accent); }
.t-green { color: var(--green); }
.t-amber { color: var(--amber); }
.t-rose { color: var(--rose); }
.t-dim { color: var(--text-3); }
.t-spacer { height: 0.6rem; }
.t-indent { padding-left: 1.2rem; }

.features-duo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.feature-card {
  padding: 1.75rem;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-card h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--text-2);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* ── Pipeline ── */
.how-section { border-top: 1px solid var(--border); }

.pipeline {
  margin-top: 2.5rem;
  display: grid;
  gap: 0;
}

.pipeline-step {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}
.pipeline-step:last-child { border-bottom: none; }

.pipeline-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pipeline-body h4 {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.pipeline-body p {
  color: var(--text-2);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ── Compat ── */
.compat-section {
  border-top: 1px solid var(--border);
  text-align: center;
}
.compat-desc {
  max-width: 420px;
  margin: 0 auto;
}

.compat-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.compat-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.compat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: border-color 0.2s, transform 0.25s var(--ease);
}
.compat-badge:hover .compat-icon {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.compat-badge span {
  font-size: 0.82rem;
  color: var(--text-2);
  font-weight: 500;
}

/* ── Bottom CTA ── */
.cta-section {
  border-top: 1px solid var(--border);
  text-align: center;
}
.cta-inner h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}
.install-block-center {
  margin: 0 auto 1.5rem;
}
.cta-note {
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}

.footer-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
}
.footer-brand span {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-meta {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.2rem;
}
.footer-meta a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-meta a:hover { color: var(--text-1); }

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text-1); }
.footer-hone {
  font-size: 0.78rem;
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-hone:hover { color: var(--text-2); }

/* ── Responsive ── */
@media (min-width: 640px) {
  section { padding-left: clamp(2rem, 5vw, 4rem); padding-right: clamp(2rem, 5vw, 4rem); }
  .hero { padding-left: clamp(2rem, 5vw, 4rem); padding-right: clamp(2rem, 5vw, 4rem); }
  .features-duo { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero { padding-left: clamp(2rem, 5vw, 4rem); padding-right: clamp(2rem, 5vw, 4rem); }
  .feature-primary {
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    padding: 2.5rem;
  }
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

::selection {
  background: rgba(99, 144, 240, 0.2);
  color: var(--text-1);
}
