/* ============================================
   GRUPO CROMOMAX — Industrial-Tech de Alto Contraste
   ============================================ */

@import url('https://api.fontshare.com/v2/css?f[]=cabinet-grotesk@400,500,700,800,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --accent: #FF6B00;
  --accent-glow: rgba(255, 107, 0, 0.35);
  --accent-soft: rgba(255, 107, 0, 0.08);

  --ink-900: #0A0A0B;
  --ink-800: #111114;
  --ink-700: #17171B;
  --ink-600: #1F1F24;
  --ink-500: #2A2A31;
  --ink-400: #3A3A43;
  --ink-300: #575761;

  --paper: #FFFFFF;
  --paper-dim: #F5F5F4;
  --paper-line: #E7E5E1;

  --tech-50: #F7F7F5;
  --tech-100: #EDECE8;
  --tech-200: #D6D5CF;
  --tech-400: #8A8A84;
  --tech-600: #4A4A45;
  --tech-900: #1A1A18;

  --display: 'Cabinet Grotesk', ui-sans-serif, system-ui, sans-serif;
  --body: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background: var(--ink-900);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ============ TYPOGRAPHY ============ */
.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
.mono { font-family: var(--mono); font-feature-settings: 'ss01'; }
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1.hero-h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
h2.section-h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p { font-size: 16px; line-height: 1.6; }
p.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--tech-200); }

/* ============ LAYOUT ============ */
.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

