/* SageOps public site — one stylesheet for every marketing and legal page.
   Tokens come from DESIGN.md (MindHYVE family, Editorial Light + Sage
   accent). Products never go dark, so there is deliberately no dark-mode
   block. Fonts are self-hosted copies of the SPA's files; no CDN. */

@import url("fonts/ibm-plex.css");
@import url("fonts/espacion-regular.css");

:root {
  /* Sage accent ramp (DESIGN.md) */
  --sage-primary: #5b9e7a;  /* marks, dots, focus */
  --sage-deeper: #3d7458;   /* AA text, links, primary buttons, rules */
  --sage-press: #2f5a44;    /* hover / press: the next-deeper shade */
  --sage-soft: #a8cdb9;     /* tints, secondary rings */
  --sage-pale: #e9f2ec;     /* the one soft accent panel per page */

  /* Surfaces */
  --page: #fafaf8;
  --surface: #ffffff;
  --band: #f6f6f2;
  --rule: #e5e1d5;
  --rule-strong: #d6d0bf;

  /* Ink */
  --ink: #1b241f;
  --ink-2: #3a443e;
  --ink-3: #5f6861; /* 5.6:1 on --page, AA for small text */

  /* Marker for unresolved legal facts */
  --confirm-bg: #fbf1d9;
  --confirm-ink: #6b4f0e;
  --confirm-rule: #d9b765;

  --font-sans: "IBM Plex Sans", -apple-system, system-ui, "Segoe UI", sans-serif;
  --font-wordmark: "ESPACIONRegular", var(--font-sans);

  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --glide: 240ms ease-out;
  --measure: 68ch;
  --wrap: 1160px;
  --gutter: 16px;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--sage-deeper); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--sage-press); }

:focus-visible {
  outline: 2px solid var(--sage-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
em { font-style: italic; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
/* viewport-fit=cover (head.html): in landscape the notch and rounded corners
   sit over the side gutters, so the gutter never drops below the safe area. */
@supports (padding: max(0px)) {
  .wrap {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 20;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--sage-deeper);
  border-radius: var(--radius-sm); font-weight: 500;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sage-deeper);
}

/* ---------- Lockup: typographic only (dot + wordmark), never a logo ---------- */
.lockup {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none;
}
.lockup:hover { color: var(--ink); }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--sage-primary); flex-shrink: 0;
}
.wordmark { font-family: var(--font-wordmark); font-size: 21px; line-height: 1; letter-spacing: 0.01em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm);
  font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  transition: background var(--glide), border-color var(--glide), color var(--glide);
}
.btn:hover { background: var(--sage-pale); border-color: var(--sage-soft); color: var(--ink); }
.btn-primary { background: var(--sage-deeper); border-color: var(--sage-deeper); color: #fff; }
.btn-primary:hover { background: var(--sage-press); border-color: var(--sage-press); color: #fff; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--sage-deeper); }
.btn-quiet:hover { background: transparent; border-color: transparent; color: var(--sage-press); text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { border-bottom: 0.5px solid var(--rule); background: var(--page); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: 68px;
}
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a.nav-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-2); text-decoration: none; font-size: 15px;
}
.site-nav a.nav-link:hover { color: var(--sage-deeper); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.site-nav .btn { margin-left: 8px; }

.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 12px; border: 1px solid var(--rule-strong); border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500; background: var(--surface);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu[open] summary { border-color: var(--sage-deeper); }
.nav-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 10;
  min-width: 220px; padding: 8px; background: var(--surface);
  border: 0.5px solid var(--rule-strong); border-radius: var(--radius);
  box-shadow: 0 18px 40px -24px rgba(13, 20, 23, 0.4);
}
.nav-menu-panel a {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; border-radius: 8px;
}
.nav-menu-panel a:hover { background: var(--sage-pale); }

@media (max-width: 859px) {
  .site-nav a.nav-link { display: none; }
  .nav-menu { display: block; }
  .site-nav .btn-primary { margin-left: 0; padding: 10px 14px; }
}
@media (max-width: 389px) {
  .site-nav .btn-primary { font-size: 14px; padding: 10px 12px; }
  .wordmark { font-size: 19px; }
}

/* ---------- Home: hero ---------- */
.hero { padding: 72px 0 64px; }
.hero h1 {
  margin-top: 20px; max-width: 16ch;
  font-size: clamp(36px, 6.4vw, 68px); font-weight: 300; line-height: 1.06; letter-spacing: -0.02em;
}
.hero h1 em { color: var(--sage-deeper); }
.hero .lede { margin-top: 24px; max-width: 58ch; font-size: clamp(17px, 2vw, 19px); color: var(--ink-2); line-height: 1.65; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.fine { font-size: 13px; color: var(--ink-3); }
.hero .fine { margin-top: 14px; }

.rule-label {
  display: flex; align-items: center; gap: 16px;
  font-size: 14px; font-style: italic; color: var(--sage-deeper);
}
.rule-label::after { content: ""; flex: 1; height: 0.5px; background: currentColor; opacity: 0.6; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; border-top: 0.5px solid var(--rule); }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head h2 { margin-top: 12px; font-size: clamp(26px, 3.6vw, 38px); font-weight: 300; line-height: 1.15; }
.section-head p { margin-top: 14px; color: var(--ink-2); }

/* Steps: brief to published */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { padding: 22px 0; border-top: 0.5px solid var(--rule-strong); }
@media (min-width: 860px) { .steps li { padding: 22px 24px 0 0; } }
.steps .num { display: block; font-size: 13px; font-weight: 500; color: var(--sage-deeper); letter-spacing: 0.08em; }
.steps h3 { margin-top: 10px; font-size: 19px; }
.steps p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }

/* Capability cards */
.grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--surface); border: 0.5px solid var(--rule-strong);
  border-radius: var(--radius-lg); padding: 24px;
}
.card h3 { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.card h3 .dot { width: 7px; height: 7px; }
.card p { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.card .meta { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

.channel-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.channel-list li {
  font-size: 13px; padding: 4px 10px; border-radius: var(--radius-pill);
  border: 0.5px solid var(--rule-strong); color: var(--ink-2); background: var(--page);
}

/* The one soft accent panel per page */
.panel {
  background: var(--sage-pale); border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 48px); position: relative; overflow: hidden;
}
.panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sage-primary); }
.panel h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 300; line-height: 1.15; max-width: 22ch; margin-top: 12px; }
.panel > p { margin-top: 14px; max-width: 60ch; color: var(--ink-2); }

