@charset "UTF-8";

/* ============================================================================
   ENTRÉNATE · MAIN.CSS
   Hoja de estilos base de la web
   ============================================================================ */

/* ============================================================================
   FUENTES
   ============================================================================ */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-variable.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================================
   TOKENS · COLORES PRIMITIVOS
   ============================================================================ */
:root {
  /* Sand */
  --color-sand-50:  #faf7f2;
  --color-sand-100: #f7f3ee;
  --color-sand-200: #efe7dd;
  --color-sand-300: #e8dfd3;
  --color-sand-400: #e0d3c3;
  --color-sand-500: #d6c5b0;

  /* Camel */
  --color-camel-300: #d4b28c;
  --color-camel-400: #c69d72;
  --color-camel-500: #b88a5a;
  --color-camel-600: #a67a4d;
  --color-camel-700: #8f6740;

  /* Earth */
  --color-earth-500: #5a4a3b;
  --color-earth-700: #4a3c30;
  --color-earth-900: #3f2f23;

  /* Neutral */
  --color-white: #ffffff;
  --color-black: #000000;

  /* Auxiliares */
  --color-aux-emerald: #10b981;
  --color-aux-amber:   #f59e0b;
  --color-aux-coral:   #ff6b6b;
  --color-aux-violet:  #8b5cf6;
  --color-aux-indigo:  #6366f1;

  /* Semánticos funcionales */
  --color-success: #4f7a3f;
  --color-warning: #b8860b;
  --color-error:   #a53a2c;
  --color-info:    #3d6b8c;
}

/* ============================================================================
   TOKENS · COLORES SEMÁNTICOS
   ============================================================================ */
:root {
  --bg-base:     var(--color-sand-100);
  --bg-subtle:   var(--color-sand-50);
  --bg-elevated: var(--color-sand-200);
  --bg-header:   var(--color-sand-300);
  --bg-inverse:  var(--color-earth-900);

  --text-primary:   var(--color-earth-900);
  --text-body:      var(--color-earth-500);
  --text-muted:     color-mix(in srgb, var(--color-earth-500) 60%, transparent);
  --text-inverse:   var(--color-white);
  --text-accent:    var(--color-camel-500);
  --text-on-accent: var(--color-white);

  --border-subtle:  color-mix(in srgb, var(--color-earth-500) 10%, transparent);
  --border-default: color-mix(in srgb, var(--color-earth-500) 20%, transparent);
  --border-strong:  color-mix(in srgb, var(--color-earth-500) 40%, transparent);
  --border-accent:  var(--color-camel-500);

  --btn-primary-bg:          var(--color-camel-500);
  --btn-primary-bg-hover:    var(--color-camel-600);
  --btn-primary-bg-active:   var(--color-camel-700);
  --btn-primary-bg-disabled: color-mix(in srgb, var(--color-camel-500) 40%, transparent);
  --btn-primary-text:        var(--color-white);

  --focus-ring: color-mix(in srgb, var(--color-camel-500) 45%, transparent);
}

/* ============================================================================
   TOKENS · TIPOGRAFÍA
   ============================================================================ */
