/* ════════════════════════════════════════
   AITRUNK — Shared Stylesheet
   Brand palette derived from parrot logo
   ════════════════════════════════════════ */

:root {
  --bg: #0B1419;
  --bg-raised: #101E25;
  --bg-card: #152830;
  --border: #1C3340;
  --border-hover: #264050;
  --text: #E0E4E8;
  --text-secondary: #93989A;
  --text-dim: #556068;
  --accent: #30B824;
  --accent-dim: rgba(38,160,32,0.10);
  --accent-glow: rgba(48,184,36,0.25);
  --blue: #5b8af5;
  --amber: #f5a623;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 20px;
  --font: 'Outfit', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ─── Skip Nav (a11y) ─── */
.skip-nav {
  position: absolute; top: -100px; left: 16px; z-index: 200;
  background: var(--accent); color: var(--bg); padding: 12px 24px;
  border-radius: var(--radius-md); font-weight: 600; font-size: 14px;
  transition: top 0.2s;
}
.skip-nav:focus { top: 16px; }

/* ─── Layout ─── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ─── Nav ─── */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  backdrop-filter: blur(24px); background: rgba(11,20,25,0.85);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 16px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo img { height: 44px; vertical-align: middle; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-size: 14px; color: var(--text-secondary); transition: color 0.2s; padding: 8px 0; }
.nav-links a.btn { padding: 10px 24px; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius-md); font-size: 14px; font-weight: 600;
  font-family: var(--font); cursor: pointer; border: none; transition: all 0.25s;
  min-height: 44px;
}
.btn-accent { background: var(--accent); color: var(--bg); }
.nav-links a.btn-accent { color: var(--bg); }
.btn-accent:hover { box-shadow: 0 0 32px var(--accent-glow); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-secondary); }
.btn-sm { padding: 10px 24px; font-size: 13px; }
.btn-lg { font-size: 16px; padding: 16px 44px; }

/* ─── Hero ─── */
.hero {
  padding: 160px 32px 80px; text-align: center;
  position: relative;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 65%);
  pointer-events: none;
}
.hero .pill {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent); padding: 6px 16px;
  border: 1px solid var(--accent-glow); border-radius: var(--radius-pill);
  margin-bottom: 36px;
}
.hero h1 {
  font-size: clamp(48px, 7.5vw, 96px); font-weight: 900; line-height: 1.05;
  letter-spacing: -2px; max-width: 800px; margin: 0 auto;
}
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 60px var(--accent-glow); }
.hero .sub {
  font-size: 17px; color: var(--text-secondary); max-width: 480px;
  margin: 28px auto 0; line-height: 1.7; font-weight: 300;
}
.hero .ctas {
  display: flex; gap: 12px; justify-content: center; margin-top: 44px;
}

/* ─── Terminal ─── */
.terminal-wrap { padding: 0 32px 100px; display: flex; justify-content: center; }
.terminal {
  width: 100%; max-width: 680px; background: var(--bg-raised);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.term-bar { display: flex; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }
.term-body {
  padding: 22px 24px; font-family: var(--mono); font-size: 13px; line-height: 2.1;
  color: var(--text-dim);
}
.term-body .g { color: var(--accent); }
.term-body .b { color: var(--blue); }
.term-body .y { color: var(--amber); }
.term-body .d { color: #444460; }
.term-body .cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); animation: blink 1s infinite; vertical-align: middle; margin-left: 2px; }

/* ─── Sections ─── */
section { padding: 100px 0; }
section.alt-bg { background: var(--bg-raised); }
.section-header { text-align: center; margin-bottom: 52px; }
.section-tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 3px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
section h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; letter-spacing: -1px; margin-bottom: 14px; }
section .lead { font-size: 16px; color: var(--text-secondary); max-width: 500px; line-height: 1.6; font-weight: 300; }
.section-header .lead { margin: 0 auto; }

