/* ============================================================
   IT CLATSUARD — DESIGN SYSTEM v3
   Paleta: Negro + Magenta #dc157c + Blanco
   Tipografía: Barlow Condensed (display) + Nunito Sans (body)
   ============================================================ */

/* Fonts are loaded via <link> in HTML head for non-blocking performance */

/* --- TOKENS --- */
:root {
  /* Paleta: Negro + Magenta + Blanco */
  --navy:        #0a0a0a;
  --navy-2:      #111111;
  --navy-3:      #1a1a1a;
  --navy-4:      #222222;
  --navy-light:  #2a2a2a;
  --red:         #dc157c;
  --red-2:       #b8106a;
  --red-light:   rgba(220, 21, 124, 0.12);
  --amber:       #f472b6;
  --cyan:        #ffffff;
  --cyan-dim:    rgba(255, 255, 255, 0.08);

  --white:       #FFFFFF;
  --white-90:    rgba(255,255,255,0.90);
  --white-70:    rgba(255,255,255,0.70);
  --white-40:    rgba(255,255,255,0.40);
  --white-15:    rgba(255,255,255,0.15);
  --white-08:    rgba(255,255,255,0.08);
  --white-04:    rgba(255,255,255,0.04);

  --font-display: 'Barlow Condensed', 'Barlow', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'Nunito Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 22px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.28s var(--ease);
  --t-slow: 0.55s var(--ease);

  --glow-red:  0 0 50px rgba(220,21,124,0.30);
  --glow-cyan: 0 0 40px rgba(255,255,255,0.08);
  --shadow-card: 0 8px 48px rgba(0,0,0,0.5);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy-2); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.8rem, 6vw, 5.2rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }
p { color: var(--white-70); font-size: 0.97rem; line-height: 1.75; font-weight: 400; }

/* --- LAYOUT --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }

/* --- LABEL / EYEBROW --- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--red);
  margin-bottom: 14px;
}
.eyebrow::before, .eyebrow::after {
  content: '';
  display: block; height: 1.5px; width: 28px;
  background: var(--red);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 30px;
  font-family: var(--font-display);
  font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: var(--t);
  position: relative; overflow: hidden;
}
.btn-red {
  background: var(--red); color: var(--white);
  box-shadow: 0 4px 20px rgba(232,52,26,0.3);
}
.btn-red::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent);
  opacity: 0; transition: var(--t);
}
.btn-red:hover { background: var(--red-2); transform: translateY(-2px); box-shadow: var(--glow-red); }
.btn-red:hover::before { opacity: 1; }

.btn-outline-cyan {
  border: 1.5px solid rgba(220,21,124,0.5);
  color: var(--red);
}
.btn-outline-cyan:hover { border-color: var(--red); background: var(--red-light); transform: translateY(-2px); }

.btn-outline-white {
  border: 1.5px solid var(--white-40);
  color: var(--white);
}
.btn-outline-white:hover { border-color: var(--white); background: var(--white-08); transform: translateY(-2px); }

.btn-ghost {
  color: var(--cyan); padding: 0;
  font-family: var(--font-display); font-size: 0.85rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.btn-ghost svg { transition: transform var(--t); }
.btn-ghost:hover svg { transform: translateX(5px); }

/* --- NAV --- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0;
  transition: var(--t);
}
.nav__top-bar {
  background: var(--navy-2);
  border-bottom: 1px solid var(--white-08);
  padding: 8px 0;
  font-size: 0.8rem; color: var(--white-70);
  display: flex; align-items: center; justify-content: center;
  gap: 32px;
  transition: var(--t);
}
.nav.scrolled .nav__top-bar { display: none; }
.nav__top-bar a { color: var(--white-70); transition: color var(--t); }
.nav__top-bar a:hover { color: var(--cyan); }
.nav__top-item { display: flex; align-items: center; gap: 7px; }
.nav__main {
  background: rgba(10, 10, 10, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--white-08);
  padding: 0 28px;
}
.nav__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; height: 68px; justify-content: space-between;
}
.nav__logo { display: flex; align-items: center; height: 48px; }
.nav__logo img { height: 100%; width: auto; max-width: none; }
.nav__logo-mark {
  background: var(--red); color: white;
  padding: 4px 9px; border-radius: 3px;
  font-size: 1rem;
}
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  padding: 8px 16px;
  font-family: var(--font-display);
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--white-70); border-radius: var(--radius-sm);
  transition: var(--t); position: relative;
}
.nav__link::after {
  content: '';
  position: absolute; bottom: 2px; left: 50%; right: 50%;
  height: 2px; background: var(--red);
  transition: var(--t);
}
.nav__link:hover, .nav__link.active { color: var(--white); }
.nav__link:hover::after, .nav__link.active::after { left: 16px; right: 16px; }
.nav__cta { margin-left: 12px; }
.nav__social { display: flex; gap: 8px; }
.nav__social-link {
  width: 30px; height: 30px; border-radius: var(--radius-sm);
  border: 1px solid var(--white-15);
  display: flex; align-items: center; justify-content: center;
  color: var(--white-70); font-size: 0.72rem; font-weight: 800;
  font-family: var(--font-display); letter-spacing: 0;
  transition: var(--t);
}
.nav__social-link:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }
/* --- HAMBURGER BUTTON --- */
.nav__hamburger {
  display: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--white-15);
  background: var(--white-04);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  cursor: pointer; flex-shrink: 0;
  transition: border-color var(--t), background var(--t);
  position: relative; z-index: 1002;
}
.nav__hamburger:hover {
  border-color: var(--red);
  background: var(--red-light);
}
.nav__hamburger span {
  display: block;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              opacity   0.25s ease,
              width     0.3s ease;
  transform-origin: center;
}
.nav__hamburger span:nth-child(1) { width: 18px; height: 1.5px; }
.nav__hamburger span:nth-child(2) { width: 22px; height: 1.5px; }
.nav__hamburger span:nth-child(3) { width: 14px; height: 1.5px; }

