/* ============================================
   AJC Logistics — Editorial Style
   Marine font + corporate colors
   ============================================ */

/* --- Custom Fonts --- */
@font-face {
  font-family: 'Marine';
  src: url('../assets/Marine-Bold.ttf') format('truetype');
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Marine';
  src: url('../assets/Marine-Light.ttf') format('truetype');
  font-weight: 100 500;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --orange: #FF4E00;
  --orange-hover: #e64500;
  --gray-dark: #54534A;
  --gray-text: #54534A;
  --gray-platform: #444543;
  --white: #FFFFFF;
  --black: #54534A;
  --off-white: #fafaf8;
  --gray-light: #f2f1ed;
  --gray-mid: #e0dfd9;
  --gray-muted: #999890;

  --font: 'Marine', 'Inter', -apple-system, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --duration: 1s;
  --duration-slow: 1.4s;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  font-weight: 300;
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.loader-active {
  overflow: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

h1, h2, h3 {
  font-weight: 700;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

.accent, [style*="color"] {
  white-space: nowrap;
  display: inline-block;
}

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================
   LOADER
   ============================================ */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--orange);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.loader.loader-exit {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.loader.loader-hidden { display: none; }

.loader-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.loader-logo {
  width: 180px;
  height: auto;
  opacity: 0;
  transform: translateY(10px);
  animation: loaderFadeIn 0.6s ease forwards;
}

@keyframes loaderFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.loader-bar-track {
  width: 120px;
  height: 2px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--white);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.loader-text {
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  min-height: 1.2em;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(180, 180, 175, 0.25);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease);
}

.cursor.hovering {
  width: 60px; height: 60px;
  background: rgba(255, 78, 0, 0.15);
}

@media (pointer: coarse) { .cursor { display: none; } }
@media (hover: none) { .cursor { display: none; } }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  opacity: 0; visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.3s var(--ease);
  box-shadow: 0 4px 20px rgba(255, 78, 0, 0.25);
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--orange-hover);
  transform: translateY(-3px);
}

.back-to-top svg { pointer-events: none; }

/* ============================================
   SIDE NAV — Caledonian-style vertical menu
   ============================================ */
.side-nav {
  position: fixed;
  left: 40px;
  top: 40px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.side-nav.hidden {
  opacity: 0;
  transform: translateX(-30px);
  pointer-events: none;
}

.side-nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-muted);
  transition: color 0.3s var(--ease);
  display: block;
  white-space: nowrap;
}

.side-nav a:hover {
  color: var(--gray-dark);
}

/* ============================================
   NAVBAR — Hidden initially, appears on scroll
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.navbar.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-logo {
  height: 28px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-muted);
  transition: color 0.4s var(--ease);
  position: relative;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 100%; height: 1px;
  background: var(--gray-dark);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-links a:hover { color: var(--gray-dark); }
.nav-cta { color: var(--orange) !important; }
.nav-cta:hover { color: var(--orange-hover) !important; }

.nav-mobile-logo { display: none; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--gray-dark);
  transition: all 0.4s var(--ease);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--white); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--white); }

/* ============================================
   SCROLL TEXT ROWS — Used inside .scrolltext-overlay
   ============================================ */
.scrolltext-row {
  overflow: hidden;
  white-space: nowrap;
  line-height: 1.05;
}

.scrolltext-track {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  will-change: transform;
}

.scrolltext-track span {
  font-size: clamp(100px, 15vw, 200px);
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
  padding: 0 0.05em;
}

.scrolltext-dot {
  font-size: clamp(80px, 12vw, 160px) !important;
  color: var(--orange) !important;
  opacity: 0.35;
  padding: 0 0.15em !important;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal-stagger.visible {
  opacity: 1;
  transform: translateY(0);
}

.word {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: 3px;
  vertical-align: bottom;
}

.word-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--duration) var(--ease);
}

.word.visible .word-inner { transform: translateY(0); }

.image-reveal { overflow: hidden; }

.image-reveal img {
  transform: scale(1.15);
  transition: transform var(--duration-slow) var(--ease);
}

.image-reveal.visible img { transform: scale(1); }

.parallax-img {
  will-change: transform;
  transition: transform 0.1s linear;
}

.accent-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.accent-letter.letter-visible {
  opacity: 1;
  transform: translateY(0);
  text-shadow: 0 0 20px rgba(255, 78, 0, 0.4), 0 0 40px rgba(255, 78, 0, 0.1);
}

