/* =====================================================================
   ExpenzX website — shared styles
   Linked from every page (and ../css/styles.css from /docs pages).
   Tailwind utilities come from the Play CDN; this file holds the custom
   component CSS that isn't expressible as utilities.
   ===================================================================== */

/* ===== Base ===== */
body { font-family: 'Inter', sans-serif; }
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ===== Cards (landing / features) ===== */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(187, 202, 192, 0.6);
}
.feature-card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0, 108, 74, 0.08); }

/* ===== Feature tier badges (features page) ===== */
.tier-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tier-free { background: #eceef0; color: #3c4a42; }
.tier-pro { background: #4edea3; color: #002114; }
.tier-premium { background: #006c4a; color: #ffffff; }

/* ===== Pricing: billing toggle ===== */
.toggle-track {
  width: 48px; height: 26px;
  background: #bbcac0;
  border-radius: 9999px;
  position: relative;
  cursor: pointer;
  transition: background 0.25s;
  flex-shrink: 0;
}
.toggle-track.on { background: #006c4a; }
.toggle-thumb {
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.toggle-track.on .toggle-thumb { transform: translateX(22px); }

/* ===== Pricing: popular card ===== */
.card-popular {
  border: 2px solid #4edea3;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 108, 74, 0.14);
}
@media (min-width: 768px) { .card-popular { transform: scale(1.04); } }
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: #4edea3;
  color: #002114;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 9999px;
  white-space: nowrap;
}

/* ===== Pricing: comparison table row striping ===== */
.comparison-table tbody tr:nth-child(even) td { background: #f2f4f6; }

/* ===== Pricing: FAQ ===== */
details summary { list-style: none; }
details summary::-webkit-details-marker { display: none; }
details .faq-icon { transition: transform 0.25s; }
details[open] .faq-icon { transform: rotate(180deg); }

/* ===== Scroll reveal (landing / features) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.985);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
  /* Preserve the popular card's emphasis scale on desktop after reveal */
  .card-popular.is-visible { transform: none; }
  @media (min-width: 768px) {
    .card-popular.is-visible { transform: scale(1.04); }
  }
}

/* ===== Legal pages ===== */
.legal-content h2 { font-size: 24px; line-height: 32px; font-weight: 600; color: #191c1e; margin-top: 48px; margin-bottom: 16px; }
.legal-content h3 { font-size: 18px; line-height: 28px; font-weight: 600; color: #191c1e; margin-top: 28px; margin-bottom: 10px; }
.legal-content p { color: #3c4a42; margin-bottom: 16px; line-height: 28px; }
.legal-content ul { list-style: disc; padding-left: 24px; margin-bottom: 16px; color: #3c4a42; }
.legal-content li { margin-bottom: 8px; line-height: 26px; }
.legal-content a { color: #006c4a; text-decoration: underline; }
.legal-content strong { color: #191c1e; font-weight: 600; }
.legal-content table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px; }
.legal-content th { background: #f2f4f6; text-align: left; padding: 12px 16px; font-weight: 600; color: #191c1e; border: 1px solid #bbcac0; }
.legal-content td { padding: 12px 16px; color: #3c4a42; border: 1px solid #bbcac0; vertical-align: top; }

/* ===== Docs layout ===== */
.docs-group-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #565e74; margin: 22px 0 8px; padding: 0 12px; }
.docs-group-label:first-child { margin-top: 0; }
.docs-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; color: #3c4a42; transition: background 0.15s, color 0.15s; text-decoration: none; }
.docs-link:hover { background: #eceef0; color: #006c4a; }
.docs-link.active { background: #dae2fd; color: #131b2e; font-weight: 600; }
.tier-pill { display: inline-flex; align-items: center; vertical-align: middle; font-size: 10px; line-height: 16px; font-weight: 700; letter-spacing: 0.04em; padding: 1px 7px; border-radius: 9999px; text-transform: uppercase; }
.tier-pill.pro { background: #4edea3; color: #002114; }
.tier-pill.premium { background: #006c4a; color: #fff; }
.doc h1 { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; color: #191c1e; margin-bottom: 12px; }
.doc h2 { font-size: 24px; line-height: 32px; font-weight: 600; color: #191c1e; margin-top: 44px; margin-bottom: 14px; scroll-margin-top: 96px; }
.doc h3 { font-size: 18px; line-height: 28px; font-weight: 600; color: #191c1e; margin-top: 28px; margin-bottom: 8px; }
.doc p { color: #3c4a42; margin-bottom: 16px; line-height: 28px; }
.doc ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; color: #3c4a42; }
.doc ol { list-style: decimal; padding-left: 22px; margin-bottom: 16px; color: #3c4a42; }
.doc li { margin-bottom: 8px; line-height: 26px; }
.doc a { color: #006c4a; text-decoration: underline; }
.doc strong { color: #191c1e; font-weight: 600; }
.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: 12px; margin: 20px 0; font-size: 14px; line-height: 22px; }
.callout .material-symbols-outlined { flex-shrink: 0; }
.callout.tip { background: #e8f5ee; color: #1b3b2c; }
.callout.tip .material-symbols-outlined { color: #006c4a; }
.callout.note { background: #dae2fd; color: #1b2438; }
.callout.note .material-symbols-outlined { color: #3f465c; }
.callout.tier { background: #fff; border: 1px solid #bbcac0; color: #3c4a42; }
.callout.tier .material-symbols-outlined { color: #006c4a; }
.doc-card { display: block; padding: 20px; border: 1px solid #bbcac0; border-radius: 14px; text-decoration: none; transition: border-color 0.15s, transform 0.15s; background: #fff; }
.doc-card:hover { border-color: #006c4a; transform: translateY(-2px); }
.doc-pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid #bbcac0; }
.doc-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border: 1px solid #bbcac0; border-radius: 12px; text-decoration: none; transition: border-color 0.15s; max-width: 48%; }
.doc-pager a:hover { border-color: #006c4a; }
.doc-pager a.next { text-align: right; align-items: flex-end; margin-left: auto; }
.doc-pager .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #565e74; }
.doc-pager .ttl { font-size: 15px; font-weight: 600; color: #191c1e; }
