/* ==========================================================================
   KAZAN GLOBAL TRADE · Modelo 3: Video y Scroll (Storytelling)
   Diseño: SimCodec · Identidad: Navy #000035 / Oro #D0A755 / Crema #F6F3EC
   Sin CDNs externas. Tipografías locales WOFF2. Cero emojis.
   ========================================================================== */

/* --- Fuentes Locales --- */
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/inter-tight-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/inter-tight-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- Variables de Marca y Diseño --- */
:root {
  --navy: #000035;
  --navy-2: #070724;
  --navy-deep: #030314;
  --navy-card: #0a0a3c;
  --crema: #f6f3ec;
  --crema-suave: #faf8f5;
  --crema-card: #ffffff;
  --blanco: #ffffff;
  --tinta: #141426;
  --tinta-suave: #4a4a60;
  --tinta-muted: #76768e;
  --oro: #d0a755;
  --oro-brillante: #e5be6b;
  --oro-claro: #f0d79a;
  --oro-suave: rgba(208, 167, 85, 0.15);
  --oro-glow: rgba(208, 167, 85, 0.35);
  --linea: rgba(0, 0, 53, 0.12);
  --linea-clara: rgba(255, 255, 255, 0.16);
  --linea-oro: rgba(208, 167, 85, 0.3);
  --sombra-sm: 0 4px 16px rgba(0, 0, 53, 0.06);
  --sombra-md: 0 10px 32px rgba(0, 0, 53, 0.12);
  --sombra-lg: 0 20px 50px rgba(0, 0, 53, 0.22);
  --sombra-oro: 0 8px 30px rgba(208, 167, 85, 0.25);
  --header-h: 114px;
  --f-texto: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-titulo: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --f-acento: 'Instrument Serif', Georgia, serif;
  --gutter: clamp(20px, 4.5vw, 64px);
  --radio: 12px;
  --radio-lg: 20px;
}

/* --- View Transitions API --- */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: 350ms cubic-bezier(0.4, 0, 0.2, 1) both fadeOut;
}
::view-transition-new(root) {
  animation: 350ms cubic-bezier(0.4, 0, 0.2, 1) both fadeIn;
}
@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Reset y Estilos Globales --- */
*, *::before, *::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}
body {
  margin: 0;
  font-family: var(--f-texto);
  color: var(--tinta);
  background-color: var(--crema);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
}
ul, ol {
  list-style: none;
}
button, input, select, textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 3px;
}

/* Enlace accesible para lectores de pantalla */
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 9999;
  background: var(--oro);
  color: var(--navy);
  padding: 12px 20px;
  font-weight: 700;
  border-radius: var(--radio);
  box-shadow: var(--sombra-md);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* Capa de grano sutil */
.grain-overlay {
  position: fixed;
  inset: -50%;
  z-index: 998;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* --- Transición de Hilo en Diagonal (Thread Wipe) --- */
.thread-transition-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  transform: skewX(-12deg) scale(1.15);
  visibility: hidden;
}
.thread-stripe {
  height: 100%;
  width: 100%;
  transform: translateY(105%);
}
.thread-stripe:nth-child(1) { background-color: var(--navy-deep); }
.thread-stripe:nth-child(2) { background-color: var(--oro); }
.thread-stripe:nth-child(3) { background-color: var(--navy); }
.thread-stripe:nth-child(4) { background-color: var(--oro-claro); }

/* --- Cursor Magnético (Desktop) --- */
@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor {
    cursor: none;
  }
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor select,
  body.has-custom-cursor label {
    cursor: none;
  }
  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--oro);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease;
  }
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(208, 167, 85, 0.6);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
  }
  .cursor-ring.is-hovering {
    width: 64px;
    height: 64px;
    border-color: var(--oro);
    background-color: rgba(208, 167, 85, 0.12);
  }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* ==========================================================================
   ENCABEZADO, BARRA DE AVISO Y SELECTOR DE MODELOS
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background-color: var(--navy);
  color: var(--blanco);
  box-shadow: 0 4px 24px rgba(0, 0, 53, 0.3);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Barra superior de aviso SimCodec */