/* Animated X state */
.nav.mobile-open .nav__hamburger {
  border-color: var(--red);
  background: var(--red-light);
}
.nav.mobile-open .nav__hamburger span:nth-child(1) {
  width: 20px;
  transform: translateY(6.5px) rotate(45deg);
}
.nav.mobile-open .nav__hamburger span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.nav.mobile-open .nav__hamburger span:nth-child(3) {
  width: 20px;
  transform: translateY(-6.5px) rotate(-45deg);
}

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 130px; /* nav height */
  position: relative; overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 60% 70% at 65% 40%, rgba(220,21,124,0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 15% 80%, rgba(220,21,124,0.06) 0%, transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 50%, var(--navy-3) 100%);
}
/* Animated circuit grid */
.hero__grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(220,21,124,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,21,124,0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 0%, transparent 75%);
}
.hero__dots {
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(circle, rgba(220,21,124,0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  mask-image: radial-gradient(ellipse 60% 60% at 80% 30%, black 0%, transparent 70%);
}

.hero__content { position: relative; z-index: 1; max-width: 720px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 18px;
  border: 1px solid rgba(220,21,124,0.35);
  border-radius: 100px; background: rgba(220,21,124,0.08);
  font-family: var(--font-display);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--red); margin-bottom: 24px;
}
.hero__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.2;} }

.hero__title { margin-bottom: 6px; }
.hero__title .line-1 { display: block; font-weight: 500; font-size: clamp(1.4rem,2.5vw,2rem); color: var(--white-70); }
.hero__title .line-2 { display: block; font-size: clamp(3rem,7vw,6rem); font-weight: 900; color: var(--white); line-height: 0.95; }
.hero__title .accent { color: var(--red); font-style: italic; }
.hero__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem,2vw,1.4rem);
  font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--cyan);
  margin-bottom: 20px;
}
.hero__desc { font-size: 1.05rem; margin-bottom: 40px; max-width: 560px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero__stats {
  display: flex; gap: 48px;
  margin-top: 64px; padding-top: 40px;
  border-top: 1px solid var(--white-08);
}
.hero__stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem; font-weight: 900; line-height: 1;
  color: var(--white);
}
.hero__stat-num span { color: var(--red); }
.hero__stat-label { font-size: 0.8rem; color: var(--white-40); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-display); font-weight: 600; }

/* Floating visual right side */
.hero__visual {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 480px; z-index: 1; pointer-events: none;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100%{transform:translateY(-50%);} 50%{transform:translateY(calc(-50% - 16px));} }

.hero__panel {
  background: linear-gradient(135deg, rgba(22,45,88,0.9), rgba(10,22,40,0.95));
  border: 1px solid var(--white-08);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}
.hero__panel-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.hero__panel-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: var(--red-light); border: 1px solid rgba(232,52,26,0.25);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hero__panel-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.06em; }
.hero__panel-status {
  margin-left: auto; padding: 3px 10px; border-radius: 100px;
  font-family: var(--font-display); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(220,21,124,0.12); color: var(--red);
  border: 1px solid rgba(220,21,124,0.25);
}
.hero__panel-list { display: flex; flex-direction: column; gap: 7px; }
.hero__panel-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.82rem; color: var(--white-70);
}
.hero__panel-item::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}

/* --- SECTION HEADER --- */
.section-header { margin-bottom: 56px; }
.section-header.centered { text-align: center; }
.section-header.centered p { margin: 0 auto; max-width: 560px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { font-size: 1.05rem; }

/* --- SERVICES CAROUSEL / HERO CARDS --- */
.services-hero {
  background: var(--navy-2);
  border-top: 1px solid var(--white-08);
  border-bottom: 1px solid var(--white-08);
  overflow: hidden;
}
.services-track-wrapper { position: relative; }
.services-track {
  display: flex; gap: 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 0;
}
.services-track::-webkit-scrollbar { display: none; }
.service-feature-card {
  scroll-snap-align: start;
  flex: 0 0 100%; position: relative; overflow: hidden;
}
.sfc-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 440px;
}
.sfc-content {
  padding: 60px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1;
}
.sfc-num {
  font-family: var(--font-display); font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.2em; color: var(--white-40);
  text-transform: uppercase; margin-bottom: 24px;
}
.sfc-icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: var(--red-light); border: 1px solid rgba(220,21,124,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  transition: var(--t);
  color: var(--red);
  flex-shrink: 0;
}
.sfc-icon svg { width: 26px; height: 26px; }
.service-feature-card:hover .sfc-icon {
  background: var(--red); border-color: var(--red); color: var(--white);
}
.sfc-title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 900; margin-bottom: 12px; }
.sfc-desc { font-size: 0.95rem; margin-bottom: 28px; }
.sfc-visual {
  background: var(--navy-3);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.sfc-visual::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 40% 40%, rgba(220,21,124,0.12) 0%, transparent 65%);
  z-index: 0;
}
.sfc-visual img {
  max-height: 300px; max-width: 88%;
  object-fit: contain;
  position: relative; z-index: 1;
  filter: drop-shadow(0 24px 48px rgba(220,21,124,0.18));
  transition: transform 0.5s var(--ease);
}
.service-feature-card:hover .sfc-visual img {
  transform: scale(1.03);
}
/* SVG fallback panel */
.sfc-visual__fallback {
  align-items: center; justify-content: center;
  width: 100%; height: 100%;
  position: relative; z-index: 1;
}
.sfc-visual__fallback svg {
  width: 110px; height: 110px;
  color: var(--red);
  opacity: 0.75;
  filter: drop-shadow(0 0 32px rgba(220,21,124,0.3));
}
.sfc-bullets { display: flex; flex-direction: column; gap: 6px; }
.sfc-bullet {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--white-70);
}
.sfc-bullet::before {
  content: ''; flex-shrink: 0;
  width: 18px; height: 2px; background: var(--red);
}

