/* ============================================================
   SPG GRAMOR Colombia · Interactive Form Site Styles
   Same brand system as the informational site
   - 8 brand colors, Comfortaa + Lato
   - Multi-step wizard with progress ring
   ============================================================ */

:root {
  /* Brand palette (from gramorcolombia.org) */
  --c-yellow: #F5D040;
  --c-green: #385733;
  --c-terracotta: #BC764C;
  --c-sage: #58A37D;
  --c-olive: #B4B955;
  --c-cream: #FAFBF4;
  --c-burgundy: #742336;
  --c-deep: #051F14;
  --c-warm-dark: #2B2925;

  /* Functional */
  --bg: var(--c-cream);
  --bg-alt: #F0EFE3;
  --text: var(--c-warm-dark);
  --text-muted: #5c5a52;
  --border: rgba(56, 87, 51, 0.16);
  --border-strong: rgba(56, 87, 51, 0.32);
  --shadow-sm: 0 2px 8px rgba(5, 31, 20, 0.08);
  --shadow-md: 0 8px 32px rgba(5, 31, 20, 0.12);
  --shadow-lg: 0 18px 60px rgba(5, 31, 20, 0.18);

  --font-display: "Comfortaa", system-ui, sans-serif;
  --font-body: "Lato", system-ui, -apple-system, sans-serif;

  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.32s;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--c-green); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--c-burgundy); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 0.5em;
  color: var(--c-green);
}
h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--c-yellow);
  color: var(--c-deep);
  padding: 12px 18px;
  z-index: 1000;
  font-weight: 700;
}
.skip-link:focus { left: 0; top: 0; }

/* ===== Header ===== */
.site-header {
  background: var(--c-deep);
  color: var(--c-cream);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--c-yellow);
}
.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__logo {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-yellow);
  padding: 3px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--c-yellow);
}
.brand__tag {
  font-size: 11px;
  color: rgba(250, 251, 244, 0.7);
  letter-spacing: 0.02em;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.save-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(250, 251, 244, 0.85);
  padding: 6px 12px;
  background: rgba(245, 208, 64, 0.12);
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.save-status__dot {
  width: 8px; height: 8px;
  background: var(--c-yellow);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all var(--dur) var(--ease);
  cursor: pointer;
  line-height: 1;
  background: transparent;
}
.btn--primary { background: var(--c-yellow); color: var(--c-deep); }
.btn--primary:hover { background: var(--c-green); color: var(--c-cream); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--secondary { background: var(--c-green); color: var(--c-cream); }
.btn--ghost {
  background: transparent;
  border-color: rgba(250, 251, 244, 0.4);
  color: var(--c-cream);
}
.btn--ghost:hover { background: rgba(250, 251, 244, 0.15); color: var(--c-yellow); }
.site-header .btn--ghost { border-color: rgba(250, 251, 244, 0.3); }
/* Dentro del formulario el fondo es claro: el botón fantasma crema no se veía
   («Avisar por correo», «Limpiar» de las firmas, «Geolocalizar»). */
.form-main .btn--ghost { border-color: var(--c-green); color: var(--c-green); }
.form-main .btn--ghost:hover { background: var(--c-green); color: var(--c-cream); }
.btn--danger {
  background: transparent;
  color: var(--c-burgundy);
  border-color: rgba(116, 35, 54, 0.3);
}
.btn--danger:hover { background: var(--c-burgundy); color: var(--c-cream); border-color: var(--c-burgundy); }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn--lg { padding: 14px 24px; font-size: 15px; }

/* ===== Hero ===== */
.form-hero {
  background:
    linear-gradient(135deg, rgba(5, 31, 20, 0.92) 0%, rgba(56, 87, 51, 0.85) 100%),
    url("assets/photos/hero-farming.jpg") center/cover no-repeat;
  color: var(--c-cream);
  padding: 56px 0;
}
.form-hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.form-hero__content { max-width: 720px; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-yellow);
  margin-bottom: 12px;
  font-weight: 700;
}
.eyebrow--light { color: var(--c-yellow); }
.form-hero h1 {
  color: var(--c-cream);
  margin: 0 0 14px;
}
.form-hero p {
  color: rgba(250, 251, 244, 0.92);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.form-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.badge {
  padding: 6px 12px;
  background: rgba(245, 208, 64, 0.15);
  border: 1px solid rgba(245, 208, 64, 0.4);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--c-yellow);
}

/* Progress ring */
.progress-ring {
  position: relative;
  width: 120px;
  height: 120px;
}
.progress-ring__label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--c-yellow);
}
.progress-ring__label span {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.progress-ring__label small {
  font-size: 10px;
  color: rgba(250, 251, 244, 0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ===== Stepper ===== */
.stepper {
  background: var(--c-cream);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 67px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}
.stepper__inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 24px;
  scrollbar-width: thin;
}
.stepper__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
}
.stepper__item:hover {
  background: var(--bg-alt);
  border-color: var(--c-yellow);
}
.stepper__item.is-active {
  background: var(--c-yellow);
  color: var(--c-deep);
  border-color: var(--c-yellow);
  box-shadow: var(--shadow-sm);
}
.stepper__item.is-done {
  background: var(--c-green);
  color: var(--c-cream);
  border-color: var(--c-green);
}
.stepper__num {
  width: 22px; height: 22px;
  background: rgba(56, 87, 51, 0.1);
  color: var(--c-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.stepper__item.is-active .stepper__num,
.stepper__item.is-done .stepper__num {
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
}
.stepper__label { display: inline; }

/* ===== Form main ===== */
.form-main { padding: 40px 0 60px; }

.step {
  background: var(--c-cream);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  animation: stepIn 0.4s var(--ease);
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.step__head {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--border);
}
.step__num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-burgundy);
  background: rgba(116, 35, 54, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.step__head h2 { margin: 0 0 6px; }
.step__head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Field blocks ===== */
.field-block-title {
  font-size: 1.05rem;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-yellow);
  color: var(--c-green);
}
.field-block-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 16px;
  font-style: italic;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.form-grid--2 { grid-template-columns: repeat(2, 1fr); }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.form-grid--4 { grid-template-columns: repeat(4, 1fr); }
.form-grid--areas { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field--lg { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--c-green);
  letter-spacing: 0.01em;
}
.field .req { color: var(--c-burgundy); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--c-cream);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  transition: all var(--dur) var(--ease);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-yellow);
  background: #FFFEF6;
  box-shadow: 0 0 0 3px rgba(245, 208, 64, 0.25);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: var(--c-burgundy);
  background: rgba(116, 35, 54, 0.04);
}
.field textarea { resize: vertical; min-height: 70px; }
.field__hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.field__inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.field__inline input { flex: 1 1 120px; }
.field__unit {
  position: relative;
}
.field__unit input { padding-right: 36px; }
.field__unit-label {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-green);
  pointer-events: none;
}

