/* Countalytix landing: the póliza world. */

:root {
  --paper: #ffffff;
  --paper-2: #f4f5f9;
  --paper-3: #e7eaf3;
  --ink: #1d2240;
  --ink-soft: #4b5274;
  --blue: #3e56a3;
  --blue-deep: #2f4486;
  --blue-pale: #dde3f3;
  --blue-mid: #9aa8d4;
  --gold: #bca546;
  --gold-deep: #a8923a;
  --gold-pale: #efe8cb;
  --review-ochre: #6b5c1c;
  --on-blue: #ffffff;
  --on-blue-soft: #dfe4f5;

  --display: "Monda", "Montserrat", sans-serif;
  --text: "Montserrat", system-ui, sans-serif;

  --m: clamp(16px, 2.8vw, 40px);
  --gap: clamp(12px, 1.6vw, 24px);
  --section: clamp(88px, 10vw, 160px);

  --s-display: clamp(44px, 5.4vw, 80px);
  --s-h2: clamp(32px, 3.3vw, 52px);
  --s-statement: clamp(22px, 1.9vw, 30px);
  --s-body: clamp(17px, 1.25vw, 19px);
  --s-small: 14px;

  --tab-h: 8px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  font-family: var(--text);
  font-size: var(--s-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul { list-style: none; }
::selection { background: var(--gold-pale); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
html { scrollbar-color: var(--blue-mid) var(--paper-2); caret-color: var(--blue); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--m); top: -60px; z-index: 10;
  background: var(--gold); color: var(--ink); padding: 12px 18px; font-weight: 600;
}
.skip:focus { top: 12px; }

.display {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-display);
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--s-h2);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead { font-size: var(--s-body); max-width: 40ch; }
.sample-note { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.sample-note--light { color: var(--on-blue-soft); margin-top: 12px; }

/* The motif: a signature field with its label tab on the top-left edge. */
.field-btn {
  --tab-w: 46%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: calc(var(--tab-h) + 10px) 22px 12px;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  clip-path: polygon(0 0, calc(var(--tab-w) - var(--tab-h)) 0, var(--tab-w) var(--tab-h), 100% var(--tab-h), 100% 100%, 0 100%);
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.field-btn:active { transform: scale(0.97); }
.field-btn--lg { min-height: 64px; padding-inline: 30px; font-size: 17px; }
.field-btn--block { display: flex; width: 100%; }
.field-btn--gold { background: var(--gold); color: var(--ink); }
.field-btn--ink { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .field-btn--gold:hover { background: var(--gold-deep); }
  .field-btn--ink:hover { background: var(--blue-deep); }
}

.text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-decoration-color var(--t-hover) ease;
}
.text-link--light { color: var(--on-blue); text-decoration-color: rgba(255, 255, 255, 0.45); }
@media (hover: hover) and (pointer: fine) {
  .text-link--light:hover { text-decoration-color: var(--gold); }
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px var(--m);
  background: var(--blue);
  color: var(--on-blue);
  position: relative;
  z-index: 3;
}
.nav__brand img { height: 34px; width: auto; }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-size: 16px; font-weight: 500; }
.nav__links a, .nav__sheet a { text-decoration: none; color: var(--on-blue-soft); transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--on-blue); }
}
.nav__cta { font-size: 15px; min-height: 48px; white-space: nowrap; }
.nav__toggle { display: none; font-weight: 600; font-size: 16px; padding: 12px 4px; color: var(--on-blue); }
.nav__sheet {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; gap: 4px; padding: 8px var(--m) 24px;
  background: var(--blue-deep);
}
.nav__sheet[hidden] { display: none; }
.nav__sheet a { padding: 12px 0; font-size: 18px; font-weight: 500; color: var(--on-blue); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  padding: 0 var(--m);
  background: var(--blue);
  color: var(--on-blue);
  overflow: clip;
  min-height: min(calc(100svh - 88px), 900px);
}
.hero__copy {
  grid-column: 1 / 7;
  padding: 48px 0 72px;
  align-self: center;
}
.hero__copy .display { max-width: none; }
.display .line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.display .line > span { display: inline-block; }
.hero__sub { margin-top: 32px; max-width: 34em; color: var(--on-blue); font-size: var(--s-body); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }

