/* ============================================================
   diseño del sistema: signal-orange industrial / motion-driven
   fuentes locales offline cargadas desde ../fonts/
   ============================================================ */

/* ---------- fuentes locales offline (.ttf) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque-Bold.ttf") format("truetype");
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree-Bold.ttf") format("truetype");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("../fonts/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Forzar la ruta local del sprite de banderas */
.iti__flag {
  background-image: url("../vendor/intl-tel-input/img/flags.webp") !important;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url("../vendor/intl-tel-input/img/flags.webp") !important;
  }
}

:root {
  /* palette — neutral ink + signal orange */
  --ink: #141210;
  --ink-2: #23201b;
  --ink-3: #322d26;
  --paper: #f1f2f0;
  --paper-2: #e7e8e4;
  --card: #ffffff;
  --line: rgba(20, 18, 16, 0.12);
  --line-2: rgba(20, 18, 16, 0.07);
  --line-dark: rgba(255, 255, 255, 0.12);
  --muted: #4a4740;
  --muted-2: #928e83;
  --accent: #ff4a1c;
  --accent-ink: #d63807;
  --accent-soft: #ffe9e1;

  /* type — fuentes locales con respaldo del sistema */
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  /* Tamaños tipográficos ajustados para pantallas desktop */
  --text-hero: clamp(2.1rem, 1.2rem + 2.3vw, 3.4rem);
  --text-h2: clamp(1.75rem, 1.1rem + 1.8vw, 2.6rem);
  --text-h3: clamp(1.15rem, 0.95rem + 0.8vw, 1.5rem);
  --text-lead: clamp(0.92rem, 0.85rem + 0.25vw, 1.05rem);

  /* rhythm */
  --container: 1240px;
  --gutter: clamp(1.15rem, 0.6rem + 2.4vw, 2.75rem);
  --space-section: clamp(2.5rem, 1.5rem + 2.5vw, 4.5rem);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;

  --dur: 320ms;
  --dur-fast: 160ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 22px 60px -30px rgba(20, 18, 16, 0.5);
  --shadow-sm: 0 12px 30px -20px rgba(20, 18, 16, 0.45);
}

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

* { 
  margin: 0; 
}

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

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.98rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;

  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.page-loaded {
  opacity: 1;
  transform: translateY(0);
}

body.page-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

main#main {
  flex: 1 0 auto;
  width: 100%;
}

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

a { 
  color: inherit; 
  text-decoration: none; 
}

button { 
  font: inherit; 
  cursor: pointer; 
  border: none; 
  background: none; 
  color: inherit; 
}

