/* ==========================================================================
   RWA Society — marketing design system
   Tokens mirror apps/resident-mobile/lib/theme.ts so web and app feel like
   one product. Spacing is on a 4px scale; radii are 8px (controls) / 16px
   (cards) / pill.
   ========================================================================== */

:root {
  /* Brand */
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-deep: #16306e;
  --brand-soft: #eef2ff;
  --brand-muted: #c7d2fe;
  --accent: #f59e0b;
  --accent-soft: #fef3c7;
  --accent-ink: #92400e;

  /* Neutrals */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e8ecf2;
  --line-strong: #d7dee9;
  --canvas: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;

  /* Semantic */
  --success: #059669;
  --success-soft: #d1fae5;
  --success-ink: #065f46;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;

  /* Radii */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Elevation — soft, layered, low opacity */
  --sh-1: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --sh-2: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.08);
  --sh-3: 0 2px 4px rgba(15, 23, 42, 0.06), 0 20px 48px rgba(15, 23, 42, 0.12);
  --sh-brand: 0 6px 20px rgba(29, 78, 216, 0.24);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 0.84, 0.44, 1);
  --t-fast: 150ms;
  --t-base: 220ms;

  --header-h: 68px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- Typography ------------------------------------------------ */

h1,
h2,
h3,
h4 {
  color: var(--ink);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(27px, 3.6vw, 40px);
  letter-spacing: -0.03em;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
}

h4 {
  font-size: 17px;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  color: var(--ink);
  font-weight: 600;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
}

.lede {
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--muted);
  max-width: 62ch;
}

.small {
  font-size: 14px;
  color: var(--muted);
}

.note {
  font-size: 13px;
  color: var(--faint);
}

.center {
  text-align: center;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink);
}

.center .lede,
.center .section-head p {
  margin-inline: auto;
}

/* ---------- Icons ----------------------------------------------------- */

.i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.i-sm {
  width: 17px;
  height: 17px;
}

.i-lg {
  width: 24px;
  height: 24px;
}

/* Skip link + focus ---------------------------------------------------- */

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 14px;
  transition: top var(--t-fast) var(--ease-out);
}

.skip:focus {
  top: 12px;
  text-decoration: none;
}

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

.wrap {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .wrap {
    width: min(1200px, 100% - 48px);
  }
}

section {
  padding: 64px 0;
}

@media (min-width: 768px) {
  section {
    padding: 96px 0;
  }
}

.section-tint {
  background: var(--canvas);
}

.section-ink {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(29, 78, 216, 0.5) 0%, transparent 60%),
    radial-gradient(700px 380px at 100% 10%, rgba(37, 99, 235, 0.34) 0%, transparent 55%),
    var(--ink);
  color: rgba(255, 255, 255, 0.76);
}

.section-ink h2,
.section-ink h3,
.section-ink h4,
.section-ink strong {
  color: #fff;
}

.section-ink .lede,
.section-ink .small {
  color: rgba(255, 255, 255, 0.72);
}

.section-head {
  max-width: 68ch;
  margin-bottom: 48px;
  display: grid;
  gap: 16px;
}

.grid {
  display: grid;
  gap: 20px;
}

.g-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.g-3 {
  grid-template-columns: repeat(auto-fit, minmax(264px, 1fr));
}

.g-4 {
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
}

.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 940px) {
  .split {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 64px;
  }
  .split-wide {
    grid-template-columns: 1.25fr 0.75fr;
  }
}

.stack {
  display: grid;
  gap: 24px;
  align-content: start;
}

.stack-sm {
  display: grid;
  gap: 12px;
  align-content: start;
}