:root {
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --fw-regular: 400;
  --fw-semibold: 600;
  --fw-bold: 800;

  --fs-display: clamp(2.5rem, 6vw, 4rem);
  --fs-h1: clamp(2rem, 4vw, 3rem);
  --fs-h2: clamp(1.5rem, 3vw, 2rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-h4: 1.125rem;
  --fs-h5: 1rem;
  --fs-h6: 0.875rem;
  --fs-body-lg: 1.125rem;
  --fs-body: 1rem;
  --fs-body-sm: 0.9375rem;
  --fs-caption: 0.875rem;
  --fs-micro: 0.75rem;
  --fs-nano: 0.6875rem;

  --lh-tight: 1.1;
  --lh-heading: 1.2;
  --lh-snug: 1.4;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  --ls-tight: -0.02em;
  --ls-snug: -0.01em;
  --ls-normal: 0;
  --ls-wide: 0.05em;
  --ls-wider: 0.12em;

  --measure-narrow: 45ch;
  --measure-base: 65ch;
  --measure-wide: 75ch;
}

/* ============================================================================
   TOKENS · ESPACIADO
   ============================================================================ */
:root {
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --section-padding-y: var(--space-24);
  --section-padding-y-mobile: var(--space-16);
  --container-gutter: var(--space-6);
  --card-padding: var(--space-6);
  --gap-grid: var(--space-6);
}

/* ============================================================================
   TOKENS · RADIOS
   ============================================================================ */
:root {
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  --radius-button: var(--radius-md);
  --radius-card: var(--radius-lg);
  --radius-block: var(--radius-xl);
}

/* ============================================================================
   TOKENS · SOMBRAS
   ============================================================================ */
:root {
  --shadow-xs: 0 1px 2px rgba(63, 47, 35, 0.05);
  --shadow-sm: 0 2px 6px rgba(63, 47, 35, 0.06);
  --shadow-md: 0 6px 16px rgba(63, 47, 35, 0.08);
  --shadow-lg: 0 12px 32px rgba(63, 47, 35, 0.10);
  --shadow-xl: 0 24px 48px rgba(63, 47, 35, 0.12);
  --shadow-inset: inset 0 1px 2px rgba(63, 47, 35, 0.06);
  --shadow-focus: 0 0 0 4px var(--focus-ring);

  --shadow-card: var(--shadow-sm);
  --shadow-card-hover: var(--shadow-md);
  --shadow-modal: var(--shadow-lg);
}

/* ============================================================================
   TOKENS · BORDES
   ============================================================================ */
:root {
  --border-width-thin: 1px;
  --border-width-medium: 2px;
  --border-width-thick: 4px;
  --border-style: solid;
}

/* ============================================================================
   TOKENS · Z-INDEX
   ============================================================================ */
:root {
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;
}

/* ============================================================================
   TOKENS · TRANSICIONES
   ============================================================================ */
:root {
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   RESET
   ============================================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================================
   BASE
   ============================================================================ */
html,
body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: var(--lh-heading);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-tight); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-snug); }
h3 { font-size: var(--fs-h3); letter-spacing: var(--ls-snug); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }
h5 { font-size: var(--fs-h5); font-weight: var(--fw-semibold); }
h6 { font-size: var(--fs-h6); font-weight: var(--fw-semibold); letter-spacing: var(--ls-wide); text-transform: uppercase; }

p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--text-accent);
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover:not(.btn) {
  color: var(--color-camel-600);
}

small {
  font-size: var(--fs-caption);
}

code, pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--fs-caption);
}

/* ============================================================================
   LAYOUT
   ============================================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

.container-fluid {
  width: 100%;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

.section {
  padding-top: var(--section-padding-y-mobile);
  padding-bottom: var(--section-padding-y-mobile);
}

.section-alt {
  background-color: var(--bg-subtle);
}

.section-inv {
  background-color: var(--bg-inverse);
  color: var(--text-inverse);
}

.section-inv h1,
.section-inv h2,
.section-inv h3,
.section-inv h4,
.section-inv h5,
.section-inv h6 {
  color: var(--text-inverse);
}

/* ============================================================================
   UTILIDADES TIPOGRÁFICAS
   ============================================================================ */
.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-clamp-2,
.text-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-clamp-2 { -webkit-line-clamp: 2; }
.text-clamp-3 { -webkit-line-clamp: 3; }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--text-accent); }
.text-inverse { color: var(--text-inverse); }
.text-uppercase { text-transform: uppercase; }

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--fs-caption);
}

.kicker {
  display: inline-block;
  font-size: var(--fs-nano);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-accent);
}

.lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-muted);
}

/* ============================================================================
   UTILIDADES RESPONSIVE
   ============================================================================ */
