/* ============================================================================
   Licita Radar — Narrative sections: problema, solución, ventaja IA, ruido
   ========================================================================== */

/* ---- Icons --------------------------------------------------------------- */

.icon { width: 24px; height: 24px; flex: none; stroke-width: 1.7; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 28px; height: 28px; }

/* ---- Split layout: sticky heading + content ------------------------------ */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.split__head { position: sticky; top: calc(var(--header-h) + 2rem); }
.split__head > * + * { margin-top: var(--sp-4); }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-7); }
  .split__head { position: static; }
}

/* ---- Problem list -------------------------------------------------------- */

.problems { display: grid; }

.problem {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4) var(--sp-5);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--border-subtle);
}
.problem:last-child { border-bottom: 1px solid var(--border-subtle); }

.problem__icon {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  color: var(--warning);
  background: rgb(232 160 32 / 0.10);
  border: 1px solid rgb(232 160 32 / 0.22);
  border-radius: var(--r-md);
}

.problem__body h3 { font-size: var(--step-1); margin-bottom: 0.35rem; }
.problem__body p { color: var(--text-2); font-size: var(--step--1); }

/* ---- Feature grid -------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--sp-4);
}

.features--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

.feature__icon {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  margin-bottom: var(--sp-4);
  color: var(--brand-green-bright);
  background: var(--green-a08);
  border: 1px solid var(--green-a16);
  border-radius: var(--r-md);
  transition: background-color var(--dur) var(--ease-out);
}
.card:hover .feature__icon { background: var(--green-a16); }

.feature h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.feature p { color: var(--text-2); font-size: var(--step--1); }

/* ---- Numbered flow ------------------------------------------------------- */

.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  counter-reset: step;
}

.flow__step { position: relative; padding-top: var(--sp-6); }

/* Connector rail: drawn on the step, not between them, so it survives wrapping */
.flow__step::before {
  content: "";
  position: absolute;
  inset-block-start: 22px;
  inset-inline: 0 calc(-1 * clamp(1.25rem, 3vw, 2.5rem));
  height: 1px;
  background: linear-gradient(90deg, var(--green-a32), var(--border-subtle));
}
.flow__step:last-child::before { display: none; }

.flow__num {
  position: relative;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  margin-bottom: var(--sp-4);
  font-size: 1.05rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #042118;
  background: var(--brand-green);
  border: 4px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--green-a32), var(--shadow-brand);
}
.section--alt .flow__num { border-color: var(--surface-alt); }

.flow__step h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.flow__step p { color: var(--text-2); font-size: var(--step--1); }

@media (max-width: 820px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow__step { padding-top: 0; padding-bottom: var(--sp-6); padding-inline-start: 68px; }
  .flow__step::before {
    inset-block: 44px 0;
    inset-inline: 21px auto;
    width: 1px; height: auto;
    background: linear-gradient(180deg, var(--green-a32), var(--border-subtle));
  }
  .flow__num { position: absolute; inset-block-start: 0; inset-inline-start: 0; margin: 0; }
  .flow__step:last-child { padding-bottom: 0; }
}

/* ---- Checklist ----------------------------------------------------------- */

.checklist { display: grid; gap: var(--sp-4); list-style: none; padding: 0; }

/* Wide variant, for sections where the checklist sits above the visuals
   instead of beside them. */
.checklist--wide {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--sp-4) var(--sp-7);
  margin-bottom: var(--sp-8);
}

.checklist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--step-0);
  line-height: 1.5;
}
.checklist .icon { color: var(--brand-green-bright); margin-top: 0.15em; }

/* ---- Product example card (AI section) ----------------------------------- */

.example {
  padding: 0;
  overflow: hidden;
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
}

.example__bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0.7rem var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--white-a04);
}
.example__bar span {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.example__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 3px var(--green-a16);
  margin-inline-start: auto;
}

.example__body { padding: var(--sp-5); display: grid; gap: var(--sp-4); }

