/* ============================================================================
 * sca-sections-3.css
 * Sistema Consultor Autónomo (SCA) landing — section-specific rules for the
 * batch-3 folds: 7 (sprint SCA-30), 8 (executive project room · CTA 2),
 * 9 (the 7 modules), 10 (bonuses + value stack ⭐).
 *
 * Loaded AFTER sca-sections-2.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 7 — SPRINT SCA-30
 * ==========================================================================*/

#sca-sprint { position: relative; }

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

.sca-sprint__sub {
  position: relative;
  margin: 16px 0 0;
  max-width: 60ch;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--text-muted);
}

/* The dotted frame — a hidden rounded-rect guide sampled at runtime by
   behaviors/sca-sprint.js into evenly spaced pop-in dots. The guide path
   itself paints nothing (fill/stroke: none); only its geometry is read. */
.sca-dottedframe {
  position: relative;
  margin-top: 64px;
  padding: 40px 32px;
}

.sca-dottedframe__guide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

#sca-sprint-frame { fill: none; stroke: none; }

.sca-dottedframe__dot {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.2);
  animation: sca-dot-pop 0.35s var(--ease) forwards;
}

@keyframes sca-dot-pop {
  from { opacity: 0;    transform: scale(0.2); }
  to   { opacity: 0.36; transform: scale(1);   }
}

.sca-timeline {
  position: relative;
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 40px 0 0;
}

.sca-timeline::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255,255,255,0.10);
}

.sca-timeline__item {
  position: relative;
  flex: 1;
  min-width: 0;
  padding-top: 24px;
}

.sca-timeline__dot {
  position: absolute;
  top: -1px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transform: translateY(-50%);
}

.sca-timeline__day   { margin: 0;         font-family: var(--font-body); font-weight: 600; font-size: 14px; color: var(--text-primary); }
.sca-timeline__title { margin: 4px 0 0;   font-family: var(--font-body); font-weight: 500; font-size: 16px; color: var(--text-primary); }
.sca-timeline__body  { margin: 8px 0 0;   font-family: var(--font-body); font-weight: 400; font-size: 15px; line-height: 1.55; color: var(--text-muted); }

@media (max-width: 768px) {
  .sca-dottedframe { padding: 32px 20px; }
  .sca-timeline { flex-direction: column; gap: 32px; }
  .sca-timeline::before { top: 0; bottom: 0; left: 4px; right: auto; width: 1px; height: auto; }
  .sca-timeline__item { padding-top: 0; padding-left: 24px; }
  .sca-timeline__dot { top: 6px; left: 0; transform: none; }
}

/* ============================================================================
 * FOLD 8 — EXECUTIVE PROJECT ROOM · CTA 2
 * ==========================================================================*/

/* Breathing room: the mockup was sitting too close to the header above and
   the CTA / sticky bar below ("todo muy junto"). Give the fold real vertical
   rhythm and let the window run wider.
   Trimmed ~13% in a later spacing audit (was clamp(120px, 14vh, 200px)) — a
   smaller cut than the other tightened folds ON PURPOSE, so this doesn't
   regress the "todo muy junto" fix above; still clearly more room than the
   base fold gap (--fold-pad, sca-tokens.css). */
#sca-projectroom { padding-bottom: clamp(104px, 12vh, 176px); }

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

.sca-pr__body {
  margin: 16px 0 0;
  max-width: 60ch;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Scoped overrides of the shared epr-* mockup (styles.css) — spacing only,
   never its internals. */
.sca-projectroom .epr-mockup-wrapper {
  max-width: 1060px;
  margin: 60px auto 0;
}

.sca-projectroom .epr-dashboard { min-height: 460px; }

.sca-projectroom .sca-cta { margin-top: 60px; }

.sca-panel {
  position: relative;
  width: 1124px;
  max-width: 100%;
  height: 465px;
  margin-top: 48px;
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  display: grid;
  grid-template-columns: 232px 1fr;
  gap: 0;
  --bb-radius: var(--radius-lg);
}

/* The 1px ring the beams travel around. mask-composite:exclude is
   structural: without it the mask paints the whole panel and the beam
   disappears under the fill. */
.sca-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--bb-radius);
  padding: 1px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.sca-beam {
  position: absolute;
  width: 84px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  offset-path: rect(0 auto auto 0 round var(--bb-radius));
  offset-distance: 0%;
  animation: bb-travel 6s linear infinite;
  will-change: offset-distance;
  pointer-events: none;
}
.sca-beam:nth-of-type(2) { animation-delay: -3s; }

@keyframes bb-travel { to { offset-distance: 100%; } }

.sca-panel__aside {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-right: 1px solid rgba(255,255,255,0.06);
}

.sca-panel__row {
  height: 13px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  border-left: 2px solid transparent;
}
.sca-panel__row span {
  display: block;
  height: 6px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.16);
}
.sca-panel__row.is-active { border-left-color: var(--accent); }
.sca-panel__row.is-active span { background: rgba(255,255,255,0.4); }