/* Carousel controls */
.services-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 20px 0;
  background: var(--navy-2);
}
.services-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--white-15); border: none; cursor: pointer;
  transition: var(--t);
}
.services-dot.active { background: var(--red); width: 24px; border-radius: 4px; }
.services-prev, .services-next {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  border: 1px solid var(--white-15); color: var(--white-70);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--t); font-size: 1rem;
}
.services-prev:hover, .services-next:hover { border-color: var(--cyan); color: var(--cyan); }

/* --- SERVICE GRID (servicios page) --- */
.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5px;
  background: var(--white-04);
  border-radius: var(--radius-lg); overflow: hidden;
}
.sc {
  background: var(--navy-2);
  padding: 44px; transition: var(--t); position: relative; overflow: hidden;
}
.sc::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--red), var(--amber));
  transform: scaleX(0); transform-origin: left; transition: var(--t);
}
.sc:hover { background: var(--navy-3); }
.sc:hover::before { transform: scaleX(1); }
.sc__icon {
  width: 56px; height: 56px; border-radius: var(--radius-md);
  background: var(--red-light); border: 1px solid rgba(220,21,124,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px; transition: var(--t);
  color: var(--red); flex-shrink: 0;
}
.sc__icon svg { width: 26px; height: 26px; }
.sc:hover .sc__icon { background: var(--red); border-color: var(--red); color: var(--white); }

/* Large service block icons (servicios page) */
.sc__icon[style*="68px"] svg,
.sc__icon[style*="68px"] { 
  color: var(--red);
}
.sc__icon[style*="68px"] svg { width: 32px; height: 32px; }

.sc__title { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.sc__desc { font-size: 0.88rem; margin-bottom: 20px; }
.sc__list { display: flex; flex-direction: column; gap: 6px; }
.sc__list-item {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.8rem; color: var(--white-70);
}
.sc__list-item::before {
  content: '▸'; color: var(--red); flex-shrink: 0; font-size: 0.7rem; margin-top: 2px;
}

/* --- BENEFITS --- */
.benefits-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0; background: var(--white-04);
  border-radius: var(--radius-lg); overflow: hidden;
}
.benefit {
  padding: 36px 28px; text-align: center;
  background: var(--navy-2); transition: var(--t);
  border-right: 1px solid var(--white-04);
}
.benefit:last-child { border-right: none; }
.benefit:hover { background: var(--navy-3); }
.benefit__icon {
  font-size: 2rem; margin-bottom: 16px;
  display: block;
}
.benefit__num {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 900;
  color: var(--white); line-height: 1; margin-bottom: 4px;
}
.benefit__num em { color: var(--red); font-style: normal; }
.benefit__label { font-size: 0.82rem; color: var(--white-40); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-display); font-weight: 600; }

/* --- TESTIMONIALS --- */
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.testimonial {
  background: var(--navy-2); border: 1px solid var(--white-08);
  border-radius: var(--radius-lg); padding: 32px;
  transition: var(--t); position: relative;
}
.testimonial:hover { border-color: rgba(232,52,26,0.25); transform: translateY(-4px); }
.testimonial__quote {
  font-family: Georgia, serif; font-size: 3rem; color: var(--red);
  line-height: 0.8; margin-bottom: 16px;
}
.testimonial__stars { color: var(--amber); margin-bottom: 14px; font-size: 0.85rem; }
.testimonial__text { font-size: 0.9rem; margin-bottom: 24px; font-style: italic; }
.testimonial__author { display: flex; align-items: center; gap: 12px; }
.testimonial__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--red-light); border: 2px solid rgba(232,52,26,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--red);
}
.testimonial__name { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.testimonial__role { font-size: 0.78rem; color: var(--white-40); }

/* --- ABOUT VISUAL --- */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-visual {
  background: var(--navy-2); border: 1px solid var(--white-08);
  border-radius: var(--radius-xl); padding: 48px;
  position: relative; overflow: hidden; text-align: center;
}
.about-visual::after {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(220,21,124,0.10) 0%, transparent 70%);
}
.about-visual__logo { font-family: var(--font-display); font-size: 3.5rem; font-weight: 900; margin-bottom: 12px; }
.about-visual__logo span { color: var(--red); }
.about-visual__sub { font-size: 0.82rem; color: var(--white-40); text-transform: uppercase; letter-spacing: 0.15em; font-family: var(--font-display); font-weight: 700; }
.about-card {
  background: var(--navy-3); border: 1px solid var(--white-08);
  border-radius: var(--radius-md); padding: 18px 22px;
  margin-top: 20px; text-align: left;
}
.about-card__label { font-size: 0.72rem; color: var(--white-40); text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-display); font-weight: 700; margin-bottom: 4px; }
.about-card__value { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--red); }