.accent-letter.letter-settled { text-shadow: none; }

.heading-text-part {
  display: inline;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.heading-text-part.text-visible {
  opacity: 1;
  transform: translateY(0);
}

.accent-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.accent-word.letter-visible {
  opacity: 1;
  transform: translateY(0);
  text-shadow: 0 0 20px rgba(255, 78, 0, 0.4);
}

.accent-word.letter-settled { text-shadow: none; }

.scale-reveal {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.scale-reveal.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   HERO — 3-column: title | video | images
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: visible;
  padding-top: 80px;
  padding-bottom: 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-left: 80px;
  will-change: transform;
}

.hero-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  padding: 6px 12px;
  margin-bottom: 32px;
}

#hero-title,
.hero-title {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--gray-dark);
  margin-bottom: 28px;
}

.hero-title .accent {
  color: var(--orange);
  position: relative;
}

.hero-title .accent::after {
  content: '';
  position: absolute;
  bottom: 0.05em; left: 0;
  width: 100%; height: 3px;
  background: var(--orange);
  opacity: 0.4;
}

.hero-title .accent.accent-split::after { display: none; }

.hero-description {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--gray-muted);
  max-width: 380px;
}

/* Hero images — Caledonian offset: img1 top, img2 lower-right */
.hero-images {
  position: relative;
  min-height: 500px;
  will-change: transform;
}

.hero-img-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 75%;
  height: 55%;
  overflow: hidden;
}

.hero-img-1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-2 {
  position: absolute;
  top: 20%;
  right: 0;
  width: 55%;
  bottom: 0;
  overflow: hidden;
}

.hero-img-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ============================================
   VIDEO SECTION — Below hero, same container width
   ============================================ */
.hero-video-section {
  position: relative;
  overflow: visible;
  z-index: 50;
  will-change: transform;
}

.hero-video-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16/9;
  will-change: transform;
}

.hero-video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Scrolltext overlay — absolute inside video wrapper */
.scrolltext-overlay {
  position: absolute;
  bottom: -30%;
  left: 0;
  right: 0;
  width: 100vw;
  margin: 0;
  padding: 0;
  z-index: 100;
  mix-blend-mode: multiply;
  pointer-events: none;
  overflow: hidden;
  will-change: transform;
}

/* ============================================
   SECTION — Common patterns
   ============================================ */
.section {
  padding: 160px 0;
  position: relative;
  z-index: 1;
}

.section--gray {
  background: var(--off-white);
}

.section-tagline {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-tagline::before {
  content: '';
  display: block;
  width: 24px; height: 1.5px;
  background: var(--orange);
}

.section-heading {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--gray-dark);
  margin-bottom: 32px;
}

.section-heading .accent { color: var(--orange); }
.section-heading .accent.accent-split::after { display: none; }

.section-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--gray-muted);
  max-width: 520px;
}

/* ============================================
   NOSOTROS
   ============================================ */
.nosotros-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 120px;
  align-items: center;
}

.nosotros-images {
  position: relative;
  min-height: 600px;
}

.nosotros-img-main {
  width: 80%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 2px;
}

.nosotros-img-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.nosotros-stat {
  position: absolute;
  bottom: 40px; right: 0;
  background: var(--white);
  padding: 32px 40px;
  z-index: 2;
}

.nosotros-stat .stat-number {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--orange);
}

.nosotros-stat .stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-muted);
  margin-top: 4px;
}

/* ============================================
   SERVICIOS
   ============================================ */
.servicios-header {
  margin-bottom: 100px;
  max-width: 700px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-mid);
}

.servicio-card {
  padding: 56px 40px 56px 0;
  border-bottom: 1px solid var(--gray-mid);
  position: relative;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.servicio-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
}

.servicio-card:not(:nth-child(3n+1)) {
  padding-left: 40px;
  border-left: 1px solid var(--gray-mid);
}

.servicio-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.1em;
  margin-bottom: 32px;
  display: block;
}

.servicio-icon {
  width: 48px; height: 48px;
  margin-bottom: 28px;
  color: var(--gray-dark);
  transition: transform 0.6s var(--ease);
}

.servicio-card:hover .servicio-icon { transform: scale(1.1); }

