/* ============================================================================
 * sca-sections-4.css
 * Sistema Consultor Autónomo (SCA) landing — section-specific rules for the
 * batch-4 (final) folds: 11 (guarantee ⭐⭐), 12 (filter yes/no),
 * 13 (about + proof + FAQ), 14 (close · CTA 5).
 *
 * Loaded AFTER sca-sections-3.css and BEFORE sca-reduced-motion.css — that
 * file must stay the last sca-*.css link in index.html or the reduction
 * silently stops applying to any selector this sheet also touches (equal
 * specificity, cascade order decides). Uses only tokens, curves and the
 * spacing scale already declared in sca-tokens.css. The single 768px
 * breakpoint is the only media query in this file (B14).
 * ==========================================================================*/

/* ============================================================================
 * FOLD 11 ⭐⭐ — GUARANTEE
 * The only light fold on the page — background/color inversion itself comes
 * from `.sca-fold--inverted` (sca-tokens.css). Nothing here repaints a
 * second fold light.
 * ==========================================================================*/

/* Dark pill on the light surface — deliberately NOT var(--accent). A green
   badge next to a green CTA on #F4F4F2 would read as two competing accents
   in the same fold (B9 fold 11). */
#sca-guarantee .sca-badge {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-inline: 18px;
  border-radius: var(--radius-pill);
  background: #0B0B0B;
  color: #F4F4F2;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  /* OVERSHOOT — declared exception 1 of 2 (the other is the primary CTA
     hover, sca-components.css). Opacity is intentionally NOT animated here:
     B9 describes only a scale pop, so this selector fully replaces the
     generic [data-reveal="fade"] transition rather than layering on top of
     it — the badge is opaque at rest and only its scale animates in. */
  opacity: 1;
  transform: scale(0);
  transition: transform 0.6s var(--overshoot);
}
#sca-guarantee .sca-badge.is-in { transform: scale(1); }

.sca-guarantee__h2 {
  position: relative;
  margin-top: 24px;
  max-width: 20ch;
  font-size: clamp(34px, 4.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

/* The dual-layer serif glow (B10). Both spans are fed the IDENTICAL
   per-word split from sca-guarantee-section.js, so the halo and the glyphs
   rise together — see that file's header for why splitting only one layer
   breaks the effect. */
.sca-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  color: transparent;
  -webkit-text-stroke-width: 14px;
  -webkit-text-stroke-color: var(--accent);
  paint-order: stroke fill;
  pointer-events: none;
}
.sca-glow__top {
  position: relative;
  z-index: 1;
  color: var(--text-on-inverted);
}

.sca-guarantee__body {
  margin-top: 24px;
  max-width: 62ch;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  /* The only non-token alpha on the page — the inverse-fold counterpart of
     --text-muted. rgba(255,255,255,0.62) is invisible on #F4F4F2 (B9). */
  color: rgba(11,11,11,0.7);
}

/* The block that turns the promise into something verifiable — visually
   differentiated with a real white card, never the dark surface tokens. */
.sca-measure {
  margin-top: 32px;
  max-width: 62ch;
  padding: 28px 32px;
  background: #FFFFFF;
  border: 1px solid rgba(11,11,11,0.10);
  border-radius: var(--radius-lg);
}
.sca-measure__label {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(11,11,11,0.5);
}
.sca-measure__body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-on-inverted);
}

#sca-guarantee .sca-cta { margin-top: 40px; }

@media (max-width: 768px) {
  .sca-measure { padding: 22px 24px; }
}

/* ============================================================================
 * FOLD 12 — FILTER, YES / NO
 * Two columns, a single vertical rule at 50% (fold 4's painted-grid-border
 * technique, one rule instead of two because this fold has two columns, not
 * three). No CTA of its own — the sticky bar covers it.
 * ==========================================================================*/

.sca-filter__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px;
  background-image: linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-position: 50% 0;
  background-size: 1px 100%;
  background-repeat: no-repeat;
}

.sca-filter__head {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.sca-filter__head--muted { color: var(--text-muted); }

.sca-filter__list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}
.sca-filter__list li {
  display: flex;
  gap: 14px;
  padding-block: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sca-filter__list p {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
}

.sca-filter__list--a { color: var(--text-primary); }
.sca-filter__list--a .sca-arrow { color: var(--accent); }
/* Column B arrows in --text-muted, never --danger (that token is fold 5's
   alone, B9 fold 12's own correction of itself). */
.sca-filter__list--b { color: var(--text-muted); }
.sca-filter__list--b .sca-arrow { color: var(--text-muted); }

@media (max-width: 768px) {
  .sca-filter__grid {
    grid-template-columns: 1fr;
    gap: 48px;
    background-image: none;
  }
  .sca-filter__list p { font-size: 15px; }
}

/* ============================================================================
 * FOLD 13 — ABOUT + PROOF + FAQ
 * ==========================================================================*/

.sca-about__h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.1; }