/* ===== Area distribution bar ===== */
.area-distribution {
  margin: 16px 0 24px;
  padding: 18px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
}
.area-distribution h4 {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 10px;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.area-distribution__bar {
  display: flex;
  height: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(56, 87, 51, 0.08);
  margin-bottom: 10px;
}
.area-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-deep);
  min-width: 0;
  overflow: hidden;
  transition: flex-basis 0.6s var(--ease);
  flex-basis: 0;
  flex-grow: 0;
}
.area-seg--cultivos { background: var(--c-yellow); }
.area-seg--animales { background: var(--c-terracotta); color: var(--c-cream); }
.area-seg--bosque { background: var(--c-green); color: var(--c-cream); }
.area-seg--otras { background: var(--c-olive); }
.area-distribution__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}
.area-distribution__legend span { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.area-distribution__legend strong { color: var(--c-green); font-family: var(--font-display); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.dot--cultivos { background: var(--c-yellow); }
.dot--animales { background: var(--c-terracotta); }
.dot--bosque { background: var(--c-green); }
.dot--otras { background: var(--c-olive); }

/* ===== File drop ===== */
.file-drop {
  position: relative;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--bg-alt);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.file-drop:hover, .file-drop.is-dragover {
  border-color: var(--c-yellow);
  background: rgba(245, 208, 64, 0.08);
}
.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop__inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.file-drop__icon { font-size: 28px; }
.file-drop__text { font-weight: 700; font-size: 14px; color: var(--c-green); }
.file-drop small { font-size: 11px; color: var(--text-muted); }
.file-preview { margin-top: 12px; }
.file-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ===== Checkbox grid ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--c-cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  font-size: 14px;
}
.check-card:hover {
  border-color: var(--c-yellow);
  background: rgba(245, 208, 64, 0.04);
}
.check-card input[type="checkbox"] {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: var(--c-green);
  flex-shrink: 0;
  cursor: pointer;
}
.check-card input:checked + .check-card__body strong { color: var(--c-burgundy); }
.check-card:has(input:checked) {
  border-color: var(--c-green);
  background: rgba(88, 163, 125, 0.08);
}
.check-card__body { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.check-card__body strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--c-green);
  font-weight: 700;
}
.check-card__body small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.check-card--inline {
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border-strong);
}