.demo-notice-bar {
  background-color: var(--navy-deep);
  border-bottom: 1px solid var(--linea-clara);
  padding: 8px var(--gutter);
  font-size: 0.8125rem;
  color: var(--oro-claro);
}
.notice-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: nowrap;
}
.notice-text {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
  white-space: nowrap;
}
.notice-text > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.notice-link-orig {
  flex-shrink: 0;
}
.models-switcher {
  flex-shrink: 0;
}
.notice-pill {
  background: var(--oro);
  color: var(--navy-deep);
  font-weight: 700;
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.notice-link-orig {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blanco);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.notice-link-orig:hover {
  color: var(--oro);
}

/* Selector discreto de modelos */
.models-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid var(--linea-clara);
}
.models-switcher-label {
  color: var(--oro);
  font-weight: 600;
  margin-right: 2px;
}
.model-badge-link {
  color: rgba(255, 255, 255, 0.7);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.model-badge-link:hover {
  color: var(--blanco);
  background: rgba(255, 255, 255, 0.12);
}
.model-badge-link[aria-current="page"] {
  color: var(--navy-deep);
  background: var(--oro);
  font-weight: 700;
}

@media (max-width: 1400px) {
  .models-switcher-label {
    display: none;
  }
}

/* Barra de navegación principal */
.header-main-bar {
  padding: 10px var(--gutter);
}
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s ease;
}
.brand-link:hover {
  opacity: 0.9;
}
.brand-logo-img {
  height: 48px;
  width: auto;
}

/* Menú de escritorio */
.main-nav {
  display: flex;
  align-items: center;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-item-link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 6px 0;
  transition: color 0.2s ease;
}
.nav-item-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--oro);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-item-link:hover {
  color: var(--oro);
}
.nav-item-link:hover::after,
.nav-item-link.is-active::after {
  width: 100%;
}
.nav-item-link.is-active {
  color: var(--oro);
  font-weight: 600;
}

/* Botón CTA y hamburguesa */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}
.btn-oro {
  background-color: var(--oro);
  color: var(--navy-deep);
  box-shadow: 0 4px 16px rgba(208, 167, 85, 0.3);
}
.btn-oro:hover {
  background-color: var(--oro-brillante);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(208, 167, 85, 0.45);
}
.btn-outline-oro {
  border-color: var(--oro);
  color: var(--oro);
  background: transparent;
}
.btn-outline-oro:hover {
  background: var(--oro);
  color: var(--navy-deep);
  transform: translateY(-2px);
}
.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
}
.btn-lg {
  padding: 16px 36px;
  font-size: 1.0625rem;
}

/* Botón hamburguesa móvil */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  color: var(--blanco);
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}
.hamburger-lines {
  position: relative;
  width: 24px;
  height: 18px;
  margin: 0 auto;
}
.hamburger-lines span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--oro);
  border-radius: 2px;
  left: 0;
  transition: 0.25s ease-in-out;
}
.hamburger-lines span:nth-child(1) { top: 0; }
.hamburger-lines span:nth-child(2) { top: 8px; }
.hamburger-lines span:nth-child(3) { top: 16px; }

.mobile-menu-btn[aria-expanded="true"] .hamburger-lines span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-lines span:nth-child(2) {
  opacity: 0;
  left: -20px;
}
.mobile-menu-btn[aria-expanded="true"] .hamburger-lines span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

/* Cajón de menú móvil */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--navy-deep);
  z-index: 850;
  padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.mobile-drawer.is-open {
  transform: translateX(0);
}
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.mobile-nav-link {
  font-family: var(--f-titulo);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blanco);
  transition: color 0.2s ease;
}
.mobile-nav-link.is-active,
.mobile-nav-link:hover {
  color: var(--oro);
}
.mobile-drawer-footer {
  padding-top: 30px;
  border-top: 1px solid var(--linea-clara);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ==========================================================================
   HERO CINEMÁTICO CON VIDEO DE FONDO
   ========================================================================== */
.hero-video-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-h) + 48px);
  background-color: var(--navy-deep);
  color: var(--blanco);
  overflow: hidden;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-video-element {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  filter: brightness(1.1) saturate(1.15);
}
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  /* Degradado lateral solo detrás del texto: el resto del cuadro conserva color y luz */
  background: linear-gradient(90deg, rgba(3, 3, 20, 0.78) 0%, rgba(3, 3, 20, 0.6) 40%, rgba(3, 3, 20, 0.2) 66%, rgba(3, 3, 20, 0) 86%),
              linear-gradient(to top, rgba(3, 3, 20, 0.55) 0%, rgba(3, 3, 20, 0) 28%);
}
.hero-content-container {
  text-shadow: 0 2px 18px rgba(3, 3, 20, 0.45);
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px var(--gutter);
  width: 100%;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--oro);
  margin-bottom: 24px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background-color: var(--oro);
}
.hero-title {
  font-family: var(--f-titulo);
  font-size: clamp(2.75rem, 7.5vw, 6.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 1100px;
  margin-bottom: 28px;
}
.hero-title .title-accent {
  font-family: var(--f-acento);
  font-style: italic;
  font-weight: 400;
  color: var(--oro);
  letter-spacing: normal;
}
.hero-description {
  font-size: clamp(1.125rem, 2vw, 1.35rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 40px;
}
.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  max-width: 880px;
  padding-top: 32px;
  border-top: 1px solid var(--linea-clara);
}
.badge-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge-number {
  font-family: var(--f-titulo);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--oro);
}
.badge-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   STORYTELLING POR CAPÍTULOS CON CANVAS SCRUBBING («Del ovillo al proyecto»)
   ========================================================================== */
