/* ============================================================================
   TOLUCA PARTY — landing publica (instrumento de EXP-01)
   Direccion: "hoja de pedido". Material: papel + tinta, marca en rojo.
   Tokens en DESIGN.md. Todo valor sale de ahi; nada se eyeballea.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Marca — rojo medido en el logo oficial (#D12325). */
  --brand-700: #8E1416;
  --brand-600: #B01A1C;
  --brand-500: #D12325;
  --brand-300: #E9807F;
  --brand-050: #FBECEC;

  /* Neutros con temperatura de papel. */
  --paper:      #FBF8F4;
  --paper-2:    #F3ECE4;
  --surface:    #FFFFFF;
  --ink:        #1B1512;
  --ink-2:      #574C45;
  --ink-3:      #6E625A;
  --ink-on-dark:  #FFFFFF;
  --ink-on-dark-2:#C9BEB5;
  --rule:        #E7DCD2;
  --rule-strong: #C9B9AB;
  --rule-dark:   #3A302A;

  /* Tipografia */
  --font-display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --font-body:    'Golos Text', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Escala de espacio */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Radios */
  --r-1: 4px; --r-2: 8px; --r-3: 14px; --r-pill: 999px;

  /* Movimiento (mapeado del interaction kit) */
  --dur-press: 80ms;
  --dur-release: 520ms;
  --dur-hover: 200ms;
  --dur-focus: 160ms;
  --dur-state: 260ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-color: cubic-bezier(0.25, 0.1, 0.25, 1);
  --spring-pop: linear(0, 0.044, 0.155, 0.307, 0.475, 0.642, 0.794, 0.922, 1.023, 1.094, 1.139, 1.16, 1.162, 1.15, 1.129, 1.103, 1.075, 1.049, 1.025, 1.006, 0.991, 0.981, 0.976, 0.973, 0.974, 0.977, 0.981, 0.985, 0.989, 0.994, 0.997, 1, 1.002, 1.003, 1.004, 1.004, 1.004, 1.004, 1.003, 1.002, 1);
  --spring-snap: linear(0, 0.03, 0.105, 0.207, 0.32, 0.435, 0.545, 0.644, 0.732, 0.806, 0.867, 0.915, 0.953, 0.981, 1.001, 1.015, 1.023, 1.027, 1.028, 1.028, 1.026, 1.023, 1.02, 1.016, 1.013, 1.01, 1.008, 1.006, 1.004, 1.003, 1);

  --focus-ring: #1B1512;
  --focus-ring-dark: #FFFFFF;

  --container: 1120px;
  --gutter: 24px;
}

@media (max-width: 640px) { :root { --gutter: 18px; } }

/* ---- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: var(--brand-500); color: #fff; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff;
  padding: var(--s-3) var(--s-4); z-index: 50;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: var(--s-3); top: var(--s-3); }

/* ---- Botones ------------------------------------------------------------ */
.btn {
  --press-scale: 0.965;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  min-height: 52px;
  padding: var(--s-3) var(--s-5);
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 700; line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-release) var(--spring-pop),
    background-color var(--dur-hover) var(--ease-color),
    color var(--dur-hover) var(--ease-color),
    border-color var(--dur-hover) var(--ease-color),
    filter var(--dur-hover) var(--ease-color),
    outline-offset var(--dur-focus) var(--ease-out),
    outline-color var(--dur-focus) var(--ease-out);
}
.btn:active { transform: scale(var(--press-scale)); filter: brightness(0.92); transition-duration: var(--dur-press); }
.btn--sm { min-height: 40px; padding: var(--s-2) var(--s-4); font-size: 0.9375rem; }
.btn--primary { background: var(--brand-500); color: #fff; }
.btn--primary:hover { background: var(--brand-600); }
.btn--inverse { background: #fff; color: var(--brand-600); }
.btn--inverse:hover { background: var(--paper); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn:focus-visible { outline-color: var(--focus-ring); outline-offset: 3px; }

/* El spinner del boton es un circulo: usa el radio de pastilla del sistema.
   Visualmente es identico a 50% (16px de lado) y deja una sola primitiva
   redonda en la escala de formas. */
.ui-spinner { border-radius: var(--r-pill); }

/* ---- Masthead ----------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.masthead__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-5); min-height: 64px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.125rem; letter-spacing: -0.01em;
  color: var(--brand-600);
  text-decoration: none;
  white-space: nowrap;
}
.nav { display: flex; align-items: center; gap: var(--s-5); }
.nav__link {
  font-size: 0.9375rem; color: var(--ink-2); text-decoration: none;
  transition: opacity var(--dur-hover) var(--ease-color), color var(--dur-hover) var(--ease-color);
}
.nav__link:hover { color: var(--ink); }
@media (max-width: 720px) { .nav__link { display: none; } }

/* ---- Hero --------------------------------------------------------------- */
.hero { background: var(--surface); padding: var(--s-7) 0 var(--s-8); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: var(--s-8);
  align-items: start;
}
.hero__logo { width: 176px; margin-bottom: var(--s-5); }
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.375rem, 6.2vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--brand-600);
  text-wrap: balance;
}
.hero__lede {
  margin-top: var(--s-4);
  max-width: 46ch;
  font-size: 1.125rem;
  color: var(--ink-2);
}
.hero__actions { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Panel de precio: la hoja de pedido (el "stub"). */
.stub {
  background: var(--brand-500);
  color: #fff;
  border-radius: var(--r-3);
  padding: var(--s-6);
  display: grid;
  gap: var(--s-3);
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset;
}
.stub__sku { font-family: var(--font-mono); font-size: 0.875rem; color: rgba(255,255,255,0.88); }
.stub__price {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 7vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 2px;
}
.stub__currency { font-size: 0.45em; transform: translateY(-0.18em); }
.stub__deposit {
  font-family: var(--font-mono); font-size: 0.9375rem;
  border-top: 1px solid rgba(255,255,255,0.32); padding-top: var(--s-3);
}
.stub__deposit strong { font-weight: 600; }
.stub__note { font-size: 0.9375rem; color: rgba(255,255,255,0.9); }
.stub .btn { margin-top: var(--s-2); }

@media (max-width: 900px) {
  .hero { padding-top: var(--s-6); }
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .hero__logo { width: 124px; }
}

/* ---- Secciones ---------------------------------------------------------- */
.section { padding: var(--s-9) 0; background: var(--surface); }
.section--paper { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--ink-on-dark); }

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4.2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: 18ch;
  text-wrap: balance;
}
.section__title--onInk { color: var(--ink-on-dark); max-width: 20ch; }
.section__lede {
  margin-top: var(--s-4);
  max-width: 56ch;
  font-size: 1.0625rem;
  color: var(--ink-2);
}
.section__lede--onInk { color: var(--ink-on-dark-2); }

