/*
 * agentmagnify.com — the landing page.
 *
 * Same world as the panel ("The Site Supervisor's Ledger", DESIGN.md): paper
 * ground, graphite ink, one petrol-teal voice, and the three status hues
 * appearing only inside the product mocks, where state has earned them. The
 * marketing page is deliberately light in a category that defaults to dark —
 * the product is a calm daytime instrument and the page dresses like it.
 */

@font-face {
  font-family: 'InterVariable';
  src: url('fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  src: url('fonts/jetbrains-mono-var.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --paper: #f7f6f3;
  --surface: #ffffff;
  --ink: #16181c;
  --ink-2: #545a62;
  --ink-3: #6e747c;
  --line: #e3e6e8;
  --line-strong: #b7bcc1;
  --signal: #1c6e76;
  --signal-deep: #0e2e32;
  --signal-hover: #175c62;
  --signal-soft: rgba(28, 110, 118, 0.2);
  --signal-wash: #dceeec;
  --amber: #a8660d;
  --amber-wash: #f6e7d1;
  --amber-deep: #6c4008;
  --crimson: #aa3b3b;
  --crimson-wash: #f5dede;
  --crimson-deep: #6b2424;
  --moss: #3c7a55;
  --moss-wash: #dcebdf;
  --moss-deep: #234a33;
  --sans: 'InterVariable', ui-sans-serif, system-ui, sans-serif;
  --mono: 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { width: min(var(--max), calc(100% - 44px)); margin: 0 auto; }

/* ---- Type ----------------------------------------------------------------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.025em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.15rem); font-weight: 680; line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 650; line-height: 1.12; }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.lede { font-size: 1.125rem; line-height: 1.65; color: var(--ink-2); max-width: 34rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 6px;
  font: 500 15px/1 var(--sans); cursor: pointer; border: none;
  transition: background-color 140ms var(--ease), border-color 140ms var(--ease), transform 140ms var(--ease);
}
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.btn-primary:hover { background: var(--signal-hover); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: #eef0f1; color: var(--ink); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }

/* ---- Nav ------------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 246, 243, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.brand svg { width: 27px; height: 27px; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; font-size: 14.5px; color: var(--ink-2); }
.nav-links a { padding: 6px 2px; transition: color 140ms var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }
.nav-cta .btn { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---- Hero ----------------------------------------------------------------- */
.hero { padding: clamp(64px, 9vw, 118px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); gap: clamp(40px, 5vw, 72px); align-items: center; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero .lede { margin: 22px 0 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.install {
  margin-top: 26px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
  padding: 0 6px 0 14px; height: 44px;
}
.install code { font: 500 14px/1 var(--mono); color: var(--ink); }
.install code span { color: var(--ink-3); }
.copy {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; border-radius: 6px;
  background: transparent; color: var(--ink-3); cursor: pointer;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.copy:hover { background: #eef0f1; color: var(--ink); }
.copy svg { width: 15px; height: 15px; }
.copy.copied { color: var(--moss); }

.hero-note { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

/* ---- The panel fragment (hero artifact) ----------------------------------- */
.fragment { position: relative; }
.panel-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-md); padding: 22px;
}
.panel-card + .panel-card { margin-top: 14px; }
.panel-label { font: 500 10.5px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 14px; }
.panel-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-title { font-weight: 600; font-size: 15px; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2.5px 9px; border-radius: 6px;
  font: 500 12px/1.4 var(--sans);
}
.chip .mono { font-size: 11.5px; }
.chip-moss { background: var(--moss-wash); color: var(--moss-deep); }
.chip-amber { background: var(--amber-wash); color: var(--amber-deep); }
.chip-crimson { background: var(--crimson-wash); color: var(--crimson-deep); }
.chip-neutral { background: #e3e6e8; color: var(--ink-2); }

.tri { margin: 16px 0 6px; }
.tri-bar { position: relative; height: 10px; border-radius: 999px; background: #e3e6e8; overflow: hidden; }
.tri-bar i {
  position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px;
  transform: scaleX(0); transform-origin: left center;
}
.tri-reported { width: 68%; background: var(--signal-soft); }
.tri-roadmap  { width: 63%; background: var(--signal); }
.tri-verified { width: 63%; top: 2px !important; bottom: 2px !important; background: var(--signal-deep); }
/* scaleX, not width: compositor-only, no layout thrash while the page loads. */
.loaded .tri-bar i { transition: transform 900ms var(--ease) 250ms; transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .tri-bar i { transform: scaleX(1); } }
.tri-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.tri-legend b { font: 500 12.5px var(--mono); color: var(--ink); }
.gap-line { margin: 12px 0 0; font-size: 13px; color: var(--amber-deep); }
.gap-line b { font-family: var(--mono); font-weight: 500; }

.dispute { border-color: rgba(193, 90, 90, 0.45); background: #fdf7f7; }
.dispute p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.dispute .panel-title { font-size: 14px; }

.steps-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.step-thumb { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--paper); }
.step-thumb .shot { height: 52px; position: relative; background: linear-gradient(180deg, #24272e 26%, #f2f3f5 26%); }
.step-thumb .shot::after { content: ""; position: absolute; left: 10%; right: 34%; top: 42%; height: 7px; border-radius: 3px; background: #d6dade; box-shadow: 0 13px 0 #d6dade, 0 26px 0 #e4e7ea; }
.step-thumb.fail .shot::before { content: ""; position: absolute; left: 8%; right: 8%; top: 33%; height: 11px; border-radius: 3px; background: var(--crimson); opacity: 0.85; }
.step-meta { display: flex; align-items: center; justify-content: space-between; padding: 7px 9px; font-size: 11px; color: var(--ink-2); }
.step-meta b { font: 500 11px var(--mono); color: var(--ink); }
.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; }
.dot-moss { background: var(--moss); }
.dot-crimson { background: var(--crimson); }

.fragment-caption { margin: 16px 4px 0; font-size: 12.5px; color: var(--ink-3); }

/* ---- Sections ------------------------------------------------------------- */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-tight { padding-top: 0; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 4.5vw, 56px); }
.section-head p { margin: 16px 0 0; color: var(--ink-2); font-size: 1.0625rem; }

.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.truths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.truth h3 { margin-bottom: 8px; }
.truth h3 .mono { color: var(--signal); font-weight: 600; font-size: 1rem; }
.truth p { margin: 0; color: var(--ink-2); font-size: 15px; }
.truth:nth-child(3) h3 .mono { color: var(--signal-deep); }

/* ---- How it works --------------------------------------------------------- */
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.how-step { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.how-step h3 { font-size: 1.125rem; }
.how-step p { margin: 0; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.snippet {
  background: var(--ink); color: #eef0f1; border-radius: 6px; padding: 12px 14px;
  font: 450 12.5px/1.6 var(--mono); overflow-x: auto; white-space: pre;
}
.snippet .c { color: #8b939c; }
.snippet .g { color: #8fc29e; }

/* ---- Features ledger ------------------------------------------------------ */
.ledger { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: clamp(36px, 5vw, 80px); align-items: start; }
.ledger-intro { position: sticky; top: 100px; }
.ledger-intro p { color: var(--ink-2); margin: 16px 0 0; }
.ledger-list { border-top: 1px solid var(--line); }
.ledger-item { display: grid; grid-template-columns: minmax(150px, 200px) minmax(0, 1fr); gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.ledger-item h3 { font-size: 1rem; }
.ledger-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* ---- Where it works ------------------------------------------------------- */
.hosts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.host { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 20px; min-width: 0; }
.host h3 { font-size: 15px; margin-bottom: 8px; }
.host code { display: block; font: 500 12px/1.5 var(--mono); color: var(--signal-deep); background: var(--signal-wash); border-radius: 6px; padding: 8px 10px; overflow-x: auto; white-space: nowrap; }
.host code.stack { white-space: pre; }
.host p { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }

/* ---- Plans ---------------------------------------------------------------- */
.plans-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; max-width: none; }
.plans-head h2 { max-width: 720px; }

.plans-switches { display: flex; flex-wrap: wrap; gap: 10px; }

.currency-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.currency-switch button {
  appearance: none; border: 0; margin: 0; cursor: pointer;
  padding: 7px 14px; background: transparent; color: var(--ink-3);
  font: 500 12.5px/1 var(--mono); letter-spacing: 0.04em;
  transition: background 140ms var(--ease), color 140ms var(--ease);
}
.currency-switch button + button { border-left: 1px solid var(--line); }
.currency-switch button:hover { color: var(--ink); }
.currency-switch button[aria-pressed='true'] { background: var(--signal); color: #fff; }
.currency-switch button:focus-visible { outline-offset: -2px; }

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.plan-featured { border-color: var(--signal); box-shadow: var(--shadow-md); }
.plan h3 { font-size: 1.125rem; }
.plan-price { margin: -4px 0 0; }
.plan-price b { font: 600 1.5rem/1.2 var(--sans); letter-spacing: -0.02em; color: var(--ink); }
.plan-price span { font-size: 13px; color: var(--ink-3); margin-left: 2px; }
.plan .plan-for { font-size: 13px; color: var(--ink-3); margin: -6px 0 0; }
.plan ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--ink-2); flex: 1; }
.plan li b { font: 500 13px var(--mono); color: var(--ink); }
.plan .btn { justify-content: center; }
.plans-note { margin-top: 18px; font-size: 13px; color: var(--ink-3); }

/* ---- Trust ---------------------------------------------------------------- */
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 56px); }
.trust-item h3 { margin-bottom: 8px; }
.trust-item p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.trust-item a { color: var(--signal); font-weight: 500; }
.trust-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Final CTA ------------------------------------------------------------ */
.finale { text-align: center; padding: clamp(80px, 10vw, 130px) 0; }
.finale h2 { font-size: clamp(2rem, 4vw, 3rem); }
.finale .lede { margin: 18px auto 32px; }
.finale .hero-ctas { justify-content: center; }

/* ---- Footer --------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 44px 0 36px; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 300px; }
.footer-brand p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--ink-3); }

.lang-menu { position: relative; }
/* Quiet on purpose: same height as its nav neighbours, no box of its own —
 * the flag is the affordance, a border would make it shout. */
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 8px; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  font: 500 12.5px/1 var(--mono); letter-spacing: 0.04em;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.lang-btn:hover { background: #eef0f1; color: var(--ink); }
.lang-btn:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.lang-btn .chev { width: 9px; height: 6px; color: var(--ink-3); }
.flag, .flag-slot svg { display: block; width: 20px; height: 14px; border-radius: 2.5px; box-shadow: inset 0 0 0 1px rgba(22, 24, 28, 0.1); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  margin: 0; padding: 5px; list-style: none; min-width: 152px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-md);
}
.lang-list li {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; color: var(--ink-2);
}
.lang-list li:hover { background: var(--paper); color: var(--ink); }
.lang-list li[aria-selected='true'] { color: var(--ink); font-weight: 550; }
.lang-list li:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; align-items: flex-start; }
.footer-links { display: flex; gap: 48px; }
.footer-links h4 { margin: 0 0 10px; font: 500 11px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 14px; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-pay { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink-3); }
.footer-pay img { height: 28px; width: auto; max-width: min(100%, 380px); object-fit: contain; }

.footer-meta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: var(--ink-3); }

/* ---- inner pages (about) ------------------------------------------------- */
.page-narrow { max-width: 720px; }
.about-body h3 { margin: 36px 0 10px; font: 600 1.125rem/1.3 var(--sans); letter-spacing: -0.01em; color: var(--ink); }
.about-body p { margin: 0 0 14px; color: var(--ink-2); }
.about-body a { color: var(--signal); }
.about-body a:hover { text-decoration: underline; text-underline-offset: 3px; }
.seller-details { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.seller-details > div { display: grid; grid-template-columns: minmax(96px, 160px) minmax(0, 1fr); gap: 16px; padding: 12px 16px; }
.seller-details > div + div { border-top: 1px solid var(--line); }
.seller-details dt { font: 500 12px/1.6 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.seller-details dd { margin: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.footer-brand-link { color: var(--signal); font-weight: 500; }
.footer-brand-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Motion --------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(10px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fragment { max-width: 560px; }
  .hosts, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Three cards carrying command lines do not fit a tablet in one row. */
  .how { grid-template-columns: minmax(0, 1fr); }
  .ledger { grid-template-columns: 1fr; }
  .ledger-intro { position: static; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .truths, .how, .hosts, .plans, .trust { grid-template-columns: minmax(0, 1fr); }
  .ledger-item { grid-template-columns: 1fr; gap: 6px; }
  .steps-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-links { flex-direction: column; gap: 22px; }
}

/*
 * Phones. The header carries a wordmark, a language menu and two calls to
 * action, which is more than a 320px screen holds — and the one that has to
 * survive is the one that opens an account. "Open the panel" is for somebody
 * who already has one, and they arrived with a bookmark.
 *
 * The gutter narrows with it: 44px of side margin is comfortable on a laptop
 * and a seventh of the screen on a phone.
 */
@media (max-width: 560px) {
  .wrap { width: calc(100% - 32px); }
  .nav-cta .btn-ghost { display: none; }
  .nav-cta { gap: 8px; }
  .nav-cta .btn { padding: 0 13px; }
}

@media (max-width: 360px) {
  .brand { font-size: 15.5px; gap: 8px; }
  .brand svg { width: 24px; height: 24px; }
}