.example__title {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
}
.example__title h3 { font-size: var(--step-1); }

.pill {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.22rem 0.7rem;
  font-size: 0.75rem; font-weight: 650;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.pill--ok { color: #b2f2d4; background: #003822; border: 1px solid var(--green-a32); }
.pill--score {
  color: #042118; background: var(--brand-green);
  font-variant-numeric: tabular-nums;
}

.example__why {
  padding: var(--sp-4);
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg);
}
.example__why h4 {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.example__why blockquote {
  font-size: var(--step--1);
  font-style: italic;
  line-height: 1.5;
  color: var(--text-2);
}

.example__meta {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: var(--step--1);
  color: var(--text-muted);
}
.example__meta .icon { color: var(--text-muted); }

/* ---- Highlight callout --------------------------------------------------- */

.callout {
  position: relative;
  margin-top: var(--sp-6);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--r-lg);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-brand) border-box;
  border: 1px solid transparent;
  font-size: var(--step-1);
  font-weight: 560;
  line-height: 1.45;
  text-wrap: pretty;
}
.callout strong { color: var(--brand-green-bright); font-weight: 700; }

/* ---- Channels ------------------------------------------------------------ */

.channels { display: grid; gap: var(--sp-4); }

.channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-5);
}

.channel__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  color: var(--brand-green-bright);
  background: var(--green-a08);
  border: 1px solid var(--green-a16);
  border-radius: var(--r-md);
}

.channel h3 { font-size: var(--step-1); margin-bottom: 0.2rem; }
.channel p { color: var(--text-2); font-size: var(--step--1); }

/* ---- WhatsApp conversation mock ------------------------------------------ */

.chat {
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-alt), var(--surface));
  box-shadow: var(--shadow-lg);
}

.chat__head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  margin-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
}
.chat__avatar {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  color: #042118;
  background: var(--brand-green);
  border-radius: 50%;
}
.chat__who strong { display: block; font-size: var(--step-0); font-weight: 620; }
.chat__who span { font-size: 0.72rem; color: var(--brand-green-bright); }

.chat__bubble {
  position: relative;
  max-width: 92%;
  padding: var(--sp-4) var(--sp-4) 1.4rem;
  border-radius: var(--r-lg) var(--r-lg) var(--r-lg) 4px;
  background: var(--surface-high);
  border: 1px solid var(--border);
  font-size: var(--step--1);
  line-height: 1.55;
  white-space: pre-line;   /* the message is written as real line breaks */
}
.chat__bubble b { color: var(--text); font-weight: 650; }
.chat__bubble .lnk { color: var(--brand-green-bright); text-decoration: underline; }

.chat__time {
  position: absolute;
  inset-block-end: 0.45rem;
  inset-inline-end: 0.75rem;
  display: flex; align-items: center; gap: 0.3rem;
  font-size: 0.66rem;
  /* --text-muted only reaches 4.2:1 on the lighter --surface-high bubble */
  color: var(--text-2);
  white-space: normal;   /* don't inherit the bubble's pre-line */
}
.chat__time .icon { width: 14px; height: 14px; color: var(--brand-green-bright); }

/* ---- Browser frame ------------------------------------------------------- */

