/* ============================================================
   public/marketing.css — the public site: index.html (landing) and pricing.html.
   Loaded after design-system.css and built only from its tokens (colours, Assistant font,
   radii, shadows, focus ring), so the site and the app read as one light product.
   No dark variant on purpose: the app is light, and the site used to turn dark on phones and
   Macs in dark mode, then jump to a bright app at sign-in.
   Nothing inside the app loads this file; the in-app pages use components.css.
   ============================================================ */

:root {
  --site-maxw: 1180px;
  --site-gut:  clamp(16px, 5vw, 64px);   /* 16px+ side gutter on phones */
  --site-header-h: 64px;
}

html { scroll-padding-top: calc(var(--site-header-h) + 16px); }   /* in-page anchors clear the sticky header */

body.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 1.0625rem;   /* 17px reading size for marketing copy */
  line-height: 1.7;
  overflow-x: hidden;
}
body.site > main { flex: 1 0 auto; }

.wrap {
  width: 100%;
  max-width: var(--site-maxw);
  margin-inline: auto;
  padding-inline: var(--site-gut);
}

.site h1, .site h2, .site h3 { text-wrap: balance; }
.site p { max-width: 62ch; }

/* ─── Skip link (first focusable element) ─────────────────── */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -200px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius-control);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 12px; }
.skip-link:focus-visible { box-shadow: var(--focus-ring), var(--shadow-md); }

/* ─── Site header ─────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-default);
}
.masthead .wrap {
  min-height: var(--site-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: 10px;
}

/* Same mark and name as the app sidebar and the login card */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  white-space: nowrap;
}
.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2) var(--space-5);
}
.site-nav a:not(.btn) {
  padding: 10px 2px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] { color: var(--text-primary); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent-primary); }
.site-nav a[aria-current="page"]:focus-visible { box-shadow: var(--focus-ring); }
.site-nav .nav-wide { display: none; }
@media (min-width: 640px) {
  .site-nav .nav-wide { display: inline; }
}

/* ─── Buttons (same look as components.css .btn in the app) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 10px var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: var(--font-base);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-sm { min-height: 40px; padding: 8px var(--space-4); font-size: var(--text-sm); }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: var(--text-lg); }
.btn-block { width: 100%; }

/* ─── Small parts ─────────────────────────────────────────── */
/* Section label above a heading: the app's accent pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--accent-text);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: 1.5;
}

.text-link {
  color: var(--text-link);
  font-weight: var(--font-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--color-primary-hover); }

.nowrap { white-space: nowrap; }

/* ─── Plan cards (landing #pricing and pricing.html) ──────── */
.plans {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  align-items: stretch;
}
@media (min-width: 820px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.plan {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}
.plan.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary), var(--shadow-md);
}
.plan-top { display: flex; flex-direction: column; gap: var(--space-2); }
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.plan-name {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--leading-tight);
}
.plan-flag {
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: var(--text-on-accent);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: 1.6;
  white-space: nowrap;
}
.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.price .num {
  font-size: clamp(2.25rem, 4.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.price .per { font-size: var(--text-sm); color: var(--text-muted); }
.plan-for { color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.6; }

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}
.plan-features li {
  position: relative;
  padding-inline-start: 28px;   /* room for the mark; the text itself flows inline */
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.55;
}
/* Check mark in the accent's text green (#0b7354) */
.plan-features li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--accent-muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b7354' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}
/* "Everything in the plan below" line */
.plan-features li.inherit { color: var(--text-primary); font-weight: var(--font-semibold); }
.plan-features li.inherit::before {
  background: var(--bg-hover) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475467' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='12' y1='5' x2='12' y2='19'/%3E%3Cline x1='5' y1='12' x2='19' y2='12'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.plan .btn { margin-top: auto; width: 100%; }

/* How to buy: filled from site-config.js by marketing.js; the owner's link once it is set */
.site .contact-line {
  max-width: none;
  margin-top: var(--space-6);
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.contact-line .contact-link {
  color: var(--text-link);
  font-weight: var(--font-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ─── Site footer ─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border-default);
  background: var(--bg-surface);
  padding-block: var(--space-6);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.footer-brand { display: inline-flex; align-items: center; gap: var(--space-2); }
.footer-brand img { width: 24px; height: 24px; object-fit: contain; flex-shrink: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); }
.foot-links a { display: inline-block; padding-block: 6px; color: var(--text-secondary); }
.foot-links a:hover { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

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