.story-scroll-section {
  position: relative;
  background-color: var(--navy-deep);
  color: var(--blanco);
}
.story-pin-wrapper {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Canvas interactivo de fondo */
.story-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.story-canvas-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(3, 3, 20, 0.5) 0%, rgba(3, 3, 20, 0.18) 45%, rgba(3, 3, 20, 0) 70%),
              linear-gradient(to top, rgba(3, 3, 20, 0.35) 0%, rgba(3, 3, 20, 0) 30%);
  pointer-events: none;
}

/* Barra de progreso de capítulos */
.story-chapter-indicator {
  position: absolute;
  top: calc(var(--header-h) + 14px);
  right: var(--gutter);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(3, 3, 20, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--linea-oro);
  box-shadow: var(--sombra-md);
}
.chapter-steps {
  display: flex;
  align-items: center;
  gap: 24px;
}
.chapter-step-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}
.chapter-step-badge.is-active {
  color: var(--oro);
}
.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}
.chapter-step-badge.is-active .step-dot {
  background: var(--oro);
  box-shadow: 0 0 12px var(--oro);
  transform: scale(1.3);
}

/* Tarjetas narrativas de capítulos */
.story-narrative-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.chapter-card {
  position: absolute;
  bottom: clamp(20px, 4vh, 48px);
  left: var(--gutter);
  max-width: min(560px, calc(100vw - var(--gutter) * 2));
  max-height: calc(100vh - var(--header-h) - 100px);
  overflow-y: auto;
  background: rgba(7, 7, 36, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--linea-oro);
  border-radius: var(--radio-lg);
  padding: clamp(20px, 2.5vw, 32px);
  box-shadow: var(--sombra-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.chapter-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.chapter-num {
  font-family: var(--f-titulo);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--oro);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.chapter-heading {
  font-family: var(--f-titulo);
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--blanco);
}
.chapter-heading em {
  font-family: var(--f-acento);
  font-style: italic;
  font-weight: 400;
  color: var(--oro);
}
.chapter-text {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}
.chapter-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.feature-pill {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--oro-claro);
  background: rgba(208, 167, 85, 0.1);
  border: 1px solid rgba(208, 167, 85, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
}

/* ==========================================================================
   SECCIÓN DE VIDEO EN BUCLE: EL ARTE DEL PROCESO
   ========================================================================== */
.craft-video-section {
  position: relative;
  background-color: var(--navy);
  color: var(--blanco);
  padding: 120px var(--gutter);
  overflow: hidden;
}
.craft-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.craft-video-card {
  position: relative;
  border-radius: var(--radio-lg);
  overflow: hidden;
  box-shadow: var(--sombra-lg);
  border: 1px solid var(--linea-oro);
}
.craft-video-element {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.craft-video-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(3, 3, 20, 0.82);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--oro);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--linea-oro);
}
.craft-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--oro);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}
.craft-content .section-eyebrow {
  color: var(--oro);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.craft-content .section-title {
  font-family: var(--f-titulo);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 24px;
}
.craft-content .section-title em {
  font-family: var(--f-acento);
  font-style: italic;
  font-weight: 400;
  color: var(--oro);
}
.craft-lead {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
  line-height: 1.65;
}
.craft-values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.craft-value-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radio);
  border: 1px solid var(--linea-clara);
}
.craft-icon-wrap {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--oro-suave);
  color: var(--oro);
  display: flex;
  align-items: center;
  justify-content: center;
}
.craft-value-title {
  font-family: var(--f-titulo);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--blanco);
}
.craft-value-desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   CATÁLOGO DESTACADO DE PRODUCTOS (Fondo Crema)
   ========================================================================== */