.hidden-mobile {
  display: none;
}
@media (min-width: 768px) {
  .hidden-mobile { display: block; }
  .hidden-desktop { display: none; }
}
/* ============================================================================
   COMPONENTE · SECTION TITLE
   ============================================================================ */
.section-title {
  text-align: center;
  margin-bottom: var(--space-8);
}
@media (min-width: 768px) {
  .section-title {
    margin-bottom: var(--space-10);
  }
}

.section-title h2 {
  display: inline-block;
  padding: 8px 20px;
  background: color-mix(in srgb, var(--color-camel-500) 12%, transparent);
  color: var(--color-camel-600);
  border-radius: var(--radius-pill);
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-title > div {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-snug);
  color: var(--text-primary);
  text-wrap: balance;
}

.section-title__accent {
  color: var(--color-camel-500);
}
/* ===== FIN COMPONENTE · SECTION TITLE ===== */
/* ============================================================================
   COMPONENTES · BOTONES
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  font-family: inherit;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: var(--ls-wide);
  border-radius: var(--radius-button);
  border: var(--border-width-thin) var(--border-style) transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn:disabled,
.btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn .btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--duration-base) var(--ease-out);
}

.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text); }
.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
  color: var(--btn-primary-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn-primary:active { background: var(--btn-primary-bg-active); transform: translateY(0); }
.btn-primary:hover .btn-icon { transform: translateX(4px); }

.btn-secondary {
  background: transparent;
  color: var(--color-camel-500);
  border-color: var(--color-camel-500);
}
.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-camel-500) 8%, transparent);
  color: var(--color-camel-500);
  transform: translateY(-2px);
}
.btn-secondary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--color-camel-500);
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--color-camel-500) 10%, transparent);
  color: var(--color-camel-500);
}
.btn-ghost:hover .btn-icon { transform: translateX(4px); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-outline:hover {
  border-color: var(--color-camel-500);
  color: var(--color-camel-500);
  transform: translateY(-2px);
}

/* ============================================================
   Botón inverso sólido (para fondos oscuros)
   - Fondo blanco, texto oscuro.
   - En hover: el fondo sigue blanco, el texto pasa a camel.
   ============================================================ */
.btn-inverse {
  background: var(--color-white);
  color: var(--color-earth-900);
  border-color: var(--color-white);
}
.btn-inverse:hover {
  background: var(--color-white);
  color: var(--color-camel-600);
  border-color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-inverse:active {
  background: var(--color-white);
  color: var(--color-camel-700);
  transform: translateY(0);
}
.btn-inverse:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}
.btn-inverse:hover .btn-icon {
  transform: translateX(4px);
}

/* ============================================================
   Botón ghost inverso (para fondos oscuros)
   - Fondo transparente, borde blanco, texto blanco.
   - En hover: fondo blanco semitransparente con efecto esmerilado.
   ============================================================ */
.btn-ghost-inverse {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn-ghost-inverse:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  border-color: var(--color-white);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(-2px);
}
.btn-ghost-inverse:active {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(0);
}
.btn-ghost-inverse:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--fs-caption);
  border-radius: var(--radius-sm);
}
.btn-sm .btn-icon { width: 16px; height: 16px; }

.btn-lg {
  padding: 18px 36px;
  font-size: var(--fs-body);
}
.btn-lg .btn-icon { width: 20px; height: 20px; }

.btn-pill { border-radius: var(--radius-pill); }
.btn-block { width: 100%; }

.btn-icon-only {
  padding: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-circle);
}
.btn-icon-only.btn-sm { width: 36px; height: 36px; }
.btn-icon-only.btn-lg { width: 52px; height: 52px; }

/* ============================================================================
   COMPONENTES · FORMULARIOS
   ============================================================================ */
