/* AgentlyMind — design system v4: light theme, DevPass-inspired layout + animations */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8f8;
  --card: #ffffff;
  --border: #e7e9e9;
  --border-strong: #d6d9d9;
  --text: #0a0b0c;
  --text-dim: #55595c;
  --text-faint: #8a8f92;
  --teal: #0d9488;
  --teal-soft: #ecfdf9;
  --coral: #ea6a4f;
  --indigo: #4f46e5;
  --sans: 'Sora', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--sans); font-weight: 800; line-height: 1.06; letter-spacing: -0.02em; margin: 0; color: var(--text); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.hl { background: linear-gradient(100deg, var(--teal-soft) 45%, transparent 45%); padding: 0 4px; border-radius: 3px; }

/* Top announcement bar */
.topbar {
  background: var(--teal-soft);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--teal);
  font-weight: 600;
}
.topbar a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); font-weight: 700; }

/* Header */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-family: var(--sans); font-weight: 800; font-size: 19px; display: flex; align-items: center; gap: 9px; letter-spacing: -0.01em; color: var(--text); }
.logo .mark { width: 10px; height: 10px; border-radius: 3px; background: var(--teal); display: inline-block; }
nav.mainnav { display: flex; gap: 32px; align-items: center; }
nav.mainnav a { font-size: 14.5px; color: var(--text-dim); font-weight: 500; transition: color .15s; }
nav.mainnav a:hover { color: var(--text); }
.btn {
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #0b7e73; transform: translateY(-1px); }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--text); }
.btn-ghost { color: var(--text-dim); font-weight: 600; font-size: 14px; }
.btn-ghost:hover { color: var(--text); }

/* Eyebrow / badge */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  padding: 7px 14px 7px 10px;
  border-radius: 100px;
  background: var(--bg-soft);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* Hero */
.hero { padding: 80px 0 60px; position: relative; overflow: hidden; }
.hero-bg-fade {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 0%, var(--teal-soft), transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(38px, 5vw, 66px); margin: 22px 0 20px; max-width: 860px; }
.hero p.sub { font-size: 18.5px; color: var(--text-dim); max-width: 600px; margin: 0 0 32px; }
.cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-micro { font-size: 13.5px; color: var(--text-faint); margin-top: 18px; }

/* Split hero (DevPass-style: text left, tool pills + terminal right) */
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }
@media (max-width: 980px) { .hero-split { grid-template-columns: 1fr; } }
.hero-visual { padding-top: 4px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.pill-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--border); background: #fff;
  font-size: 13.5px; font-weight: 600; color: var(--text-dim);
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.pill-badge img { width: 16px; height: 16px; }
.pill-badge.core { border-color: var(--teal); background: var(--teal-soft); color: var(--text); }
.pill-badge .tag-mini { font-size: 10px; font-weight: 800; letter-spacing: 0.03em; color: var(--teal); background: rgba(13,148,136,0.12); padding: 2px 7px; border-radius: 100px; }