/* ---------- Header ---------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}

.site-header[data-stuck='true'] {
  border-bottom-color: var(--line);
  box-shadow: var(--sh-1);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.03em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  box-shadow: var(--sh-brand);
  flex-shrink: 0;
}

.brand-sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--faint);
  text-transform: uppercase;
  line-height: 1.1;
  margin-top: 2px;
}

.site-nav {
  display: none;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}

.site-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
  text-decoration: none;
}

.site-nav a[aria-current='page'] {
  color: var(--brand);
  background: var(--brand-soft);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

@media (min-width: 1024px) {
  .site-nav,
  .header-actions {
    display: flex;
  }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 0 24px;
}

.mobile-nav[data-open='true'] {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-nav[data-open='true'] {
    display: none;
  }
}

.mobile-nav ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 2px;
}

.mobile-nav a {
  display: block;
  padding: 12px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
}

.mobile-nav a:hover {
  background: var(--canvas);
  text-decoration: none;
}

.mobile-nav a[aria-current='page'] {
  color: var(--brand);
  background: var(--brand-soft);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: center;
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.99);
}

.btn-sm {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
}

.btn-lg {
  min-height: 54px;
  padding: 0 28px;
  font-size: 16px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}

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

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--sh-1);
}

.btn-secondary:hover {
  border-color: var(--brand-muted);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  min-height: 44px;
  padding: 0 14px;
  font-weight: 600;
}

.btn-ghost:hover {
  background: var(--canvas);
  color: var(--ink);
  transform: none;
}

.btn-accent {
  background: var(--accent);
  color: #3d2708;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.28);
}

.btn-accent:hover {
  background: #e08c07;
}

.btn-on-ink {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.btn-on-ink:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.arrow {
  transition: transform var(--t-fast) var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--brand);
}

.text-link:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Cards ----------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--sh-1);
  display: grid;
  gap: 12px;
  align-content: start;
}

.card-hover {
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out);
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-2);
  border-color: var(--brand-muted);
}

.card p {
  color: var(--muted);
  font-size: 15px;
}

.card-pad-lg {
  padding: 32px;
}

.section-ink .card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.section-ink .card p {
  color: rgba(255, 255, 255, 0.72);
}

.icon-tile {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  flex-shrink: 0;
}

.icon-tile svg {
  width: 22px;
  height: 22px;
}

.icon-tile-accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.icon-tile-success {
  background: var(--success-soft);
  color: var(--success-ink);
}

.section-ink .icon-tile {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---------- Badges & pills -------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--brand-soft);
  color: var(--brand-dark);
  border: 1px solid var(--brand-muted);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: #fcd34d;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success-ink);
  border-color: #6ee7b7;
}

.badge-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pill {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--canvas);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

/* ---------- Hero ------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 64px;
  background:
    radial-gradient(720px 340px at 8% -6%, rgba(29, 78, 216, 0.1) 0%, transparent 62%),
    radial-gradient(640px 320px at 96% 4%, rgba(245, 158, 11, 0.1) 0%, transparent 58%),
    var(--surface);
}

@media (min-width: 768px) {
  .hero {
    padding: 72px 0 96px;
  }
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.06fr 0.94fr;
    gap: 56px;
  }
}

.hero h1 {
  max-width: 19ch;
}

.hero-copy {
  display: grid;
  gap: 24px;
  align-content: start;
}

.hero-sub {
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 56ch;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-proof svg {
  width: 17px;
  height: 17px;
  color: var(--success);
  flex-shrink: 0;
}

.page-hero {
  padding: 48px 0 8px;
  background:
    radial-gradient(760px 320px at 50% -10%, rgba(29, 78, 216, 0.09) 0%, transparent 60%),
    var(--surface);
}

@media (min-width: 768px) {
  .page-hero {
    padding: 72px 0 16px;
  }
}

.page-hero .section-head {
  margin-bottom: 32px;
}

/* ---------- Product mock (hero visual) -------------------------------- */

.mock {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  /* Extra bottom padding reserves room for .mock-float so it never covers a row. */
  padding: 16px 16px 68px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.mock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.mock-bar span:last-child {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--faint);
}

.mock-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mock-kpi {
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

.mock-kpi b {
  display: block;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink);
  letter-spacing: -0.02em;
}

.mock-kpi span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--faint);
}

.mock-rows {
  display: grid;
  gap: 8px;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}

.mock-row b {
  color: var(--ink);
  font-size: 14px;
}

.mock-row span:nth-child(2) {
  color: var(--muted);
  margin-right: auto;
}

.mock-chip {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--success-soft);
  color: var(--success-ink);
}

.mock-chip-warn {
  background: var(--warning-soft);
  color: var(--accent-ink);
}

.mock-chip-brand {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.mock-float {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--sh-3);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mock-float-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  flex-shrink: 0;
}

.mock-float-icon svg {
  width: 22px;
  height: 22px;
}

.mock-float div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mock-float b {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.3;
}

