/* ===== Todo Viento — identidad ===== */
@font-face {
  font-family: 'Retrokia';
  src: url('/fonts/retrokia.woff2') format('woff2'), url('/fonts/retrokia.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

:root {
  --noir: #1a2021;
  --bone: #f7f5ed;
  --bone-dim: #eceadf;
  --noir-soft: rgba(26, 32, 33, 0.62);
  --line: rgba(26, 32, 33, 0.16);
  --error: #b3402a;
  --ok: #2c6e49;
  --display: 'Retrokia', 'Space Grotesk', sans-serif;
  --body: 'Space Grotesk', sans-serif;
  --hand: 'Gochi Hand', cursive;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  color: var(--noir);
  background-color: var(--bone);
  background-image: url('/assets/paper-texture.jpg');
  background-size: 700px;
  background-blend-mode: multiply;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }

.hidden { display: none !important; }

/* ===== Topbar ===== */
.topbar {
  background: var(--noir);
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
}

.topbar__logo { height: 20px; width: auto; }

.topbar__tag {
  font-family: var(--hand);
  font-size: 15px;
  letter-spacing: 0.04em;
  opacity: 0.85;
  white-space: nowrap;
}

/* ===== Layout ===== */
.page {
  width: min(660px, 100% - 40px);
  margin: 0 auto;
  flex: 1;
  padding: 44px 0 72px;
}

/* ===== Hero ===== */
.hero { text-align: center; margin-bottom: 40px; }

.hero__logo {
  width: min(240px, 60%);
  margin: 0 auto 10px;
}

.hero__hand {
  font-family: var(--hand);
  font-size: clamp(16px, 4vw, 19px);
  color: var(--noir-soft);
  transform: rotate(-1.5deg);
  margin-bottom: 26px;
}

.hero__title {
  font-family: var(--display);
  font-size: clamp(34px, 9vw, 56px);
  line-height: 0.96;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.hero__details {
  font-size: 16px;
  color: var(--noir-soft);
  max-width: 46ch;
  margin: 0 auto 20px;
  white-space: pre-line;
}

.hero__price {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--noir);
  color: var(--bone);
  border-radius: 999px;
  padding: 10px 22px;
  transform: rotate(-1deg);
}

.hero__price-label {
  font-family: var(--hand);
  font-size: 15px;
  opacity: 0.8;
}

.hero__price-value {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.03em;
}

/* ===== Stepper ===== */
.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.stepper__item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.35;
  transition: opacity 0.25s;
}

.stepper__item.is-active { opacity: 1; }

.stepper__num {
  font-family: var(--display);
  font-size: 26px;
}

.stepper__label {
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stepper__line {
  flex: 1;
  height: 2px;
  background: var(--line);
}

/* ===== Secciones / campos ===== */
.section-title {
  font-family: var(--display);
  font-size: clamp(24px, 6vw, 32px);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.step { border: 0; }

.field { display: block; margin-bottom: 18px; flex: 1; }

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.field input[type='text'],
.field input[type='tel'] {
  width: 100%;
  font: 500 17px var(--body);
  color: var(--noir);
  background: rgba(255, 255, 255, 0.55);
  border: 2px solid var(--noir);
  border-radius: 14px;
  padding: 13px 16px;
  outline: none;
  transition: box-shadow 0.15s, transform 0.15s;
}

.field input::placeholder { color: rgba(26, 32, 33, 0.3); }

.field input:focus {
  box-shadow: 3px 3px 0 var(--noir);
  transform: translate(-1px, -1px);
}

.field-row { display: flex; gap: 14px; }

@media (max-width: 540px) {
  .field-row { flex-direction: column; gap: 0; }
}

/* Talles */
.talles { display: flex; flex-wrap: wrap; gap: 10px; }

.talle input { position: absolute; opacity: 0; pointer-events: none; }

.talle span {
  display: inline-block;
  font-family: var(--display);
  font-size: 17px;
  padding: 10px 18px;
  border: 2px solid var(--noir);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
  background: rgba(255, 255, 255, 0.4);
}

.talle input:checked + span {
  background: var(--noir);
  color: var(--bone);
  transform: rotate(-2deg) scale(1.05);
  box-shadow: 3px 3px 0 rgba(26, 32, 33, 0.25);
}

.talle input:focus-visible + span { outline: 3px solid var(--noir-soft); outline-offset: 2px; }

/* Checkbox deslinde */
.check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 26px 0;
  cursor: pointer;
}

.check input { position: absolute; opacity: 0; pointer-events: none; }

.check__box {
  flex: 0 0 26px;
  height: 26px;
  border: 2px solid var(--noir);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  position: relative;
  transition: background 0.12s;
  margin-top: 2px;
}

.check input:checked + .check__box { background: var(--noir); }

.check input:checked + .check__box::after {
  content: '';
  position: absolute;
  inset: 4px 5px 7px;
  border-left: 3px solid var(--bone);
  border-bottom: 3px solid var(--bone);
  transform: rotate(-50deg);
}

.check input:focus-visible + .check__box { outline: 3px solid var(--noir-soft); outline-offset: 2px; }

.check__text { font-size: 15px; line-height: 1.5; }

.check__text em {
  display: block;
  font-family: var(--hand);
  font-style: normal;
  color: var(--noir-soft);
  margin-top: 4px;
}

/* ===== Botones ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 700 17px var(--body);
  text-decoration: none;
  border: 2px solid var(--noir);
  border-radius: 999px;
  padding: 15px 28px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn--primary {
  background: var(--noir);
  color: var(--bone);
  width: 100%;
}

.btn--primary:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(26, 32, 33, 0.3); }

.btn--primary:active { transform: none; box-shadow: none; }

.btn--primary:disabled { opacity: 0.55; cursor: wait; transform: none; box-shadow: none; }

.btn--ghost { background: transparent; color: var(--noir); }

.btn--mp {
  background: #009ee3;
  border-color: #009ee3;
  color: #fff;
  margin-top: 10px;
  width: 100%;
}

.btn--mp:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 rgba(0, 158, 227, 0.35); }

/* ===== Pasos de pago ===== */
.pay-steps { list-style: none; display: flex; flex-direction: column; gap: 26px; margin-bottom: 26px; }

.pay-steps li { display: flex; gap: 16px; }

.pay-steps li > div { flex: 1; }

.pay-steps p { font-size: 15.5px; margin-bottom: 10px; line-height: 1.5; }

.pay-steps__num {
  flex: 0 0 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 19px;
  border: 2px solid var(--noir);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.pay-nolink {
  font-family: var(--hand);
  font-size: 16px;
  color: var(--noir-soft);
  transform: rotate(-1deg);
}

/* ===== Checkout directo ===== */
.pay-resume {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 2px solid var(--noir);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.pay-resume__img { width: 74px; flex: 0 0 auto; }

.pay-resume__row { font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; }

.pay-resume__row strong {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.pay-resume__note { font-size: 14px; color: var(--noir-soft); margin-top: 6px; line-height: 1.45; }

.pay-checkout-text { font-size: 15.5px; line-height: 1.6; margin-bottom: 14px; }

#payCheckout .pay-nolink { margin-bottom: 10px; }

.success__img--iso { width: 90px; }

.retry { max-width: 360px; margin: 0 auto; text-align: left; }

.retry .btn { width: 100%; }

/* Dropzone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  border: 2px dashed var(--noir);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4);
  padding: 22px 18px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.dropzone:hover, .dropzone.is-drag { background: var(--bone-dim); transform: scale(1.01); }

.dropzone__img { width: 64px; opacity: 0.9; margin-bottom: 4px; }

.dropzone__text { font-size: 15.5px; }

.dropzone__hint { font-size: 12.5px; color: var(--noir-soft); letter-spacing: 0.04em; }

.filecard {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--noir);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  padding: 10px 14px;
  margin-top: 12px;
}

.filecard__thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }

.filecard__pdf {
  font-family: var(--display);
  font-size: 13px;
  background: var(--noir);
  color: var(--bone);
  border-radius: 8px;
  padding: 14px 10px;
}

.filecard__name {
  flex: 1;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filecard__remove {
  border: 0;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: var(--noir-soft);
  padding: 6px;
}

/* Navegación de pasos y errores */
.step__nav { display: flex; gap: 12px; }

.step__nav .btn--ghost { flex: 0 0 auto; }

.step__nav .btn--primary { flex: 1; }

.form-error {
  background: var(--error);
  color: var(--bone);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 15px;
  margin-bottom: 16px;
  transform: rotate(-0.5deg);
}

/* ===== Éxito / cerrado ===== */
.success, .closed { text-align: center; padding: 30px 0 10px; }

.success__img, .closed__img { width: 150px; margin: 0 auto 18px; }

.success__title {
  font-family: var(--display);
  font-size: clamp(36px, 10vw, 54px);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.success__hand, .closed p {
  font-family: var(--hand);
  font-size: 18px;
  color: var(--noir-soft);
  margin-bottom: 20px;
}

.closed p { font-family: var(--body); font-size: 16px; max-width: 40ch; margin: 0 auto; }

.success__text { font-size: 16px; line-height: 1.6; max-width: 44ch; margin: 0 auto 18px; }

.success__id {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--noir);
  border-radius: 999px;
  padding: 8px 18px;
}

/* ===== Footer ===== */
.footer {
  background: var(--noir);
  color: var(--bone);
  text-align: center;
  padding: 36px 20px 42px;
}

.footer__iso { width: 54px; margin: 0 auto 14px; }

.footer__addr {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 10px;
}

.footer__hand { font-family: var(--hand); font-size: 16px; opacity: 0.9; }

@media (max-width: 480px) {
  .topbar__tag { display: none; }
  .step__nav { flex-direction: column-reverse; }
}