.mission-item { margin-bottom: 32px; }
.mission-tag {
  display: inline-block; padding: 3px 12px;
  background: var(--red-light); border: 1px solid rgba(232,52,26,0.2);
  border-radius: 100px; font-family: var(--font-display); font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red); margin-bottom: 10px;
}
.mission-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; }

/* --- VALUES --- */
.values-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; background: var(--white-04); border-radius: var(--radius-lg); overflow: hidden;
}
.value {
  background: var(--navy-2); padding: 32px; transition: var(--t);
  border-right: 1px solid var(--white-04);
}
.value:last-child { border-right: none; }
.value:hover { background: var(--navy-3); }
.value__num { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; color: var(--red); text-transform: uppercase; margin-bottom: 16px; }
.value__title { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.value__desc { font-size: 0.85rem; }

/* --- TEAM PRO --- */
.team-grid-pro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.team-card-pro {
  background: var(--navy-2);
  border: 1px solid var(--white-08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--t);
  display: flex; flex-direction: column;
  position: relative;
}
.team-card-pro::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), rgba(220,21,124,0.3));
  transform: scaleX(0); transform-origin: left;
  transition: var(--t);
}
.team-card-pro:hover { border-color: rgba(220,21,124,0.25); transform: translateY(-5px); box-shadow: 0 20px 60px rgba(0,0,0,0.4); }
.team-card-pro:hover::before { transform: scaleX(1); }

.tcp-top {
  padding: 32px 28px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.tcp-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--red), rgba(220,21,124,0.4));
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
.tcp-avatar span {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 900;
  color: white; letter-spacing: 0.04em;
  position: relative; z-index: 1;
}
.tcp-avatar-ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgba(220,21,124,0.35);
  animation: ring-pulse 3s ease-in-out infinite;
}
@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.06); opacity: 0.9; }
}
.tcp-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: rgba(220,21,124,0.10);
  border: 1px solid rgba(220,21,124,0.2);
  border-radius: 100px;
  font-family: var(--font-display); font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--red);
}
.tcp-badge svg { flex-shrink: 0; }

.tcp-body { padding: 20px 28px 0; flex: 1; }
.tcp-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--white); margin-bottom: 4px;
}
.tcp-role { font-size: 0.82rem; color: var(--white-40); font-weight: 500; }
.tcp-divider { height: 1px; background: var(--white-08); margin: 16px 0; }
.tcp-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.tcp-skills span {
  padding: 4px 10px;
  background: var(--white-04);
  border: 1px solid var(--white-08);
  border-radius: 100px;
  font-size: 0.7rem; font-weight: 600;
  color: var(--white-70);
  font-family: var(--font-display);
  letter-spacing: 0.06em; text-transform: uppercase;
  transition: var(--t);
}
.team-card-pro:hover .tcp-skills span { border-color: rgba(220,21,124,0.2); color: var(--white); }

.tcp-exp {
  margin: 20px 28px 28px;
  padding: 14px 18px;
  background: var(--navy-3);
  border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--white-04);
}
.tcp-exp-num {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 900;
  color: var(--red); line-height: 1;
}
.tcp-exp-label {
  font-size: 0.72rem; color: var(--white-40);
  text-transform: uppercase; letter-spacing: 0.06em;
  font-family: var(--font-display); font-weight: 600;
}