/* ===== Check block ===== */
.check-block {
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--c-yellow);
}
.check-block__title {
  font-size: 1rem;
  margin: 0 0 14px;
  color: var(--c-green);
}

/* ===== Rating ===== */
.rating-grid { display: flex; flex-direction: column; gap: 12px; }
.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: var(--c-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.rating-row__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--c-green);
  flex: 1;
}
.rating {
  display: inline-flex;
  gap: 4px;
}
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  background: var(--c-cream);
}
.rating label:hover {
  border-color: var(--c-yellow);
  background: rgba(245, 208, 64, 0.15);
  color: var(--c-green);
}
.rating input:checked + label {
  background: var(--c-yellow);
  border-color: var(--c-yellow);
  color: var(--c-deep);
}

/* ===== Radio cards (categoria) ===== */
.radio-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.radio-card {
  display: block;
  padding: 18px;
  background: var(--c-cream);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.radio-card:hover {
  border-color: var(--c-yellow);
  transform: translateY(-2px);
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card:has(input:checked) {
  border-color: var(--c-green);
  background: rgba(88, 163, 125, 0.08);
  box-shadow: var(--shadow-sm);
}
.radio-card__body { display: flex; flex-direction: column; gap: 4px; }
.radio-card__body strong {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--c-green);
}
.radio-card__body small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== Repeatable rows ===== */
.repeatable { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.repeatable__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  animation: rowIn 0.3s var(--ease);
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.repeatable__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  flex: 1;
}
.repeatable__grid .field { margin-bottom: 0; }
.repeatable__remove {
  align-self: flex-start;
  margin-top: 2px;
}
.repeatable__add {
  margin-top: 4px;
  border-color: var(--c-green);
  color: var(--c-green);
  background: transparent;
}
.repeatable__add:hover {
  background: var(--c-green);
  color: var(--c-cream);
}

/* ===== Photo upload & gallery ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.photo-upload {
  position: relative;
  min-height: 150px;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.photo-upload:hover, .photo-upload.is-dragover {
  border-color: var(--c-yellow);
  background: rgba(245, 208, 64, 0.08);
}
.photo-upload .file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-upload__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  padding: 12px;
}
.photo-upload__icon { font-size: 28px; }
.photo-upload__text { font-size: 13px; font-weight: 700; color: var(--c-green); }
.photo-upload small { font-size: 10px; color: var(--text-muted); }

.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.photo-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--c-cream);
  aspect-ratio: 1;
  animation: rowIn 0.3s var(--ease);
}
.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.photo-item__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(5, 31, 20, 0.85));
  color: var(--c-cream);
  font-size: 11px;
  padding: 16px 10px 8px;
}
.photo-item__caption input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--c-cream);
  font-family: var(--font-body);
  font-size: 11px;
  outline: none;
}
.photo-item__caption input::placeholder { color: rgba(250, 251, 244, 0.6); }
.photo-item__remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  background: rgba(116, 35, 54, 0.85);
  color: var(--c-cream);
  border: 0;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}
.photo-item:hover .photo-item__remove { opacity: 1; }

/* ===== Signature pads ===== */
.signature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.signature-card {
  padding: 20px;
  background: var(--c-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.signature-card h3 {
  font-size: 14px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-yellow);
  color: var(--c-green);
}
.signature-pad {
  position: relative;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--c-cream);
  margin-bottom: 12px;
  overflow: hidden;
}
.signature-pad canvas {
  display: block;
  width: 100%;
  height: 140px;
  cursor: crosshair;
  touch-action: none;
}
.signature-clear {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 11px;
  padding: 4px 10px;
  border-color: var(--border-strong);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.9);
}
.signature-clear:hover { background: var(--c-burgundy); color: var(--c-cream); border-color: var(--c-burgundy); }

/* ===== Summary ===== */
.summary {
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--c-green);
  margin-bottom: 24px;
}
.summary__empty { color: var(--text-muted); font-style: italic; margin: 0; }
.summary h4 { color: var(--c-green); margin: 0 0 10px; font-size: 14px; font-family: var(--font-display); }
.summary dl { display: grid; grid-template-columns: maxmax 1fr; gap: 6px 16px; margin: 0; }
.summary dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--c-burgundy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.summary dd { margin: 0; font-size: 14px; color: var(--text); }
.summary__row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 6px 16px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.summary__row:last-child { border-bottom: 0; }

