/* Aptly marketing site: shared styles, loaded by every marketing page.
   Bump the ?v= on the <link> in every page when this file changes.

   Two layers:
   1. Tokens, navigation and footer apply on every page.
   2. Base styles and components apply only where <html class="site">, so pages
      that still carry their own inline styles are not restyled by accident.
      :where() keeps those rules at their normal specificity. */

:root {
  --paper: #f8f7f2;
  --surface: #f0ede6;
  --card: #ffffff;
  --ink: #111210;
  --body: #3d3d38;
  --muted: #6f6e66;
  --line: #e2e0d8;

  --forest: #1a2e0f;
  --forest-deep: #132209;
  --green: #2d5016;
  --green-mid: #4a7c28;
  --leaf: #97c459;
  --leaf-bright: #a9d36e;
  --leaf-tint: #edf5e6;

  --amber-tint: #fbf1dc;
  --amber-ink: #8a5a00;
  --red: #a32d2d;
  --red-tint: #fcebeb;
  --honey: #f1e8d4;
  --honey-ink: #856726;
  --slate: #e8ecee;
  --slate-ink: #41545f;

  --on-forest: #f8f7f2;
  --on-forest-soft: #c4d4b6;

  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --wrap: 1160px;
  --gutter: 24px;
  --radius: 12px;
}

/* ==================== Layer 1: every page ==================== */

/* ---------- Navigation ---------- */

.site-nav { position: sticky; top: 0; z-index: 100; background: var(--forest); font-family: var(--sans); line-height: 1.6; box-sizing: border-box; }
.site-nav *, .site-foot * { box-sizing: border-box; }

/* Pages that still carry their own inline styles were built around a fixed bar. */
.site-nav.site-nav-fixed { position: fixed; left: 0; right: 0; }

.site-nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 11px var(--gutter);
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav-logo { display: block; margin-right: auto; line-height: 0; }
.site-nav-logo img { display: block; height: 30px; width: auto; }

.site-nav-links { display: flex; align-items: center; gap: 2px; }

.site-nav-links a {
  color: var(--on-forest-soft);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
}
.site-nav-links a:hover,
.site-nav-links a[aria-current="page"] { color: #ffffff; background: rgba(255, 255, 255, 0.07); text-decoration: none; }

.site-nav-cta {
  background: var(--leaf);
  color: var(--forest);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav-cta:hover { background: var(--leaf-bright); color: var(--forest); text-decoration: none; }

.site-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.site-nav-toggle span { display: block; width: 20px; height: 2px; background: var(--on-forest); border-radius: 2px; }

.site-nav :focus-visible, .site-foot :focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

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

.site-foot { background: var(--forest-deep); color: var(--on-forest-soft); padding: 64px 0 32px; font-family: var(--sans); font-size: 0.92rem; line-height: 1.6; }
.site-foot p { margin: 0; font-size: inherit; line-height: inherit; color: inherit; }

.site-foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.site-foot-top { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; }

.site-foot-brand img { display: block; height: 30px; width: auto; }
.site-foot-brand p { margin-top: 16px; max-width: 26rem; line-height: 1.55; }

.site-foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.site-foot-cols .site-foot-title { font-size: 0.85rem; font-weight: 600; color: var(--on-forest); margin-bottom: 12px; }
.site-foot-cols a { display: block; color: var(--on-forest-soft); text-decoration: none; padding: 4px 0; }
.site-foot-cols a:hover { color: #ffffff; text-decoration: underline; }

.site-foot-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  font-size: 0.82rem;
}
.site-foot-bottom a { color: var(--on-forest); }
.site-foot-bottom a:hover { color: #ffffff; }

@media (max-width: 900px) {
  .site-nav-toggle { display: inline-flex; }
  .site-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--forest);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
  }
  .site-nav-links.open { display: flex; }
  .site-nav-links a { padding: 13px 8px; font-size: 1rem; }
  .site-foot-top { grid-template-columns: 1fr; gap: 36px; }
  .site-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }

  /* The cookie banner (consent.js) took about a quarter of a phone screen. */
  body #aptly-consent-banner .aptly-consent-inner { padding: 10px 14px; gap: 8px; }
  body #aptly-consent-banner .aptly-consent-text strong { display: none; }
  body #aptly-consent-banner .aptly-consent-text p { font-size: 12px; line-height: 1.4; }
  body #aptly-consent-banner .aptly-consent-actions { gap: 6px; }
  body #aptly-consent-banner .aptly-consent-actions button { padding: 7px 6px; font-size: 12px; }
}

/* ==================== Layer 2: pages with <html class="site"> ==================== */

:where(.site) *, :where(.site) *::before, :where(.site) *::after { box-sizing: border-box; }

html:where(.site) { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }

:where(.site) body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:where(.site) img, :where(.site) video { max-width: 100%; display: block; }

:where(.site) h1, :where(.site) h2, :where(.site) h3, :where(.site) h4, :where(.site) p,
:where(.site) ul, :where(.site) ol, :where(.site) dl, :where(.site) dd,
:where(.site) figure, :where(.site) blockquote { margin: 0; }
:where(.site) ul, :where(.site) ol { padding: 0; list-style: none; }

:where(.site) a { color: var(--green); text-underline-offset: 3px; }
:where(.site) a:hover { color: var(--green-mid); }

:where(.site) :focus-visible { outline: 3px solid var(--green-mid); outline-offset: 3px; border-radius: 4px; }
:where(.site) .on-forest :focus-visible { outline-color: var(--leaf); }

:where(.site) .wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

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

:where(.site) .h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 22ch;
}

:where(.site) .lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--body);
  max-width: 38rem;
  margin-top: 16px;
}

:where(.site) .on-forest .h2 { color: var(--on-forest); }
:where(.site) .on-forest .lead { color: var(--on-forest-soft); }

/* ---------- Bands (page sections) ---------- */

:where(.site) .band { padding: 96px 0; }
:where(.site) .band-surface { background: var(--surface); }
:where(.site) .band-forest { background: var(--forest); color: var(--on-forest); }

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

:where(.site) .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  padding: 16px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

:where(.site) .btn-leaf { background: var(--leaf); color: var(--forest); }
:where(.site) .btn-leaf:hover { background: var(--leaf-bright); color: var(--forest); }

:where(.site) .btn-forest { background: var(--forest); color: var(--on-forest); }
:where(.site) .btn-forest:hover { background: var(--green); color: var(--on-forest); }

:where(.site) .btn-line { background: transparent; color: var(--ink); border-color: #c9c6bc; }
:where(.site) .btn-line:hover { border-color: var(--ink); color: var(--ink); }

:where(.site) .on-forest .btn-line { color: var(--on-forest); border-color: rgba(248, 247, 242, 0.35); }
:where(.site) .on-forest .btn-line:hover { border-color: var(--on-forest); color: var(--on-forest); }

@media (max-width: 900px) {
  :where(.site) .band { padding: 64px 0; }
}

@media (max-width: 600px) {
  :where(.site) body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html:where(.site) { scroll-behavior: auto; }
  :where(.site) *, :where(.site) *::before, :where(.site) *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