.form-group { margin-bottom: var(--space-5); }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: var(--ls-wide);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: var(--lh-snug);
  color: var(--text-body);
  background: var(--bg-subtle);
  border: var(--border-width-thin) var(--border-style) var(--border-default);
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast) var(--ease-out);
}
.form-input { height: 48px; }
.form-textarea { min-height: 120px; resize: vertical; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4a3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 44px;
  cursor: pointer;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:hover,
.form-textarea:hover,
.form-select:hover { border-color: var(--border-strong); }

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-camel-500);
  background: var(--color-white);
  box-shadow: var(--shadow-focus);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-header);
}

.form-help {
  display: block;
  font-size: var(--fs-caption);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.form-error {
  display: block;
  font-size: var(--fs-caption);
  color: var(--color-error);
  margin-top: var(--space-2);
  font-weight: var(--fw-semibold);
}

.form-input.is-error,
.form-textarea.is-error { border-color: var(--color-error); }

.form-input.is-success,
.form-textarea.is-success { border-color: var(--color-success); }

.form-input-icon { position: relative; }
.form-input-icon .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.form-input-icon .form-input { padding-left: 44px; }
.form-input-icon:focus-within .input-icon { color: var(--color-camel-500); }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--fs-body-sm);
  color: var(--text-body);
  line-height: var(--lh-snug);
}
.form-check input {
  appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  border: var(--border-width-thin) var(--border-style) var(--border-strong);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}
.form-check input[type="checkbox"] { border-radius: var(--radius-xs); }
.form-check input[type="radio"] { border-radius: var(--radius-circle); }
.form-check input:hover { border-color: var(--color-camel-500); }
.form-check input:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.form-check input:checked {
  background: var(--color-camel-500);
  border-color: var(--color-camel-500);
}
.form-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--color-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-check input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  background: var(--color-white);
}

/* ============================================================================
   COMPONENTES · BADGES, CHIPS, PILLS
   ============================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 12px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  line-height: 1.4;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-primary { background: var(--color-camel-500); color: var(--color-white); }
.badge-default { background: color-mix(in srgb, var(--color-camel-500) 12%, transparent); color: var(--color-camel-600); }
.badge-success { background: color-mix(in srgb, var(--color-success) 12%, transparent); color: var(--color-success); }
.badge-warning { background: color-mix(in srgb, var(--color-warning) 14%, transparent); color: var(--color-warning); }
.badge-error   { background: color-mix(in srgb, var(--color-error) 12%, transparent);   color: var(--color-error); }
.badge-info    { background: color-mix(in srgb, var(--color-info) 12%, transparent);    color: var(--color-info); }
.badge-neutral { background: color-mix(in srgb, var(--color-earth-500) 10%, transparent); color: var(--color-earth-700); }

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-circle);
  background: currentColor;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 8px 16px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  background: var(--bg-subtle);
  color: var(--text-body);
  border: var(--border-width-thin) var(--border-style) var(--border-default);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.chip:hover { border-color: var(--color-camel-500); color: var(--color-camel-500); }
.chip.is-active { background: var(--color-camel-500); color: var(--color-white); border-color: var(--color-camel-500); }
.chip .chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: color-mix(in srgb, currentColor 15%, transparent);
  border-radius: var(--radius-pill);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
}

/* ============================================================================
   COMPONENTES · CARDS
   ============================================================================ */