/* ---- Hoja de pedido (paquete) ------------------------------------------ */
.sheet {
  margin-top: var(--s-7);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-3);
  padding: var(--s-6);
  max-width: 720px;
}
.sheet__items { border-bottom: 1px solid var(--rule); padding-bottom: var(--s-4); }
.sheet__item {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4);
  padding: var(--s-2) 0;
}
.sheet__name { font-weight: 700; }
.sheet__spec { color: var(--ink-3); font-size: 0.9375rem; text-align: right; }
.sheet__total {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4);
  padding-top: var(--s-4);
}
.sheet__totalLabel { color: var(--ink-2); }
.sheet__totalValue {
  font-family: var(--font-display);
  font-size: 1.75rem; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--brand-600);
}
.sheet__total--deposit .sheet__totalLabel { color: var(--ink); font-weight: 700; }
.sheet__total--deposit .sheet__totalValue { color: var(--ink); font-size: 1.375rem; }

.notlist { margin-top: var(--s-6); display: grid; gap: var(--s-2); max-width: 720px; }
.notlist__item { color: var(--ink-2); font-size: 0.9375rem; }
.notlist__mark {
  display: inline-block;
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-strong);
  margin-right: var(--s-2);
}

/* ---- Anexos ------------------------------------------------------------- */
.annexes__grid {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s-8);
  align-items: start;
}
.annex__title {
  font-family: var(--font-body);
  font-size: 1.0625rem; font-weight: 700;
  color: var(--ink);
  padding-bottom: var(--s-3);
  border-bottom: 2px solid var(--ink);
  margin-bottom: var(--s-4);
}
.annex--extras .annex__title { border-bottom-color: var(--rule-strong); }

.lines { display: grid; gap: var(--s-4); }
.line { display: flex; align-items: baseline; }
.line__name { flex: 0 1 auto; font-weight: 700; }
.line__spec { display: block; font-weight: 400; font-size: 0.875rem; color: var(--ink-3); }
.line__dots {
  flex: 1 1 auto; min-width: var(--s-4);
  border-bottom: 1px dotted var(--rule-strong);
  margin: 0 var(--s-3);
  transform: translateY(-0.32em);
}
.line__price {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.lines--compact .line__price { color: var(--ink-2); }

@media (max-width: 900px) {
  .annexes__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
}

/* ---- Cifras del circuito ------------------------------------------------ */
.figures {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6) var(--s-5);
}
.figure { border-top: 2px solid var(--rule-dark); padding-top: var(--s-4); }
.figure__value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4.6vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--brand-300);
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: var(--s-2);
}
.figure__of { font-size: 0.36em; color: var(--ink-on-dark-2); letter-spacing: 0; }
.figure__label { margin-top: var(--s-3); font-size: 0.9375rem; color: var(--ink-on-dark-2); }
.figures__close {
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid var(--rule-dark);
  max-width: 56ch; color: var(--ink-on-dark);
}
@media (max-width: 860px) { .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Estados de garantia ------------------------------------------------ */
.guarantees__head { max-width: 60ch; }
.states {
  margin-top: var(--s-7);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-6) var(--s-7);
}
.state { border-top: 1px solid var(--rule-strong); padding-top: var(--s-4); }
.state__name { font-weight: 700; }
.state__value {
  margin-top: var(--s-1);
  font-family: var(--font-mono); font-size: 0.875rem;
}
.state__value--pending { color: var(--brand-600); }
.state__note { margin-top: var(--s-2); font-size: 0.9375rem; color: var(--ink-2); }
@media (max-width: 760px) { .states { grid-template-columns: minmax(0, 1fr); } }