/* ─── Agents (horizontal list, left-aligned) ─── */
.agents { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.agent {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; transition: all 0.3s; position: relative;
  display: flex; gap: 18px; align-items: flex-start; text-align: left;
}
.agent::after {
  content: ''; position: absolute; inset: -1px; border-radius: var(--radius-lg);
  border: 1px solid var(--accent); opacity: 0; transition: opacity 0.3s;
}
.agent:hover { transform: translateY(-2px); }
.agent:hover::after { opacity: 1; }
.agent .icon {
  color: var(--accent); background: var(--accent-dim);
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.agent .icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.agent h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.agent p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.agent .tag { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 8px; opacity: 0.6; }

/* ─── Steps (left-aligned) ─── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { padding: 28px; text-align: left; }
.step .num { font-family: var(--mono); font-size: 42px; font-weight: 700; color: var(--border); line-height: 1; margin-bottom: 18px; }
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.step code {
  display: block; margin-top: 14px; font-family: var(--mono); font-size: 13px;
  color: var(--accent); background: var(--bg-card); padding: 10px 14px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
}

/* ─── Credits ─── */
.credits-table {
  margin: 0 auto; max-width: 600px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}
.credits-table .row {
  display: grid; grid-template-columns: 2fr 1fr 1fr; padding: 14px 24px;
  font-size: 13px; border-bottom: 1px solid var(--border); align-items: center;
}
.credits-table .row:last-child { border-bottom: none; }
.credits-table .header { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); background: var(--bg-raised); }
.credits-table .header div { text-align: center; }
.credits-table .header div:first-child { text-align: left; }
.credits-table .scenario { color: var(--text-secondary); }
.credits-table .scenario .sub-text { font-size: 12px; color: var(--text-dim); }
.credits-table .cost { font-family: var(--mono); font-weight: 700; text-align: center; }
.credits-table .cost.highlight { color: var(--accent); }

/* ─── Pricing ─── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.plan {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px 28px; display: flex; flex-direction: column; text-align: left;
}
.plan.featured { border-color: var(--accent); position: relative; }
.plan.featured::before {
  content: attr(data-badge); position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 700;
  padding: 3px 14px; border-radius: var(--radius-md); letter-spacing: 0.5px;
}
.plan .plan-name { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.plan .price span { font-size: 15px; font-weight: 400; color: var(--text-secondary); }
.plan .plan-desc { font-size: 14px; color: var(--text-secondary); margin: 12px 0 20px; line-height: 1.5; }
.plan ul { list-style: none; flex: 1; }
.plan ul li { font-size: 14px; color: var(--text-secondary); padding: 5px 0; line-height: 1.5; }
.plan ul li::before { content: '\2713'; color: var(--accent); margin-right: 10px; font-weight: 700; }
.plan { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.plan:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.plan.featured:hover { box-shadow: 0 12px 40px rgba(48,184,36,0.15); }
.plan .plan-cta { margin-top: 24px; }
.plan .plan-cta .btn { width: 100%; }
.plan-note { font-size: 13px; color: var(--text-dim); margin-top: 20px; text-align: center; }

/* ─── Integration ─── */
.integrations-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; text-align: left; }
.integrations-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.integration-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column;
}
.integration-card.featured { border-color: var(--accent); }
.integration-card .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.integration-card h3 { font-size: 15px; font-weight: 700; }
.integration-card .card-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.integration-card .badge { font-size: 11px; color: var(--accent); border: 1px solid var(--accent-glow); padding: 3px 10px; border-radius: var(--radius-md); }
.code-preview {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 14px; font-family: var(--mono); font-size: 12px; line-height: 2; flex: 1; overflow-x: auto;
}
.code-preview.compact { font-size: 12px; line-height: 1.8; }
.code-preview .comment { color: var(--text-dim); }
.code-preview .prompt { color: var(--accent); }
.code-preview .string { color: var(--amber); }
.code-preview .key { color: var(--blue); }
.code-preview .punct { color: var(--text-dim); }
.integration-card .card-footer { font-size: 12px; color: var(--text-dim); margin-top: 12px; }

/* ─── Voice Demo ─── */
.voice-demo {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.voice-row { display: flex; align-items: flex-start; gap: 10px; }
.voice-label { font-size: 14px; font-family: var(--mono); color: var(--accent); font-weight: 700; flex-shrink: 0; }
.voice-text { font-size: 13px; color: var(--text-secondary); font-style: italic; }
.voice-response { font-size: 13px; color: var(--accent); }
.voice-meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.voice-divider { width: 100%; height: 1px; background: var(--border); }

/* ─── Compatibility ─── */
.compat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.compat-item {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px; text-align: center;
}
.compat-item .name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.compat-item .desc { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.compat-item code {
  display: block; font-family: var(--mono); font-size: 12px; color: var(--accent);
  background: var(--bg-raised); padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
}

/* ─── Shield ─── */
.shield {
  margin: 52px auto 0; max-width: 640px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px 28px;
  display: flex; gap: 16px; align-items: flex-start; text-align: left;
}
.shield .shield-icon { font-family: var(--mono); font-size: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.shield h4 { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.shield p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ─── CTA ─── */
.final-cta { padding: 120px 0; text-align: center; position: relative; }
.final-cta::before {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
  pointer-events: none;
}

/* ─── Footer ─── */
footer {
  padding: 32px; border-top: 1px solid var(--border); text-align: center;
  font-size: 13px; color: var(--text-dim);
}
footer .logo { margin-bottom: 12px; }
footer .logo img { height: 48px; }
footer a { margin: 0 12px; padding: 8px 4px; display: inline-block; }
footer a:hover { color: var(--text); }

/* ─── Scroll Reveal ─── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Hero-specific animations (always visible on load) */
.hero .pill { animation: rise 0.6s 0.1s forwards; opacity: 0; }
.hero h1 { animation: rise 0.6s 0.25s forwards; opacity: 0; }
.hero .sub { animation: rise 0.6s 0.4s forwards; opacity: 0; }
.hero .ctas { animation: rise 0.6s 0.55s forwards; opacity: 0; }
.terminal { animation: rise 0.6s 0.7s forwards; opacity: 0; }

/* ─── Animations ─── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
/* Terminal typing */
.term-body .line { opacity: 0; }
.term-body .line.typed { opacity: 1; }
.term-body.no-js .line { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .agents { grid-template-columns: 1fr; }
  .agent { flex-direction: column; }
  .steps, .plans, .compat-grid { grid-template-columns: 1fr; }
  .integrations-grid, .integrations-grid.three-col { grid-template-columns: 1fr; }
  .hero { padding: 120px 24px 60px; }
  .nav-links a:not(.btn) { display: none; }
  .container { padding: 0 20px; }
  .credits-table .row { grid-template-columns: 1.5fr 1fr 1fr; padding: 12px 16px; font-size: 12px; }
}
@media (max-width: 480px) {
  .hero .ctas { flex-direction: column; align-items: center; }
}