.hero__stage {
  --stage-tab: clamp(140px, 16vw, 240px);
  grid-column: 7 / -1;
  margin-right: calc(-1 * var(--m));
  align-self: end;
  margin-top: clamp(16px, 2.4vw, 40px);
  padding: calc(28px + clamp(28px, 3.6vw, 56px)) var(--m) 0 clamp(24px, 3.6vw, 56px);
  background: var(--paper);
  color: var(--ink);
  clip-path: polygon(0 0, calc(var(--stage-tab) - 28px) 0, var(--stage-tab) 28px, 100% 28px, 100% 100%, 0 100%);
}

/* The póliza (interface fragment) */
.poliza {
  position: relative;
  max-width: 640px;
  font-size: 14px;
  line-height: 1.4;
}
.poliza__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.poliza__title { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--blue); line-height: 1.1; }
.poliza__folio { margin-top: 4px; color: var(--ink-soft); }
.poliza__status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: var(--gold-pale); color: var(--ink);
  font-weight: 600; white-space: nowrap;
  transition: background-color 240ms ease;
}
.poliza__status svg { width: 16px; height: 16px; flex: none; }
.poliza[data-state="done"] .poliza__status { background: var(--blue-pale); }

.poliza__meta { display: grid; grid-template-columns: 1fr 1fr 2.2fr; gap: 6px; margin-top: 20px; }
.poliza__meta > div { background: var(--paper-2); padding: 8px 12px; }
.poliza__meta dt { font-size: 13px; font-weight: 600; color: var(--blue); }
.poliza__meta dd { font-weight: 500; }

.poliza__table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.poliza__table th, .poliza__table td { padding: 10px 12px; text-align: left; vertical-align: top; }
.poliza__table thead th { background: var(--blue); color: var(--on-blue); font-weight: 600; font-size: 13px; }
.poliza__table tbody tr:nth-child(even) { background: var(--paper-2); }
.poliza__table .num { text-align: right; width: 104px; white-space: nowrap; font-weight: 500; }
.poliza__table tfoot th, .poliza__table tfoot td { background: var(--paper-3); font-weight: 700; }
.acct { display: block; font-weight: 600; }
.src { display: block; color: var(--ink-soft); font-size: 13px; }