.products-section {
  padding: 120px var(--gutter);
  background-color: var(--crema);
  color: var(--tinta);
}
.section-header-center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}
.section-eyebrow-dark {
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.section-title-dark {
  font-family: var(--f-titulo);
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 16px;
}
.section-title-dark em {
  font-family: var(--f-acento);
  font-style: italic;
  font-weight: 400;
  color: var(--oro);
}
.section-subtitle-dark {
  font-size: 1.125rem;
  color: var(--tinta-suave);
}

.products-grid {
  max-width: 1400px;
  margin: 0 auto 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.product-card {
  background: var(--crema-card);
  border-radius: var(--radio-lg);
  overflow: hidden;
  box-shadow: var(--sombra-sm);
  border: 1px solid var(--linea);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--sombra-md);
}
.product-image-wrap {
  position: relative;
  background: #eae6dc;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img {
  transform: scale(1.05);
}
.product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--navy);
  color: var(--oro);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.05em;
}
.product-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}
.product-title {
  font-family: var(--f-titulo);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.product-desc {
  font-size: 0.9375rem;
  color: var(--tinta-suave);
  margin-bottom: 20px;
  line-height: 1.55;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--linea);
  padding-top: 16px;
}
.product-tag {
  font-size: 0.8125rem;
  color: var(--tinta-muted);
  font-weight: 500;
}
.product-btn-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.product-btn-link:hover {
  color: var(--oro);
  transform: translateX(4px);
}

/* Categorías de tienda en píldoras */
.categories-teaser-box {
  max-width: 1400px;
  margin: 0 auto;
  background: var(--navy);
  color: var(--blanco);
  border-radius: var(--radio-lg);
  padding: clamp(32px, 5vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.categories-teaser-text {
  max-width: 500px;
}
.categories-teaser-title {
  font-family: var(--f-titulo);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.categories-teaser-title em {
  font-family: var(--f-acento);
  font-style: italic;
  font-weight: 400;
  color: var(--oro);
}
.categories-teaser-p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9375rem;
}
.categories-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 650px;
}
.cat-pill {
  background: rgba(255, 255, 255, 0.08);
  color: var(--blanco);
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--linea-clara);
  transition: all 0.2s ease;
}
.cat-pill:hover {
  background: var(--oro);
  color: var(--navy-deep);
  border-color: var(--oro);
}

/* ==========================================================================
   PÁGINAS INTERNAS: PRODUCTOS, NOSOTROS, CONTACTO
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--blanco);
  padding: calc(var(--header-h) + 60px) var(--gutter) 80px;
  position: relative;
  overflow: hidden;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(208, 167, 85, 0.15) 0%, transparent 60%);
}
.page-hero-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}
.page-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--oro);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.page-hero-title {
  font-family: var(--f-titulo);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}
.page-hero-title em {
  font-family: var(--f-acento);
  font-style: italic;
  font-weight: 400;
  color: var(--oro);
}
.page-hero-lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  line-height: 1.6;
}

/* Calculadora Interactiva de Trapillos (en productos.html) */
.calculator-section {
  padding: 80px var(--gutter);
  background-color: var(--crema-suave);
  border-bottom: 1px solid var(--linea);
}
.calc-container {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--blanco);
  border-radius: var(--radio-lg);
  padding: clamp(30px, 5vw, 60px);
  box-shadow: var(--sombra-md);
  border: 1px solid var(--linea);
}
.calc-header {
  margin-bottom: 40px;
  text-align: center;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.calc-control-group {
  margin-bottom: 24px;
}
.calc-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.calc-select, .calc-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radio);
  border: 1px solid var(--linea);
  background: var(--crema-suave);
  color: var(--tinta);
  font-size: 1rem;
}
.calc-result-card {
  background: var(--navy);
  color: var(--blanco);
  border-radius: var(--radio-lg);
  padding: 32px;
  border: 1px solid var(--linea-oro);
}
.calc-result-title {
  font-family: var(--f-titulo);
  font-size: 1.125rem;
  color: var(--oro);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.calc-stat-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}
.calc-stat-val {
  font-family: var(--f-titulo);
  font-size: 3rem;
  font-weight: 800;
  color: var(--oro);
}
.calc-stat-unit {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
}
.calc-note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--linea-clara);
}

