/* =========================================================
   AgenticWeave — Landing Page Styles
   Palette derived from the AgenticWeave logo (teal → blue → violet on deep navy)
   ========================================================= */
:root {
  --bg: #0b0f1e;
  --bg-2: #10162a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1fb;
  --muted: #a3abc6;
  --dim: #6f7896;
  --teal: #4fe3c8;
  --cyan: #5cc8ff;
  --blue: #4a7dff;
  --violet: #9b6bff;
  --grad: linear-gradient(120deg, #4fe3c8 0%, #5cc8ff 35%, #4a7dff 65%, #9b6bff 100%);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  --max: 1180px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: 0.9em; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.ambient::before, .ambient::after {
  content: ""; position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.22;
}
.ambient::before { background: radial-gradient(circle, #4a7dff, transparent 65%); top: -25vmax; left: -15vmax; }
.ambient::after { background: radial-gradient(circle, #9b6bff, transparent 65%); bottom: -30vmax; right: -20vmax; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 15, 30, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 750; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 0.5rem 0.85rem; border-radius: 999px; color: var(--muted);
  font-size: 0.95rem; font-weight: 500; transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary:focus-visible { color: #071022; background: var(--grad); font-weight: 700; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 650; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--grad); color: #071022; box-shadow: 0 10px 30px -10px rgba(92, 200, 255, 0.55); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 3rem; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.9rem;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  font-size: 0.85rem; color: var(--muted); font-weight: 500; margin-bottom: 1.5rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.hero h1 { max-width: 15ch; margin-inline: auto; }
.hero-lead { max-width: 640px; margin: 0 auto 2rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-bottom: 1.6rem; }
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.4rem; color: var(--dim); font-size: 0.9rem; list-style: none; padding: 0; margin: 0; }
.platforms li { display: inline-flex; align-items: center; gap: 0.4rem; }
.platforms svg { width: 16px; height: 16px; }

.hero-visual { position: relative; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.hero-visual::before {
  content: ""; position: absolute; inset: 10% 8% -4%; background: var(--grad); filter: blur(80px); opacity: 0.28; border-radius: 40px; z-index: -1;
}
.hero-mac {
  /* "auto" = use the screenshot's real proportions once loaded; 1363/909 only reserves space beforehand (CLS-safe) */
  display: block; width: 100%; max-width: 1000px; height: auto; margin-inline: auto;
  aspect-ratio: auto 1363 / 909; object-fit: contain;
  border-radius: 18px; box-shadow: var(--shadow);
}
.hero-phone {
  position: absolute; bottom: -6%; width: clamp(110px, 19%, 210px); aspect-ratio: 739 / 1600;
  border-radius: 26px; border: 6px solid #1a2036; box-shadow: var(--shadow); object-fit: cover; background: #1a2036;
}
.hero-phone.left { left: max(0px, 2%); transform: rotate(-5deg); }
.hero-phone.right { right: max(0px, 2%); transform: rotate(5deg); }

/* ---------- Trust strip ---------- */
.strip { padding: 3.5rem 0 1rem; text-align: center; }
.strip p { color: var(--dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; margin-bottom: 1.2rem; }
.provider-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; list-style: none; padding: 0; margin: 0; }
.provider-row li {
  padding: 0.55rem 1.1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--muted); font-weight: 600; font-size: 0.95rem;
}

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-head { max-width: 720px; margin: 0 auto clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.section-head .kicker { display: inline-block; font-family: var(--mono); font-size: 0.82rem; color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.section-head p { color: var(--muted); font-size: 1.12rem; }

/* ---------- Pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  position: relative; padding: 1.9rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); transition: transform 0.25s ease, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card p { color: var(--muted); margin: 0; }
.icon-tile {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.2rem;
  background: linear-gradient(135deg, rgba(79, 227, 200, 0.18), rgba(155, 107, 255, 0.18)); border: 1px solid var(--border-strong);
}
.icon-tile svg { width: 24px; height: 24px; color: var(--cyan); }

/* ---------- Loop ---------- */
.loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.loop li { position: relative; padding: 1.6rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.loop li::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 0.85rem; font-weight: 700; display: inline-block; margin-bottom: 0.9rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.loop p { color: var(--muted); font-size: 0.97rem; margin: 0; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-copy h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.split-copy > p { color: var(--muted); font-size: 1.08rem; }
.checklist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.85rem; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 0.75rem; color: var(--muted); }
.checklist li strong { color: var(--text); font-weight: 650; }
.checklist svg { width: 22px; height: 22px; color: var(--teal); margin-top: 2px; }
.phone-pair { display: flex; justify-content: center; gap: 1.2rem; }
.phone-pair img {
  width: min(46%, 260px); aspect-ratio: 739 / 1600; object-fit: cover; border-radius: 30px;
  border: 7px solid #1a2036; box-shadow: var(--shadow); background: #1a2036;
}
.phone-pair img:nth-child(2) { transform: translateY(2.5rem); }

/* ---------- BYOA tabs ---------- */
.byoa-panel { display: grid; grid-template-columns: 300px 1fr; gap: 1.25rem; align-items: stretch; }
.tablist { display: flex; flex-direction: column; gap: 0.5rem; }
.tab {
  display: flex; align-items: center; gap: 0.8rem; text-align: left; width: 100%;
  padding: 0.95rem 1.1rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.tab:hover { color: var(--text); background: var(--surface-2); }
.tab[aria-selected="true"] { color: var(--text); border-color: rgba(92, 200, 255, 0.55); background: rgba(74, 125, 255, 0.12); }
.tab .swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.tab small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--dim); }
.tabpanel {
  padding: clamp(1.6rem, 4vw, 2.4rem); border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, rgba(74, 125, 255, 0.1), rgba(155, 107, 255, 0.06) 60%, transparent);
}
.tabpanel[hidden] { display: none; }
.tabpanel .tag {
  display: inline-block; font-family: var(--mono); font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: 6px;
  background: rgba(79, 227, 200, 0.14); color: var(--teal); margin-bottom: 1rem; font-weight: 600;
}
.tabpanel p { color: var(--muted); }
.tabpanel ul { margin: 1rem 0 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: 0.4rem; }

/* ---------- BYOH flow ---------- */
.host-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.file-tree {
  margin-top: 2rem; padding: 1.5rem 1.75rem; border-radius: var(--radius); background: #070a16; border: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.92rem; color: var(--muted); line-height: 1.9; overflow-x: auto;
}
.file-tree .c { color: var(--dim); }
.file-tree .f { color: var(--cyan); }
.file-tree .d { color: var(--violet); }

/* ---------- Sync ---------- */
.sync-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem); border-radius: 28px; border: 1px solid var(--border-strong);
  background: radial-gradient(120% 120% at 0% 0%, rgba(79, 227, 200, 0.12), transparent 50%), radial-gradient(120% 120% at 100% 100%, rgba(155, 107, 255, 0.14), transparent 50%), var(--bg-2);
}
.sync-wrap h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.sync-wrap > div > p { color: var(--muted); }
.devices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.device { text-align: center; padding: 1.4rem 0.8rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.device svg { width: 40px; height: 40px; margin: 0 auto 0.7rem; color: var(--text); }
.device h3 { font-size: 1rem; margin: 0 0 0.2rem; }
.device p { font-size: 0.82rem; color: var(--dim); margin: 0; }
.sync-bar { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 0.4rem; }
.sync-bar span { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 99px; animation: sync 2.6s ease-in-out infinite; }
@keyframes sync { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ---------- Comparison ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.compare .card h3 { display: flex; align-items: center; gap: 0.6rem; }
.compare ul { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.7rem; color: var(--muted); }
.compare li { display: grid; grid-template-columns: 20px 1fr; gap: 0.6rem; }
.compare li svg { width: 18px; height: 18px; margin-top: 4px; }
.compare .old li svg { color: #ff7a8a; }
.compare .new { border-color: rgba(92, 200, 255, 0.4); background: linear-gradient(160deg, rgba(74, 125, 255, 0.12), transparent 70%); }
.compare .new li svg { color: var(--teal); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 0.75rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.faq-item h3 { margin: 0; font-size: 1.05rem; }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 1.3rem; background: none; border: 0; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.faq-q svg { width: 20px; height: 20px; flex: none; color: var(--muted); transition: transform 0.25s ease; }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); }
.faq-a { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.faq-a[hidden] { display: none; }
.faq-a p { margin: 0; }

/* ---------- CTA ---------- */
.cta {
  text-align: center; padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem); border-radius: 32px;
  background: radial-gradient(80% 120% at 50% 0%, rgba(92, 200, 255, 0.22), transparent 60%), var(--bg-2);
  border: 1px solid var(--border-strong); position: relative; overflow: hidden;
}
.cta img { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 1.6rem; box-shadow: 0 20px 50px -15px rgba(92, 200, 255, 0.5); object-fit: cover; }
.cta p { color: var(--muted); max-width: 560px; margin: 0 auto 2rem; font-size: 1.1rem; }

.kicker { display: inline-block; font-family: var(--mono); font-size: 0.82rem; color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.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; }

/* ---------- Access form (mailto composer) ---------- */
.access-form { max-width: 620px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; text-align: left; }
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-size: 0.88rem; font-weight: 600; color: var(--muted); }
.access-form input, .access-form select, .access-form textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: rgba(7, 10, 22, 0.7); color: var(--text); font: inherit; font-size: 1rem; transition: border-color 0.2s;
}
.access-form textarea { resize: vertical; min-height: 96px; }
.access-form input:focus, .access-form select:focus, .access-form textarea:focus { outline: none; border-color: var(--cyan); }
.access-form [aria-invalid="true"] { border-color: #ff7a8a; }
.access-form .btn { width: 100%; }
.cta .form-note { margin: 0.8rem 0 0; font-size: 0.88rem; color: var(--dim); text-align: center; max-width: none; }
.form-note a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) { .access-form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { padding: 3.5rem 0 2.5rem; border-top: 1px solid var(--border); margin-top: clamp(4rem, 8vw, 6rem); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-grid p { color: var(--dim); font-size: 0.93rem; max-width: 36ch; margin-top: 1rem; }
.footer-grid h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--dim); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-grid ul a { color: var(--muted); font-size: 0.95rem; }
.footer-grid ul a:hover { color: var(--text); }
.legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--dim); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .loop { grid-template-columns: repeat(2, 1fr); }
  .byoa-panel { grid-template-columns: 1fr; }
  .tablist { flex-direction: row; overflow-x: auto; padding-bottom: 0.3rem; scrollbar-width: thin; }
  .tab { width: auto; flex: none; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0.25rem;
    padding: 1rem 1.25rem 1.5rem; background: rgba(11, 15, 30, 0.97); border-bottom: 1px solid var(--border);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 0.8rem 1rem; font-size: 1.05rem; }
  .nav-links .btn { margin-top: 0.5rem; }
  .pillars, .host-grid, .compare { grid-template-columns: 1fr; }
  .split, .sync-wrap { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .hero-phone { display: none; }
}
@media (max-width: 520px) {
  .loop { grid-template-columns: 1fr; }
  .devices { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .device { padding: 1rem 0.4rem; }
  .hero-ctas .btn { width: 100%; }
}