.poliza__table tbody tr.line--flag { background: var(--gold-pale); transition: background-color 240ms ease; }
.line__review { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.line__ask, .line__ok { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.line__ask svg, .line__ok svg { width: 16px; height: 16px; }
.line__ask { color: var(--review-ochre); }
.line__ok { color: var(--blue); display: none; }
.mini-btn {
  padding: 6px 12px; background: var(--ink); color: var(--paper);
  font-weight: 600; font-size: 13px;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.mini-btn:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .mini-btn:hover { background: var(--blue-deep); } }
.poliza:not([data-state="review"]) .poliza__table tbody tr.line--flag { background: transparent; }
.poliza:not([data-state="review"]) .line__ask,
.poliza:not([data-state="review"]) .mini-btn { display: none; }
.poliza:not([data-state="review"]) .line__ok { display: inline-flex; }

.poliza__sigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.sig {
  --tab-w: 58%;
  display: flex; flex-direction: column; gap: 2px;
  min-height: 104px;
  padding: calc(var(--tab-h) + 10px) 14px 12px;
  background: var(--paper-2);
  clip-path: polygon(0 0, calc(var(--tab-w) - var(--tab-h)) 0, var(--tab-w) var(--tab-h), 100% var(--tab-h), 100% 100%, 0 100%);
  transition: background-color 240ms ease;
}
.sig--auth { background: var(--gold-pale); }
.sig__label { font-size: 13px; font-weight: 600; color: var(--blue); }
.sig__who { font-family: var(--display); font-weight: 700; font-size: 18px; margin-top: auto; }
.sig__when { font-size: 13px; color: var(--ink-soft); }
.sig__btn {
  margin-top: auto; padding: 10px 12px; text-align: left;
  background: var(--blue); color: var(--on-blue); font-weight: 600; font-size: 14px;
  transition: background-color var(--t-hover) ease, opacity var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.sig__btn--gold { background: var(--gold); color: var(--ink); }
.sig__btn:active:not(:disabled) { transform: scale(0.97); }
.sig__btn:disabled { background: var(--paper-3); color: var(--ink-soft); cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .sig__btn:not(:disabled):hover { background: var(--blue-deep); }
  .sig__btn--gold:not(:disabled):hover { background: var(--gold-deep); }
}
.sig__signed { display: none; }
.poliza[data-state="authorize"] .sig--review .sig__btn,
.poliza[data-state="done"] .sig--review .sig__btn,
.poliza[data-state="done"] .sig--auth .sig__btn { display: none; }
.poliza[data-state="authorize"] .sig--review .sig__signed,
.poliza[data-state="done"] .sig--review .sig__signed,
.poliza[data-state="done"] .sig--auth .sig__signed { display: block; }

.poliza__stamp {
  position: absolute; right: 8px; top: 96px;
  padding: 6px 16px;
  font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: 0.02em;
  color: var(--gold-deep);
  border: 4px solid var(--gold);
  transform: rotate(-8deg) scale(1.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms var(--ease-out);
}
.poliza[data-state="done"] .poliza__stamp {
  opacity: 1;
  transform: rotate(-8deg) scale(1);
  transition: opacity 120ms ease, transform 260ms var(--ease-out);
}
.poliza__reset {
  display: none; margin: 12px 0 16px;
  font-size: 13px; font-weight: 600; color: var(--blue);
  text-decoration: underline; text-underline-offset: 4px;
}
.poliza[data-state="done"] .poliza__reset { display: inline-block; }

/* Cómo trabajan: one CFDI, four fields */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); }
.flow__field {
  position: relative;
  min-height: min(84svh, 760px);
  padding: 40px clamp(20px, 2vw, 28px) 32px;
  display: flex; flex-direction: column;
}
.flow__field--1 { background: var(--paper-2); }
.flow__field--2 { background: var(--blue-pale); }
.flow__field--3 { background: var(--blue); color: var(--on-blue); }
.flow__field--4 { background: var(--ink); color: var(--on-blue); }
.flow__title {
  position: absolute; left: clamp(20px, 2vw, 28px); top: 40px; right: 20px;
  font-family: var(--display); font-weight: 700;
  font-size: var(--s-statement); line-height: 1.1; letter-spacing: -0.01em;
}
.flow__clause {
  margin-top: auto;
  font-weight: 600;
  font-size: var(--s-statement);
  line-height: 1.2;
  max-width: 14em;
}
.cfdi {
  width: 260px; max-width: 100%;
  margin: auto auto 48px;
  padding: 16px 18px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  transition: transform 150ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .flow__field:hover .cfdi { transform: translateY(-6px); }
}
.cfdi__kind { font-size: 13px; font-weight: 600; color: var(--blue); }
.cfdi__who { font-weight: 700; font-size: 16px; margin-top: 6px; }
.cfdi__rfc { color: var(--ink-soft); font-size: 13px; }
.cfdi__total { font-family: var(--display); font-weight: 700; font-size: 24px; margin-top: 8px; }
.cfdi__acct { margin-top: 8px; padding: 6px 10px; background: var(--blue-pale); font-weight: 600; font-size: 13px; }
.cfdi__lines { margin-top: 8px; display: grid; gap: 2px; }
.cfdi__lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.cfdi__lines dt { color: var(--ink-soft); }
.cfdi__lines dd { font-weight: 600; }
.cfdi__lines .sum { background: var(--paper-2); padding: 6px 8px; margin-top: 4px; }
.cfdi__lines .sum dt { color: var(--ink); font-weight: 600; }
.cfdi__tag { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--blue); }
.mk::before { content: ""; width: 16px; height: 16px; flex: none; background: currentColor; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.mk--check { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.mk--pending { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='5.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 2.5a5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E"); }
.mk--file { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1.5h5l3.5 3.5v9.5h-8.5z M9 1.5v3.5h3.5' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* Para quién */
.audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(88svh, 820px);
  margin-top: var(--section);
  padding: 0 var(--m);
  column-gap: clamp(32px, 5vw, 80px);
}
.audience__plate {
  aspect-ratio: 1;
  align-self: center;
  background: var(--blue);
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 64px);
  clip-path: polygon(0 0, calc(34% - 28px) 0, 34% 28px, 100% 28px, 100% 100%, 0 100%);
}
.plate {
  transition: opacity 200ms ease;
  width: 100%; max-width: 460px;
  background: var(--paper);
  padding: 20px;
  font-size: 14px;
  line-height: 1.4;
}
.plate__title { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--blue); }
.plate__list { margin-top: 12px; display: grid; gap: 4px; }
.plate__list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; background: var(--paper-2); }
.plate__name { font-weight: 600; }
.plate__name small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-soft); }
.plate__count { color: var(--ink-soft); text-align: right; font-size: 13px; }
.badge { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.badge--ok { color: var(--blue); }
.badge--rev { color: var(--review-ochre); }
.plate__kpis { margin-top: 12px; display: grid; gap: 4px; }
.plate__kpis > div { display: flex; justify-content: space-between; padding: 12px; background: var(--paper-2); }
.plate__kpis dd { font-family: var(--display); font-weight: 700; font-size: 18px; }
.plate__kpis .sum { background: var(--blue-pale); }
.plate__line { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-weight: 600; color: var(--blue); }
.plate__line svg { width: 16px; height: 16px; }
.plate__line--rev { color: var(--review-ochre); margin-top: 4px; }
.plate__note { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }

.audience__text { display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 28px 0; }
.tabs { display: flex; gap: 28px; }
.tabs button {
  font-size: 18px; font-weight: 600; color: var(--ink-soft); padding: 6px 0;
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 10px;
  text-decoration-color: transparent;
  transition: color var(--t-hover) ease, text-decoration-color var(--t-hover) ease;
}
.tabs button[aria-selected="true"] { color: var(--ink); text-decoration-color: var(--gold); }
@media (hover: hover) and (pointer: fine) { .tabs button:hover { color: var(--ink); } }
.audience__body .lead { margin-top: 28px; }
.audience__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cell {
  display: flex; align-items: center; justify-content: center;
  min-height: 72px; font-weight: 600; text-decoration: none;
  transition: background-color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.cell:active { transform: scale(0.98); }
.cell--ink { background: var(--ink); color: var(--paper); }
.cell--tone { background: var(--paper-3); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .cell--ink:hover { background: var(--blue-deep); }
  .cell--tone:hover { background: var(--blue-pale); }
}

/* Funciones */
.features {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  padding: 0 var(--m);
  margin-top: var(--section);
}
.features__intro { grid-column: 1 / 4; }
.features__intro .lead { margin-top: 24px; max-width: 30ch; }
.features__grid {
  grid-column: 4 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 10px;
}
.spec { min-width: 0; }
.spec--wide { grid-column: span 2; }
.spec__tile {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: clip;
}
.spec--wide .spec__tile { aspect-ratio: auto; height: 100%; max-height: none; }
.spec--wide { display: grid; grid-template-rows: 1fr auto auto; }
.spec__tile--pale { background: var(--blue-pale); }
.spec__tile--gold { background: var(--gold-pale); }
.spec__tile--tone { background: var(--paper-3); }
.spec__name { margin-top: 16px; font-size: 20px; font-weight: 600; line-height: 1.25; }
.spec__fact { margin-top: 4px; font-size: 16px; color: var(--ink); }

.frag {
  width: 100%; max-width: 230px;
  background: var(--paper);
  padding: 16px;
  font-size: 13px;
  line-height: 1.4;
}
.frag--wide { max-width: min(440px, 100%); }
.frag__title { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--blue); margin-bottom: 8px; }
.frag__row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.frag__row span { color: var(--ink-soft); }
.frag__done, .frag__file { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 600; }
.frag__done { color: var(--blue); }
.frag__done svg, .frag__file svg { width: 16px; height: 16px; flex: none; }
.frag__file span { min-width: 0; }
.frag { min-width: 0; }
.frag__file { padding: 8px; background: var(--paper-2); margin-top: 4px; font-weight: 500; font-size: 12px; overflow-wrap: break-word; }
.frag__chart { width: 100%; height: auto; margin: 4px 0 8px; }
.frag__table { width: 100%; border-collapse: collapse; }
.frag__table th { text-align: left; font-size: 13px; color: var(--paper); background: var(--blue); padding: 6px 8px; font-weight: 600; }
.frag__table td { padding: 8px; }
.frag__table tbody tr:nth-child(even) { background: var(--paper-2); }
.frag__table td svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: var(--blue); }
.frag__table tr.rev td:nth-child(2) { color: var(--review-ochre); font-weight: 600; }
.frag__table tr.rev svg { color: var(--review-ochre); }
.frag__table .num { text-align: right; white-space: nowrap; }