.servicio-icon svg {
  width: 100%; height: 100%;
  stroke: currentColor;
  stroke-width: 1.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.servicio-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--gray-dark);
  margin-bottom: 16px;
  line-height: 1.2;
}

.servicio-card p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--gray-muted);
}

/* ============================================
   VENTAJAS — Background image section
   ============================================ */
.ventajas {
  background: url('../assets/fondo-diferencias-desktop-ajclogistics.webp') center/cover no-repeat;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}

.ventajas::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(40, 40, 36, 0.82);
  z-index: 1;
}

.ventajas .container { position: relative; z-index: 2; }
.ventajas .section-tagline { color: var(--orange); }
.ventajas .section-tagline::before { background: var(--orange); }
.ventajas .section-heading { color: var(--white); }

.ventajas-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
  align-items: start;
}

.ventajas-intro .section-text { color: rgba(255, 255, 255, 0.45); }

.ventajas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 40px;
}

.ventaja-item { padding: 0; }

.ventaja-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  opacity: 0.3;
}

.ventaja-item h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.ventaja-item p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.4);
}

.ventajas-dots {
  position: absolute;
  bottom: -40px; right: 48px;
  width: 200px; height: auto;
  opacity: 0.15; z-index: 2;
  pointer-events: none;
}

/* ============================================
   OPERATIVA
   ============================================ */
.operativa-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
  align-items: start;
}

.operativa-features { margin-top: 16px; }

.feature-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--gray-mid);
}

.feature-item:first-child { border-top: 1px solid var(--gray-mid); }

.feature-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  min-width: 24px;
}

.feature-item span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-dark);
  line-height: 1.5;
}

/* ============================================
   CTA FINAL — White/light background (reverted)
   ============================================ */
.cta-final {
  padding: 160px 0;
  text-align: center;
  position: relative;
  background: var(--white);
  border-top: 1px solid var(--gray-mid);
}

.cta-final-heading {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--gray-dark);
  margin-bottom: 24px;
}

.cta-final-heading .accent { color: var(--orange); }
.cta-final-heading .accent.accent-split::after { display: none; }

.cta-final-text {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--gray-muted);
  margin-bottom: 48px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--orange);
  padding: 18px 40px;
  border-radius: 0;
  border: none;
  transition: all 0.4s var(--ease);
}

.btn-cta:hover {
  background: var(--orange-hover);
  transform: translateY(-2px) scale(1.02);
}

/* ============================================
   CONTACTO — Orange background
   ============================================ */
.contacto {
  background: var(--orange);
}

.contacto .section-tagline {
  color: var(--white);
}

.contacto .section-tagline::before {
  background: var(--white);
}

.contacto .section-heading {
  color: var(--white);
}

.contacto .section-heading .accent {
  color: var(--white);
  opacity: 0.85;
}

.contacto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 120px;
  align-items: start;
}

.contacto-info { margin-top: 48px; }
.contacto-persona { margin-bottom: 48px; }

.contacto-persona h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.contacto-persona span {
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
}

.contacto-dato {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.contacto-dato:first-of-type {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.contacto-dato-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  min-width: 80px;
  flex-shrink: 0;
}

.contacto-dato-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
}

.contacto-dato-value a {
  transition: color 0.3s var(--ease);
  color: var(--white);
}

.contacto-dato-value a:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Contact form — white on orange */
.contacto-form { padding-top: 48px; }

.form-group { margin-bottom: 32px; }