ul { 
  list-style: none; 
  padding: 0; 
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

::selection { 
  background: var(--accent); 
  color: #fff; 
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus { 
  left: 0; 
}

:focus-visible { 
  outline: 3px solid var(--accent); 
  outline-offset: 3px; 
  border-radius: 4px; 
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
}
.eyebrow.on-dark { 
  color: var(--accent); 
}

.section {
  padding-block: var(--space-section);
}

.section-head {
  display: grid;
  gap: 0.75rem;
  max-width: 640px;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.4rem);
}
.section-head h2 { 
  font-size: var(--text-h2); 
}
.section-head p { 
  color: var(--muted); 
  font-size: var(--text-lead); 
}

/* Centrado completo para Flota y Valores Operativos */
.section-head.section-head-center {
  max-width: 100% !important;
  margin-inline: auto !important;
  text-align: center !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.section-head.section-head-center h2 {
  text-align: center !important;
  color: var(--ink) !important;
  width: 100% !important;
  margin-inline: auto !important;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem) !important;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.75rem 1.35rem;
  border-radius: 100px;
  transition: transform var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn svg { 
  width: 16px; 
  height: 16px; 
  transition: transform var(--dur) var(--ease); 
}
.btn-primary { 
  background: var(--accent); 
  color: #fff; 
}
.btn-primary:hover { 
  background: var(--accent-ink); 
  transform: translateY(-2px); 
}
.btn-primary:hover svg { 
  transform: translate(3px, -3px); 
}
.btn-dark { 
  background: var(--ink); 
  color: #fff; 
}
.btn-dark:hover { 
  background: var(--ink-2); 
  transform: translateY(-2px); 
}
.btn-ghost { 
  border: 1.5px solid var(--line); 
  color: var(--ink); 
}
.btn-ghost:hover { 
  border-color: var(--ink); 
  transform: translateY(-2px); 
}
.btn-ghost.on-dark { 
  border-color: var(--line-dark); 
  color: #fff; 
}
.btn-ghost.on-dark:hover { 
  border-color: #fff; 
}
.btn-lg { 
  padding: 0.85rem 1.5rem; 
  font-size: 0.96rem; 
}

.btn-scroll-style {
  background: var(--ink) !important;
  color: #ffffff !important;
  border: 1.5px solid transparent !important;
  transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-scroll-style:hover {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
  transform: translateY(-2px);
}

.btn-scroll-style:hover svg {
  transform: translateX(3px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.site-header.scrolled { 
  border-color: var(--line); 
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
}

.brand-logo {
  height: 56px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}

.brand-info {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.brand-sub {
  font-family: var(--font-display);
  font-size: 0.80rem;
  font-weight: 600;
  letter-spacing: 0.00em;
  text-transform: none;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.15;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  font-weight: 500;
  font-size: 0.94rem;
}
.nav-links a { 
  color: var(--muted); 
  transition: color var(--dur-fast); 
  position: relative; 
}
.nav-links a:hover, 
.nav-links a[aria-current="page"] { 
  color: var(--ink); 
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; 
  right: 0; 
  bottom: -6px;
  height: 2px;
  background: var(--accent);
}
.header-cta { 
  display: flex; 
  align-items: center; 
  gap: 0.8rem; 
}

.nav-toggle { 
  display: none; 
  width: 42px; 
  height: 42px; 
  border-radius: 10px; 
  border: 1px solid var(--line); 
}
.nav-toggle span { 
  display: block; 
  width: 18px; 
  height: 2px; 
  background: var(--ink); 
  margin: 3px auto; 
  transition: transform var(--dur), opacity var(--dur); 
}

/* ---------- hero (index) ---------- */
.hero {
  min-height: calc(100vh - 68px - 44px); 
  min-height: calc(100dvh - 68px - 44px);
  display: flex;
  align-items: center;
  padding-top: 0.8rem;
  padding-bottom: 1rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  align-items: center;
  width: 100%;
}
.hero-copy { 
  display: flex; 
  flex-direction: column; 
}
.hero h1 {
  font-size: var(--text-hero);
  letter-spacing: -0.03em;
  margin-top: 0.5rem;
  line-height: 1.05;
}
.hero h1 .stroke { 
  color: var(--accent); 
}
.hero-lead {
  color: var(--muted);
  font-size: var(--text-lead);
  max-width: 36ch;
  margin-top: 0.8rem;
  text-align: justify; 
}
.hero-actions { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 0.75rem; 
  margin-top: 1.2rem; 
}
.hero-stats {
  display: flex;
  gap: clamp(1rem, 0.5rem + 1.8vw, 2.2rem);
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stat .num { 
  font-family: var(--font-display); 
  font-weight: 800; 
  font-size: 1.6rem; 
  letter-spacing: -0.03em; 
}
.hero-stat .lbl { 
  font-family: var(--font-display); 
  font-size: 0.80rem; 
  letter-spacing: 0.0em; 
  text-transform: uppercase;
  font-weight: bold; 
  color: var(--muted); 
  margin-top: 0.1rem; 
}

.hero-visual { 
  position: relative; 
  width: 100%; 
  max-width: 100%;
}

/* Corrección responsive: altura flexible para no desbordar en móviles */
.hero-photo {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.4;
  height: auto;
  max-height: 520px;
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
.hero-photo img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center; 
}

/* ---------- feature split (imagen why-us adaptada) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.8rem, 1rem + 2.5vw, 3.5rem);
  align-items: center;
}
.split-media { 
  position: relative; 
  width: 100%;
  max-width: 100%;
}
.split-media img {
  border-radius: var(--radius);
  width: 100%;
  max-width: 100%;
  aspect-ratio: 4 / 3.4;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  object-position: center;
  box-shadow: var(--shadow-sm);
}
.split h2 { 
  font-size: var(--text-h2); 
  margin-top: 0.7rem; 
}
.check-list { 
  display: grid; 
  gap: 0.75rem; 
  margin-top: 1.2rem; 
}
.check-list li { 
  display: flex; 
  gap: 0.75rem; 
  align-items: flex-start; 
}
.check-list .ci { 
  width: 24px; 
  height: 24px; 
  border-radius: 7px; 
  background: var(--accent-soft); 
  color: var(--accent-ink); 
  display: grid; 
  place-items: center; 
  flex: 0 0 auto; 
  margin-top: 2px; 
}
.check-list .ci svg { 
  width: 14px; 
  height: 14px; 
}
.check-list strong { 
  font-weight: 600; 
  font-size: 0.92rem; 
}
.check-list p { 
  color: var(--muted); 
  font-size: 0.88rem; 
}

/* ---------- route / values ---------- */
.route { 
  background: var(--paper-2); 
}
.values-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 1rem; 
}
.value { 
  padding: 1.3rem; 
  border: 1px solid var(--line); 
  border-radius: var(--radius); 
  background: var(--card); 
}
.value .vi { 
  width: 40px; 
  height: 40px; 
  border-radius: 10px; 
  background: var(--ink); 
  color: var(--accent); 
  display: grid; 
  place-items: center; 
  margin-bottom: 0.9rem; 
}
.value .vi svg { 
  width: 20px; 
  height: 20px; 
}
.value h3 { 
  font-size: 1.1rem; 
}
.value p { 
  color: var(--muted); 
  margin-top: 0.4rem; 
  font-size: 0.88rem; 
}

/* ---------- flota / team ---------- */
.team-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 1.2rem; 
}
.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.member img,
.member .team-img {
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 5;
  height: clamp(220px, 28vh, 280px);
  object-fit: cover;
  width: 100%;
  display: block;
}
.member h4 { 
  font-family: var(--font-display); 
  font-size: 1.2rem; 
  margin-top: 0.75rem; 
  text-align: center; 
  color: var(--ink); 
}
.member p { 
  font-family: var(--font-display); 
  font-size: 1rem; 
  color: var(--muted); 
  letter-spacing: 0.00em; 
  text-align: center; 
}

/* Botón ficha técnica en minúsculas */
.btn-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  text-transform: none;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease);
}

.btn-pdf svg {
  width: 15px;
  height: 15px;
  stroke: var(--accent);
  transition: transform var(--dur-fast) var(--ease), stroke var(--dur-fast) var(--ease);
}

.btn-pdf:hover {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 18, 16, 0.15);
}

.btn-pdf:hover svg {
  stroke: #ffffff;
  transform: translateY(1.5px);
}

/* ---------- CONTACT / FORMS ---------- */
.contact-section {
  padding-top: clamp(1rem, 1.8vh, 1.8rem);
  padding-bottom: var(--space-section);
}

/* Encabezado centrado */
.contact-header-compact {
  text-align: center;
  margin-bottom: clamp(1.4rem, 2vh, 2.2rem);
}

.contact-header-compact h1 {
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3.2rem);
  color: var(--ink);
  line-height: 1.05;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 1.2rem + 2vw, 2.8rem);
  align-items: stretch;
}