/* ===== Submit block ===== */
.submit-block {
  padding: 24px;
  background: linear-gradient(135deg, rgba(245, 208, 64, 0.15), rgba(88, 163, 125, 0.1));
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-yellow);
}
.submit-block .check-card { margin-bottom: 18px; }
.submit-block__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ===== Estado del envío al panel ===== */
.envio-estado {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
  border: 1.5px solid var(--border-strong);
  background: #fff;
}
.envio-estado--enviando { border-color: var(--c-olive); }
.envio-estado--ok { border-color: var(--c-sage); background: rgba(88, 163, 125, 0.12); }
.envio-estado--error { border-color: var(--c-terracotta); background: rgba(188, 118, 76, 0.1); }
.envio-estado code { font-size: 13px; background: rgba(5, 31, 20, 0.06); padding: 1px 6px; border-radius: 4px; }
#btnSubmit:disabled { opacity: 0.6; cursor: wait; }

/* ===== Step navigation ===== */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding: 18px 24px;
  background: var(--c-cream);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.step-nav__info {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--c-green);
}
.step-nav .btn--ghost {
  border-color: var(--c-green);
  color: var(--c-green);
}
.step-nav .btn--ghost:hover { background: var(--c-green); color: var(--c-cream); }
.step-nav .btn--ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--c-deep);
  color: var(--c-cream);
  padding: 32px 0 24px;
  margin-top: 40px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: start;
}
.site-footer__brand { display: flex; align-items: center; gap: 12px; }
.site-footer__logo { width: 56px; height: 56px; border-radius: 50%; background: var(--c-yellow); padding: 3px; }
.site-footer__brand strong { display: block; font-family: var(--font-display); font-size: 14px; color: var(--c-yellow); }
.site-footer__brand span { display: block; font-size: 11px; color: rgba(250, 251, 244, 0.7); }
.site-footer__links { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.site-footer__links a {
  color: rgba(250, 251, 244, 0.85);
  font-size: 13px;
  font-weight: 600;
}
.site-footer__links a:hover { color: var(--c-yellow); }
.site-footer__credit { text-align: right; font-size: 11px; line-height: 1.7; color: rgba(250, 251, 244, 0.6); }
.site-footer__credit p { margin: 0; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 100px);
  padding: 12px 22px;
  background: var(--c-deep);
  color: var(--c-cream);
  border-radius: var(--radius-pill);
  border: 2px solid var(--c-yellow);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s var(--ease);
  pointer-events: none;
  max-width: 90vw;
}
.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 760px) {
  .form-hero__inner { grid-template-columns: 1fr; }
  .progress-ring { margin: 0 auto; }
  .header-actions .btn span { display: none; }
  .header-actions .btn { padding: 8px 10px; }
  .site-footer__inner { grid-template-columns: 1fr; text-align: center; }
  .site-footer__brand, .site-footer__links { justify-content: center; align-items: center; }
  .site-footer__credit { text-align: center; }
  .stepper__label { display: none; }
  .stepper__item { padding: 8px 10px; }
  /* En el teléfono la cabecera ocupa dos líneas: fija se comía casi un cuarto
     de la pantalla. Se deja arriba y solo los pasos quedan a la vista. */
  .site-header { position: static; }
  .stepper { top: 0; }
  .save-status__text { display: none; }
  .summary__row { grid-template-columns: 1fr; gap: 2px; }
  .step-nav { flex-direction: column; gap: 12px; }
  .step-nav .btn { width: 100%; justify-content: center; }
  .repeatable__row { grid-template-columns: 1fr; }
  .form-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .step { padding: 20px 16px; }
  .form-grid--2, .form-grid--3, .form-grid--4 { grid-template-columns: 1fr; }
  .rating-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .rating { justify-content: space-between; }
}

/* ===== Print ===== */
@media print {
  .site-header, .stepper, .step-nav, .form-hero__progress, .header-actions,
  .signature-clear, .photo-upload, .repeatable__remove, .file-drop,
  .btn--danger, .submit-block__actions, .toast, .back-to-top { display: none !important; }
  .step { display: block !important; padding: 0; border: 0; box-shadow: none; page-break-inside: avoid; }
  .step[hidden] { display: block !important; }
  body { background: white; }
  .form-hero { background: white; color: black; padding: 16px 0; }
  .form-hero h1, .form-hero p { color: black; }
  .badge { background: #ddd; color: black; border-color: #999; }
  .signature-pad { border: 1px solid #999; }
  .signature-pad canvas { background: white; }
}