/* Terminal mockup */
.terminal { border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.25); border: 1px solid #1c1f1f; }
.terminal-bar { background: #1a1d1d; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.terminal-dots { display: flex; gap: 7px; }
.terminal-dots span { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }
.terminal-bar .path { font-family: var(--mono); font-size: 12px; color: #8a8f8f; }
.terminal-bar .lang { font-family: var(--mono); font-size: 11px; color: #6b7070; letter-spacing: 0.06em; }
.terminal-body { background: #101313; padding: 24px 22px; font-family: var(--mono); font-size: 14px; line-height: 1.9; min-height: 210px; }
.terminal-body .prompt { color: #6de3c9; }
.terminal-body .cmd { color: #f2f4f4; }
.terminal-body .comment { color: #6b7070; }
.terminal-cursor { display: inline-block; width: 8px; height: 16px; background: var(--teal); vertical-align: middle; animation: blink 1s steps(1) infinite; }

/* Proof panel */
.proof {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
@media (max-width: 780px) { .proof { grid-template-columns: 1fr; } }
.proof .item { display: flex; gap: 14px; align-items: flex-start; }
.proof .item .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--teal-soft); color: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.proof .item h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.proof .item p { font-size: 13.5px; color: var(--text-dim); margin: 0; }

/* Sections */
section { padding: 64px 0; }
.section-label { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 38px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 42px); margin-top: 10px; }

/* Marquee trust bar */
.trust-bar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 26px 0; overflow: hidden; }
.trust-bar .lbl { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; text-align: center; margin-bottom: 18px; }
.marquee { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 56px; align-items: center; flex-shrink: 0; animation: marquee 22s linear infinite; padding-right: 56px; }
.marquee-track span { font-weight: 700; font-size: 18px; color: var(--text-dim); white-space: nowrap; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* Big stats row */
.stats-row { display: flex; justify-content: center; gap: 64px; flex-wrap: wrap; text-align: center; padding: 40px 0; }
.stats-row .stat .num { font-family: var(--sans); font-size: clamp(36px,5vw,52px); font-weight: 800; color: var(--text); }
.stats-row .stat .lbl { font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-top: 4px; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Agent cards grid */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: border-color .18s, transform .18s, box-shadow .18s; }
.card:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 12px 24px -12px rgba(0,0,0,0.12); }
.card .icobox { width: 42px; height: 42px; border-radius: 11px; background: var(--teal-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; margin-bottom: 18px; }
.card h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 14.5px; margin: 0; }
.card .arrow { margin-top: 18px; font-size: 13.5px; color: var(--teal); font-weight: 700; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 24px; background: var(--bg-soft); border-radius: var(--radius); border: 1px solid var(--border); }
.step .n { color: var(--coral); font-size: 14px; font-weight: 800; margin-bottom: 12px; }

/* CTA band */
.cta-band { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 58px; text-align: center; background: linear-gradient(180deg, var(--teal-soft), #fff 70%); }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 14px; }
.cta-band p { color: var(--text-dim); max-width: 460px; margin: 0 auto 26px; }
@media (max-width: 640px) { .cta-band { padding: 36px 22px; } }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 28px; margin-top: 20px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer .fcol h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); margin-bottom: 14px; font-weight: 700; }
footer .fcol a { display: block; color: var(--text-dim); font-size: 14.5px; margin-bottom: 10px; }
footer .fcol a:hover { color: var(--text); }
.footer-bottom { color: var(--text-faint); font-size: 13px; margin-top: 36px; text-align: center; }

/* Agent page specifics */
.breadcrumb { font-size: 13px; color: var(--text-faint); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--text-dim); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 0; }
.tag { font-size: 12.5px; padding: 6px 13px; border-radius: 100px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-dim); font-weight: 600; }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); font-size: 15px; }
.checklist li::before { content: "✓"; color: var(--teal); font-weight: 800; flex-shrink: 0; }

/* Live demo simulation widget */
.demo {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 520px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.demo-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-faint); font-weight: 600;
  background: var(--bg-soft);
}
.demo-head .live { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); }
.demo-head .live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: blink 1.5s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.demo-body { padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.demo-msg {
  max-width: 80%;
  padding: 11px 15px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  animation: risehold 7s ease infinite;
}
.demo-msg.in { align-self: flex-start; background: var(--bg-soft); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.demo-msg.out { align-self: flex-end; background: var(--teal); color: #fff; font-weight: 500; border-bottom-right-radius: 4px; }
@keyframes risehold {
  0%   { opacity: 0; transform: translateY(8px); }
  6%   { opacity: 1; transform: translateY(0); }
  92%  { opacity: 1; transform: translateY(0); }
  97%  { opacity: 0; }
  100% { opacity: 0; }
}
.demo-msg:nth-child(1) { animation-delay: 0s; }
.demo-msg:nth-child(2) { animation-delay: .6s; }
.demo-msg:nth-child(3) { animation-delay: 1.3s; }
.demo-msg:nth-child(4) { animation-delay: 1.9s; }
.demo-result {
  margin: 4px 20px 18px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--teal-soft);
  border: 1px solid rgba(13,148,136,0.25);
  font-size: 13px; color: var(--teal); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  opacity: 0; animation: risehold 7s ease infinite; animation-delay: 2.4s;
}

/* MCP integrations hub diagram */
.mcp-section { padding: 70px 0; }
.mcp-diagram { position: relative; max-width: 620px; margin: 50px auto 0; aspect-ratio: 1 / 1; }
.mcp-ring { position: absolute; inset: 0; border: 1px dashed var(--border-strong); border-radius: 50%; }
.mcp-ring.inner { inset: 15%; }
.mcp-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; text-align: center;
  box-shadow: 0 0 0 10px var(--teal-soft), 0 12px 30px -8px rgba(13,148,136,0.45);
  z-index: 3;
}
.mcp-hub .proto { font-size: 10px; font-weight: 600; opacity: .85; margin-top: 2px; }
.mcp-node { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 8px 18px -6px rgba(0,0,0,0.18); }
.mcp-node img { width: 26px; height: 26px; }
.mcp-label { font-size: 12px; font-weight: 700; color: var(--text-dim); white-space: nowrap; text-align: center; }
.mcp-label-wrap { position: absolute; z-index: 2; left: calc(50% + var(--x)); top: calc(50% + var(--y)); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mcp-lines { position: absolute; inset: 0; z-index: 1; }
.mcp-lines line { stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 4 5; }
.mcp-lines.flow line { stroke: var(--teal); stroke-width: 2; stroke-dasharray: 6 8; opacity: 0.55; animation: flow 1.8s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -14; } }

/* Compact live MCP card for hero */
.hero-mcp-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 20px 50px -20px rgba(0,0,0,0.12); overflow: hidden; }
.hero-mcp-card .demo-head { background: var(--bg-soft); }
.hero-mcp-diagram { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1/0.82; margin: 26px auto 10px; }
.hero-mcp-diagram .mcp-hub { width: 68px; height: 68px; font-size: 11px; box-shadow: 0 0 0 7px var(--teal-soft), 0 8px 20px -6px rgba(13,148,136,0.4); }
.hero-mcp-diagram .mcp-node { width: 44px; height: 44px; }
.hero-mcp-diagram .mcp-node img { width: 20px; height: 20px; }
.hero-mcp-diagram .mcp-label { font-size: 10.5px; }
.hero-ticker { border-top: 1px solid var(--border); padding: 14px 20px; font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.hero-ticker .dot2 { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex-shrink: 0; animation: blink 1.5s infinite; }
.mcp-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 40px; }
@media (max-width: 640px) { .mcp-diagram { max-width: 340px; transform: scale(0.82); transform-origin: top center; } }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { padding: 20px 0; cursor: pointer; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--teal); font-size: 20px; font-weight: 400; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { color: var(--text-dim); padding-bottom: 20px; margin: 0; font-size: 15px; max-width: 640px; }

/* Blog */
.blog-card { display: block; padding-bottom: 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.blog-card .meta { font-size: 12.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; font-weight: 700; }
.blog-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.blog-card p { color: var(--text-dim); font-size: 15px; }
article.post { max-width: 700px; margin: 0 auto; }
article.post h1 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 18px; }
article.post .meta { color: var(--text-faint); font-size: 13px; margin-bottom: 38px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
article.post h2 { font-size: 25px; margin: 38px 0 14px; font-weight: 700; }
article.post p { color: var(--text-dim); font-size: 16px; margin-bottom: 18px; }
article.post ul { color: var(--text-dim); }

/* RTL support */
html[dir="rtl"] body { font-family: 'Cairo', var(--body); }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { font-family: 'Cairo', var(--sans); }
html[dir="rtl"] .marquee-track { animation-direction: reverse; }

.lang-switch { font-size: 13.5px; color: var(--text-faint); }
.lang-switch a { color: var(--text-faint); }
.lang-switch a.active, .lang-switch a:hover { color: var(--text); }

@media (max-width: 720px) {
  nav.mainnav { display: none; }
  .hero { padding: 56px 0 38px; }
}