.contact-card,
.form-card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2vh, 2rem);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

/* Títulos de tarjetas: centrados y en mayúsculas */
.card-title-group {
  text-align: center;
  margin-bottom: 1.2rem;
}

.card-title-group h2 {
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.15;
  text-transform: uppercase;
}

.card-title-group p {
  color: var(--ink);
  font-size: 0.88rem;
  margin-top: 0.35rem;
  line-height: 1.4;
}

/* Canales de atención: compactos y juntos */
.contact-items-stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.65rem;
}

.contact-card .info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.95rem;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast);
}

.contact-card .info-item:hover {
  transform: translateY(-2px);
  border-color: var(--line);
}

.contact-card .ii-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.contact-card .ii-ico svg { 
  width: 18px; 
  height: 18px; 
}

.contact-card h4 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.1rem;
}

.contact-card a,
.contact-card p {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
}

.contact-card a:hover {
  color: var(--accent-ink);
}

.contact-card small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.15rem;
}

.form-card {
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}

/* Homogeneización a 46px para todos los inputs normales */
.field input,
.field select {
  font: inherit;
  font-size: 0.92rem;
  height: 46px !important;
  line-height: 46px !important;
  padding: 0 1rem !important;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.field textarea {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  min-height: 100px;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #ffffff;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  align-items: end;
}

/* ---------- SELECTOR DE TELÉFONO (CORRECCIÓN DE PADDING Y BANDERA) ---------- */
.iti {
  width: 100%;
  display: block;
  position: relative;
}

/* Padding-left de 92px para separar el texto de la bandera y el prefijo */
.iti input#phone {
  width: 100% !important;
  font-family: var(--font-body) !important;
  font-size: 0.92rem !important;
  font-weight: 500 !important;
  height: 46px !important;
  line-height: 46px !important;
  padding-left: 92px !important;
  padding-right: 1rem !important;
  background: var(--paper) !important;
  border: 1.5px solid var(--line) !important;
  border-radius: 9px !important;
  color: var(--ink) !important;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.iti input#phone:focus {
  border-color: var(--accent) !important;
  background: #ffffff !important;
  outline: none !important;
}