/* Legacy team (unused but kept) */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.team-card { background: var(--navy-2); border: 1px solid var(--white-08); border-radius: var(--radius-lg); overflow: hidden; transition: var(--t); text-align: center; }
.team-card:hover { border-color: rgba(220,21,124,0.25); transform: translateY(-4px); }
.team-photo { height: 160px; font-size: 3.5rem; background: var(--navy-3); display: flex; align-items: center; justify-content: center; }
.team-info { padding: 20px; }
.team-name { font-family: var(--font-display); font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.team-role { font-size: 0.78rem; color: var(--red); font-weight: 600; }

/* --- CONTACT SECTION --- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: start; }
.contact-info-item {
  display: flex; gap: 16px; align-items: flex-start;
  margin-bottom: 24px;
}
.ci-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--red-light); border: 1px solid rgba(232,52,26,0.2);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  color: var(--red); font-size: 1rem;
}
.ci-label { font-family: var(--font-display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white-40); margin-bottom: 3px; }
.ci-value { font-size: 0.95rem; color: var(--white); }
.ci-value a:hover { color: var(--cyan); }
.contact-form-box {
  background: var(--navy-2); border: 1px solid var(--white-08);
  border-radius: var(--radius-lg); padding: 40px;
}
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white-40); margin-bottom: 8px; }
.form-input, .form-textarea, .form-select {
  width: 100%;
  background: var(--navy-3); border: 1px solid var(--white-08);
  border-radius: var(--radius-sm); color: var(--white);
  padding: 12px 16px; font-family: var(--font-body); font-size: 0.95rem;
  transition: var(--t); resize: none; -webkit-appearance: none;
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--white-40); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none; border-color: var(--red); background: var(--navy-4);
  box-shadow: 0 0 0 3px rgba(220,21,124,0.12);
}
.form-select option { background: var(--navy-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-textarea { min-height: 110px; }
.form-success { display: none; text-align: center; padding: 32px; color: #4ade80; }
.map-box {
  margin-top: 44px; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--white-08); height: 320px;
}
.map-box iframe { width: 100%; height: 100%; border: none; filter: grayscale(40%) brightness(0.7) hue-rotate(175deg); }

/* --- CTA BANNER --- */
.cta-section {
  position: relative; padding: 88px 0; overflow: hidden;
  background: linear-gradient(135deg, var(--red) 0%, #c42a14 60%, #8B1A0B 100%);
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.cta-section::after {
  content: 'IT CLATSUARD';
  position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-display); font-size: 8rem; font-weight: 900;
  color: rgba(0,0,0,0.08); white-space: nowrap; pointer-events: none; line-height: 1;
  text-transform: uppercase;
}
.cta-content { position: relative; z-index: 1; text-align: center; }
.cta-content h2 { color: white; margin-bottom: 14px; }
.cta-content p { color: rgba(255,255,255,0.85); margin-bottom: 36px; font-size: 1.1rem; }

/* --- TECH STRIP --- */
.tech-wrap { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-pill {
  padding: 8px 20px; border-radius: 100px;
  border: 1px solid var(--white-08); background: var(--white-04);
  font-size: 0.82rem; color: var(--white-70);
  transition: var(--t); font-family: var(--font-display); font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.tech-pill:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }

/* --- PAGE HERO (subpages) --- */
.page-hero {
  padding: 150px 0 72px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--white-08);
}
.page-hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 90% 50%, rgba(220,21,124,0.07) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
}
.page-hero__content { position: relative; z-index: 1; }

/* --- FOOTER --- */
.footer {
  background: var(--navy-2);
  border-top: 1px solid var(--white-08);
  padding: 56px 0 28px;
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 44px; margin-bottom: 44px;
}
.footer__logo { margin-bottom: 14px; }
.footer__desc { font-size: 0.86rem; color: var(--white-40); line-height: 1.75; }
.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.footer__social-link {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--white-08); background: var(--white-04);
  display: flex; align-items: center; justify-content: center;
  color: var(--white-40); font-size: 0.78rem; font-weight: 800;
  font-family: var(--font-display); transition: var(--t);
}
.footer__social-link:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }
.footer__col-title {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--white);
  margin-bottom: 18px;
}
.footer__links { display: flex; flex-direction: column; gap: 9px; }
.footer__link { font-size: 0.86rem; color: var(--white-40); transition: var(--t); }
.footer__link:hover { color: var(--cyan); padding-left: 4px; }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px; border-top: 1px solid var(--white-08);
  font-size: 0.8rem; color: var(--white-40);
}
.footer__tagline { color: var(--red); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; font-size: 0.78rem; }

/* --- WHATSAPP FLOAT --- */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 999;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 28px rgba(37,211,102,0.35);
  transition: var(--t);
  animation: wa-glow 2.8s ease-in-out infinite;
}
.wa-float:hover { transform: scale(1.1); box-shadow: 0 10px 40px rgba(37,211,102,0.55); animation: none; }
.wa-float svg { width: 28px; height: 28px; fill: white; }
.wa-float__tip {
  position: absolute; right: 66px; white-space: nowrap;
  background: var(--navy-2); color: var(--white); border: 1px solid var(--white-08);
  padding: 6px 14px; border-radius: 100px; font-size: 0.78rem; font-weight: 600;
  opacity: 0; pointer-events: none; transition: var(--t); transform: translateX(6px);
}
.wa-float:hover .wa-float__tip { opacity: 1; transform: translateX(0); }
@keyframes wa-glow {
  0%,100%{box-shadow: 0 6px 28px rgba(37,211,102,0.35);}
  50%{box-shadow: 0 6px 44px rgba(37,211,102,0.55);}
}

/* --- ANIMATIONS --- */
.fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* --- PRELOADER --- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  transition: opacity 0.5s, visibility 0.5s;
}
.preloader.hidden { opacity: 0; visibility: hidden; }
.preloader__logo {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.1em;
  animation: preloader-pulse 1.2s ease-in-out infinite;
}
.preloader__logo span { color: var(--red); }
.preloader__bar {
  width: 140px; height: 2px;
  background: var(--white-08); border-radius: 2px; overflow: hidden;
}
.preloader__bar::after {
  content: ''; display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--red), var(--cyan));
  border-radius: 2px;
  animation: preloader-slide 1.2s ease-in-out infinite;
}
@keyframes preloader-pulse { 0%,100%{opacity:1;} 50%{opacity:0.3;} }
@keyframes preloader-slide { 0%{transform:translateX(-100%);} 100%{transform:translateX(350%);} }

