/* ====================================================================
   BrickBrain Landing Page — page sections, part 2
   Preview rail, trial, FAQ, download CTA, contact page and the responsive
   block. Split from sections.css purely for the 800-line ceiling — see
   the note there. Depends on styles.css for tokens.
   ==================================================================== */

/* ===== Preview marquee ===== */
.preview { padding: var(--section) 0 calc(var(--section) - 26px); overflow: hidden; }
.preview-rail-wrap {
  position: relative;
  margin-top: 12px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.preview-rail {
  display: flex;
  width: max-content;
  padding: 26px 0 44px;
  animation: previewScroll var(--scroll-duration, 60s) linear infinite;
  will-change: transform;
}
.preview-rail-wrap:hover .preview-rail,
.preview-rail-wrap:focus-within .preview-rail,
.preview-rail-wrap.is-paused .preview-rail { animation-play-state: paused; }
/* The rail holds no focusable content, so :focus-within can never fire on its
   own — script.js adds .is-paused from a real control and from touch. */
.rail-pause {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 auto; padding: 9px 18px;
  font-size: 0.82rem; font-weight: 700;
  color: var(--brand-700);
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
}
.rail-pause:hover { border-color: var(--brand-300); }
@media (prefers-reduced-motion: reduce) { .rail-pause { display: none; } }
@keyframes previewScroll {
  from { transform: translate3d(0, 0, 0); }
  /* JS duplicates the children, so -50% lands the duplicate exactly where
     the original started -> seamless loop. */
  to   { transform: translate3d(-50%, 0, 0); }
}
.preview-phone {
  flex: 0 0 auto;
  width: 254px;
  margin-right: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.4s var(--ease-out);
}
.preview-phone:hover { transform: translateY(-6px); }
.preview-phone figcaption { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.preview-phone figcaption strong { font-size: 0.95rem; font-weight: 700; color: var(--brand-900); }
.preview-phone figcaption span { font-size: 0.82rem; color: var(--text-mute); line-height: 1.45; max-width: 235px; }
.preview-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-mute);
  max-width: 620px;
  margin: 0 auto;
}
@media (prefers-reduced-motion: reduce) {
  .preview-rail { animation: none; }
  .preview-rail-wrap { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
}

/* ===== Trial / premium ===== */
.trial { padding: var(--section) 0; }
.trial-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(251, 113, 144, 0.16), transparent 52%),
    radial-gradient(circle at 92% 92%, rgba(31, 179, 86, 0.11), transparent 52%),
    var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 56px 52px;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 52px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}
.trial-card h2 { font-size: clamp(1.9rem, 3.4vw, 2.55rem); font-weight: 800; margin-bottom: 16px; }
.trial-card > div > p { color: var(--text-body); font-size: 1.04rem; line-height: 1.72; margin-bottom: 24px; }
.trial-card .eyebrow { margin-bottom: 20px; }
.trial-fine {
  font-size: 0.82rem;
  color: var(--text-mute);
  line-height: 1.6;
  margin-top: 20px;
  max-width: 420px;
}
.trial-card .btn-primary { margin-top: 4px; }
.trial-list { display: flex; flex-direction: column; gap: 11px; }
.trial-list li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
}
.trial-list li svg {
  width: 20px; height: 20px;
  color: var(--white);
  /* --success-dark, not --success: a white tick on #1fb356 is only 2.75:1 */
  background: var(--success-dark);
  border-radius: 50%;
  padding: 4px;
  flex-shrink: 0;
  box-sizing: content-box;
  margin-top: 1px;
}
.trial-list strong { display: block; font-size: 0.95rem; font-weight: 700; color: var(--ink-900); margin-bottom: 2px; }
.trial-list small { color: var(--text-mute); font-size: 0.85rem; line-height: 1.5; }

/* ===== FAQ ===== */
.faq { padding: var(--section) 0; }
.faq-list { max-width: 820px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) {
  .faq-list { grid-template-columns: 1fr 1fr; align-items: start; max-width: 1100px; gap: 14px; }
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.faq-item:hover { box-shadow: var(--shadow-sm); }
.faq-item.open { border-color: var(--brand-500); box-shadow: var(--shadow-sm); }
.faq-q {
  width: 100%;
  padding: 21px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.99rem;
  color: var(--brand-900);
}
.faq-q-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-50);
  border: 1px solid var(--border-brand);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-800);
  flex-shrink: 0;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.faq-q-icon svg { width: 13px; height: 13px; transition: transform 0.3s var(--ease-out); }
