/*
 * AgenticPanels marketing site — tokens, type and page chrome.
 * Tokens mirror packages/ui/src/styles/tokens.css (light) and tokens-dark.css (dark) so the
 * site and the product read as one thing. Section and mockup styles live in sections.css.
 */
:root {
  color-scheme: light;

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  --font-brand: 'Plus Jakarta Sans', var(--font-sans);

  /* The logo's two agent colours, for highlighted words: green is what the agents do, violet is you.
     The on-ink pair is for bands whose background is --ink (it flips with the theme). */
  --brand-green: #2f8a73;
  --brand-violet: #6c5fbd;
  --brand-green-on-ink: #8ad6c3;
  --brand-violet-on-ink: #c9c3f1;

  --paper: #f4f2ec;
  --paper-2: #f8f7f3;
  --paper-3: #fbfaf7;
  --dock: #efede6;
  --track: #ece9e1;
  --card: #ffffff;
  --line: #e4e1d8;
  --line-soft: #ece9e1;
  --line-strong: #d9d5ca;
  --line-hover: #c9c5ba;

  --ink: #17171a;
  --ink-hover: #2c2c31;
  --quiet: #4a4843;
  --muted: #55534d;
  --faint: #6b6860;
  --faintest: #8a867c;
  --on-ink: #f4f2ec;

  --accent: #1d6b57;
  --accent-strong: #134a3c;
  --accent-soft: #e3efea;
  --success-bg: #f1f7f4;
  --success-line: #c9d9d2;
  --warn: #a04a12;
  --warn-strong: #7f3a0e;
  --warn-soft: #fbf0e6;
  --warn-bar: #c98a5e;
  --violet: #3d3570;
  --violet-soft: #eceaf4;

  --panel-command: #17171a;
  --panel-growth: #1d6b57;
  --panel-growth-soft: #e3efea;
  --panel-customers: #3d3570;
  --panel-customers-soft: #eceaf4;
  --panel-operations: #8a5a12;
  --panel-operations-soft: #f6eedd;
  --panel-money: #1f5a85;
  --panel-money-soft: #e4edf5;
  --panel-team: #8a3b5c;
  --panel-team-soft: #f4e6ec;
  --panel-mission: #a04a12;
  --panel-mission-soft: #fbf0e6;

  /* The overnight band stays dark in both themes */
  --night: #141413;
  --night-2: #1e1e1c;
  --night-line: #302f2b;
  --night-ink: #eceae4;
  --night-muted: #aca89e;
  --night-faint: #7c7971;

  --radius-card: 14px;
  --radius-band: 18px;
  --radius-button: 10px;
  --elev-console: 0 1px 0 rgba(23, 23, 26, 0.04), 0 30px 80px -40px rgba(23, 23, 26, 0.35);
  --elev-float: 0 18px 40px -24px rgba(23, 23, 26, 0.4);

  --page-max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --brand-green: #8ad6c3;
    --brand-violet: #c9c3f1;
    --brand-green-on-ink: #2f8a73;
    --brand-violet-on-ink: #6c5fbd;
    --paper: #141413;
    --paper-2: #181817;
    --paper-3: #1b1b1a;
    --dock: #10100f;
    --track: #2a2926;
    --card: #1e1e1c;
    --line: #302f2b;
    --line-soft: #282725;
    --line-strong: #3b3a35;
    --line-hover: #4c4a44;
    --ink: #eceae4;
    --ink-hover: #d6d3cb;
    --quiet: #bebab0;
    --muted: #aca89e;
    --faint: #95928a;
    --faintest: #7c7971;
    --on-ink: #141413;
    --accent: #3f9c82;
    --accent-strong: #86d2b9;
    --accent-soft: #1b3029;
    --success-bg: #172520;
    --success-line: #2b463c;
    --warn: #c9733a;
    --warn-strong: #f0b58a;
    --warn-soft: #33241a;
    --violet: #aaa1e3;
    --violet-soft: #25223a;
    --panel-command: #6c6b69;
    --panel-growth: #5a9a88;
    --panel-growth-soft: #1b2f29;
    --panel-customers: #7c76a0;
    --panel-customers-soft: #252339;
    --panel-operations: #b08b55;
    --panel-operations-soft: #33291a;
    --panel-money: #5f8fb2;
    --panel-money-soft: #1b2a37;
    --panel-team: #b2798f;
    --panel-team-soft: #36232b;
    --panel-mission: #c38357;
    --panel-mission-soft: #33241a;
    --night: #0c0c0b;
    --night-2: #171716;
    --night-line: #2a2926;
    --elev-console: 0 1px 0 rgba(0, 0, 0, 0.3), 0 30px 80px -40px rgba(0, 0, 0, 0.8);
    --elev-float: 0 18px 40px -24px rgba(0, 0, 0, 0.8);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 14px;
  border-radius: var(--radius-button);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--page-max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(80px, 11vw, 150px) 0 0;
}

.section-head {
  max-width: 880px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

/* ---------- Type ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

h1.display {
  font-size: clamp(40px, 6.2vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

/* Two-tone hero: "You run the agents." steps back as the answer to the first line. */
.hero-copy h1 .line + .line {
  color: var(--muted);
}

/* Highlighted words in headings, in the logo's colours. */
.hl-agents {
  color: var(--brand-green);
}

.hl-you {
  color: var(--brand-violet);
}

h2.display {
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.06;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--quiet);
  max-width: 62ch;
  margin: 20px 0 0;
}

.body-copy {
  color: var(--quiet);
  max-width: 60ch;
  margin: 0;
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--on-ink);
}

.btn-primary:hover {
  background: var(--ink-hover);
}

.btn-quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--line-hover);
  background: var(--card);
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark,
.brand img {
  display: block;
  width: 28px;
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  font-size: 14.5px;
}

.nav-links a {
  text-decoration: none;
  color: var(--quiet);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-button);
  background: transparent;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .site-nav.is-open .nav-links,
  .site-nav.is-open .nav-actions {
    display: flex;
  }

  .site-nav.is-open .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 18px;
  }

  .site-nav.is-open .nav-links {
    order: 3;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 8px 0 0;
  }

  .site-nav.is-open .nav-links a {
    display: block;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
  }

  .site-nav.is-open .nav-actions {
    order: 4;
    width: 100%;
  }

  .site-nav.is-open .nav-actions .btn {
    flex: 1;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
  padding: 36px 0 48px;
  color: var(--faint);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-inner a {
  text-decoration: none;
}

.footer-inner a:hover {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