/* ============================================================
   RESPONSIVE — ALL DEVICES
   1280px  Desktop large
   1024px  Tablet landscape / small laptop
   768px   Tablet portrait
   640px   Large phone landscape
   480px   Phone
   375px   iPhone SE / small phones
   320px   Ultra small
   ============================================================ */

/* --- 1280px: Large desktop fine-tuning --- */
@media (max-width: 1280px) {
  .container { max-width: 100%; padding: 0 40px; }
  .hero__visual { right: -40px; width: 420px; }
}

/* --- 1024px: Tablet landscape / small laptop --- */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }
  .section { padding: 80px 0; }

  /* Nav */
  .nav__top-bar { gap: 20px; font-size: 0.75rem; padding: 7px 0; }
  .nav__main { padding: 0 20px; }
  .nav__inner { height: 62px; }
  .nav__logo { height: 40px; }
  .nav__links { gap: 2px; }
  .nav__link { padding: 7px 11px; font-size: 0.82rem; }

  /* Hero */
  .hero__visual { display: none; }
  .hero { padding-top: 120px; }
  .hero__stats { gap: 32px; }

  /* Layout grids */
  .about-split { grid-template-columns: 1fr; gap: 40px; }
  .mission-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .team-grid-pro { grid-template-columns: 1fr 1fr; }

  /* Services carousel */
  .sfc-inner { grid-template-columns: 1fr; }
  .sfc-visual { display: none; }
  .sfc-content { padding: 44px; }

  /* Service detail blocks */
  .sc { padding: 36px; }
  .sc > div[style*="grid-template-columns:auto 1fr"] { gap: 20px; }
}