.faq-item.open .faq-q-icon { background: var(--brand-500); color: var(--white); border-color: var(--brand-500); }
.faq-item.open .faq-q-icon svg { transform: rotate(45deg); }
.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
  color: var(--text-body);
  font-size: 0.94rem;
  line-height: 1.72;
}
.faq-item.open .faq-a { padding: 0 24px 21px; max-height: 460px; }

/* ===== Download CTA ===== */
.download { padding: var(--section) 0; }
.download-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 68px 52px;
  text-align: center;
  color: var(--white);
  background:
    /* 0.26, two steps down from the donor's 0.44. This fork's --brand-900 is
       colorInfo #881337 at 7.12:1, noticeably lighter than the emerald fork's
       9.72:1 floor, so the whole card sits higher and the highlight pushed the
       lead paragraph to 4.34-4.45:1 across three of four breakpoints. At 0.26
       the same text measures 5.8:1. */
    radial-gradient(circle at 18% 12%, rgba(251, 113, 144, 0.26), transparent 54%),
    radial-gradient(circle at 88% 92%, rgba(251, 113, 144, 0.28), transparent 48%),
    linear-gradient(140deg, var(--brand-900) 0%, #751030 55%, var(--deep-900) 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.download-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 26%, transparent 72%);
          mask-image: radial-gradient(ellipse at center, #000 26%, transparent 72%);
}
.download-card > * { position: relative; }
.download-card .eyebrow {
  /* Same dark-wash reasoning as the pending store pills below: on a 390px
     card the top-left rose radial sits directly behind this chip, and a white
     wash took its white label to 3.43:1. --brand-900 at 0.3 gives 5.32:1. */
  color: var(--white);
  background: rgba(136, 19, 55, 0.3);
  border-color: rgba(255, 255, 255, 0.28);
  margin-bottom: 22px;
}
.download-card h2 {
  color: var(--white);
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  font-weight: 800;
  margin: 0 auto 20px;
  max-width: 760px;
}
/* --brand-100, not --brand-300: a light tint is too weak on the card's
   brightest rose and reads as washed-out grey. This is the third value the
   re-tint broke on this card (see also the Soon chip and the promise ticks) —
   anything tinted on this surface must be measured, not assumed. The card's
   brightest stop stays --brand-900: the top-left rose radial lands hard,
   and over --brand-700 the alpha'd white body text drops to 2.71:1. */
.download-card h2 .accent { color: var(--brand-100); }
.download-card > p {
  /* Pure white, not an alpha: this paragraph crosses the brightest part of the
     card and every fraction of alpha comes straight off the contrast. */
  color: var(--white);
  font-size: 1.06rem;
  max-width: 560px;
  margin: 0 auto 34px;
  line-height: 1.7;
}
.download-card .store-buttons { justify-content: center; margin-bottom: 26px; }
.download-card .store-btn {
  background: var(--white);
  color: var(--brand-900);
  border-color: var(--white);
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.6);
}
.download-card .store-btn:hover { background: var(--brand-50); }
/* These two wash DARK, not light. A white wash over the CTA card is the
   obvious way to make a pending pill read as raised, but the card's top-left
   rose radial is strongest exactly here, and stacking white on white pushed
   the local backdrop to #54907e - white label text measured 3.71:1 on the
   "Soon" chip and 4.12:1 on "Google Play". Washing with --brand-900 instead
   recesses the pill and takes the same text to 5.1:1 and 6.2:1. The dashed
   border still carries the "not yet live" signal. */