.form-group label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 16px 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  color: var(--white);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 0;
  transition: border-color 0.4s var(--ease);
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-bottom-color: var(--white);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-group select option {
  color: var(--gray-dark);
  background: var(--white);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group select { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  background: transparent;
  padding: 18px 40px;
  border-radius: 0;
  border: 2px solid var(--white);
  font-family: var(--font);
  transition: all 0.4s var(--ease);
  cursor: pointer;
  margin-top: 8px;
}

.btn-submit:hover {
  background: var(--white);
  color: var(--orange);
  transform: translateY(-2px) scale(1.02);
}

.form-group.field-hidden { display: none; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 48px 0;
  background: var(--gray-platform);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand { display: inline-flex; align-items: center; }

.footer-logo {
  height: 24px; width: auto; display: block;
  opacity: 0.8;
  transition: opacity 0.3s var(--ease);
}

.footer-brand:hover .footer-logo { opacity: 1; }

.footer-text {
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.02em;
}

/* Nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(84, 83, 74, 0.3);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.nav-overlay.active { display: block; opacity: 1; }

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal, .reveal-stagger, .image-reveal img,
  .accent-letter, .accent-word, .heading-text-part,
  .scale-reveal { opacity: 1 !important; transform: none !important; }

  .loader { display: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================
   RESPONSIVE — Tablet <= 1024px
   ============================================ */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .section { padding: 120px 0; }

  /* Hide side-nav on tablet, use sticky navbar */
  .side-nav { display: none; }

  /* Navbar always visible on tablet */
  .navbar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .hero { min-height: auto; padding-top: 100px; }

  .hero-content { margin-top: 60px; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 32px;
  }

  .hero-content {
    padding-left: 0;
    padding-top: 0;
  }

  .hero-images {
    position: relative;
    min-height: 300px;
  }

  .hero-img-1 {
    position: absolute;
    top: 0; left: 0;
    width: 55%; height: 60%;
  }

  .hero-img-2 {
    position: absolute;
    top: 30%; right: 0;
    width: 50%; bottom: 0;
  }

  /* Hamburger nav */
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 100%; max-width: 400px;
    height: 100vh;
    background: var(--orange);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;
    padding: 48px 48px;
    transition: right 0.6s var(--ease);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  }

  .nav-links.open { right: 0; }

  .nav-mobile-logo {
    display: block;
    width: 160px;
    height: auto;
    margin-top: 60px;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
  }

  .nav-links a {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--white);
  }

  .nav-links a:hover {
    color: rgba(255, 255, 255, 0.6);
  }

  .nav-links .nav-cta {
    color: var(--white) !important;
    opacity: 0.7;
  }

  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-toggle { display: flex; }

  /* hero-grid already set to 1fr above */

  .nosotros-layout,
  .operativa-layout,
  .contacto-layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .nosotros-images { min-height: 400px; }

  .ventajas-layout {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .ventajas-grid { grid-template-columns: 1fr 1fr; }

  .servicios-grid { grid-template-columns: 1fr; }

  .servicio-card { padding: 40px 0; }

  .servicio-card:not(:nth-child(3n+1)) {
    padding-left: 0;
    border-left: none;
  }

  .servicio-card:hover { transform: translateY(-4px); }

  .scrolltext-track span { font-size: clamp(48px, 10vw, 80px); }
  .scrolltext-dot { font-size: clamp(36px, 8vw, 60px) !important; }
}

/* ============================================
   RESPONSIVE — Mobile <= 768px
   ============================================ */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .section { padding: 80px 0; }

  .nav-links { max-width: 100%; }

  .hero { padding-top: 80px; }

  .hero-grid { padding: 0 24px; gap: 20px; }

  #hero-title,
  .hero-title { font-size: clamp(2.2rem, 9vw, 3.2rem); }

  .hero-description { font-size: 0.9rem; }

  .hero-images { min-height: 240px; }

  .hero-img-1 { width: 58%; height: 55%; }
  .hero-img-2 { width: 48%; top: 35%; }

  .scrolltext-track span { font-size: clamp(40px, 9vw, 64px); }
  .scrolltext-dot { font-size: clamp(30px, 7vw, 48px) !important; }

  .ventajas {
    background-image: url('../assets/fondo-diferencias-mobile-ajclogistics.webp');
  }

  .ventajas-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .cta-final { padding: 80px 0; }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .nosotros-stat {
    position: relative;
    bottom: auto; right: auto;
    margin-top: -40px;
    margin-left: auto;
    display: inline-block;
  }

  .nosotros-images { min-height: 350px; }
  .section-heading { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .servicios-header { margin-bottom: 60px; }

  .back-to-top {
    bottom: 24px; right: 24px;
    width: 44px; height: 44px;
  }

  .servicio-card:hover { transform: none; box-shadow: none; }
}

/* ============================================
   RESPONSIVE — Small mobile <= 480px
   ============================================ */
@media (max-width: 480px) {
  .container { padding: 0 20px; }

  .hero { padding-top: 60px; }
  .hero-grid { padding: 0 20px; }

  #hero-title,
  .hero-title { font-size: clamp(2rem, 8.5vw, 2.8rem); }

  .section-heading { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .cta-final-heading { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .nosotros-stat .stat-number { font-size: 3rem; }

  .hero-images { min-height: 200px; }
}