.sca-about__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 336px 1fr;
  gap: 48px;
  align-items: start;
}

.sca-portrait {
  width: 336px;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.sca-about__body p {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 62ch;
}
.sca-about__body p:last-of-type { margin-bottom: 0; }

.sca-about__links {
  margin-top: 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--text-muted);
}
.sca-about__links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.sca-about__links a:hover { text-decoration: underline; }

/* Discreet testimonial marquee — fold 3's exact mechanism (two duplicated
   groups, translateX(0 -> -50%), linear, 32s, 80px side masks) at a smaller
   scale. Reuses the `sca-marquee` keyframes already declared in
   sca-sections-2.css rather than redeclaring them (B9 fold 13: "same
   mechanism as fold 3"). */
.sca-testimonials {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
  mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 80px, #000 calc(100% - 80px), transparent);
}
.sca-testimonials__track {
  display: flex;
  gap: 20px;
  width: max-content;
  will-change: transform;
  animation: sca-marquee 32s linear infinite;
}

.sca-testimonial {
  flex-shrink: 0;
  width: 420px;
  max-width: 420px;
  padding: 20px 24px;
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
}
.sca-testimonial__quote,
.sca-testimonial__translation {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.sca-testimonial__translation { margin-top: 8px; }
.sca-testimonial__name {
  margin: 12px 0 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

/* The wrapping `.sca-fold__inner` that follows the marquee — spacing only,
   the FAQ's own selectors are namespaced below. */
.sca-faq { margin-top: 64px; }

/* B9 gives no typography for this h3 (unlike sca-filter__head, which does) —
   sized as a secondary fold heading, invented within the page's own type
   scale and flagged in the batch report. */
.sca-faq__h3 {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.sca-faq__list { position: relative; }

.sca-faq__item { position: relative; }

.sca-faq__btn {
  width: 100%;
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 20px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--text-primary);
}

.sca-faq__chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease);
}
.sca-faq__item.is-open .sca-faq__chevron { transform: rotate(180deg); }

.sca-faq__panel {
  height: 0;
  overflow: hidden;
  transition: height 0.85s var(--accordion);
}
.sca-faq__panel p {
  margin: 0;
  padding-bottom: 24px;
  max-width: 68ch;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* The item divider — a 1px SVG line revealed with data-reveal="draw" rather
   than a plain CSS border, matching folds 5/6/7's telemetry-line mechanism.
   A straight line across a 0..100 viewBox has length 100 by construction, so
   --len is a fixed constant, never getTotalLength() at runtime (B9 fold 13,
   same reasoning as sca-twelve-months-section.js / sca-sprint-section.js). */
.sca-faq__divider {
  display: block;
  width: 100%;
  height: 1px;
  overflow: visible;
}
.sca-faq__divider path { stroke: rgba(255,255,255,0.06); stroke-width: 1; }

@media (max-width: 768px) {
  .sca-about__grid { grid-template-columns: 1fr; }
  .sca-portrait { width: 100%; height: auto; aspect-ratio: 672 / 840; }
  .sca-testimonial { width: 300px; max-width: 300px; }
}

/* ============================================================================
 * FOLD 14 — CLOSE · CTA 5
 * Full-height closing section — the only fold on the page with a declared
 * min-height beyond its own content (B9 fold 14).
 * ==========================================================================*/

#sca-close {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sca-close__h2 {
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
/* NOTE (batch report): B9's own prose asks for `padding-bottom: 0.15em` on
   the word wrappers here; sca-motion.css (foundation, out of this batch's
   scope) already ships `.sca-word { padding-bottom: .2em; }` for BOTH
   wordRise and curtain. Followed the shipped foundation value rather than
   re-declaring a conflicting one in a section sheet. */

.sca-close__scarcity {
  margin-top: 24px;
  max-width: 68ch;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
}

.sca-close__call { margin-top: 40px; }

.sca-close__call-intro {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 17px;
  color: var(--text-primary);
}

.sca-close__call-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.sca-close__call-list li {
  display: flex;
  gap: 14px;
  padding-block: 10px;
}
.sca-close__call-list p {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
}
/* Identical to fold 12 column A — accent arrows on the affirmative list. */
.sca-close__call-list .sca-arrow { color: var(--accent); }

#sca-close .sca-cta { margin-top: 40px; }
#sca-close .sca-secondary { margin-top: 20px; }

.sca-close__ps {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 32px;
  margin-top: 64px;
  max-width: 68ch;
}
.sca-close__ps p {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}
.sca-close__ps strong { color: var(--text-primary); font-weight: 600; }

.sca-footer {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding-top: 96px;
}
.sca-footer__watermark {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(64px, 14vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  opacity: 0.30;
  padding-bottom: 0.15em;
}
.sca-footer__copyright {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .sca-footer { grid-template-columns: repeat(4, 1fr); }
  .sca-close__ps { margin-top: 48px; }
}
