/* ---------- Pricing Page (Cards + Toggle + Compare + Footer) ---------- */
/* Design tokens */
:root {
  --bg: #ffffff;
  --fg: #0b0d11;
  --muted: #5b6270;
  --border: #e5e7eb;
  --accent: #0ea5e9;
  --accent2: #6366f1;
  /* purple accent */
  --accent-tint: rgba(14, 165, 233, .12);
  --success: #10b981;

  /* Sticky pill footer surface + chip */
  --surface: rgba(255, 255, 255, 0.75);
  --chip-bg: #f3f4f6;

  /* Reserve space for sticky pill on all screens */
  --footer-h: 32px;
}

/* Dark theme tokens */
html.dark {
  --bg: #0b0d11;
  --fg: #f3f4f6;
  --muted: #9aa1ad;
  --border: #1f2937;
  --accent: #818cf8;
  --accent2: #c084fc;
  --accent-tint: rgba(129, 140, 248, .14);
  --success: #34d399;

  --surface: rgba(11, 13, 17, 0.65);
  --chip-bg: rgba(255, 255, 255, 0.06);
}

/* Base + layout */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

/* ensure hidden works even with resets */

.pricing {
  background: var(--bg);
  color: var(--fg);
}

.pricing .container {
  max-width: 1060px;
  margin: 0 auto;
  padding: clamp(2rem, 3vw, 3rem) 1rem;
}

/* Typography */
.pricing,
.pricing * {
  font-family: "Plus Jakarta Sans", "Nunito", "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.pricing h1 {
  font-size: clamp(2.2rem, 3vw + 1rem, 3.2rem);
  line-height: 1.1;
  margin: 3rem 0 .5rem;
  letter-spacing: -.01em;
}

.pricing .sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}

/* Optional: breadcrumb (kept lightweight) */
.breadcrumb {
  display: flex;
  gap: .4rem;
  align-items: center;
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--fg);
  text-decoration: underline;
}

.breadcrumb .sep {
  opacity: .6;
}

/* Theme toggle */
.theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 60px;
  height: 28px;
  border-radius: 14px;
  background: var(--muted);
  border: none;
  cursor: pointer;
  transition: background .3s;
}

.theme-toggle::after {
  content: '🌞';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform .3s;
}

html.dark .theme-toggle {
  background: var(--accent);
}

html.dark .theme-toggle::after {
  content: '🌙';
  transform: translateX(32px);
}

/* Toggle (Setup / Maintenance) */
.segment {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg), var(--accent-tint));
}

.segment button {
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  font-weight: 700;
  font-size: .95rem;
}

.segment button.active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.segment button:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* Helper */
.center {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Cards grid (v2: 2 columns desktop, 1 column ≤960px) */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-content: start;
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  background: linear-gradient(180deg, var(--bg), transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

html.dark .card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.card.pop {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--accent-tint), transparent);
}

.card .eyebrow {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  color: var(--muted);
}

.card h3 {
  font-size: 1.4rem;
  margin: .1rem 0 .1rem;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: .2rem 0 .6rem;
}

.price small {
  font-size: .95rem;
  color: var(--muted);
  font-weight: 600;
}

.card ul {
  list-style: none;
  padding-left: 0;
  line-height: 1.7;
  margin: .2rem 0 .6rem;
}

.card li {
  margin: .18rem 0;
}

.card li::before {
  content: "✔";
  margin-right: .45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent-tint);
  border: 1px solid var(--border);
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .85rem;
  color: var(--fg);
}

/* Recommended tag */
.card-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.tag-rec {
  position: absolute;
  top: -0.9rem;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #fff;
  background: #ff3ea5;
  border: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
  z-index: 2;
}

html.dark .tag-rec {
  background: #ff9bd5;
  color: #111;
}

/* CTA */
.cta {
  margin-top: auto;
  display: inline-block;
  text-align: center;
  width: 130px;
  padding: .6rem .8rem;
  border-radius: .9rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: #fff;
  background: linear-gradient(90deg, #7c3aed, #6366f1, #8b5cf6) left / 200% 100%;
  transition: background-position .5s, transform .3s, box-shadow .3s;
}

html.dark .cta {
  background: linear-gradient(90deg, #f3f4f6, #818cf8, #c084fc) left / 200% 100%;
  color: #0b0d11;
}

.cta:hover {
  background-position: right;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

/* ---------- Section: Add-ons ---------- */
.addons {
  margin-top: clamp(4rem, 8vw, 6rem);
}

.addons h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 .5rem;
}

.addons .sub {
  color: var(--muted);
  margin: 0 0 1rem;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 1060px) {
  .addon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .addon-grid {
    grid-template-columns: 1fr;
  }
}

/* Add-on card */
.card.addon {
  align-items: center;
  text-align: center;
  gap: .85rem;
  padding-bottom: 3rem;
}

.addon-icon {
  font-size: 2rem;
  margin: .25rem auto .25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.addon-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent2);
  margin: .2rem 0 0;
}

.addon-desc {
  color: var(--muted);
  margin: 0;
  line-height: 1.65;
}

.addon-price {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
}

/* Add-ons expand/collapse button */
.addons-toggle {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--accent2);
  font-weight: 900;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -.01em;
  padding: 1rem 0 1.4rem;
  cursor: pointer;
  user-select: none;
}