.card {
  background: var(--bg-elevated);
  border: var(--border-width-thin) var(--border-style) var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all var(--duration-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card-media {
  position: relative;
  overflow: hidden;
  background: var(--bg-header);
  aspect-ratio: 16 / 9;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}
.card-media.ratio-4-3 { aspect-ratio: 4 / 3; }
.card-media.ratio-1-1 { aspect-ratio: 1 / 1; }
.card-body {
  padding: var(--card-padding);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.card-title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: var(--lh-snug);
}
.card-text {
  font-size: var(--fs-body-sm);
  color: var(--text-body);
  line-height: var(--lh-normal);
  flex: 1;
}
.card-footer {
  padding: var(--space-4) var(--card-padding);
  border-top: var(--border-width-thin) var(--border-style) var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: color-mix(in srgb, var(--color-camel-500) 40%, transparent);
}
.card-hover:hover .card-media img { transform: scale(1.05); }
.card-featured {
  border-color: var(--color-camel-500);
  border-width: var(--border-width-medium);
  background: color-mix(in srgb, var(--color-camel-500) 4%, var(--bg-elevated));
}
.card-flat { box-shadow: none; }
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-link:hover { color: inherit; }

/* ============================================================================
   COMPONENTES · ALERTAS
   ============================================================================ */
.alert {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border-left: var(--border-width-thick) var(--border-style) currentColor;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-snug);
}
.alert-icon { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.alert-content { flex: 1; }
.alert-title { display: block; font-weight: var(--fw-semibold); margin-bottom: var(--space-1); }
.alert-text { margin: 0; }

.alert-success { background: color-mix(in srgb, var(--color-success) 10%, var(--bg-subtle)); color: var(--color-success); }
.alert-warning { background: color-mix(in srgb, var(--color-warning) 10%, var(--bg-subtle)); color: var(--color-warning); }
.alert-error   { background: color-mix(in srgb, var(--color-error) 10%, var(--bg-subtle));   color: var(--color-error); }
.alert-info    { background: color-mix(in srgb, var(--color-info) 10%, var(--bg-subtle));    color: var(--color-info); }

/* ============================================================================
   COMPONENTES · SEPARADORES
   ============================================================================ */
.divider {
  height: 1px;
  background: var(--border-subtle);
  border: 0;
  margin: var(--space-6) 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-muted);
  font-size: var(--fs-caption);
}
.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}
.divider-vertical {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
  display: inline-block;
  vertical-align: middle;
}

/* ============================================================================
   COMPONENTES · ICONOS
   ============================================================================ */
.icon { display: inline-flex; align-items: center; justify-content: center; color: currentColor; }
.icon svg { width: 100%; height: 100%; display: block; }
.icon-xs  { width: 14px; height: 14px; }
.icon-sm  { width: 16px; height: 16px; }
.icon     { width: 20px; height: 20px; }
.icon-md  { width: 24px; height: 24px; }
.icon-lg  { width: 32px; height: 32px; }
.icon-xl  { width: 48px; height: 48px; }
.icon-2xl { width: 64px; height: 64px; }

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--duration-base) var(--ease-out);
}
.icon-box-sm { width: 40px; height: 40px; }
.icon-box    { width: 48px; height: 48px; }
.icon-box-lg { width: 64px; height: 64px; }

.icon-box-primary {
  background: color-mix(in srgb, var(--color-camel-500) 12%, transparent);
  color: var(--color-camel-500);
}
.icon-box-inverse {
  background: var(--color-camel-500);
  color: var(--color-white);
}
.icon-box-neutral {
  background: color-mix(in srgb, var(--color-earth-500) 10%, transparent);
  color: var(--color-earth-700);
}
.icon-box-circle { border-radius: var(--radius-circle); }

/* ============================================================================
   COMPONENTES · ENLACES
   ============================================================================ */
.link { color: var(--color-camel-500); transition: color var(--duration-fast) var(--ease-out); }
.link:hover { color: var(--color-camel-600); text-decoration: underline; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-camel-500);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-body-sm);
  transition: gap var(--duration-base) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.link-arrow:hover { gap: var(--space-3); color: var(--color-camel-600); }
.link-arrow .link-arrow-icon { width: 16px; height: 16px; transition: transform var(--duration-base) var(--ease-out); }

.link-underline {
  position: relative;
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
  padding-bottom: 2px;
}
.link-underline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-camel-500);
  transition: all var(--duration-base) var(--ease-out);
  transform: translateX(-50%);
}
.link-underline:hover { color: var(--color-camel-500); }
.link-underline:hover::after { width: 100%; }

.link-inverse { color: var(--color-camel-300); }
.link-inverse:hover { color: var(--color-white); text-decoration: underline; }

