/* ═══ AgileX Design System ═══ */
:root {
  --red: #E04032;
  --red-dark: #C4362A;
  --red-light: #E8564A;
  --red-glow: rgba(224,64,50,.10);
  --black: #0A0A0A;
  --warm: #111111;
  --charcoal: #1C1C1E;
  --graphite: #2C2C2E;
  --g9: #3A3A3C;
  --g7: #636366;
  --g5: #8E8E93;
  --g4: #AEAEB2;
  --g3: #C7C7CC;
  --g2: #E5E5EA;
  --g1: #F2F2F7;
  --g0: #F9F9FB;
  --success: #30D158;
  --amber: #FFD60A;
  --info: #64D2FF;
  --purple: #BF5AF2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Outfit", sans-serif;
  background: var(--black);
  color: var(--g4);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ═══ NAV ═══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: all .4s;
  background: rgba(10,10,10,.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
nav.scrolled {
  background: rgba(10,10,10,.94);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.nav-in {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 72px;
}
.nav-mark {
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 26px;
  color: #fff; letter-spacing: 1.5px; text-decoration: none; text-transform: uppercase;
}
.nav-mark .x { color: var(--red); }
.nav-r { display: flex; align-items: center; gap: 6px; }
.nav-r a {
  color: var(--g5); text-decoration: none; font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px; transition: all .2s; letter-spacing: .2px;
}
.nav-r a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-cta {
  background: var(--red) !important; color: #fff !important;
  font-weight: 600 !important; border-radius: 8px !important;
}
.nav-cta:hover { background: var(--red-dark) !important; }
@media(max-width:768px) {
  .nav-r a:not(.nav-cta) { display: none; }
  .nav-in { padding: 0 20px; }
}

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh; position: relative;
  display: flex; align-items: center; overflow: hidden;
  padding: 120px 40px 80px;
}
.hero-dots {
  position: absolute; inset: 0; opacity: .02;
  background-image: radial-gradient(circle, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 32px 32px;
}
.hero::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0;
  height: 200px; background: linear-gradient(to top, var(--black), transparent); z-index: 1;
}
.hero-glow {
  position: absolute; top: 8%; right: 12%; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(224,64,50,.05), transparent 55%);
  pointer-events: none;
}
.hero-in {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center; position: relative; z-index: 2;
}
@media(max-width:900px) { .hero-in { grid-template-columns: 1fr; text-align: center; } }
.hero-txt { opacity: 0; animation: rise .8s .2s forwards; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(224,64,50,.06); border: 1px solid rgba(224,64,50,.12);
  border-radius: 100px; padding: 6px 16px 6px 10px; margin-bottom: 36px;
  font-size: 12px; color: var(--red); font-weight: 500; letter-spacing: .3px;
}
.hero-tag-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.hero-h1 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: clamp(52px, 7.5vw, 96px); line-height: .95;
  color: #fff; letter-spacing: 2px; margin-bottom: 28px; text-transform: uppercase;
}
.hero-h1 .hl { color: var(--red); }
.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px); font-weight: 300;
  line-height: 1.7; color: var(--g4); max-width: 460px; margin-bottom: 40px;
}
@media(max-width:900px) { .hero-sub { margin: 0 auto 40px; } }
.hero-sub strong { color: #fff; font-weight: 600; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media(max-width:900px) { .hero-actions { justify-content: center; } }

/* Hero visual — chain preview */
.hero-visual { position: relative; opacity: 0; animation: rise .8s .45s forwards; }
.chain-preview { display: flex; flex-direction: column; gap: 8px; }
.chain-node {
  display: flex; align-items: center; gap: 16px;
  background: var(--charcoal); border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 16px 20px; transition: all .35s; cursor: default;
}
.chain-node:hover { border-color: rgba(255,255,255,.12); transform: translateX(6px); }
.chain-node-av {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 18px;
  border: 2px solid; flex-shrink: 0;
}
.chain-node-txt { flex: 1; }
.chain-node-name {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 15px; color: #fff; letter-spacing: .5px;
}
.chain-node-role {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase; margin-top: 1px;
}
.chain-node-arrow { font-size: 16px; color: var(--g7); flex-shrink: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; font-size: 15px;
  font-weight: 600; text-decoration: none; transition: all .25s;
  border: none; cursor: pointer; letter-spacing: .2px;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(224,64,50,.25); }
.btn-ghost { background: rgba(255,255,255,.04); color: #fff; border: 1px solid rgba(255,255,255,.08); }
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }

/* ═══ STATS ═══ */
.stats {
  position: relative; z-index: 3;
  border-top: 1px solid rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.04);
  background: var(--warm); padding: 52px 40px;
}
.stats-in {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; text-align: center;
}
@media(max-width:640px) { .stats-in { grid-template-columns: 1fr 1fr; gap: 24px; } }
.stat-num {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 44px; color: #fff; line-height: 1; letter-spacing: 1px;
}
.stat-num .u { font-size: 26px; color: var(--red); margin-left: 2px; }
.stat-lbl { font-size: 12px; color: var(--g5); margin-top: 6px; letter-spacing: .3px; }

