/* Mantis Checkout — shared styles for marketing + legal pages */

:root {
  /* Brand palette — adjust here, applied everywhere via custom properties.
     Derived from the Mantis Checkout logo: a lime "M" mark over a white
     wordmark on a dark-teal field. Kept in lock-step with lib/theme/brand.dart
     so the marketing site and the Flutter app read as one product. */
  --brand-primary: #1B2E36;       /* dark teal: headings, links */
  --brand-primary-dark: #132127;  /* deepest teal: footer background */
  --brand-accent: #A5C633;        /* lime from the M mark: CTAs, highlights */
  --brand-accent-dark: #8FAB2A;   /* CTA hover */
  --brand-accent-tint: #F1F6DD;   /* faint lime wash for callouts */
  --brand-dark: #1B2E36;          /* dark-teal header / footer field */
  --brand-dark-light: #2A4250;    /* subtle lighter teal */
  --brand-on-accent: #1B2E36;     /* dark ink on top of lime CTAs */
  --brand-bg: #FAFBFB;            /* cool off-white page background */
  --brand-surface: #FFFFFF;       /* white cards / lifted surfaces */
  --brand-text: #2B2B2B;          /* body text */
  --brand-text-muted: #6A6A6A;    /* secondary text, captions, footer body */
  --brand-border: #E0E4E5;        /* pale grey hairline borders */

  --max: 1080px;
  --max-prose: 720px;

  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-system);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Links and inline elements ---------- */

a {
  color: var(--brand-primary);
  text-decoration: none;
}
a:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

strong { font-weight: 700; }
em { font-style: italic; }

/* ---------- Wordmark (used in header + footer) ---------- */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #FFFFFF;                 /* wordmark always sits on the dark field */
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.wordmark:hover {
  text-decoration: none;
  color: var(--brand-accent);
}
.wordmark-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 7px;
  display: block;
}
.wordmark-text { white-space: nowrap; }

/* ---------- Private-beta banner (above the site header) ---------- */

.beta-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  border-bottom: 1px solid var(--brand-accent-dark);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  padding: 10px 20px;
}
.beta-banner strong {
  font-weight: 700;
}

/* ---------- Site header ---------- */

.site-header {
  background: var(--brand-dark);
  border-bottom: 1px solid var(--brand-dark-light);
}
.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 15px;
}
.site-nav a {
  color: #C4CDD0;                 /* cool light grey on the dark header */
  text-decoration: none;
}
.site-nav a:hover {
  color: #FFFFFF;
  text-decoration: none;
}
.site-nav a.cta {
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  padding: 9px 16px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid var(--brand-accent);
}
.site-nav a.cta:hover {
  background: var(--brand-accent-dark);
  border-color: var(--brand-accent-dark);
  color: var(--brand-on-accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  line-height: 1;
}
.btn-primary {
  background: var(--brand-accent);
  color: var(--brand-on-accent);
  border-color: var(--brand-accent);
}
.btn-primary:hover {
  background: var(--brand-accent-dark);
  border-color: var(--brand-accent-dark);
  color: var(--brand-on-accent);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-secondary:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
  text-decoration: none;
}

/* ---------- Landing hero ---------- */

.hero {
  padding: 72px 24px 64px;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-copy {
  flex: 1 1 460px;
  min-width: 0;
}
.hero-art {
  flex: 0 1 300px;
  text-align: center;
}
.hero-art img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 18px;
}

.hero h1 {
  font-size: 2.75rem;        /* ~44px */
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 0 0 18px;
}
.hero p.lead {
  font-size: 1.25rem;        /* ~20px */
  color: var(--brand-text);
  margin: 0 0 28px;
  max-width: 560px;
}
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Generic content sections ---------- */

.section {
  padding: 64px 24px;
  max-width: var(--max);
  margin: 0 auto;
}
.section.alt {
  background: var(--brand-surface);
  max-width: none;
  border-top: 1px solid var(--brand-border);
  border-bottom: 1px solid var(--brand-border);
}
.section.alt > .inner {
  max-width: var(--max);
  margin: 0 auto;
}
.section h2 {
  font-size: 1.75rem;        /* ~28px */
  letter-spacing: -0.01em;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 0 0 28px;
}

/* ---------- Pillars (value props) ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.pillar {
  background: var(--brand-bg);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 26px;
}
.pillar h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: var(--brand-primary);
  font-weight: 700;
}
.pillar p {
  margin: 0;
  color: var(--brand-text-muted);
  font-size: 15px;
}

/* ---------- How-it-works ---------- */

.howto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.howto h3 {
  font-size: 1.3rem;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 0 0 14px;
}
.howto ol {
  margin: 0;
  padding-left: 22px;
  color: var(--brand-text);
}
.howto li { margin: 8px 0; }
.howto .note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--brand-text-muted);
  line-height: 1.55;
}

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.pricing-card {
  background: var(--brand-bg);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  padding: 26px;
}
.pricing-card .label {
  font-size: 12px;
  color: var(--brand-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 0 0 10px;
}
.pricing-card .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.pricing-card .price small {
  font-size: 14px;
  color: var(--brand-text-muted);
  font-weight: 500;
}
.pricing-card p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--brand-text);
  line-height: 1.55;
}

.callout {
  margin: 26px 0 0;
  padding: 16px 18px;
  background: var(--brand-accent-tint);
  border: 1px solid var(--brand-accent-dark);
  border-left-width: 4px;
  color: var(--brand-text);
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: var(--max-prose);
}
.callout strong { color: var(--brand-primary); }

/* ---------- Segments ---------- */

.segments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  list-style: none;
  margin: 0;
}
.segments li {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--brand-text);
}

/* ---------- Site footer ---------- */

