/* ============================================================
   16-pricing.css — Pricing card grid
   Used on services.html (web-build tiers) and crm.html (CRM tiers).
   Section wrapper (#pricing) background is set per-page via
   the bg-* layout helpers, so it is not defined here.
   ============================================================ */

/* ---- Section background (shared) ---- */
#pricing {
  background: var(--c-bg);
  border-top: 1px solid var(--c-line);
}

/* ---- Grid ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  align-items: start;
}

/* ---- Base card ---- */
.pricing-card {
  background: var(--c-white);
  border: 1.5px solid var(--c-line);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  position: relative;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), border-color 0.22s var(--ease-out);
}
/* Lift handled centrally in 15-transitions.css under @media (hover: hover) */

/* ---- Featured / popular tier ---- */
.pricing-card--popular {
  border-color: var(--c-navy);
  background: var(--c-navy);
  color: var(--c-white);
  transform: scale(1.03);
  /* Yellow top accent line to draw the eye */
  border-top: 3px solid var(--c-yellow);
}
/* Popular card hover handled in 15-transitions.css under @media (hover: hover) */
.pricing-card--popular h3           { color: var(--c-yellow); }
.pricing-card--popular .pricing-desc {
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
}
.pricing-card--popular .pricing-feature { color: rgba(255, 255, 255, 0.85); }
.pricing-card--popular .pricing-feature::before {
  background-color: var(--c-yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='3,8 6.5,11.5 13,5' stroke='%231A1A1A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

/* ---- "Most popular" ribbon ---- */
.pricing-ribbon {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--c-yellow);
  color: var(--c-black);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 5px 12px;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ---- Tier label ---- */
.pricing-tier {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--c-muted);
}
.pricing-card--popular .pricing-tier { color: rgba(255, 255, 255, 0.5); }

/* ---- Price display ---- */
.pricing-price {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--c-navy);
  line-height: 1;
  letter-spacing: -0.03em;
}
.pricing-card--popular .pricing-price { color: var(--c-yellow); }
.pricing-price small {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
}

/* ---- "Best for" qualifier line ---- */
.pricing-best-for {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--c-navy);
  margin: 0 0 0.5rem;
  line-height: 1.5;
}
.pricing-card--popular .pricing-best-for {
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Description ---- */
.pricing-desc {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin: 0;
  border-top: 1px solid var(--c-line);
  padding-top: var(--s-3);
}

/* ---- Feature list ---- */
.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
}
.pricing-feature::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background: var(--c-green);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpolyline points='3,8 6.5,11.5 13,5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---- CTA area ---- */
.pricing-cta { margin-top: var(--s-3); }
.pricing-cta .btn { width: 100%; justify-content: center; }

/* ---- Optional footer note beneath the grid ---- */
.pricing-footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: var(--s-5);
  font-style: italic;
}

/* ---- Focus state on card CTA buttons ---- */
.pricing-cta .btn:focus-visible {
  outline: 3px solid var(--c-yellow);
  outline-offset: 2px;
}

/* ---- Inside-card footnote (e.g. "Or DIY for free: download on GitHub") ---- */
.pricing-footnote {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px dashed var(--c-line);
  font-size: 0.78rem;
  color: var(--c-muted);
  line-height: 1.5;
}
.pricing-footnote strong { color: var(--c-navy); }
.pricing-footnote a {
  color: var(--c-navy);
  font-weight: 600;
}
.pricing-footnote a:hover { color: var(--c-yellow-dark); }
.pricing-footnote-list {
  list-style: none;
  padding: 0;
  margin: var(--s-2) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pricing-footnote-list li {
  position: relative;
  padding-left: 14px;
  font-size: 0.76rem;
}
.pricing-footnote-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-weight: 700;
}
.pricing-footnote-list code {
  background: rgba(15, 59, 95, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.85em;
  color: var(--c-navy);
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
  .pricing-card--popular {
    /* Mobile loses the desktop scale lift, so we replace it with a thicker
       yellow outline + slightly heavier shadow. Without this, the popular
       tier sits flush with siblings in the stack and the visual hierarchy
       collapses to "ribbon only." */
    transform: none;
    border-top: 4px solid var(--c-yellow);
    box-shadow:
      0 0 0 2px var(--c-yellow),
      0 6px 18px rgba(15, 59, 95, 0.18);
  }
  .pricing-ribbon {
    /* Bigger touch-friendly ribbon on mobile so it reads from a phone arm-length */
    font-size: 0.72rem;
    padding: 6px 14px;
  }
}