/* ═══ SECTIONS ═══ */
.section { padding: 100px 40px; }
.sec-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace; font-size: 11px;
  font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 16px;
}
.sec-h2 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: clamp(32px, 4.5vw, 52px); color: #fff;
  letter-spacing: 1.5px; text-transform: uppercase; line-height: 1; margin-bottom: 16px;
}
.sec-sub {
  font-size: 17px; color: var(--g5); max-width: 640px;
  line-height: 1.7; margin-bottom: 56px;
}
.sec-sub strong { color: #fff; font-weight: 600; }
.sec-center { text-align: center; }
.sec-center .sec-sub { margin-left: auto; margin-right: auto; }

/* ═══ AGENT CARDS ═══ */
.ag-grid {
  display: grid; grid-template-columns: repeat(5,1fr);
  gap: 16px; max-width: 1200px; margin: 0 auto;
}
@media(max-width:1100px) { .ag-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:700px) { .ag-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:480px) { .ag-grid { grid-template-columns: 1fr; } }
.ag-card {
  background: var(--charcoal); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 28px 24px; transition: all .3s;
  text-align: center; position: relative; overflow: hidden;
}
.ag-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; opacity: 0; transition: opacity .3s;
}
.ag-card:hover {
  border-color: rgba(255,255,255,.1); transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.3);
}
.ag-card:hover::before { opacity: 1; }
.ag-av {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Oswald", sans-serif; font-weight: 700; font-size: 28px;
  margin: 0 auto 16px; border: 2px solid; position: relative;
}
.ag-av::after {
  content: ""; position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--success); border: 2px solid var(--charcoal);
}
.ag-name {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 22px; color: #fff; letter-spacing: .5px;
}
.ag-role {
  font-family: "JetBrains Mono", monospace; font-size: 10px;
  font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  margin-top: 2px; margin-bottom: 12px;
}
.ag-desc { font-size: 13px; color: var(--g5); line-height: 1.6; margin-bottom: 16px; }
.ag-chain {
  font-family: "JetBrains Mono", monospace; font-size: 9px;
  font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--g7); background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06); border-radius: 6px;
  padding: 6px 10px; display: inline-block;
}
.ag-tasks { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.ag-task {
  font-size: 10px; padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06);
  color: var(--g4); font-weight: 500; letter-spacing: .2px;
}

/* ═══ FEATURES ═══ */
.feat-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 20px; max-width: 1200px; margin: 0 auto;
}
@media(max-width:900px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card {
  background: var(--charcoal); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 32px 28px; transition: all .3s;
}
.feat-card:hover { border-color: rgba(255,255,255,.1); transform: translateY(-3px); }
.feat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 22px;
}
.feat-h3 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 20px; color: #fff; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 10px;
}
.feat-p { font-size: 14px; color: var(--g5); line-height: 1.65; }
.feat-list { list-style: none; margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.feat-list li { font-size: 13px; color: var(--g4); padding-left: 20px; position: relative; }
.feat-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); opacity: .6;
}

/* ═══ TOOLS LINKS ═══ */
.tools-wrap { max-width: 1200px; margin: 0 auto; }
.tools-grid-3 {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 16px; max-width: 800px; margin: 0 auto;
}
@media(max-width:700px) { .tools-grid-3 { grid-template-columns: 1fr; } }
.tool-link {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--charcoal); border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px; padding: 28px 24px; text-decoration: none;
  transition: all .3s; color: inherit;
}
.tool-link:hover { border-color: rgba(255,255,255,.12); transform: translateY(-4px); background: rgba(255,255,255,.03); }
.tool-link-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tool-link-name {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 17px; color: #fff; letter-spacing: .5px; text-transform: uppercase;
}
.tool-link-desc { font-size: 13px; color: var(--g5); margin-top: 2px; line-height: 1.5; }
.tool-sub-link { display: block; font-size: 11px; color: var(--g7); margin-top: 6px; font-style: italic; }
.tool-link-arrow { font-size: 18px; color: var(--g7); align-self: flex-end; transition: transform .3s; }
.tool-link:hover .tool-link-arrow { transform: translateX(4px); color: var(--red); }

/* ═══ TRUST ═══ */
.trust-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 20px; max-width: 1200px; margin: 0 auto;
}
@media(max-width:900px) { .trust-grid { grid-template-columns: 1fr; } }
.trust-card {
  background: var(--charcoal); border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px; padding: 32px 28px; transition: all .3s;
}
.trust-card:hover { border-color: rgba(255,255,255,.1); }
.trust-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.trust-h4 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 18px; color: #fff; letter-spacing: .5px;
  text-transform: uppercase; margin-bottom: 8px;
}
.trust-p { font-size: 14px; color: var(--g5); line-height: 1.65; }