/* Precios */
.pricing {
  padding: clamp(72px, 8vw, 120px) var(--m);
  margin-top: var(--section);
  background: var(--paper-2);
}
.plans { position: relative; min-height: 420px; }
.plan__name {
  display: flex; align-items: center; gap: 0.3em;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 5.4vw, 84px); line-height: 1.25; letter-spacing: -0.02em;
  color: var(--ink-soft);
  transition: color var(--t-hover) ease;
}
.plan__name::before {
  content: ""; width: 0.36em; height: 0.36em; flex: none;
  background: var(--gold);
  clip-path: polygon(0 0, 50% 0, 64% 18%, 100% 18%, 100% 100%, 0 100%);
  opacity: 0; transition: opacity var(--t-hover) ease;
}
.plan__name[aria-expanded="true"] { color: var(--ink); }
.plan__name[aria-expanded="true"]::before { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .plan__name:hover { color: var(--ink); } }
.plan__stage {
  position: absolute; top: 0; left: 58%; right: 0;
}
.plan__price {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(64px, 8.4vw, 136px); line-height: 0.9; letter-spacing: -0.03em;
  display: flex; align-items: flex-start; flex-wrap: wrap;
}
.plan__price .cur { font-size: 0.5em; margin-top: 0.08em; margin-right: 0.04em; }
.plan__price--word { font-size: clamp(56px, 6.4vw, 104px); }
.plan__desc { margin: 28px 0 32px; max-width: 34ch; font-size: 18px; }
.plan__stage { transition: opacity 200ms ease; }
@starting-style { .plan__stage { opacity: 0; } }