.site-footer {
  background: var(--brand-primary-dark);
  color: var(--brand-bg);
  padding: 48px 24px 40px;
}
.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.site-footer .wordmark {
  color: #FFFFFF;
}
.site-footer .wordmark:hover { color: var(--brand-accent); }
.site-footer h4 {
  color: var(--brand-bg);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 14px;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin: 6px 0; }
.site-footer a {
  color: #C4CDD0;
  text-decoration: none;
  font-size: 15px;
}
.site-footer a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}
.site-footer .footer-tag {
  margin: 14px 0 0;
  font-size: 14px;
  color: #A8B2B5;
  max-width: 320px;
  line-height: 1.55;
}
.site-footer .identity {
  font-size: 13px;
  color: #8B9598;
  margin-top: 16px;
  line-height: 1.6;
}

/* ---------- Legal-page layout ---------- */

.legal-shell {
  max-width: var(--max-prose);
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.legal-shell h1 {
  font-size: 2rem;           /* ~32px — smaller than landing H1 */
  letter-spacing: -0.015em;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 0 0 10px;
}
.legal-shell .effective {
  display: inline-block;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  color: var(--brand-text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13.5px;
  margin: 0 0 32px;
  font-weight: 500;
}
.legal-shell h2 {
  font-size: 1.35rem;
  letter-spacing: -0.005em;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 40px 0 14px;
}
.legal-shell h3 {
  font-size: 1.05rem;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 26px 0 10px;
}
.legal-shell p {
  margin: 0 0 14px;
  color: var(--brand-text);
}
.legal-shell ul,
.legal-shell ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--brand-text);
}
.legal-shell li { margin: 4px 0; }
.legal-shell .clause {
  margin: 0 0 14px;
  color: var(--brand-text);
}
.legal-shell .clause .n {
  font-weight: 700;
  margin-right: 4px;
  color: var(--brand-primary);
}
.legal-shell .subclause-list {
  margin: 6px 0 14px;
  padding-left: 22px;
  color: var(--brand-text);
  list-style: none;
}
.legal-shell .subclause-list li {
  margin: 4px 0;
  text-indent: -22px;
  padding-left: 22px;
}

/* ---------- FAQ page ---------- */

.faq-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 240px;
  gap: 56px;
  justify-content: center;
  align-items: start;
}
.faq-content { min-width: 0; }
.faq-content > .faq-header { margin: 0 0 24px; }
.faq-content h1 {
  font-size: 2rem;
  letter-spacing: -0.015em;
  color: var(--brand-primary);
  font-weight: 700;
  margin: 0 0 12px;
}
.faq-content .intro {
  color: var(--brand-text);
  font-size: 1.05rem;
  margin: 0 0 6px;
  max-width: 620px;
}
.faq-content h2 {
  color: var(--brand-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 48px 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--brand-border);
  scroll-margin-top: 24px;
}
.faq-content > section:first-of-type h2 {
  margin-top: 28px;
}
.qa { margin: 22px 0 26px; }
.qa h3 {
  color: var(--brand-primary);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px;
  scroll-margin-top: 24px;
}
.qa h3:hover::after {
  content: " #";
  opacity: 0.45;
  font-weight: 500;
}
.qa p { margin: 0 0 10px; color: var(--brand-text); }
.qa ul { margin: 8px 0 10px; padding-left: 22px; color: var(--brand-text); }
.qa li { margin: 4px 0; }

/* Sticky TOC (desktop) */
.faq-toc {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  font-size: 14px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid var(--brand-border);
}
.faq-toc h2 {
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  font-weight: 700;
}
.faq-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: tocnum;
}
.faq-toc li {
  margin: 8px 0;
  counter-increment: tocnum;
}
.faq-toc a {
  color: var(--brand-text-muted);
  text-decoration: none;
  display: block;
  line-height: 1.45;
}
.faq-toc a::before {
  content: counter(tocnum) ". ";
  color: var(--brand-border);
  font-weight: 600;
  margin-right: 2px;
}
.faq-toc a:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

/* Mobile fallback: inline "jump to section" list, above content */
.faq-jump {
  display: none;
  margin: 0 0 32px;
  padding: 16px 18px;
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
}
.faq-jump h2 {
  margin: 0 0 10px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-text-muted);
  font-weight: 700;
}
.faq-jump ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.faq-jump li { margin: 0; }
.faq-jump a {
  color: var(--brand-primary);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 1100px) {
  .faq-layout { grid-template-columns: minmax(0, 720px); }
  .faq-toc { display: none; }
  .faq-jump { display: block; }
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { padding: 48px 20px 44px; }
  .hero-inner { gap: 28px; }
  .hero-copy { flex: 1 1 100%; }
  .hero-art { order: -1; flex: 0 0 auto; }
  .hero-art img { max-width: 200px; }
  .hero h1 { font-size: 2.1rem; }
  .hero p.lead { font-size: 1.1rem; }
  .section { padding: 44px 20px; }
  .section.alt { padding: 44px 20px; }
  .section h2 { font-size: 1.5rem; }
  .pillars { grid-template-columns: 1fr; }
  .howto { grid-template-columns: 1fr; gap: 28px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .legal-shell { padding: 36px 20px 60px; }
  .legal-shell h1 { font-size: 1.7rem; }
  .legal-shell h2 { font-size: 1.2rem; }
  .faq-shell { padding: 36px 20px 60px; }
  .faq-content h1 { font-size: 1.7rem; }
  .faq-content h2 { font-size: 1.2rem; }
  .qa h3 { font-size: 1.05rem; }
  .faq-jump ol { gap: 8px 14px; }
  .site-nav { gap: 14px; }
  .wordmark { font-size: 17px; }
  .wordmark-icon { width: 32px; }
}