.addons-toggle .addons-toggle-sign {
  display: inline-block;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1;
  margin-right: .5rem;
  transform: translateY(2px);
  font-weight: 900;
}

.addons-toggle:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 4px;
  border-radius: 8px;
}

/* ---------- Section: Compare ---------- */
.compare {
  margin-top: clamp(4rem, 8vw, 6rem);
}

.compare h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 800;
  margin: 0 0 .5rem;
}

.compare .sub {
  color: var(--muted);
  margin: 0 0 1rem;
}

/* Scroll container */
.scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
}

/* Table shell */
.table {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th,
.table td {
  padding: 1.05rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.table th {
  background: var(--bg);
}

/* Center the plan header titles in the compare table */
.table th.plan-head { 
  text-align: center;
}

/* Plan headers (Mini / Pro) */
.plan-head {
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  padding-block: 1rem;
}

.plan-head .title {
  font-size: clamp(1.2rem, 1.3vw + .6rem, 1.6rem);
  font-weight: 800;
  letter-spacing: .01em;
}

.plan-head .sub {
  color: var(--muted);
  font-size: .9rem;
  margin-top: .15rem;
  font-weight: normal;
}

.plan-head .price {
  margin-top: .25rem;
  font-weight: 800;
}

.compare .price small {
  font-size: .95rem;
  color: var(--muted);
  font-weight: 600;
}

/* Sticky top header + sticky first column */
.compare thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--border);
}

.compare .feat-col {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 340px;
  background: var(--bg);
  border-right: 1px solid var(--border);
}

/* Category rows */
.compare .cat-row th {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .01em;
  border-top: 1px solid var(--border);
  background: #000;
  color: #fff;
}

html.dark .compare .cat-row th {
  background: #fff;
  color: #000;
}

/* Feature cell */
.feature {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.feature .name {
  font-weight: 600;
}

.feature .desc {
  color: var(--muted);
  font-weight: 500;
}

/* Checks / dashes */
.check-cell {
  text-align: center;
}

.checkmark {
  color: var(--accent2);
  font-weight: 900;
  font-size: 24px;
}

.dash {
  opacity: .65;
}

/* Center plan columns; keep feature column left */
.compare tbody td {
  text-align: center;
  vertical-align: middle;
}

.compare tbody td .checkmark,
.compare tbody td .dash {
  display: inline-block;
  line-height: 1;
}

/* Mobile refinements */
@media (max-width: 720px) {

  /* Shrink first column, allow wrap */
  .compare .feat-col {
    position: static;
    width: auto;
    max-width: none;
    min-width: 0;
    white-space: normal;
    word-break: break-word;
    padding-right: .5rem;
  }

  .compare .feature .name {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
  }

  .compare .feature .desc {
    display: none;
  }

  /* hide descriptions on mobile */

  /* Trim spacing & font sizes */
  .table th,
  .table td {
    padding: .65rem .6rem;
    font-size: .9rem;
  }

  .plan-head .title {
    font-size: 1rem;
  }

  .plan-head .price {
    font-size: .95rem;
    font-weight: 700;
  }

  .compare .checkmark {
    font-size: 18px;
  }

  /* Compact table (no horizontal scroll) */
  .table table {
    min-width: 0;
    table-layout: fixed;
  }
}

/* ---------- Sticky pill footer nav ---------- */
footer.site-footer {
  background: transparent;
  border: 0;
  padding: 0;
}

.footer-pill {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  backdrop-filter: saturate(120%) blur(8px);
  z-index: 1000;
}

.footer-pill .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  gap: .5rem;
  padding: .65rem 1.1rem;
  border-radius: 9999px;
  background: var(--chip-bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  line-height: 1;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease, color .2s ease;
}

.footer-pill .chip:hover {
  background: #5F56DD;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}

.footer-pill .chip.active {
  background: #0b0d11;
  color: #ffffff;
  cursor: default;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
  font-weight: 700;
}

html.dark .footer-pill .chip.active {
  background: #f3f4f6;
  color: #0b0d11;
}

.footer-pill .chip:active {
  transform: translateY(0);
  box-shadow: none;
}

.footer-pill .chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Footer labels */
.footer-pill .label-short {
  display: none;
}

@media (max-width: 640px) {
  .footer-pill {
    width: min(560px, calc(100% - 40px));
    justify-content: space-between;
    gap: 6px;
  }

  .footer-pill .chip {
    flex: 1 1 0;
    text-align: center;
    min-width: 0;
  }

  .footer-pill .label-full {
    display: none;
  }

  .footer-pill .label-short {
    display: inline;
  }
}

/* Reserve space so content never sits under the pill */
main,
.container,
.content,
.pricing,
.legal {
  padding-bottom: calc(var(--footer-h) + 16px + env(safe-area-inset-bottom));
}

/* Mobile: move theme toggle to top-left */
@media (max-width: 768px) {
  .theme-toggle {
    top: 1rem;
    right: auto;
    left: 1rem;
  }
}