/* ---- Cobertura ---------------------------------------------------------- */
.coverage__head { max-width: 52ch; }
.municipalities {
  margin-top: var(--s-6);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  max-width: 900px;
}
.municipalities li {
  font-size: 0.9375rem; color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-pill);
  padding: var(--s-1) var(--s-3);
  background: var(--paper);
}
.coverage__note { margin-top: var(--s-5); color: var(--ink-2); font-size: 0.9375rem; }

/* ---- Preguntas ---------------------------------------------------------- */
.faq__list { margin-top: var(--s-6); max-width: 760px; border-top: 1px solid var(--rule-strong); }
.qa { border-bottom: 1px solid var(--rule-strong); }
.qa__q {
  cursor: pointer;
  list-style: none;
  padding: var(--s-5) 0;
  font-size: 1.125rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  transition: color var(--dur-hover) var(--ease-color);
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after {
  content: "+";
  font-family: var(--font-mono); font-size: 1.375rem; font-weight: 400;
  color: var(--brand-600);
  transition: transform var(--dur-state) var(--spring-snap);
}
.qa[open] .qa__q::after { transform: rotate(45deg); }
.qa__a { padding-bottom: var(--s-5); max-width: 62ch; color: var(--ink-2); }
.qa__a p { color: var(--ink-2); }

/* ---- Reserva ------------------------------------------------------------ */
.section--reserve { background: var(--ink); color: var(--ink-on-dark); }
.reserve { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s-8); align-items: start; }
.reserve__head .section__lede { color: var(--ink-on-dark-2); }

.form {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-3);
  padding: var(--s-6);
}
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.field { display: grid; gap: var(--s-1); }
.field--wide { grid-column: 1 / -1; }
.field__label { font-size: 0.875rem; color: var(--ink-on-dark-2); }
.field__input {
  width: 100%;
  min-height: 48px;
  padding: var(--s-3);
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-2);
  background: rgba(255,255,255,0.06);
  color: var(--ink-on-dark);
  font: inherit; font-size: 1rem;
  transition: border-color var(--dur-hover) var(--ease-color), box-shadow var(--dur-focus) var(--ease-out);
}
.field__input::placeholder { color: rgba(255,255,255,0.45); }
.field__input:focus { outline: none; border-color: var(--focus-ring-dark); box-shadow: 0 0 0 3px rgba(255,255,255,0.22); }
select.field__input option { color: var(--ink); background: #fff; }

.confirm { display: flex; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-5); font-size: 0.9375rem; color: var(--ink-on-dark); }
.confirm__box {
  margin-top: 2px; flex: none;
  width: 22px; height: 22px;
  accent-color: var(--brand-500);
  cursor: pointer;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__foot { margin-top: var(--s-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4); }
.form__status { font-size: 0.9375rem; color: var(--ink-on-dark-2); max-width: 40ch; }
.form__status[data-state="ok"] { color: var(--brand-300); }
.form__status[data-state="error"] { color: #FFC9C9; }

@media (max-width: 900px) {
  .reserve { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
}
@media (max-width: 560px) {
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .form { padding: var(--s-5); }
}

/* ---- Footer ------------------------------------------------------------- */
.footer { background: var(--paper-2); border-top: 1px solid var(--rule); padding: var(--s-8) 0 var(--s-6); }
.footer__grid { display: grid; grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr); gap: var(--s-8); }
.footer__logo { width: 108px; }
.footer__tagline { margin-top: var(--s-3); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.footer__head {
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 700;
  padding-bottom: var(--s-2); margin-bottom: var(--s-3);
  border-bottom: 1px solid var(--rule-strong);
}
.footer__list { display: grid; gap: var(--s-1); font-size: 0.875rem; color: var(--ink-2); }
.footer__list--pending { color: var(--ink-3); }
.footer__base {
  margin-top: var(--s-7); padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem; color: var(--ink-3); max-width: 90ch;
}
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) { .footer__cols { grid-template-columns: minmax(0, 1fr); } }

/* ---- Movimiento reducido ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .qa__q::after, .field__input {
    transition-property: background-color, color, border-color, filter, outline-offset, outline-color;
  }
  .btn:active { transform: none; }
  .qa[open] .qa__q::after { transform: none; }
}

/* ---- Impresion ---------------------------------------------------------- */
@media print {
  .masthead, .stub .btn, .hero__actions, .form, .skip { display: none; }
  body { background: #fff; }
  .section { padding: var(--s-5) 0; }
}