/* Sección Nosotros (nosotros.html) */
.story-detail-section {
  padding: 100px var(--gutter);
  background: var(--crema);
}
.story-detail-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.mision-vision-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}
.mv-card {
  background: var(--blanco);
  padding: 32px;
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra-sm);
  border: 1px solid var(--linea);
}
.mv-title {
  font-family: var(--f-titulo);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

/* Sección Contacto (contacto.html) */
.contact-section {
  padding: 100px var(--gutter);
  background: var(--crema);
}
.contact-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}
.contact-info-card {
  background: var(--navy);
  color: var(--blanco);
  padding: clamp(32px, 5vw, 48px);
  border-radius: var(--radio-lg);
  border: 1px solid var(--linea-oro);
  box-shadow: var(--sombra-md);
}
.contact-info-title {
  font-family: var(--f-titulo);
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 24px;
}
.contact-data-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}
.contact-data-item {
  display: flex;
  gap: 16px;
}
.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--oro-suave);
  color: var(--oro);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-data-label {
  font-size: 0.8125rem;
  color: var(--oro-claro);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.contact-data-val {
  font-size: 1.0625rem;
  color: var(--blanco);
}
.contact-form-wrap {
  background: var(--blanco);
  padding: clamp(32px, 5vw, 48px);
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra-sm);
  border: 1px solid var(--linea);
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radio);
  border: 1px solid var(--linea);
  background: var(--crema-suave);
  font-size: 1rem;
  color: var(--tinta);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--oro);
  box-shadow: 0 0 0 3px var(--oro-suave);
  outline: none;
}
.form-feedback-alert {
  display: none;
  background: #e8f5e9;
  color: #1b5e20;
  padding: 16px;
  border-radius: var(--radio);
  margin-top: 20px;
  font-weight: 600;
  border: 1px solid #a5d6a7;
}

/* ==========================================================================
   PIE DE PÁGINA (Footer)
   ========================================================================== */
.site-footer {
  background-color: var(--navy-deep);
  color: var(--blanco);
  padding: 80px var(--gutter) 40px;
  border-top: 1px solid var(--linea-clara);
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 60px;
  border-bottom: 1px solid var(--linea-clara);
}
.footer-brand-col {
  max-width: 440px;
}
.footer-logo-img {
  height: 48px;
  width: auto;
  margin-bottom: 20px;
}
.footer-brand-desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}
.footer-col-title {
  font-family: var(--f-titulo);
  font-size: 1rem;
  font-weight: 700;
  color: var(--oro);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.footer-link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-link {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--oro);
}
.footer-bottom {
  padding-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE DESIGN (1440, 1280, 768, 390px)
   ========================================================================== */
@media (max-width: 1024px) {
  .craft-container,
  .story-detail-grid,
  .contact-grid,
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 140px;
  }
  .main-nav,
  .header-actions .btn {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .brand-logo-img {
    height: 40px;
  }
  .notice-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  .notice-text {
    flex-wrap: wrap;
    white-space: normal;
  }
  .notice-text > span:nth-child(2) {
    overflow: visible;
    text-overflow: clip;
  }
  .hero-gradient-overlay {
    background: linear-gradient(to bottom, rgba(3, 3, 20, 0.5) 0%, rgba(3, 3, 20, 0.4) 55%, rgba(3, 3, 20, 0.62) 100%);
  }
  .story-canvas-overlay {
    background: linear-gradient(to top, rgba(3, 3, 20, 0.3) 0%, rgba(3, 3, 20, 0) 40%);
  }
  .story-chapter-indicator {
    left: var(--gutter);
    right: var(--gutter);
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
  }
  .story-chapter-indicator > span {
    display: none;
  }
  .chapter-steps {
    gap: 12px;
  }
  .chapter-step-badge {
    font-size: 0.75rem;
    white-space: nowrap;
  }
  .chapter-card {
    left: var(--gutter);
    right: var(--gutter);
    max-width: none;
    padding: 18px;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
    --header-h: 148px;
  }
  .demo-notice-bar {
    padding: 6px var(--gutter);
    font-size: 0.75rem;
  }
  .models-switcher {
    font-size: 0.6875rem;
    gap: 4px;
    padding: 2px 6px;
    flex-wrap: wrap;
  }
  .model-badge-link {
    padding: 2px 4px;
  }
  .header-main-bar {
    padding: 8px var(--gutter);
  }
  .brand-logo-img {
    height: 36px;
  }
  .hero-content-container {
    padding: 24px var(--gutter) 48px;
  }
  .hero-title {
    font-size: clamp(2rem, 8.5vw, 2.65rem);
    margin-bottom: 18px;
  }
  .hero-description {
    font-size: 0.9375rem;
    margin-bottom: 28px;
  }
  .hero-badge-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding-top: 24px;
  }
  .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
}

/* Soporte para preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .thread-transition-curtain {
    display: none !important;
  }
  .story-canvas {
    display: none !important;
  }
}