/* ============================================================================
   COMPONENTES · AVATAR
   ============================================================================ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  overflow: hidden;
  background: var(--color-camel-500);
  color: var(--color-white);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
  border: 2px solid var(--bg-subtle);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-xs { width: 24px; height: 24px; font-size: var(--fs-micro); }
.avatar-sm { width: 32px; height: 32px; font-size: var(--fs-caption); }
.avatar    { width: 40px; height: 40px; font-size: var(--fs-caption); }
.avatar-md { width: 48px; height: 48px; font-size: var(--fs-body-sm); }
.avatar-lg { width: 64px; height: 64px; font-size: var(--fs-body); }
.avatar-xl { width: 96px; height: 96px; font-size: var(--fs-h3); }

.avatar-group { display: inline-flex; align-items: center; }
.avatar-group .avatar { margin-left: -10px; transition: transform var(--duration-fast) var(--ease-out); }
.avatar-group .avatar:first-child { margin-left: 0; }
.avatar-group .avatar:hover { transform: translateY(-4px); z-index: 2; }
.avatar-group .avatar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -10px;
  border-radius: var(--radius-circle);
  background: var(--color-earth-900);
  color: var(--color-white);
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  border: 2px solid var(--bg-subtle);
}

/* ============================================================================
   COMPONENTES · TABLA
   ============================================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: var(--border-width-thin) var(--border-style) var(--border-subtle);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elevated);
  font-size: var(--fs-body-sm);
}
.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: var(--border-width-thin) var(--border-style) var(--border-subtle);
  vertical-align: top;
}
.table th {
  background: var(--bg-header);
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}
.table tr:last-child td { border-bottom: 0; }
.table-striped tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--color-earth-500) 4%, transparent);
}
.table-bordered th,
.table-bordered td {
  border: var(--border-width-thin) var(--border-style) var(--border-subtle);
}

/* ============================================================================
   BLOQUE FUNDAMENTAL: HEADER
   ============================================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background-color: var(--bg-header);
  border-bottom: var(--border-width-thin) var(--border-style) var(--border-subtle);
  padding: var(--space-3) 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.header__logo {
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}
.header__logo img {
  max-height: 44px;
  width: auto;
}

.header__nav {
  display: none;
}
@media (min-width: 992px) {
  .header__nav {
    display: block;
  }
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}

.header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-out);
}
.header__nav-link:hover {
  color: var(--color-camel-600);
}
.header__nav-link::after {
  content: "";
  position: absolute;
  left: var(--space-4);
  right: var(--space-4);
  bottom: 0;
  height: 2px;
  background: var(--color-camel-500);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--duration-base) var(--ease-out);
}
.header__nav-link:hover::after,
.header__nav-link.is-active::after {
  transform: scaleX(1);
}
.header__nav-link.is-active {
  color: var(--color-camel-600);
}

.header__cta {
  display: none;
}
@media (min-width: 992px) {
  .header__cta {
    display: inline-flex;
  }
}

.header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: var(--text-body);
  transition: background var(--duration-fast) var(--ease-out);
  margin-left: auto;
}
@media (min-width: 992px) {
  .header__toggle {
    display: none;
  }
}
.header__toggle:hover {
  background: color-mix(in srgb, var(--color-camel-500) 10%, transparent);
}
.header__toggle svg {
  width: 24px;
  height: 24px;
}

.header__mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-header);
  border-bottom: var(--border-width-thin) var(--border-style) var(--border-subtle);
  padding: var(--space-4) 0;
  box-shadow: var(--shadow-md);
}
.header__mobile.is-open {
  display: block;
}
@media (min-width: 992px) {
  .header__mobile {
    display: none !important;
  }
}

.header__mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.header__mobile-link {
  display: block;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.header__mobile-link:hover {
  background: color-mix(in srgb, var(--color-camel-500) 10%, transparent);
  color: var(--color-camel-600);
}

.header__mobile .btn {
  margin-top: var(--space-4);
}
/* ===== FIN BLOQUE FUNDAMENTAL: HEADER ===== */

