/* ====================================================================
   Circle AI Landing Page - page sections, part 2
   Preview rail, subscription, 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: 10px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  color: var(--brand-800);
  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-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.02rem; font-weight: 600;
  color: var(--brand-900);
}
.preview-phone figcaption span { font-size: 0.83rem; 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: 640px;
  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; }
}

/* ===== Subscription ===== */
.trial { padding: var(--section) 0; }
.trial-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(141, 153, 252, 0.20), transparent 52%),
    radial-gradient(circle at 92% 92%, rgba(47, 67, 250, 0.10), 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.95rem, 3.5vw, 2.6rem); margin-bottom: 16px; }
.trial-card > div > p { color: var(--text-body); font-size: 1.05rem; line-height: 1.74; margin-bottom: 24px; }
.trial-card .eyebrow { margin-bottom: 20px; }
.trial-fine {
  font-size: 0.82rem;
  color: var(--text-mute);
  line-height: 1.62;
  margin-top: 20px;
  max-width: 430px;
}
.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);
  /* --brand-700 (10.71:1 behind white), not the brand hue, so the tick is a
     firm mark at 20px. */
  background: var(--brand-700);
  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-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  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-700); color: var(--white); border-color: var(--brand-700); }
.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.95rem;
  line-height: 1.72;
}
.faq-item.open .faq-a { padding: 0 24px 21px; max-height: 520px; }

/* ===== Download CTA =====
   Every tinted value on this card is measured against the COMPOSITED
   backdrop, not against the base colour. The blue radial is capped at 0.30
   so the white body copy stays above 7:1 under the highlight. */
.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:
    radial-gradient(circle at 18% 12%, rgba(141, 153, 252, 0.30), transparent 54%),
    radial-gradient(circle at 88% 88%, rgba(16, 19, 42, 0.26), transparent 50%),
    linear-gradient(140deg, var(--brand-800) 0%, #121858 55%, var(--brand-900) 100%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
/* The radiance again, as the card's texture: rays fanning from the bottom
   centre. */
.download-card::before {
  content: '';
  position: absolute;
  left: 50%; bottom: -58%;
  width: 150%; aspect-ratio: 1;
  transform: translateX(-50%);
  background: repeating-conic-gradient(
    from 180deg,
    rgba(255, 255, 255, 0.09) 0deg 1.6deg,
    transparent 1.6deg 6.4deg
  );
  -webkit-mask-image: radial-gradient(circle, transparent 24%, #000 34%, transparent 66%);
          mask-image: radial-gradient(circle, transparent 24%, #000 34%, transparent 66%);
  pointer-events: none;
}
.download-card > * { position: relative; }
.download-card .eyebrow {
  /* Washes DARK, not light: a translucent white chip on the lit corner took
   the white label under 4.5:1, so the chip recesses instead. */
  color: var(--white);
  background: rgba(16, 19, 42, 0.34);
  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.3rem);
  margin: 0 auto 20px;
  max-width: 780px;
}
/* --brand-200 is a LARGE-text accent only - the h2 is 2.1rem+ at weight 800,
   which clears the 3:1 large floor. Never reuse this value on body copy. */
.download-card h2 .accent { color: var(--brand-200); }
.download-card > p {
  color: rgba(255, 255, 255, 0.97);
  font-size: 1.07rem;
  max-width: 580px;
  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); }
/* Same dark-wash reasoning as the eyebrow above. */
.download-card .store-btn.is-pending {
  background: rgba(16, 19, 42, 0.38);
  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(16, 19, 42, 0.34);
  border-color: rgba(213, 218, 253, 0.45);
}
.download-promise {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 0.89rem;
  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: on the card's lit corners the 300 step
   disappears even as 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); margin: 18px 0 16px; }
.contact-intro > p { color: var(--text-body); font-size: 1.05rem; line-height: 1.74; 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: 50%;
  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.96rem; font-weight: 700; margin-bottom: 3px; }
.contact-channel-text small { display: block; font-size: 0.86rem; color: var(--text-mute); margin-bottom: 8px; line-height: 1.55; }
.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.44rem; margin-bottom: 6px; }
.contact-form-card p.muted { color: var(--text-mute); font-size: 0.92rem; margin-bottom: 26px; line-height: 1.6; }
.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); padding-left: 4px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border-strong);
  /* The app's inputs are pills (tailwind borderRadius.input 9999px). The
     textarea is the one exception - a multi-line pill is unusable - so it
     takes the card radius instead. */
  border-radius: var(--radius-input);
  color: var(--ink-900);
  font-family: inherit;
  font-size: 0.96rem;
  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(47, 67, 250, 0.22);
}
.form-row textarea { resize: vertical; min-height: 138px; border-radius: var(--radius); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { width: 100%; padding: 16px; }
.form-status {
  display: none;
  padding: 15px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 18px;
  line-height: 1.55;
}
.form-status.show { display: block; }
.form-status.ok { background: rgba(47, 67, 250, 0.10); border: 1px solid var(--border-brand); color: var(--brand-800); }
.form-status.err { background: rgba(200, 30, 30, 0.06); border: 1px solid rgba(200, 30, 30, 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 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; }
  .filter-grid { grid-template-columns: 1fr; }
  .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 12px; 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 20px; font-size: 0.95rem; }
  .faq-item.open .faq-a { padding: 0 20px 18px; }
  .download-card { padding: 40px 20px; }
  .preview-phone { width: 198px; margin-right: 16px; }
}

/* ===== Screenshot slots =====
   The app screenshots (images/screen-01.webp .. screen-06.webp) do not exist
   yet. Every element that needs one carries .needs-shots and is hidden; the
   rules below let the text column reflow to fill the row. Delete the
   .needs-shots class from the HTML (and nothing else) once the six files
   are in images/. */
.needs-shots {
  /* Taken out of flow and out of the accessibility tree, but still LAID OUT
     (not display:none): script.js measures the preview rail's children to
     size its marquee, and a display:none rail measures zero. */
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
.hero-grid:has(> .needs-shots) { grid-template-columns: 1fr; }
.hero-grid:has(> .needs-shots) .hero-text { text-align: center; }
.hero-grid:has(> .needs-shots) .hero-mini,
.hero-grid:has(> .needs-shots) .hero-cta,
.hero-grid:has(> .needs-shots) .hero-trust { justify-content: center; }
.hero-grid:has(> .needs-shots) .hero-lead { margin-left: auto; margin-right: auto; }
.deep-row:has(> .needs-shots) { grid-template-columns: 1fr; }
.deep-row:has(> .needs-shots) .deep-text { max-width: 760px; margin: 0 auto; }
