/* ============================================================
   FUNCIONES — "Funciones destacadas" feature dossier.
   Anatomy: a bordered marquee feature (Bet Builder, photo+body)
   then a two-column pair (Cashout | Mi carrera) split by a rule.
   No numerals here — distinct from DESCARGA/VIVO.
   ============================================================ */

.funciones {
  border-top: 1px solid var(--rule);
  padding-block: var(--rhythm);
}

.funciones__head { max-width: 42ch; }
.funciones__head h2 { margin-top: 1rem; }
.funciones__head .standfirst { margin-top: 1rem; }

/* marquee feature — bordered framed panel */
.feature {
  margin-top: clamp(34px, 4vw, 60px);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: stretch;
  border: 1px solid var(--rule-strong);
  background: var(--night-2);
}
.feature__plate { display: flex; }
.feature__plate img {
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 34vw, 460px);
  object-fit: cover;
  object-position: 50% 26%;
}
.feature__body {
  display: flex;
  flex-direction: column;
  padding: clamp(1.6rem, 3vw, 2.8rem);
}
.feature__body::before {
  /* ember kit-bar marking the star feature */
  content: "Función destacada";
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ember);
  padding-bottom: 0.9rem;
}
.feature__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3rem);
  text-transform: uppercase;
  line-height: 0.95;
  margin: 0;
}
.feature__body p {
  margin: 1.1rem 0 0;
  color: var(--ink-soft);
  max-width: 52ch;
}
.feature__body .ticket { margin-top: 1.8rem; align-self: flex-start; }

/* pair — Cashout | Mi carrera, editorial columns split by a rule */
.funciones__pair {
  margin-top: clamp(28px, 3.5vw, 52px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
}
.tool {
  display: flex;
  flex-direction: column;
  padding-top: 1.3rem;
  border-top: 2px solid var(--ember-line);
}
.tool + .tool {
  /* vertical hairline between the two columns (desktop) */
  position: relative;
}
.tool + .tool::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(-1 * clamp(28px, 4vw, 64px) / 2);
  border-left: 1px solid var(--rule);
}
.tool__name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  text-transform: uppercase;
  margin: 0;
}
.tool p { margin: 0.9rem 0 0; color: var(--ink-soft); }
.tool .ticket { margin-top: 1.5rem; align-self: flex-start; }

/* ===== mobile ===== */
@media (max-width: 880px) {
  .funciones__head { max-width: none; }
  .feature { grid-template-columns: 1fr; }
  .feature__plate { order: -1; }
  .feature__plate img { min-height: clamp(260px, 60vw, 400px); }
  .funciones__pair { grid-template-columns: 1fr; gap: clamp(26px, 8vw, 40px); }
  .tool + .tool::before { display: none; }
}
@media (max-width: 520px) {
  .feature__body .ticket,
  .tool .ticket { width: 100%; justify-content: center; }
}