.iti__country-container {
  padding: 0 0 0 10px !important;
  z-index: 2;
}

.iti__selected-country {
  background: transparent !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 100% !important;
}

.iti__selected-dial-code {
  font-family: var(--font-body) !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
}

.form-card .btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  font-size: 0.95rem;
  margin-top: auto;
}

.form-note {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* Animaciones del formulario */
@keyframes spin { 
  from { transform: rotate(0deg); } 
  to { transform: rotate(360deg); } 
}
.spin-anim { 
  display: inline-block; 
  vertical-align: middle; 
  margin-right: 8px; 
  animation: spin 0.8s linear infinite; 
}

.form-submitting-letter {
  transform: translateY(-24px) scale(0.92) rotateX(12deg) !important;
  opacity: 0 !important;
  filter: blur(1.5px);
  pointer-events: none;
}

.form-card-success {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 420px;
  text-align: center;
}

.letter-success-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem;
}

.success-seal-badge {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #10b981;
  border: 2px solid #10b981;
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
}
.success-seal-badge svg { 
  width: 30px; 
  height: 30px; 
}
.letter-success-box h3 { 
  font-size: 1.35rem; 
  color: var(--ink); 
  margin-bottom: 0.5rem; 
}
.letter-success-box p { 
  color: var(--muted); 
  font-size: 0.92rem; 
  max-width: 38ch; 
  line-height: 1.5; 
}
.success-track-code { 
  margin-top: 1.2rem; 
  font-family: var(--font-mono); 
  font-size: 0.72rem; 
  letter-spacing: 0.12em; 
  background: var(--paper-2); 
  padding: 0.4rem 0.9rem; 
  border-radius: 6px; 
  border: 1px dashed var(--line); 
}

.form-error-shake { 
  animation: errorShake 0.45s ease-in-out forwards; 
  border-color: #ef4444 !important; 
}
@keyframes errorShake { 
  0%, 100% { transform: translateX(0); } 
  20%, 60% { transform: translateX(-8px); } 
  40%, 80% { transform: translateX(8px); } 
}

.error-badge-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #dc2626;
  font-weight: 600;
  font-size: 0.8rem;
  background: #fef2f2;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #fecaca;
  margin-top: 0.6rem;
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding-top: clamp(2rem, 1.2rem + 1.8vw, 3rem);
  margin-top: auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 1.8rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand .brand { 
  margin-bottom: 0.9rem; 
  align-items: center;
}
.footer-brand p { 
  max-width: 34ch; 
  font-size: 0.88rem; 
}

/* Aumento exclusivo del logo en el footer */
.site-footer .brand-logo {
  height: 75px !important;
  max-width: 260px !important;
}

.site-footer .brand-name { 
  color: var(--accent);
  font-size: 1.65rem !important;
  line-height: 1.1;
}

.site-footer .brand-sub {
  font-size: 0.88rem !important;
  color: rgba(255, 255, 255, 0.75) !important;
  margin-top: 3px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.8rem;
}
.footer-col a {
  display: block;
  padding: 0.25rem 0;
  color: rgba(255, 255, 255, 0.72);
  transition: color var(--dur-fast);
  font-size: 0.88rem;
}
.footer-col a:hover { 
  color: #fff; 
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
}

/* ---------- botón volver arriba (css puro) ---------- */
.scroll-top-wrapper {
  position: absolute;
  top: 250px;
  bottom: 0;
  right: 28px;
  width: 44px;
  pointer-events: none;
  z-index: 99999;
}