/* Vertical divider between aside and card grid — absolutely positioned so
   it never becomes a third grid item. Revealed with maskedImage per B9. */
.sca-panel__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 232px;
  width: 1px;
  background: rgba(255,255,255,0.06);
}

.sca-panel__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 16px;
  padding: 24px;
}

.sca-panel__card {
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.sca-panel__card--2x2 { grid-column: span 2; grid-row: span 2; }
.sca-panel__card--1x1 { grid-column: span 1; grid-row: span 1; }
.sca-panel__card--1x2 { grid-column: span 1; grid-row: span 2; }
.sca-panel__card--2x1 { grid-column: span 2; grid-row: span 1; }

@media (max-width: 768px) {
  .sca-panel { height: auto; grid-template-columns: 1fr; }
  .sca-panel__aside {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .sca-panel__row { width: 45%; }
  .sca-panel__divider { display: none; }
  .sca-panel__grid { grid-template-columns: repeat(2, 1fr); }
  /* .sca-cta already goes width:100% below 768px via sca-components.css —
     not redeclared here. */
}

/* ============================================================================
 * FOLD 9 — THE 7 MODULES
 * `.sca-module` adds layout, the numbered icon slot and the conic ring only.
 * The liquid-fill mechanism itself — `::before`, the -6px lift, the timing —
 * is `.sca-card`, reused as-is (batch 2), never redeclared here.
 * ==========================================================================*/

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

.sca-modules__sub {
  margin: 16px 0 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--text-muted);
}

.sca-modules__grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.sca-module {
  padding: 28px;
}
.sca-module--wide { grid-column: 1 / -1; }

.sca-module__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.sca-module__number {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  color: var(--accent);
  transition: color 0.55s var(--ease);
}

.sca-module__price {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--accent);
  text-align: right;
  transition: color 0.55s var(--ease);
}

.sca-module__title {
  margin: 16px 0 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-primary);
  transition: color 0.55s var(--ease);
}

.sca-module__body {
  margin: 12px 0 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  transition: color 0.55s var(--ease);
}

.sca-module:hover .sca-module__number,
.sca-module:hover .sca-module__price,
.sca-module:hover .sca-module__title,
.sca-module:hover .sca-module__body { color: var(--on-accent); }

/* Rotating conic border on the hovered card. 250% 250% background-size and
   mask-composite:exclude are structural — without @property the angle does
   not animate and the ring degrades cleanly to static. */
.sca-module { position: relative; }
.sca-module::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 2px;
  background: conic-gradient(from var(--mb-angle, 0deg),
              transparent 0deg, var(--accent) 40deg, transparent 120deg, transparent 360deg);
  background-size: 250% 250%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  filter: drop-shadow(0 0 4px rgba(0,252,168,0.38)) drop-shadow(0 0 12px rgba(0,252,168,0.10));
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.sca-module:hover::after { opacity: 1; animation: sca-mb 4s linear infinite; }
@property --mb-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes sca-mb { to { --mb-angle: 360deg; } }

.sca-modules__total {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  text-align: right;
  color: var(--text-primary);
  margin-top: 32px;
}

@media (max-width: 768px) {
  .sca-modules__grid { grid-template-columns: 1fr; }
  .sca-module--wide { grid-column: auto; }
  .sca-module { padding: 22px; }
  .sca-modules__total { text-align: left; font-size: 26px; }
}

/* ============================================================================
 * FOLD 10 ⭐ — BONUSES + VALUE STACK
 * ==========================================================================*/

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

.sca-bonuses {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.sca-bonuses__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  padding-block: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sca-bonuses__title { margin: 0; font-family: var(--font-body); font-weight: 600; font-size: 17px; color: var(--text-primary); }
.sca-bonuses__price { margin: 0; font-family: var(--font-body); font-weight: 500; font-size: 16px; color: var(--accent); text-align: right; }

.sca-bonuses__body {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

.sca-bonuses__total {
  margin-top: 24px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-muted);
  text-align: right;
}

.sca-price {
  border-top: 1px solid rgba(0,252,168,0.38);
  padding-top: 48px;
  margin-top: 48px;
  text-align: center;
}

.sca-price__was { margin: 0; font-family: var(--font-body); font-weight: 400; font-size: 18px; color: var(--text-muted); }

.sca-price__now {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  background-image: linear-gradient(180deg, #00fca8 0%, #00A86E 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.15em;
}

.sca-price__terms { margin: 8px 0 0; font-family: var(--font-body); font-weight: 400; font-size: 15px; color: var(--text-muted); }

.sca-cohortnote {
  margin: 40px auto 0;
  max-width: 68ch;
  padding: 24px 28px;
  border: 1px solid rgba(0,252,168,0.38);
  border-radius: var(--radius-lg);
}
.sca-cohortnote p {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .sca-bonuses__row { grid-template-columns: 1fr; }
  .sca-bonuses__price { text-align: left; }
  .sca-price { padding-top: 32px; margin-top: 32px; }
}