/* --- 768px: Tablet portrait --- */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-sm { padding: 44px 0; }

  /* Nav — mobile hamburger */
  .nav__top-bar { display: none !important; }
  .nav__main { padding: 0 16px; }
  .nav__inner { height: 60px; }
  .nav__logo { height: 34px; }
  .nav__links, .nav__cta, .nav__social { display: none; }
  .nav__hamburger { display: flex; }

  /* ══ MOBILE MENU OVERLAY ══ */

  /* Backdrop: capa oscura sobre toda la página */
  .nav.mobile-open .nav__main::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1040;
    pointer-events: auto;
  }

  /* Panel: columna desde la derecha, fondo sólido, encima del backdrop */
  .nav.mobile-open .nav__links {
    display: flex !important;
    flex-direction: column;
    list-style: none;
    margin: 0; padding: 0;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    max-width: 90vw;
    background: #111111;
    border-left: 1px solid rgba(220, 21, 124, 0.25);
    padding-top: 0;
    padding-bottom: 32px;
    gap: 0;
    z-index: 1060;
    overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0,0,0,0.7);
  }

  /* Cabecera del panel con logo del menú */
  .nav.mobile-open .nav__links::before {
    content: 'NAVEGACIÓN';
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 24px;
    flex-shrink: 0;
    background: #0a0a0a;
    border-bottom: 1px solid rgba(220, 21, 124, 0.2);
    font-family: var(--font-display);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
  }

  /* Cada <li> ocupa todo el ancho */
  .nav.mobile-open .nav__links li {
    display: block;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  /* Cada <a> ocupa todo el li */
  .nav.mobile-open .nav__link {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
    padding: 18px 24px;
    text-decoration: none;
    transition: color 0.18s, background 0.18s, padding-left 0.18s;
    box-sizing: border-box;
  }
  /* Flecha derecha */
  .nav.mobile-open .nav__link::after {
    content: '›';
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    color: #dc157c;
    flex-shrink: 0;
    position: static;
    background: none;
    width: auto; height: auto;
    transform: none;
    opacity: 1;
  }
  .nav.mobile-open .nav__link:hover,
  .nav.mobile-open .nav__link:focus {
    color: #ffffff;
    background: rgba(220, 21, 124, 0.06);
    padding-left: 32px;
    outline: none;
  }
  .nav.mobile-open .nav__link.active {
    color: #dc157c;
  }

  /* Botón CTA al final del panel */
  .nav.mobile-open .nav__cta {
    display: block !important;
    margin: 20px 20px 0;
    width: calc(100% - 40px);
    text-align: center;
    padding: 14px 16px;
    font-size: 0.88rem;
    box-sizing: border-box;
  }

  /* Hamburger siempre encima del panel */
  .nav.mobile-open .nav__hamburger {
    position: relative;
    z-index: 1070;
  }

  /* Hero */
  .hero { padding-top: 80px; min-height: auto; padding-bottom: 60px; }
  .hero__eyebrow { font-size: 0.7rem; padding: 5px 14px; }
  .hero__desc { font-size: 0.95rem; }
  .hero__stats { flex-direction: row; flex-wrap: wrap; gap: 20px; margin-top: 44px; padding-top: 32px; }
  .hero__stat-num { font-size: 2rem; }
  .hero__actions { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  /* Hero panels */
  .hero__panel { padding: 20px; }
  .hero__panel-title { font-size: 0.88rem; }

  /* Section headers */
  .section-header { margin-bottom: 36px; }
  .section-header p { font-size: 0.95rem; }

  /* Service feature cards */
  .sfc-content { padding: 32px 24px; }
  .sfc-title { font-size: 1.4rem; }
  .sfc-desc { font-size: 0.88rem; }
  .services-controls { padding: 16px 0; }

  /* Service detail cards */
  .service-cards-grid { grid-template-columns: 1fr; gap: 1px; }
  .sc { padding: 28px 24px; }
  .sc > div[style] { flex-direction: column; gap: 16px; }
  .sc__icon[style] { width: 52px !important; height: 52px !important; }
  .sc__title { font-size: 1.1rem; }

  /* Service detail blocks on servicios page */
  .sc > div { flex-direction: column; }

  /* Benefits */
  .benefits-strip { grid-template-columns: 1fr 1fr; }
  .benefit { border-right: none; border-bottom: 1px solid var(--white-04); padding: 24px 20px; }

  /* About split */
  .about-split { grid-template-columns: 1fr; gap: 32px; }
  .about-visual { padding: 32px 24px; }
  .about-visual img { height: 56px !important; }

  /* Values */
  .values-grid { grid-template-columns: 1fr 1fr; }
  .value { padding: 24px; }
  .value__title { font-size: 0.95rem; }

  /* Team */
  .team-grid-pro { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tcp-top { padding: 24px 20px 0; }
  .tcp-avatar { width: 58px; height: 58px; }
  .tcp-avatar span { font-size: 1.2rem; }
  .tcp-body { padding: 16px 20px 0; }
  .tcp-exp { margin: 14px 20px 20px; padding: 12px 14px; }
  .tcp-exp-num { font-size: 1.5rem; }

  /* Mission items */
  .mission-item { margin-bottom: 24px; }
  .mission-title { font-size: 1.1rem; }

  /* Contact */
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
  .contact-form-box { padding: 28px 24px; }
  .map-box { height: 260px; }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 32px; }
  .footer__bottom { flex-direction: column; gap: 10px; text-align: center; font-size: 0.78rem; }
  .footer__tagline { display: none; }

  /* CTA */
  .cta-section { padding: 64px 0; }
  .cta-section::after { display: none; }
  .cta-content h2 { font-size: 1.8rem; }
  .cta-content p { font-size: 0.95rem; }
  .cta-content > div[style] { flex-direction: column; align-items: center; }
  .cta-content .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* Page hero */
  .page-hero { padding: 120px 0 56px; }
  .page-hero h1 { font-size: 2.6rem; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; gap: 0; }

  /* FAQ */
  details summary { font-size: 0.95rem; }
}

/* --- 640px: Large phones landscape --- */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 52px 0; }

  h1 { font-size: clamp(2.2rem, 8vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 6vw, 2.2rem); }

  /* Hero */
  .hero { padding-bottom: 48px; }
  .hero__stats { gap: 16px; }
  .hero__stat-num { font-size: 1.8rem; }
  .hero__stat-label { font-size: 0.72rem; }
  .hero__eyebrow { display: none; }

  /* Services carousel */
  .sfc-content { padding: 28px 20px; }
  .sfc-title { font-size: 1.3rem; }
  .sfc-num { margin-bottom: 12px; }
  .sfc-icon { width: 48px; height: 48px; font-size: 1.4rem; margin-bottom: 16px; }
  .services-controls { gap: 8px; }
  .services-dot { width: 6px; height: 6px; }
  .services-dot.active { width: 18px; }

  /* About bienvenida 2-col grid → single col */
  .about-split-simple { grid-template-columns: 1fr !important; gap: 32px !important; }
  .about-split-simple > div:last-child { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 12px !important; }

  /* Values */
  .values-grid { grid-template-columns: 1fr; }

  /* Team */
  .team-grid-pro { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tcp-badge { font-size: 0.62rem; padding: 4px 8px; }
  .tcp-name { font-size: 0.9rem; }
  .tcp-skills span { font-size: 0.62rem; padding: 3px 8px; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__logo img { height: 44px !important; }

  /* Testimonials */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* Service detail page — stacked layout */
  .sc > div[style*="auto 1fr"] {
    display: flex !important; flex-direction: column !important;
  }
}

/* --- 480px: Standard phones --- */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .section { padding: 44px 0; }

  h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  h2 { font-size: clamp(1.5rem, 7vw, 2rem); }
  h3 { font-size: 1.15rem; }

  /* Buttons */
  .btn { padding: 12px 22px; font-size: 0.85rem; }

  /* Hero */
  .hero { padding-top: 72px; }
  .hero__desc { font-size: 0.9rem; margin-bottom: 28px; }
  .hero__stats { flex-direction: column; gap: 16px; }
  .hero__actions .btn { padding: 14px 24px; }

  /* Nav mobile */
  .nav.mobile-open .nav__link { font-size: 1.05rem; padding: 16px 28px; }
  .nav__logo { height: 30px; }

  /* Benefits */
  .benefits-strip { grid-template-columns: 1fr; }
  .benefit { padding: 20px 16px; }

  /* Team */
  .team-grid-pro { grid-template-columns: 1fr; gap: 16px; }
  .tcp-top { padding: 20px 18px 0; }
  .tcp-body { padding: 14px 18px 0; }
  .tcp-exp { margin: 14px 18px 18px; }

  /* Values */
  .value { padding: 20px; }

  /* Service cards */
  .sc { padding: 24px 18px; }

  /* Contact form */
  .contact-form-box { padding: 22px 18px; }
  .map-box { height: 220px; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; }
  .footer { padding: 40px 0 20px; }

  /* Page hero */
  .page-hero { padding: 100px 0 44px; }
  .page-hero h1 { font-size: 2rem; }

  /* CTA */
  .cta-section { padding: 52px 0; }
  .cta-content h2 { font-size: 1.6rem; }

  /* About visual */
  .about-visual { padding: 24px 18px; }
  .about-card { padding: 14px 16px; }

  /* Metric cards in about section */
  .about-split-simple > div:last-child { grid-template-columns: 1fr 1fr !important; }

  /* TCP skills wrap */
  .tcp-skills { gap: 4px; }
}