/* Preguntas: index cards with tabs */
.faq { padding: 0 var(--m); margin-top: var(--section); }
.faq__title { max-width: 900px; margin: 0 auto; }
.faq__stack { max-width: 900px; margin: 48px auto 0; }
.fcard {
  --tab-l: 0px; --tab-w: 200px; --tab-hh: 40px;
  position: relative;
  padding: calc(var(--tab-hh) + 16px) clamp(20px, 3vw, 36px) 56px;
  margin-top: calc(-1 * var(--tab-hh));
  clip-path: polygon(0 var(--tab-hh), var(--tab-l) var(--tab-hh), var(--tab-l) 0, calc(var(--tab-l) + var(--tab-w) - 16px) 0, calc(var(--tab-l) + var(--tab-w)) var(--tab-hh), 100% var(--tab-hh), 100% 100%, 0 100%);
}
.fcard:first-child { margin-top: 0; }
.fcard--1 { --tab-l: 0px; background: var(--blue); color: var(--on-blue); z-index: 1; }
.fcard--2 { --tab-l: 150px; background: var(--blue-pale); z-index: 2; }
.fcard--3 { --tab-l: 300px; background: var(--paper-3); z-index: 3; }
.fcard--4 { --tab-l: 450px; background: var(--gold-pale); z-index: 4; }
.fcard--5 { --tab-l: 600px; background: var(--ink); color: var(--on-blue); z-index: 5; }
.fcard__tab {
  position: absolute; top: 0; left: var(--tab-l);
  width: calc(var(--tab-w) - 16px); height: var(--tab-hh);
  display: flex; align-items: center; padding-left: 16px;
  font-size: 16px; font-weight: 600;
}
.fcard__q {
  width: 100%; text-align: left;
  font-size: 20px; font-weight: 600; line-height: 1.35;
  padding: 4px 0;
}
.fcard__a { margin-top: 12px; max-width: 50ch; font-size: 17px; transition: opacity 200ms ease; }
@starting-style { .fcard__a { opacity: 0; } }
.fcard__a a { font-weight: 600; text-underline-offset: 4px; }

