/* ===========================================================================
   /como-funciona  +  /en/how-it-works  — page-scoped layer.

   Extends the marketing system defined in main.css. The vibe: an editorial
   long-form walkthrough. Oversized numerals, generous gutters, a single
   accent colour (heritage verde), and real device screens paired tightly
   with each step so the reader never has to imagine what's being described.
   =========================================================================== */

/* ---------- Hero ---------- */

.how-hero {
  padding: 128px 0 72px;
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(0, 166, 81, 0.10) 0%, transparent 60%),
    var(--hueso);
}
.how-hero-inner {
  max-width: 860px;
}
.how-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--tinta-500);
  margin-bottom: 24px;
  transition: color var(--dur-fast) var(--ease-standard);
}
.how-crumb:hover { color: var(--verde-700); }
.how-hero h1 { margin-top: 12px; color: var(--tinta-900); max-width: 14ch; }
.how-hero .oro-dot { color: var(--oro); }
.how-lede {
  margin-top: 28px;
  max-width: 620px;
  color: var(--tinta-500);
}

/* Table-of-contents pill row. Each pill is a deep-link into one step;
   the oversized numeral mirrors the step treatment further down so the
   page reads as one continuous spine. */
.how-toc {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.how-toc a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--tinta-300);
  background: var(--blanco);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--tinta-700);
  transition: transform var(--dur-fast) var(--ease-emphasized),
              border-color var(--dur-fast) var(--ease-standard);
}
.how-toc a:hover {
  transform: translateY(-1px);
  border-color: var(--verde-500);
  color: var(--verde-900);
}
.how-toc span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--verde-900);
  color: var(--hueso);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ---------- Step band ---------- */

.how-step {
  padding: 96px 0;
  background: var(--hueso);
  scroll-margin-top: 96px;
}
.how-step--tinted { background: var(--crema); }
.how-step-inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 40px;
  align-items: center;
}
.how-step-copy { grid-column: 1 / span 7; }
.how-step-art  { grid-column: 8 / span 5; display: flex; justify-content: center; }
.how-step--reverse .how-step-copy { grid-column: 6 / span 7; order: 2; }
.how-step--reverse .how-step-art  { grid-column: 1 / span 5; order: 1; }

.how-step .eyebrow { display: block; margin: 8px 0 14px; }
.how-step h2       { color: var(--tinta-900); max-width: 18ch; }
.how-step p        { margin-top: 20px; color: var(--tinta-500); max-width: 52ch; }

.how-step-num {
  font-family: 'Inter', sans-serif;
  font-size: clamp(80px, 9vw, 132px);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--verde-300);
  margin-bottom: -4px;
}

/* Feature bullet list — verde checkmark sits on the baseline of the
   first line of copy, so long wrapping lines visually align. */
.how-facts {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.how-facts li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: var(--fs-body);
  color: var(--tinta-700);
  line-height: 1.5;
}
.how-facts svg {
  flex-shrink: 0;
  color: var(--verde-500);
  margin-top: 3px;
}

/* Sub-flow — lettered bullets for sub-options inside a single step
   (e.g. three ways to add balance). */
.how-subflow {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.how-subflow-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--blanco);
  border: 1px solid rgba(11, 11, 11, 0.06);
}
.how-step--tinted .how-subflow-row { background: var(--hueso); }
.how-subflow-bullet {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--verde-900);
  color: var(--hueso);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.how-subflow-row strong {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--tinta-900);
}
.how-subflow-row p {
  margin-top: 4px;
  font-size: var(--fs-caption);
  color: var(--tinta-500);
  line-height: 1.55;
  max-width: 52ch;
}

/* Device frame — the SVG is the screen; the wrap is the phone chrome. */
.how-device-wrap {
  position: relative;
  width: 280px;
  padding: 10px;
  border-radius: 44px;
  background: linear-gradient(180deg, #1a1a1c 0%, #0b0b0b 100%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.4),
    var(--shadow-modal);
}
.how-device-wrap::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 22px;
  background: #1a1a1c;
  border-radius: 11px;
  z-index: 2;
}
.how-device {
  width: 100%;
  aspect-ratio: 9 / 18;
  border-radius: 34px;
  overflow: hidden;
  display: block;
}

/* ---------- Gallery ---------- */

.how-gallery {
  padding: 120px 0;
  background: var(--tinta-900);
  color: var(--hueso);
}
.how-gallery .section-head h2,
.how-gallery .section-head h2.display-m {
  color: var(--hueso);
}
.how-gallery .section-head .eyebrow { color: var(--verde-300); }
.how-gallery .section-head .kicker { color: rgba(250, 247, 242, 0.65); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin: 0;
}
.gallery-device {
  width: 240px;
  aspect-ratio: 9 / 18;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.gallery-card figcaption {
  text-align: center;
  max-width: 28ch;
}
.gallery-card figcaption strong {
  display: block;
  font-size: var(--fs-headline);
  font-weight: 700;
  color: var(--hueso);
  margin-bottom: 6px;
}
.gallery-card figcaption p {
  font-size: var(--fs-caption);
  color: rgba(250, 247, 242, 0.65);
  line-height: 1.55;
}

/* ---------- FAQ lite ---------- */

.how-faqlite {
  padding: 120px 0;
  background: var(--hueso);
}
.how-faqlite .container { max-width: 720px; }
.how-faqlite .section-head h2 { color: var(--tinta-900); }
.how-faqlite .faq-list { margin-top: 40px; }

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

@media (max-width: 1023px) {
  .how-hero { padding: 112px 0 56px; }
  /* Collapse the 12-track grid to a single column on tablet / mobile.
     `grid-column: 1 / -1` alone kept the 11 phantom column gaps
     (11 × 40px = 440px) as a hard minimum grid width, which pushed
     `.how-step-inner` past any phone viewport and dragged horizontal
     overflow into the body. One track, one dimension of gap. */
  .how-step-inner { grid-template-columns: 1fr; gap: 32px; }
  .how-step-copy,
  .how-step-art,
  .how-step--reverse .how-step-copy,
  .how-step--reverse .how-step-art {
    grid-column: 1 / -1;
    order: initial;
  }
  .how-step-art { margin-top: 16px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .how-hero { padding: 96px 0 40px; }
  .how-hero h1 { max-width: none; }
  .how-step { padding: 64px 0; }
  .how-gallery,
  .how-faqlite { padding: 72px 0; }
  .how-toc { gap: 8px; }
  .how-toc a { padding: 8px 14px 8px 8px; }
  .how-toc span { width: 24px; height: 24px; font-size: 10px; }
  .how-step-num { font-size: 72px; }
  .how-device-wrap { width: 240px; }
}