.browser {
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.browser__bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0.65rem var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--white-a04);
}
.browser__dots { display: flex; gap: 6px; }
.browser__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border); }
.browser__url {
  flex: 1;
  padding: 0.2rem 0.7rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.browser__body { padding: var(--sp-4); overflow-x: auto; }

/* ---- Data table ---------------------------------------------------------- */

.data-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.data-table th {
  padding: 0 0.6rem 0.6rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background-color var(--dur-fast) var(--ease-out); }
.data-table tbody tr:hover { background: var(--white-a04); }

.data-table .nog { font-variant-numeric: tabular-nums; color: var(--text-2); }
.data-table .fecha { font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
/* Mirrors the app: deadlines inside 3 days render bold red */
.data-table .fecha--soon { color: #ff8f8f; font-weight: 700; }

.score {
  display: inline-block;
  min-width: 3.1em;
  padding: 0.12rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  text-align: center;
  border-radius: var(--r-sm);
}
.score--ok   { color: #042118; background: var(--brand-green); }
.score--warn { color: #2a1c00; background: var(--warning); }
.score--bad  { color: #f0b4b4; background: rgb(217 82 82 / 0.22); border: 1px solid rgb(240 112 112 / 0.35); }

/* ---- Requisitos / documentos panel --------------------------------------- */

/* Two product screens side by side: one per tab of the real detail dialog */
.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--sp-5);
  align-items: start;
}

.panel { padding: 0; overflow: hidden; }

.panel__tabs {
  display: flex;
  gap: var(--sp-2);
  padding: 0 var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--white-a04);
}
.panel__tabs span {
  padding: 0.7rem 0.5rem;
  font-size: var(--step--1);
  font-weight: 560;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
}
.panel__tabs .on { color: var(--brand-green-bright); border-bottom-color: var(--brand-green); }

.panel__body { padding: var(--sp-5); display: grid; gap: var(--sp-4); }

.panel__caption {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.fauxsearch {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 0.55rem 0.85rem;
  font-size: var(--step--1);
  color: var(--text-2);
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
}
.fauxsearch .icon { color: var(--text-muted); }

.reqs { display: grid; gap: var(--sp-3); list-style: none; padding: 0; }

/* The bullet is a ::before, not a grid item, so a requisito can contain any
   inline markup (<mark>, <b>, links) without a two-column grid tearing the
   line apart. */
.reqs li {
  position: relative;
  padding-inline-start: calc(6px + var(--sp-3));
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-2);
}
.reqs li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.6em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-green);
  opacity: 0.7;
}
.reqs mark {
  padding: 0 0.15em;
  color: var(--text);
  background: var(--green-a32);
  border-radius: 3px;
}

.docs { display: grid; gap: var(--sp-2); list-style: none; padding: 0; }
.docs li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 0.6rem 0.75rem;
  font-size: var(--step--1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--bg);
}
.docs .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs .icon { color: var(--text-muted); }
.docs .dl {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  color: var(--brand-green-bright);
  background: var(--green-a08);
  border: 1px solid var(--green-a16);
  border-radius: var(--r-sm);
}

/* ---- Benefits: 5 cards, balanced 3 + 2 ----------------------------------- */

.benefits {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--sp-4);
}
/* Three per row, then the last two split the final row evenly instead of
   leaving a ragged hole. */
.benefits > * { grid-column: span 2; }
.benefits > :nth-child(4),
.benefits > :nth-child(5) { grid-column: span 3; }

@media (max-width: 900px) {
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .benefits > *,
  .benefits > :nth-child(4),
  .benefits > :nth-child(5) { grid-column: span 1; }
  .benefits > :nth-child(5) { grid-column: span 2; }
}
@media (max-width: 560px) {
  .benefits { grid-template-columns: 1fr; }
  .benefits > :nth-child(5) { grid-column: span 1; }
}

/* ---- Market stats -------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--sp-4);
}

.stat { position: relative; overflow: hidden; }

/* Faint brand wash in the corner so a stat card reads as a "figure", not a card */
.stat::after {
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-end: -30%;
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-a08), transparent 70%);
  pointer-events: none;
}

.stat__value {
  display: block;
  font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-green-bright);
  margin-bottom: var(--sp-3);
}

.stat p { font-size: var(--step--1); color: var(--text-2); line-height: 1.45; }

.source {
  margin-top: var(--sp-5);
  font-size: var(--step--1);
  color: var(--text-muted);
  max-width: 78ch;
  line-height: 1.5;
}

/* ---- Closing CTA --------------------------------------------------------- */

.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 8vw, 7rem);
  padding-inline: var(--gutter);
  text-align: center;
  background: var(--surface-alt);
}