.modes { display: grid; gap: 12px; margin: 28px 0 0; }
@media (min-width: 720px) { .modes { grid-template-columns: repeat(3, 1fr); } }
.mode { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; border: 0.5px solid var(--sage-soft); }
.mode dt { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.mode dd { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.state { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.state-allow { background: var(--sage-deeper); }
.state-ask { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sage-deeper); }
.state-deny { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink-3); position: relative; }
.state-deny::after { content: ""; position: absolute; left: 1px; right: 1px; top: 4px; height: 2px; background: var(--ink-3); transform: rotate(-45deg); }

.audiences { display: grid; gap: 0; }
@media (min-width: 860px) { .audiences { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.audience { padding: 22px 0; border-top: 0.5px solid var(--rule-strong); }
.audience h3 { font-size: 19px; }
.audience p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; padding: 12px 0; border-top: 0.5px solid var(--rule); color: var(--ink-2); font-size: 15px; }
.checklist li:first-child { border-top: 0; }
.checklist .dot { width: 7px; height: 7px; margin-top: 9px; }
.checklist strong { color: var(--ink); font-weight: 500; }

.closing { padding: 72px 0; border-top: 0.5px solid var(--rule); text-align: left; }
.closing h2 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 300; line-height: 1.1; max-width: 20ch; }

/* ---------- Pricing ---------- */
.page-head { padding: 56px 0 32px; }
.page-head h1 { margin-top: 14px; font-size: clamp(32px, 5vw, 52px); font-weight: 300; line-height: 1.1; max-width: 20ch; }
.page-head p { margin-top: 16px; max-width: 60ch; color: var(--ink-2); font-size: 17px; }

.billing-toggle {
  display: inline-flex; margin-top: 28px; padding: 4px; gap: 4px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius-pill); background: var(--surface);
}
.billing-toggle button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius-pill);
  background: transparent; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer;
  transition: background var(--glide), color var(--glide);
}
.billing-toggle button[aria-pressed="true"] { background: var(--sage-deeper); color: #fff; }
.billing-toggle .save { font-weight: 400; }

.trial-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 32px; padding: 20px 24px; border-radius: var(--radius-lg);
  border: 0.5px solid var(--rule-strong); background: var(--surface);
}
.trial-banner strong { font-weight: 500; }