.mock-float span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.mock-float .mock-chip {
  margin-left: auto;
  flex-shrink: 0;
}

/* ---------- Stats ----------------------------------------------------- */

.stat-strip {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat {
  background: var(--surface);
  padding: 24px;
  display: grid;
  gap: 4px;
}

.stat b {
  font-size: clamp(26px, 3vw, 34px);
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* Variant for strips whose lead line is a short claim rather than a metric —
   a phrase at metric size wraps badly and makes the cells uneven. */
.stat-strip-claims .stat b {
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.section-ink .stat {
  background: transparent;
}

.section-ink .stat-strip {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.14);
}

.section-ink .stat b {
  color: #fff;
}

.section-ink .stat span {
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- Lists ----------------------------------------------------- */

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink-2);
}

.check-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--success);
}

.check-list-brand svg {
  color: var(--brand);
}

.section-ink .check-list li {
  color: rgba(255, 255, 255, 0.82);
}

.section-ink .check-list svg {
  color: #6ee7b7;
}

.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pain-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
}

.pain-list svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--danger);
}

/* ---------- Steps ----------------------------------------------------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  display: grid;
  gap: 10px;
  align-content: start;
  box-shadow: var(--sh-1);
}

.step::before {
  content: counter(step);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  box-shadow: var(--sh-brand);
}

/* ---------- Feature module rows --------------------------------------- */

.module {
  display: grid;
  gap: 24px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .module {
    grid-template-columns: 300px 1fr;
    gap: 48px;
    padding: 40px 0;
  }
}

.module:first-of-type {
  border-top: none;
  padding-top: 0;
}

.module-head {
  display: grid;
  gap: 12px;
  align-content: start;
}

/* Module titles sit in a ~300px column, so they are sized for that measure
   rather than inheriting the full-width h2 scale. */
.module-head h2,
.module-head h3 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.module-body {
  display: grid;
  gap: 20px;
}

.mini-grid {
  display: grid;
  gap: 16px 32px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mini {
  display: grid;
  gap: 4px;
}

.mini b {
  font-size: 15px;
  color: var(--ink);
}

.mini span {
  font-size: 14px;
  color: var(--muted);
}

.outcome {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--success-ink);
  font-weight: 500;
}

.outcome svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Pricing --------------------------------------------------- */

.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
}

.billing-toggle button {
  min-height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: var(--r-pill);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}

.billing-toggle button[aria-pressed='true'] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
}

.plans {
  display: grid;
  gap: 20px;
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
  box-shadow: var(--sh-1);
}

/* Emphasis comes from the border and elevation, not a transform — scaling the
   card would enlarge its type and break alignment with its neighbours. */
.plan-featured {
  border-color: var(--brand);
  border-width: 2px;
  box-shadow: var(--sh-3);
  position: relative;
}