section { position: relative; }
.section-light { background: var(--paper); color: var(--ink-900); }
.section-dark { background: var(--ink-900); color: var(--paper); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: 0;
  transition: all 0.25s cubic-bezier(.2,.7,.2,1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: #ff7d1f;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-light-ghost {
  background: transparent;
  color: var(--ink-900);
  border: 1px solid var(--ink-900);
}
.btn-light-ghost:hover { background: var(--ink-900); color: var(--paper); }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  background: rgba(10,10,11,0.72);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.nav.light {
  background: rgba(255,255,255,0.85);
  border-bottom-color: rgba(0,0,0,0.08);
  color: var(--ink-900);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  position: relative;
  display: grid; place-items: center;
  color: #000;
  font-weight: 900;
  font-size: 16px;
  font-family: var(--display);
}
.nav-logo-mark::after {
  content: '';
  position: absolute;
  top: 4px; right: -4px;
  width: 8px; height: 8px;
  background: var(--paper);
}
.nav.light .nav-logo-mark::after { background: var(--ink-900); }
.nav-links { display: flex; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-links a { position: relative; opacity: 0.75; transition: opacity 0.2s; }
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--accent); }
.nav-cta {
  padding: 12px 20px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
@media (max-width: 860px) {
  .nav { padding: 12px 20px; }
  .nav-links { display: none; }
  .nav-logo-img { height: 44px !important; }
}

/* ============ FOOTER ============ */
.footer {
  background: var(--ink-900);
  color: var(--paper);
  padding: 120px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-cta {
  border: 1px solid rgba(255,255,255,0.1);
  padding: 60px;
  margin-bottom: 80px;
  display: grid;
  grid-template-columns: 1.3fr auto;
  align-items: center;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.footer-cta::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  pointer-events: none;
}
.footer-cta h2 { position: relative; }
.footer-cta .btn { position: relative; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tech-400);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--tech-200); transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-brand p { color: var(--tech-400); font-size: 14px; max-width: 340px; margin-top: 16px; }
.footer-bottom {
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--tech-400);
}
@media (max-width: 860px) {
  .footer-cta { grid-template-columns: 1fr; padding: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ============ WHATSAPP FLOATING ============ */
.wa-float {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 90;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #25D366;
  display: grid; place-items: center;
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: waPulse 2.4s infinite;
}
@keyframes waPulse {
  0% { opacity: 0.8; transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1.4); }
}

/* ============ UTILITIES ============ */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 24px 0;
  background: var(--ink-800);
}
.marquee {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.02em;
}
.marquee span { display: inline-flex; align-items: center; gap: 64px; }
.marquee .dot { width: 8px; height: 8px; background: var(--accent); display: inline-block; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Placeholder image treatment */
.placeholder-img {
  background:
    linear-gradient(135deg, rgba(255,107,0,0.12) 0%, transparent 50%),
    radial-gradient(circle at 30% 30%, #2a2a31, #0a0a0b 70%);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--tech-400);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.placeholder-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.placeholder-img.light {
  background:
    linear-gradient(135deg, rgba(255,107,0,0.08) 0%, transparent 50%),
    radial-gradient(circle at 30% 30%, #e7e5e1, #c9c7c1 80%);
  color: var(--ink-600);
}

/* Grid overlay */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s, transform 0.8s; }
.reveal.in { opacity: 1; transform: none; }

/* Entry animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.9s cubic-bezier(.2,.7,.2,1) both; }

/* ============ RESPONSIVE FIXES ============ */
/* Prevent any horizontal scroll on mobile */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Tablet & below */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .clients-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .process-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .reviews-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .pay-trust { grid-template-columns: repeat(3, 1fr) !important; gap: 16px !important; }
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
}

/* Mobile portrait */
@media (max-width: 720px) {
  /* Container & layout */
  section { padding-left: 0 !important; padding-right: 0 !important; }
  .container { padding: 0 20px !important; }

  /* Sections — reduce vertical padding on mobile */
  .section-light, .section-dark { padding: 64px 0 !important; }

  /* Typography — keep readable on small screens */
  .section-h2 { font-size: clamp(28px, 7vw, 40px) !important; line-height: 1.1 !important; }
  .lead { font-size: 16px !important; line-height: 1.55 !important; }
  h1 { font-size: clamp(36px, 9vw, 56px) !important; line-height: 1.05 !important; }
  h3 { font-size: 18px !important; }

  /* Buttons — full-width on mobile, never overlap text */
  .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 18px 24px !important;
    font-size: 15px !important;
    box-sizing: border-box;
  }
  /* Stack button rows */
  .hero-ctas, .cta-row, .footer-cta {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  /* Grids — collapse to 1 column */
  .services-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .gallery-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .reviews-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .process-grid { grid-template-columns: 1fr !important; gap: 16px !important; }

  /* Clients keep 2 columns to look like a wall */
  .clients-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Pay-trust: stack */
  .pay-trust { grid-template-columns: 1fr !important; gap: 12px !important; }

  /* Hero stats: 2 columns */
  .hero-stats { grid-template-columns: repeat(2, 1fr) !important; gap: 24px !important; }
  .hero-stats > div { padding: 16px 0 !important; }

  /* Hero — kill the right-side coordinates that overlap */
  .hero-ticks { display: none !important; }

  /* Forms — stack inputs */
  .form-row { grid-template-columns: 1fr !important; gap: 12px !important; }

  /* Timeline — simpler stack */
  .timeline-head { grid-template-columns: 1fr !important; gap: 32px !important; }
  .timeline-row { grid-template-columns: 1fr !important; gap: 8px !important; padding: 24px 0 !important; }

  /* Footer */
  .footer { padding: 64px 0 32px !important; }
  .footer-cta { padding: 28px !important; margin-bottom: 48px !important; text-align: center; }
  .footer-cta h2 { font-size: 28px !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; padding-bottom: 40px; }
  .footer-bottom { flex-direction: column !important; gap: 12px !important; align-items: flex-start !important; }

  /* WhatsApp floating button - smaller on mobile */
  .wa-float { width: 56px !important; height: 56px !important; bottom: 20px !important; right: 20px !important; }

  /* Marquee speeds up & smaller text */
  .marquee { animation-duration: 25s !important; font-size: 22px !important; gap: 36px !important; }
  .marquee span { gap: 36px !important; }

  /* Eyebrow */
  .eyebrow { font-size: 11px !important; }

  /* Avoid sticky overflow */
  [style*="position: sticky"] { position: static !important; }
}

/* Very small phones */
@media (max-width: 380px) {
  .container { padding: 0 16px !important; }
  .section-h2 { font-size: 26px !important; }
  h1 { font-size: 36px !important; }
  .clients-grid { grid-template-columns: 1fr !important; }
  .hero-stats { grid-template-columns: 1fr !important; gap: 16px !important; }
}