.download-card .store-btn.is-pending {
  background: rgba(136, 19, 55, 0.35);
  color: rgba(255, 255, 255, 0.92);
  border: 1px dashed rgba(255, 255, 255, 0.42);
}
.download-card .store-btn.is-pending .store-btn-text strong { color: rgba(255, 255, 255, 0.96); }
.download-card .store-pending-tag {
  color: var(--white);
  background: rgba(136, 19, 55, 0.3);
  border-color: rgba(254, 205, 211, 0.45);
}
.download-promise {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.92);
}
.download-promise-item { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
/* --brand-200 not --brand-300: the coral #fb7190 is only 1.74:1 against the
   card's brightest red, which is invisible even for a non-text graphic. */
.download-promise-item svg { width: 16px; height: 16px; color: var(--brand-200); flex-shrink: 0; }

/* ===== Contact page ===== */
.contact-wrap { padding: 132px 0 96px; }
.contact-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 56px; align-items: start; }
.contact-intro h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); font-weight: 800; margin: 18px 0 16px; }
.contact-intro > p { color: var(--text-body); font-size: 1.04rem; line-height: 1.72; margin-bottom: 32px; }
.contact-channels { display: flex; flex-direction: column; gap: 14px; }
.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 19px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.contact-channel:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.contact-channel-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--brand-100);
  border: 1px solid var(--border-brand);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-800);
  flex-shrink: 0;
}
.contact-channel-icon svg { width: 19px; height: 19px; }
.contact-channel-text strong { display: block; font-size: 0.95rem; font-weight: 700; margin-bottom: 3px; }
.contact-channel-text small { display: block; font-size: 0.85rem; color: var(--text-mute); margin-bottom: 8px; }
.contact-channel-text a { font-size: 0.9rem; color: var(--brand-800); font-weight: 700; }
.contact-channel-text a:hover { text-decoration: underline; }

.contact-form-card {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 38px;
  box-shadow: var(--shadow-md);
}
.contact-form-card h2 { font-size: 1.36rem; margin-bottom: 6px; }
.contact-form-card p.muted { color: var(--text-mute); font-size: 0.92rem; margin-bottom: 26px; }
.form-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 17px; }
.form-row label { font-size: 0.85rem; font-weight: 700; color: var(--ink-700); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-btn);
  color: var(--ink-900);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--ink-300); }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(251, 113, 144, 0.22);
}
.form-row textarea { resize: vertical; min-height: 132px; }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { width: 100%; padding: 15px; }
.form-status {
  display: none;
  padding: 15px 17px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 18px;
  line-height: 1.55;
}
.form-status.show { display: block; }
.form-status.ok { background: rgba(31, 179, 86, 0.09); border: 1px solid rgba(31, 179, 86, 0.32); color: var(--success-dark); }
.form-status.err { background: rgba(217, 45, 32, 0.07); border: 1px solid rgba(217, 45, 32, 0.28); color: var(--error); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .hero { padding: 132px 0 76px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-text { text-align: center; }
  .hero-text .hero-mini, .hero-text .hero-cta, .hero-text .hero-trust { justify-content: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-visual { min-height: 580px; }
  .filter-grid { grid-template-columns: 1fr; }
  .filter-grid.quad { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-card, .feature-card.wide { grid-column: span 2; }
  .feature-card.full { grid-column: span 4; }
  .deep-row { grid-template-columns: 1fr; gap: 44px; }
  .deep-row.flip .deep-visual { order: 0; }
  .deep-text { text-align: center; }
  .deep-list li { text-align: left; }
  .trial-card { grid-template-columns: 1fr; padding: 44px 34px; }
  .trial-fine { margin-left: auto; margin-right: auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  .hero-visual { min-height: 520px; }
  .fc-1 { left: -8px; top: 26px; }
  .fc-2 { right: -8px; }
  .fc-3 { left: -8px; bottom: 48px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .stat-item::after { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-card.wide, .feature-card.full { grid-column: span 1; }
  .feature-card.full {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 22px;
    justify-items: start;
  }
  .feature-card.full .feature-icon { margin-bottom: 0; }
  .download-card { padding: 48px 26px; }
  .trial-card { padding: 36px 22px; }
  .contact-form-card { padding: 28px 22px; }
  .preview-phone { width: 218px; margin-right: 20px; }
  .hero-trust { gap: 18px; }
  .trust-divider { display: none; }
}

@media (max-width: 420px) {
  .hero { padding: 116px 0 56px; }
  .hero-visual { min-height: 448px; }
  .float-card { padding: 9px 11px; gap: 9px; }
  .float-icon { width: 30px; height: 30px; }
  .float-icon svg { width: 15px; height: 15px; }
  .float-text small { font-size: 0.6rem; }
  .float-text strong { font-size: 0.77rem; }
  .fc-1 { left: -4px; top: 16px; }
  .fc-2 { right: -4px; }
  .fc-3 { left: -4px; bottom: 30px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .filter-tile, .step, .feature-card { padding: 22px 20px; }
  .step-num { font-size: 2.5rem; }
  .faq-q { padding: 18px 19px; font-size: 0.94rem; }
  .faq-item.open .faq-a { padding: 0 19px 18px; }
  .download-card { padding: 40px 20px; }
  .preview-phone { width: 198px; margin-right: 16px; }
}
