/* =========================================================
   Sub-pages — card-wallet/privacy-policy.html & support.html
   Layers on top of the eBoxr design system (style.css).
   No Bootstrap: prose, FAQ cards, and the app-icon brand are
   styled here using the shared design tokens.
   ========================================================= */

/* ---------- Entrance reveal ----------
   style.css hides .reveal unconditionally (opacity:0). For these
   standalone legal/support pages we invert that: content is visible
   by default, and only hidden-then-revealed when JS is actually
   running — so a no-JS (or failed-script) load never blanks the
   policy text. subpage.css must load AFTER style.css for this override. */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 650ms var(--ease),
    transform 650ms var(--ease);
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- App icon in the header brand ----------
   Replaces the "e" brand-mark used on the main site with the
   Rewards Card Wallet app icon (the app's registered identity). */
.brand-app-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
}

/* Long app name beside the menu toggle on small screens */
@media (max-width: 900px) {
  .brand-word {
    font-size: 1.02rem;
  }
}

@media (max-width: 420px) {
  .brand-word {
    font-size: 0.94rem;
    letter-spacing: -0.04em;
  }
}

/* Active sub-page nav link. Desktop is styled in style.css (surface +
   accent underline). On mobile the last link ("Back to eBoxr") is already
   accent via .mobile-menu a:last-child, so the active page uses bright text
   + heavier weight to stay distinct rather than competing for the accent. */
.mobile-menu a.active {
  color: var(--text);
  font-weight: 800;
}

/* ---------- Page layout ---------- */

.subpage-main {
  padding-top: calc(var(--header-height) + 52px);
  padding-bottom: 96px;
}

.subpage-main .container {
  max-width: 760px;
}

/* ---------- Page header: app icon + title + meta ---------- */

.subpage-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 52px;
}

.subpage-hero .app-icon {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.subpage-hero .subpage-title {
  margin: 0 0 6px;
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.subpage-hero .subpage-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.subpage-hero .subpage-meta strong {
  color: var(--text);
  font-weight: 750;
}

/* ---------- Prose (privacy policy) ---------- */

.prose p {
  margin: 0 0 16px;
  color: var(--text-soft);
  line-height: 1.75;
}

.prose > p:first-of-type {
  color: var(--text-soft);
}

.prose h2 {
  margin: 52px 0 18px;
  padding-top: 8px;
  font-size: clamp(1.4rem, 3vw, 1.7rem);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.prose h2::before {
  display: block;
  width: 36px;
  height: 2px;
  margin-bottom: 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  content: "";
}

.prose h3 {
  margin: 28px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

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

.prose ul li {
  position: relative;
  padding-left: 24px;
  color: var(--text-soft);
  line-height: 1.65;
}

.prose ul li::before {
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  opacity: 0.7;
}

.prose strong {
  color: var(--text);
  font-weight: 700;
}

.prose a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.35);
  transition:
    color 180ms ease,
    border-color 180ms ease;
}

.prose a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ---------- FAQ cards (support) ---------- */

.faq-list {
  display: grid;
  gap: 14px;
  margin: 0 0 8px;
}

.faq-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(
    150deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.02)
  );
  transition:
    border-color 220ms ease,
    background-color 220ms ease,
    transform 220ms var(--ease);
}

.faq-card:hover {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}

.faq-q {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text);
}

.faq-q::before {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
  content: "Q";
}

.faq-a {
  margin: 0;
  padding-left: 24px;
  color: var(--text-soft);
  line-height: 1.65;
}

/* ---------- Responsive ---------- */

@media (max-width: 620px) {
  .subpage-hero {
    gap: 14px;
    margin-bottom: 40px;
  }

  .subpage-hero .app-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .prose h2 {
    margin-top: 42px;
  }

  .faq-card {
    padding: 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .js .reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .faq-card:hover {
    transform: none;
  }
}