/* Cierre */
.close {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gap);
  align-items: center;
  min-height: min(72svh, 700px);
  margin-top: var(--section);
  padding: 64px var(--m);
  background: var(--gold);
  color: var(--ink);
}
.close__text { grid-column: 1 / 7; align-self: end; padding-bottom: 8px; }
.close__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 5.6vw, 92px); line-height: 0.95; letter-spacing: -0.03em;
  max-width: 8em;
}
.close__text .lead { margin-top: 28px; max-width: 36ch; }
.dialog {
  grid-column: 8 / 12;
  width: 100%; max-width: 440px;
  justify-self: center;
  background: var(--paper);
  padding: 28px;
  box-shadow: 0 24px 48px -12px rgba(29, 34, 64, 0.35); /* taste-skill-ignore: an open dialog floats */
  font-size: 15px;
}
.dialog__title { font-family: var(--display); font-weight: 700; font-size: 26px; color: var(--blue); }
.dialog__label { margin-top: 20px; font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px; padding: 4px; background: var(--paper-2); }
.seg button {
  padding: 12px 8px; font-weight: 600; color: var(--ink-soft);
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.seg button[aria-checked="true"] { background: var(--blue); color: var(--on-blue); }
.dialog__hint { margin: 16px 0 20px; min-height: 3em; color: var(--ink); }
.dialog__alt { margin-top: 16px; font-size: 14px; color: var(--ink-soft); }
.dialog__alt a { color: var(--blue); font-weight: 600; text-underline-offset: 4px; }

/* Footer */
.foot { background: var(--ink); color: var(--on-blue-soft); padding: clamp(64px, 8vw, 120px) var(--m) 32px; }
.foot__mark { width: 100%; height: auto; }
.foot__cols { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); margin-top: 56px; }
.foot__cols > div { grid-column: span 3; display: grid; align-content: start; gap: 8px; font-size: 15px; }
.foot__cols .foot__contact { grid-column: 9 / -1; }
.foot__h { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--on-blue); margin-bottom: 4px; }
.foot a { text-decoration: none; transition: color var(--t-hover) ease; }
@media (hover: hover) and (pointer: fine) { .foot__cols a:hover { color: var(--gold); } }
.foot__last { display: flex; justify-content: space-between; align-items: center; margin-top: 64px; font-size: 14px; }

/* Tablet */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .fcard { --tab-w: 160px; }
  .fcard--2 { --tab-l: 110px; }
  .fcard--3 { --tab-l: 220px; }
  .fcard--4 { --tab-l: 330px; }
  .fcard--5 { --tab-l: 440px; }
  .nav__cta { margin-left: auto; }
  .hero__copy { grid-column: 1 / -1; padding-bottom: 48px; }
  .hero__stage { grid-column: 1 / -1; margin-left: calc(-1 * var(--m)); margin-top: 0; }
  .flow { grid-template-columns: 1fr 1fr; }
  .features__intro { grid-column: 1 / -1; margin-bottom: 40px; }
  .features__grid { grid-column: 1 / -1; }
  .close__text { grid-column: 1 / -1; align-self: start; }
  .close__title { max-width: none; }
  .dialog { grid-column: 1 / -1; justify-self: start; margin-top: 48px; }
  .foot__cols > div { grid-column: span 4; }
  .foot__cols .foot__contact { grid-column: span 4; }
}