/* --- 375px: iPhone SE / small phones --- */
@media (max-width: 375px) {
  .container { padding: 0 12px; }
  .section { padding: 36px 0; }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  /* Nav */
  .nav__logo { height: 28px; }
  .nav__hamburger span { width: 20px; }
  .nav.mobile-open .nav__link { font-size: 1rem; }

  /* Hero */
  .hero { padding-top: 68px; padding-bottom: 40px; }
  .hero__stat-num { font-size: 1.6rem; }

  /* Services carousel */
  .sfc-content { padding: 22px 16px; }
  .sfc-title { font-size: 1.15rem; }
  .sfc-desc { font-size: 0.84rem; }

  /* Buttons */
  .btn { padding: 11px 18px; font-size: 0.82rem; gap: 7px; }
  .btn svg { width: 13px; height: 13px; }

  /* Cards */
  .sc { padding: 20px 14px; }
  .sc__title { font-size: 1rem; }
  .sc__desc { font-size: 0.84rem; }

  /* Team */
  .tcp-avatar { width: 52px; height: 52px; }
  .tcp-avatar span { font-size: 1.05rem; }
  .tcp-name { font-size: 0.85rem; }
  .tcp-role { font-size: 0.75rem; }
  .tcp-exp-num { font-size: 1.3rem; }
  .tcp-exp-label { font-size: 0.65rem; }

  /* Contact */
  .contact-form-box { padding: 18px 14px; }
  .form-input, .form-textarea, .form-select { padding: 10px 12px; font-size: 0.88rem; }

  /* Footer */
  .footer__col-title { font-size: 0.78rem; }
  .footer__link { font-size: 0.8rem; }
  .footer__desc { font-size: 0.8rem; }

  /* Page hero */
  .page-hero { padding: 90px 0 36px; }
  .page-hero h1 { font-size: 1.8rem; }
  .page-hero p { font-size: 0.88rem; }

  /* About visual */
  .about-visual img { height: 48px !important; }
  .about-card__value { font-size: 0.9rem; }

  /* Value blocks */
  .value__title { font-size: 0.9rem; }
  .value__desc { font-size: 0.8rem; }

  /* CTA */
  .cta-content h2 { font-size: 1.4rem; }
  .cta-content p { font-size: 0.88rem; }
}

/* --- 320px: Ultra small devices --- */
@media (max-width: 320px) {
  .container { padding: 0 10px; }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  .nav__logo { height: 24px; }
  .hero { padding-top: 64px; }
  .btn { padding: 10px 16px; font-size: 0.8rem; }

  .tcp-top { flex-direction: column; gap: 12px; align-items: flex-start; }
  .tcp-badge { align-self: flex-start; }

  .hero__stats { gap: 12px; }
  .hero__stat-num { font-size: 1.4rem; }

  .about-split-simple > div:last-child { grid-template-columns: 1fr !important; }
  .sc { padding: 16px 12px; }
  .sfc-content { padding: 18px 14px; }
}

/* --- Landscape orientation on phones --- */
@media (max-width: 768px) and (orientation: landscape) {
  .hero { min-height: auto; padding-top: 72px; padding-bottom: 40px; }
  .hero__stats { flex-direction: row; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
  .page-hero { padding: 90px 0 40px; }
  .nav.mobile-open .nav__link { font-size: 0.95rem; padding: 14px 20px; }
  .sfc-content { padding: 24px 20px; }
  .section { padding: 44px 0; }
}

/* --- Touch device optimizations --- */
@media (hover: none) and (pointer: coarse) {
  .btn:hover { transform: none; }
  .team-card-pro:hover { transform: none; }
  .testimonial:hover { transform: none; }
  .sc:hover { background: var(--navy-2); }
  /* Larger tap targets */
  .nav__link { padding: 10px 14px; }
  .footer__link { padding: 4px 0; display: block; }
  .wa-float { width: 60px; height: 60px; bottom: 20px; right: 20px; }
}

/* --- Print --- */
@media print {
  .nav, .wa-float, .preloader, .hero__grid, .hero__dots,
  .services-controls, .cta-section { display: none !important; }
  body { background: white; color: black; }
  .section { padding: 32px 0; }
  .container { padding: 0 24px; }
}

/* --- SAFE AREA INSETS (iPhone notch / Dynamic Island / home bar) --- */
@supports (padding: env(safe-area-inset-bottom)) {
  .nav__main { padding-left: max(28px, env(safe-area-inset-left)); padding-right: max(28px, env(safe-area-inset-right)); }
  .wa-float { bottom: max(28px, calc(env(safe-area-inset-bottom) + 16px)); right: max(28px, env(safe-area-inset-right)); }
  .footer { padding-bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px)); }
  .nav.mobile-open .nav__links { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
}