/* ============================================================================
   BLOQUE FUNDAMENTAL: FOOTER
   ============================================================================ */
.footer {
  background-color: var(--bg-elevated);
  border-top: var(--border-width-thin) var(--border-style) var(--border-subtle);
  padding: var(--space-12) 0 var(--space-6);
  color: var(--text-body);
}

.footer__top {
  padding-bottom: var(--space-10);
  border-bottom: var(--border-width-thin) var(--border-style) var(--border-subtle);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer__brand-name {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: var(--ls-snug);
}

.footer__description {
  font-size: var(--fs-body-sm);
  line-height: var(--lh-normal);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  max-width: 40ch;
}

.footer__social {
  display: flex;
  gap: var(--space-2);
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--color-earth-500) 8%, transparent);
  color: var(--text-body);
  transition: all var(--duration-fast) var(--ease-out);
}
.footer__social a:hover {
  background: var(--color-camel-500);
  color: var(--color-white);
  transform: translateY(-2px);
}
.footer__social svg {
  width: 18px;
  height: 18px;
}

.footer__heading {
  font-size: var(--fs-h5);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  position: relative;
  padding-bottom: var(--space-3);
}
.footer__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background: var(--color-camel-500);
}

.footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__links li {
  margin-bottom: var(--space-2);
}
.footer__links a {
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
  display: inline-block;
}
.footer__links a:hover {
  color: var(--color-camel-500);
  transform: translateX(4px);
}

.footer__newsletter-text {
  font-size: var(--fs-body-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: var(--lh-normal);
}

.footer__newsletter {
  display: flex;
  gap: var(--space-2);
  position: relative;
}
.footer__newsletter input[type="email"] {
  flex: 1;
  height: 48px;
  padding: 0 52px 0 16px;
  font-size: var(--fs-body-sm);
  color: var(--text-body);
  background: var(--bg-subtle);
  border: var(--border-width-thin) var(--border-style) var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}
.footer__newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--color-camel-500);
  box-shadow: var(--shadow-focus);
}
.footer__newsletter input[type="email"]::placeholder {
  color: var(--text-muted);
}
.footer__newsletter button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-camel-500);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast) var(--ease-out);
}
.footer__newsletter button:hover {
  background: var(--color-camel-600);
}
.footer__newsletter button svg {
  width: 18px;
  height: 18px;
}

.footer__bottom {
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer__legal a {
  color: var(--text-muted);
  font-size: var(--fs-caption);
  transition: color var(--duration-fast) var(--ease-out);
}
.footer__legal a:hover {
  color: var(--color-camel-500);
}

.footer__credits a {
  color: var(--color-camel-500);
  font-weight: var(--fw-semibold);
}
/* ===== FIN BLOQUE FUNDAMENTAL: FOOTER ===== */
/* ============================================================================
   BLOQUE FUNDAMENTAL: SCROLL TOP
   ============================================================================ */
.scroll-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-camel-500);
  color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--duration-base) var(--ease-out);
  z-index: var(--z-sticky);
}

.scroll-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* El SVG hereda el color del padre. Lo forzamos por si acaso. */
.scroll-top svg {
  width: 20px;
  height: 20px;
  color: inherit;
  stroke: currentColor;
}

/* Hover: fondo más oscuro, icono blanco explícito.
   Usamos un selector con más especificidad que el a:hover global
   (a.scroll-top:hover en lugar de .scroll-top:hover). */
a.scroll-top:hover {
  background: var(--color-camel-600);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Nos aseguramos de que el SVG dentro del hover también es blanco. */
a.scroll-top:hover svg,
a.scroll-top:hover svg polyline {
  color: var(--color-white);
  stroke: var(--color-white);
}

.scroll-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}
/* ===== FIN BLOQUE FUNDAMENTAL: SCROLL TOP ===== */