.back-to-top {
  position: sticky;
  top: calc(100vh - 72px);
  top: calc(100dvh - 72px);
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  animation: mostrarConScroll linear both;
  animation-timeline: scroll(root);
  animation-range: 0px 250px;
}

@keyframes mostrarConScroll {
  from { 
    opacity: 0; 
    visibility: hidden; 
    transform: scale(0.6); 
    pointer-events: none; 
  }
  to { 
    opacity: 1; 
    visibility: visible; 
    transform: scale(1); 
    pointer-events: auto; 
  }
}

.back-to-top svg { 
  width: 20px; 
  height: 20px; 
  stroke: #ffffff; 
}
.back-to-top:hover { 
  background: var(--accent); 
  transform: scale(1.08) translateY(-2px); 
}

/* ---------- reveal animation ---------- */
.js [data-reveal] { 
  opacity: 0; 
  transform: translateY(24px); 
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); 
}
.js [data-reveal].in { 
  opacity: 1; 
  transform: none; 
}

/* ---------- responsive (pantallas móviles y tablets) ---------- */
@media screen and (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 520px; }
  .hero-photo { aspect-ratio: 16 / 11; }
  .split { grid-template-columns: 1fr; }
  .split-media { max-width: 540px; }
  .contact-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 760px) {
  .header-inner { 
    height: 60px; 
    gap: 0.6rem; 
  }

  .brand { 
    gap: 0.55rem; 
    min-width: 0; 
    flex: 1 1 auto; 
    align-items: center;
  }

  .brand-logo { 
    height: 38px; 
    width: auto; 
    max-width: 130px;
    flex-shrink: 0; 
  }

  /* El texto al lado del logo se mantiene siempre visible y legible */
  .brand-info {
    display: flex !important;
    min-width: 0;
  }

  .brand-name {
    font-size: 0.82rem !important;
    line-height: 1.15 !important;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .brand-sub { 
    display: none; 
  }

  .header-cta { 
    gap: 0.4rem; 
    flex-shrink: 0; 
  }

  .header-cta .btn-primary { 
    padding: 0.45rem 0.8rem !important; 
    font-size: 0.74rem !important; 
  }

  .header-cta .btn-primary svg { 
    width: 12px; 
    height: 12px; 
  }

  .nav-links { 
    display: none; 
  }

  .nav-toggle { 
    display: block; 
    width: 36px; 
    height: 36px; 
  }

  .hero-visual,
  .hero-photo,
  .split-media,
  .split-media img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .footer-top { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }

  .nav-links.open {
    display: flex;
    position: fixed;
    inset: 60px 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.5rem;
    z-index: 99;
  }
  .nav-links.open a { 
    padding: 0.85rem 0; 
    width: 100%; 
    border-bottom: 1px solid var(--line-2); 
    font-size: 1rem; 
  }
}

@media screen and (max-width: 460px) {
  .footer-top { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.2rem; }
}

/* En teléfonos muy angostos preservamos el texto y ajustamos proporciones */
@media screen and (max-width: 420px) {
  .brand-logo { 
    height: 34px; 
  }
  .brand-name { 
    font-size: 0.75rem !important; 
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { 
    animation-duration: 0.001ms !important; 
    animation-iteration-count: 1 !important; 
    transition-duration: 0.001ms !important; 
    scroll-behavior: auto !important; 
  }
  [data-reveal] { 
    opacity: 1; 
    transform: none; 
  }
}

/* ============================================================
   ESTILOS EXCLUSIVOS PARA IMPRIMIR / EXPORTAR EN PDF
   ============================================================ */
@media print {
  @page {
    size: auto;
    margin: 0;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    width: 1200px !important;
    min-width: 1200px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: var(--paper) !important;
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
    min-height: auto !important;
  }

  .wrap {
    width: 1140px !important;
    max-width: 1140px !important;
    padding-inline: 1.5rem !important;
    margin: 0 auto !important;
  }

  .scroll-top-wrapper,
  .back-to-top,
  .skip-link,
  .nav-toggle,
  .header-cta,
  .iti__country-list {
    display: none !important;
  }

  .site-header {
    position: static !important;
    width: 100% !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--line) !important;
    backdrop-filter: none !important;
  }

  .nav-links {
    display: flex !important;
  }

  .contact-grid,
  .hero-grid,
  .split {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .contact-card,
  .form-card,
  .split-media,
  .member,
  .value,
  .section-head,
  .footer-top {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }
}