/* ═══ CTA ═══ */
.cta { position: relative; padding: 100px 40px; text-align: center; overflow: hidden; }
.cta-glow {
  position: absolute; top: 50%; left: 50%; width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(224,64,50,.06), transparent 60%);
  transform: translate(-50%,-50%); pointer-events: none;
}
.cta-h2 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: clamp(36px, 5vw, 60px); color: #fff; letter-spacing: 2px;
  text-transform: uppercase; line-height: 1; margin-bottom: 20px; position: relative;
}
.cta-h2 .hl { color: var(--red); }
.cta-sub {
  font-size: 17px; color: var(--g5); max-width: 520px;
  margin: 0 auto 36px; line-height: 1.7; position: relative;
}
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ═══ FOOTER ═══ */
footer {
  border-top: 1px solid rgba(255,255,255,.06); padding: 48px 40px;
}
.ft-in {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start;
}
@media(max-width:768px) { .ft-in { grid-template-columns: 1fr; text-align: center; } }
.ft-brand {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 22px; color: rgba(255,255,255,.4);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px;
}
.ft-brand .x { color: var(--red); }
.ft-copy {
  font-size: 11px; color: var(--g7);
  font-family: "JetBrains Mono", monospace; letter-spacing: .5px;
}
.ft-links { display: flex; gap: 24px; flex-wrap: wrap; }
@media(max-width:768px) { .ft-links { justify-content: center; } }
.ft-links a { font-size: 13px; color: var(--g5); text-decoration: none; transition: color .2s; }
.ft-links a:hover { color: #fff; }

/* ═══ SCROLL REVEAL ═══ */
.rv { opacity: 0; transform: translateY(32px); transition: all .7s cubic-bezier(.16,1,.3,1); }
.rv.vis { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ═══ ARTICLE / POST ═══ */
.article-content {
  max-width: 760px; margin: 0 auto; padding: 0 40px 80px;
}
.article-content h2 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 28px; color: #fff; letter-spacing: .5px;
  text-transform: uppercase; margin: 48px 0 16px;
}
.article-content h3 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 20px; color: #fff; margin: 32px 0 12px;
}
.article-content p {
  font-size: 16px; line-height: 1.8; color: var(--g4); margin-bottom: 16px;
}
.article-content strong { color: #fff; font-weight: 600; }
.article-content hr {
  border: none; border-top: 1px solid rgba(255,255,255,.08);
  margin: 40px 0;
}
.article-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14px;
}
.article-content th {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 12px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--red); padding: 12px 16px; text-align: left;
  border-bottom: 2px solid rgba(224,64,50,.2);
}
.article-content td {
  padding: 10px 16px; color: var(--g4);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.article-content em { color: var(--g5); }
.article-content ul, .article-content ol {
  margin: 16px 0; padding-left: 24px;
}
.article-content li {
  font-size: 15px; line-height: 1.7; color: var(--g4); margin-bottom: 8px;
}
.article-content code {
  font-family: "JetBrains Mono", monospace; font-size: 14px;
  background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 4px;
  color: var(--red);
}

/* ═══ SIMPLE FOOTER (for tool pages) ═══ */
.ft-simple { border-top: 1px solid rgba(255,255,255,.06); padding: 40px 32px; text-align: center; margin-top: 40px; }
.ft-l { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 22px; color: rgba(255,255,255,.4); letter-spacing: 1px; text-transform: uppercase; }
.ft-l .x { color: var(--red); }
.ft-n { font-size: 11px; color: var(--g7); margin-top: 8px; font-family: "JetBrains Mono", monospace; letter-spacing: .5px; }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--charcoal); border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px; padding: 40px; width: 100%; max-width: 480px;
  position: relative; animation: slideUp .3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: none; color: var(--g5);
  font-size: 28px; cursor: pointer; transition: color .2s;
  line-height: 1;
}
.modal-close:hover { color: #fff; }
.modal-h3 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  font-size: 28px; color: #fff; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 8px;
}
.modal-sub {
  font-size: 14px; color: var(--g5); line-height: 1.6; margin-bottom: 28px;
}
.form-row { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 11px; font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--g5); margin-bottom: 6px;
}
.form-input {
  width: 100%; padding: 12px 16px; font-size: 15px;
  font-family: "Outfit", sans-serif; color: #fff;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px; transition: all .2s; outline: none;
}
.form-input::placeholder { color: var(--g7); }
.form-input:focus { border-color: var(--red); background: rgba(255,255,255,.06); }
.form-textarea { resize: vertical; min-height: 100px; }
.modal-submit { width: 100%; justify-content: center; margin-top: 6px; }
.form-status { text-align: center; margin-top: 14px; font-size: 14px; min-height: 20px; }
.form-success { color: var(--success); }
.form-error { color: var(--red); }