.cta::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 70% at 50% 0%, rgb(46 204 138 / 0.20), transparent 70%),
    radial-gradient(45% 60% at 85% 100%, rgb(26 100 100 / 0.35), transparent 72%);
  pointer-events: none;
}

.cta__inner { max-width: 720px; margin-inline: auto; display: grid; gap: var(--sp-5); justify-items: center; }

.cta h2 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); max-width: 18ch; }
.cta p { font-size: var(--step-1); color: var(--text-2); max-width: 46ch; }
.cta .btn { margin-top: var(--sp-2); }

.cta__domain {
  font-size: var(--step--1);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ---- Pricing ------------------------------------------------------------- */

.pricing { display: grid; place-items: center; }

.plan {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--r-xl);
  /* Gradient border on a slightly lifted surface — this is the page's hero
     commercial object, so it earns a touch more emphasis than a plain .card. */
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad-brand) border-box;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.plan::before {
  content: "";
  position: absolute;
  inset-block-start: -45%;
  inset-inline-end: -25%;
  width: 60%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--green-a16), transparent 70%);
  pointer-events: none;
}

.plan__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.plan__name { font-size: var(--step-1); font-weight: 650; }

.plan__tag {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.7rem;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #042118; background: var(--brand-green);
  border-radius: var(--r-pill);
}

.plan__price {
  display: flex; align-items: baseline; gap: 0.4rem;
  margin-bottom: var(--sp-2);
}
.plan__amount {
  font-size: clamp(2.6rem, 1.7rem + 3vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.plan__amount .cur { font-size: 0.55em; font-weight: 700; color: var(--text-2); margin-inline-end: 0.15em; }
.plan__period { font-size: var(--step-0); color: var(--text-2); font-weight: 500; }

.plan__sub { color: var(--text-2); font-size: var(--step--1); margin-bottom: var(--sp-6); }

.plan__features {
  display: grid;
  gap: var(--sp-3);
  list-style: none;
  padding: var(--sp-6) 0;
  margin-block: 0 var(--sp-6);
  border-block: 1px solid var(--border-subtle);
}
.plan__features li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--step-0);
  line-height: 1.45;
}
.plan__features .icon { color: var(--brand-green-bright); margin-top: 0.1em; }

.plan .btn { width: 100%; }

.plan__note {
  margin-top: var(--sp-4);
  text-align: center;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* ---- Noise vs signal ----------------------------------------------------- */

.signal-strip {
  display: flex;
  align-items: flex-end;
  gap: clamp(3px, 0.8vw, 7px);
  height: 64px;
  margin-bottom: var(--sp-7);
}

.signal-strip i {
  flex: 1;
  height: 28%;
  border-radius: 2px;
  background: var(--border-subtle);
}
/* The few that matter: taller, brand-coloured, glowing */
.signal-strip i.lit {
  height: 100%;
  background: linear-gradient(180deg, var(--brand-green-bright), var(--brand-green-dark));
  box-shadow: 0 0 14px var(--green-a32);
}

@media (max-width: 600px) { .signal-strip { height: 44px; } }

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--sp-5);
}

.compare__col h3 {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--step-1);
  margin-bottom: var(--sp-5);
}

.compare__col ul { display: grid; gap: var(--sp-4); list-style: none; padding: 0; }
.compare__col li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-2);
}
.compare__col li .icon { margin-top: 0.1em; }

/* Losing side: deliberately flat and desaturated */
.compare__col--bad { opacity: 0.72; }
.compare__col--bad h3 { color: var(--text-2); }
.compare__col--bad .icon { color: #f07070; }

/* Winning side: lit edge + brand glow */
.compare__col--good {
  border-color: var(--green-a32);
  background: linear-gradient(var(--surface), var(--surface)) padding-box;
  box-shadow: 0 0 40px -18px rgb(46 204 138 / 0.55);
}
.compare__col--good .icon { color: var(--brand-green-bright); }