/* Phone */
@media (max-width: 720px) {
  .nav { gap: 16px; padding-block: 14px; }
  .nav__brand img { height: 28px; }
  .nav__cta { min-height: 44px; padding-inline: 14px; font-size: 14px; }
  .hero__copy { padding-top: 40px; }
  .hero .display { font-size: 8.6vw; }
  .hero__stage { padding: calc(28px + 16px) 16px 32px; --stage-tab: 120px; }
  .poliza__meta { grid-template-columns: 1fr 1fr; }
  .poliza__concept { grid-column: 1 / -1; }
  .poliza__table th, .poliza__table td { padding: 8px; }
  .poliza__table .num { width: 84px; }
  .poliza__sigs { grid-template-columns: 1fr; }
  .sig { min-height: 0; }
  .poliza__status { white-space: normal; }
  .poliza__head { flex-direction: column; }
  .poliza__stamp { top: 60px; font-size: 24px; }

  .flow { grid-template-columns: 1fr; }
  .flow__field { min-height: 0; padding: 32px 20px 48px; }
  .flow__title { position: static; margin-bottom: 12px; font-size: 24px; }
  .flow__clause { order: 1; margin-top: 0; font-size: 24px; }
  .cfdi { order: 2; margin: 32px 0 0; }
  .flow__field .sample-note { order: 3; }

  .audience { grid-template-columns: 1fr; row-gap: 32px; }
  .audience__text { padding: 0; gap: 32px; }
  .audience__actions { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }

  .features__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 8px; }
  .spec--wide { grid-column: 1 / -1; order: -1; }
  .spec--wide .spec__tile { aspect-ratio: auto; height: auto; padding: 16px 12px; }
  .frag__table th, .frag__table td { padding: 6px 4px; }
  .spec__name { font-size: 17px; }
  .spec__fact { font-size: 15px; }
  .frag { padding: 12px; }

  .plans { min-height: 0; }
  .plan__name { font-size: 10vw; width: 100%; }
  .plan__stage { position: static; padding: 24px 0 80px; }
  .plan__price { font-size: 20vw; line-height: 1; }
  .plan__price--word { font-size: 14vw; }
  .plan__desc { font-size: 17px; margin: 20px 0 24px; }
  .plan__stage .field-btn { display: flex; width: 100%; }

  .faq__title { font-size: 9vw; }
  .fcard { --tab-w: 120px; padding-inline: 20px; }
  .fcard--2 { --tab-l: 48px; }
  .fcard--3 { --tab-l: 96px; }
  .fcard--4 { --tab-l: 144px; }
  .fcard--5 { --tab-l: 192px; }
  .fcard__tab { font-size: 14px; padding-left: 12px; }
  .fcard__q { font-size: 18px; }
  .fcard__a { font-size: 16px; }

  .close { align-items: start; padding-block: 56px; }
  .close__title { font-size: 13vw; }
  .dialog { padding: 20px; }
  .dialog .field-btn { min-height: 56px; }

  .foot__cols { row-gap: 32px; }
  .foot__cols > div, .foot__cols .foot__contact { grid-column: span 6; }
  .foot__cols .foot__contact { grid-column: 1 / -1; }
}

@starting-style { .plate { opacity: 0; } }

/* Motion. Content is visible without script; hidden start states live only under .js. */

/* Hero, once on load: the headline rises out of its lines, the sheet slides up,
   and the agent fills the póliza line by line. */
@keyframes line-rise { from { transform: translateY(105%); } }
@keyframes fade-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sheet-up {
  from { clip-path: polygon(0 100%, calc(var(--stage-tab) - 28px) 100%, var(--stage-tab) 100%, 100% 100%, 100% 100%, 0 100%); }
}
@media (prefers-reduced-motion: no-preference) {
  .display .line > span { animation: line-rise 900ms var(--ease-expo) calc(var(--i) * 90ms) both; }
  .hero__sub { animation: fade-rise 700ms var(--ease-out) 180ms both; }
  .hero__actions { animation: fade-rise 700ms var(--ease-out) 260ms both; }
  .hero__stage { animation: sheet-up 800ms var(--ease-in-out) 120ms both; }
  .poliza__head, .poliza__meta, .poliza__table tr, .poliza__sigs { animation: fade-rise 500ms var(--ease-out) var(--d, 0ms) both; }
  .poliza__head { --d: 440ms; }
  .poliza__meta { --d: 500ms; }
  .poliza__table thead tr { --d: 560ms; }
  .poliza__table tbody tr:nth-child(1) { --d: 620ms; }
  .poliza__table tbody tr:nth-child(2) { --d: 680ms; }
  .poliza__table tbody tr:nth-child(3) { --d: 740ms; }
  .poliza__table tbody tr:nth-child(4) { --d: 800ms; }
  .poliza__table tfoot tr { --d: 860ms; }
  .poliza__sigs { --d: 920ms; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__stage, .poliza { animation: fade-in 300ms ease both; }
  .poliza__stamp, .poliza[data-state="done"] .poliza__stamp { transform: rotate(-8deg); }
}

/* How it works, once as it enters: the CFDI card moves through the four steps. */
@media (prefers-reduced-motion: no-preference) {
  .js .rv {
    transform: translateY(32px);
    transition: transform 700ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .is-in .rv { transform: none; }
}