.plans { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 0.5px solid var(--rule-strong); border-radius: var(--radius-lg); padding: 28px 24px; }
.plan-featured { border: 1px solid var(--sage-deeper); }
.plan h2 { font-size: 20px; }
.plan .tag { margin-left: 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-deeper); vertical-align: middle; }
.plan .for { margin-top: 6px; color: var(--ink-3); font-size: 14px; }
.price { margin-top: 20px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price .amount { font-size: 44px; font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.price .per { color: var(--ink-3); font-size: 15px; }
.price-note { margin-top: 6px; min-height: 1.5em; font-size: 13px; color: var(--ink-3); }
.plan ul { list-style: none; padding: 0; margin: 22px 0 24px; flex: 1; }
.plan li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; color: var(--ink-2); }
.plan li .dot { width: 6px; height: 6px; margin-top: 10px; }
.plan .btn { width: 100%; }
.renewal { margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }

[data-cycle="annual"] .show-monthly { display: none; }
[data-cycle="monthly"] .show-annual { display: none; }

.extras { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 720px) { .extras { grid-template-columns: repeat(2, 1fr); } }
.extras .card h2 { font-size: 18px; }

.faq { max-width: 760px; }
.faq details { border-top: 0.5px solid var(--rule-strong); }
.faq details:last-child { border-bottom: 0.5px solid var(--rule-strong); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-size: 17px; font-weight: 500; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sage-deeper); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 0 0 20px; color: var(--ink-2); max-width: var(--measure); }
.faq .answer p + p { margin-top: 10px; }

/* ---------- Prose (security + legal) ---------- */
.prose { max-width: var(--measure); padding-bottom: 72px; }
.prose h2 { margin: 44px 0 12px; font-size: 22px; font-weight: 500; }
.prose h3 { margin: 28px 0 8px; font-size: 17px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 12px 0; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose address { font-style: normal; color: var(--ink-2); margin-top: 12px; }

.legal { font-size: 15.5px; }
.legal .meta { margin-top: 12px; color: var(--ink-3); font-size: 14px; }
.legal .notice {
  margin: 20px 0 8px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 0.5px solid var(--rule-strong); background: var(--surface); color: var(--ink);
}
.legal .caps { text-transform: none; }
.legal .clause { margin-top: 12px; }
.legal .sub { margin: 10px 0 0 1.2em; }
.legal-toc { margin: 24px 0 0; padding: 18px 20px; background: var(--surface); border: 0.5px solid var(--rule-strong); border-radius: var(--radius); }
.legal-toc h2 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.legal-toc ol { margin: 0; padding-left: 1.4em; columns: 1; }
@media (min-width: 720px) { .legal-toc ol { columns: 2; column-gap: 32px; } }
.legal-toc li { font-size: 14.5px; margin: 0 0 4px; break-inside: avoid; }
/* Each contents entry is a whole-line, 44px-tall tap target on touch. */
@media (pointer: coarse), (max-width: 719px) {
  .legal-toc li { margin: 0; }
  .legal-toc li a { display: flex; align-items: center; min-height: 44px; padding: 4px 0; line-height: 1.35; }
}

.table-scroll { overflow-x: auto; margin: 16px 0; border: 0.5px solid var(--rule-strong); border-radius: var(--radius); background: var(--surface); }
.table-scroll table { border-collapse: collapse; width: 100%; font-size: 14px; }
.table-scroll table:has(th:nth-child(3)) { min-width: 640px; }
.table-scroll th, .table-scroll td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 0.5px solid var(--rule); }
.table-scroll th { font-weight: 500; color: var(--ink); background: var(--band); }
.table-scroll tr:last-child td { border-bottom: 0; }

/* Unresolved facts: visible, clearly styled, never mistaken for final text. */
.to-confirm {
  display: inline; padding: 1px 6px; border-radius: 4px;
  background: var(--confirm-bg); color: var(--confirm-ink);
  border: 1px dashed var(--confirm-rule); font-size: 0.92em; font-weight: 500;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 0.5px solid var(--rule); background: var(--band); padding: 48px 0 calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { margin-top: 14px; max-width: 44ch; color: var(--ink-2); }
.footer-col h2 { font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.footer-col ul { list-style: none; padding: 0; margin: 10px 0 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 36px; color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--sage-deeper); text-decoration: underline; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 0.5px solid var(--rule-strong); color: var(--ink-3); font-size: 13px; }
.footer-legal p + p { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em; padding: 1px 5px; border-radius: 4px; background: var(--band);
}
.prose a { overflow-wrap: anywhere; }

/* Touch: the footer links and the billing toggle are 44px targets too
   (kept last so it wins over their base rules above). */
@media (pointer: coarse), (max-width: 719px) {
  .footer-col a, .billing-toggle button { min-height: 44px; }
}