.plan-name {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* The price is the dominant element in a plan card; the plan name is a label. */
.plan-name h2,
.plan-name h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-price b {
  font-size: clamp(32px, 3.4vw, 40px);
  color: var(--ink);
  letter-spacing: -0.035em;
  line-height: 1;
  font-weight: 800;
}

.plan-price span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.plan-meta {
  font-size: 13px;
  color: var(--success-ink);
  font-weight: 600;
  min-height: 20px;
}

.plan hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.plan-limits {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.plan-limits div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.plan-limits dt {
  color: var(--muted);
  margin: 0;
}

.plan-limits dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Comparison table ------------------------------------------ */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

table.compare {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 15px;
}

table.compare th,
table.compare td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

table.compare thead th {
  position: sticky;
  top: 0;
  background: var(--canvas);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

table.compare tbody th {
  font-weight: 600;
  color: var(--ink);
}

table.compare td {
  text-align: center;
  color: var(--ink-2);
}

table.compare thead th:not(:first-child),
table.compare tbody td {
  text-align: center;
}

table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td {
  border-bottom: none;
}

table.compare tbody tr:hover {
  background: var(--surface-2);
}

.tick {
  color: var(--success);
  width: 20px;
  height: 20px;
  margin-inline: auto;
}

.dash {
  color: var(--faint);
  font-weight: 600;
}

caption.sr-only,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- FAQ ------------------------------------------------------- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.faq summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform var(--t-base) var(--ease-out);
  flex-shrink: 0;
}

.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq summary:hover {
  background: var(--surface-2);
}

.faq .faq-body {
  padding: 0 24px 20px;
  color: var(--muted);
  font-size: 15px;
  max-width: 70ch;
}

/* ---------- Forms ----------------------------------------------------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-2);
  padding: 24px;
}

@media (min-width: 768px) {
  .form-card {
    padding: 32px;
  }
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 20px;
}

.field-row {
  display: grid;
  gap: 0 20px;
  grid-template-columns: 1fr;
}

@media (min-width: 620px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

label .opt {
  color: var(--faint);
  font-weight: 500;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  min-height: 48px;
  width: 100%;
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.14);
}

.field-help {
  font-size: 13px;
  color: var(--muted);
}

.field-error {
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  display: none;
  align-items: center;
  gap: 6px;
}

.field[data-invalid='true'] .field-error {
  display: flex;
}

.field[data-invalid='true'] input,
.field[data-invalid='true'] select,
.field[data-invalid='true'] textarea {
  border-color: var(--danger);
  background: #fffbfb;
}

.form-status {
  display: none;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 12px;
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  color: var(--success-ink);
  font-size: 15px;
  margin-bottom: 20px;
}

.form-status[data-show='true'] {
  display: flex;
}

.form-status svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

/* ---------- Contact channel cards ------------------------------------- */

.channel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
  transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}

.channel:hover {
  border-color: var(--brand-muted);
  box-shadow: var(--sh-2);
  text-decoration: none;
}

.channel div {
  display: grid;
  gap: 2px;
}

.channel b {
  color: var(--ink);
  font-size: 15px;
}

.channel span {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- App showcase ---------------------------------------------- */

.app-hero {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 940px) {
  .app-hero {
    grid-template-columns: 0.92fr 1.08fr;
    gap: 56px;
  }
  .app-hero-reverse .app-hero-visual {
    order: -1;
  }
}

.phone {
  width: min(260px, 100%);
  margin-inline: auto;
  border-radius: 32px;
  border: 8px solid var(--ink);
  background: var(--canvas);
  box-shadow: var(--sh-3);
  overflow: hidden;
}

.phone-top {
  height: 26px;
  background: var(--ink);
  display: grid;
  place-items: center;
}

.phone-top::after {
  content: '';
  width: 56px;
  height: 5px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.3);
}

.phone-screen {
  padding: 14px;
  display: grid;
  gap: 10px;
  background: var(--canvas);
}

.phone-head {
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  border-radius: 14px;
  padding: 14px;
  color: #fff;
}

.phone-head b {
  display: block;
  font-size: 15px;
}

.phone-head span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.phone-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.phone-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 6px;
  display: grid;
  gap: 6px;
  justify-items: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-2);
  text-align: center;
  line-height: 1.2;
}

.phone-tile svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
}

.phone-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.phone-card b {
  font-size: 12px;
  color: var(--ink);
}

.phone-card span {
  font-size: 11px;
  color: var(--muted);
}

.phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---------- Quote / callout ------------------------------------------- */

.callout {
  background: linear-gradient(140deg, var(--brand-dark) 0%, var(--brand) 55%, #2563eb 100%);
  border-radius: var(--r-lg);
  padding: 40px 24px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  display: grid;
  gap: 20px;
  justify-items: center;
  box-shadow: var(--sh-3);
}

@media (min-width: 768px) {
  .callout {
    padding: 56px 48px;
  }
}

.callout h2 {
  color: #fff;
  max-width: 24ch;
}

.callout p {
  color: rgba(255, 255, 255, 0.84);
  max-width: 58ch;
  font-size: 17px;
}

.callout .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  box-shadow: none;
}

.callout .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.callout .btn-primary {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 8px 24px rgba(8, 20, 55, 0.28);
}

.callout .btn-primary:hover {
  background: var(--brand-soft);
}

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

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  padding: 56px 0 32px;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-bottom: 40px;
}

@media (min-width: 940px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
  }
}

.site-footer .brand {
  color: #fff;
}

.site-footer h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
}

.site-footer a:hover {
  color: #fff;
}

.footer-about {
  display: grid;
  gap: 16px;
  align-content: start;
  max-width: 42ch;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Reveal on scroll ------------------------------------------ */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out);
}

[data-reveal][data-visible='true'] {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
