/* ═══════════════════════════════════════════════════════════════
   CCS COMDATA — white-label enterprise site (v2 anti-AI look)
   Design system: paleta cálida orgánica · serif editorial · bento
   asimétrico · grain · micro-interacciones · copy hiperespecífico
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Paleta cálida orgánica (sin neón, sin navy) */
  --ivory: #FAF6F0;
  --ivory-2: #F3EDE3;
  --paper: #FFFFFF;
  --ink: #1C1917;           /* charcoal cálido */
  --ink-soft: #44403C;
  --muted: #78716C;         /* stone-500 */
  --line: #E7E0D4;
  --accent: #C2542E;        /* terracotta */
  --accent-deep: #9A3F1F;
  --accent-soft: #F1DED3;

  /* Tipografía: Serif display + Sans cuerpo + Mono badges */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-soft: 0 24px 60px rgba(28, 25, 23, 0.06);
  --shadow-hover: 0 32px 80px rgba(28, 25, 23, 0.12);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);  /* física de resorte */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

/* ─── Grain (textura sutil) ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ─── Badges mono ─── */
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.badge::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}

/* ═══ HEADER ═══ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(250, 246, 240, 0.88);
  backdrop-filter: blur(14px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.brand-logo {
  height: 30px;
  width: auto;
  max-width: 100%;
  display: block;
}
.brand-logo-footer { height: 26px; }
.main-nav { display: flex; gap: 32px; align-items: center; }
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
  position: relative;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--spring);
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { width: 100%; }
.nav-cta {
  background: var(--ink);
  color: var(--ivory) !important;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.25s var(--ease), transform 0.25s var(--spring);
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--accent); color: var(--ivory) !important; transform: translateY(-1px); }

/* ─── Language selector ─── */
.lang-selector { position: relative; }
.lang-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.lang-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.lang-menu {
  display: none;
  position: absolute; right: 0; top: 46px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 150px;
  box-shadow: var(--shadow-soft);
}
.lang-menu.open { display: block; }
.lang-menu button {
  display: block; width: 100%;
  background: none; border: none;
  color: var(--ink-soft);
  padding: 10px 14px;
  text-align: left;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s, color 0.15s;
}
.lang-menu button:hover { background: var(--ivory-2); color: var(--ink); }

/* ═══ HERO — asimétrico, editorial, con video ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ivory);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Duotone cálido: convierte los tonos navy/cian a paleta cálida */
  filter: sepia(0.45) hue-rotate(-18deg) saturate(1.15) contrast(1.02) brightness(0.92);
  opacity: 0.9;
}
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(250,246,240,0.97) 0%, rgba(250,246,240,0.82) 38%, rgba(250,246,240,0.25) 72%, rgba(250,246,240,0.05) 100%),
    linear-gradient(180deg, rgba(250,246,240,0.2) 0%, transparent 30%, rgba(250,246,240,0.9) 92%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 140px 0 120px;
}
.hero-eyebrow { margin-bottom: 28px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 30px;
}
.hero-title .hero-accent {
  font-style: italic;
  color: var(--accent);
}
.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 44px;
  font-weight: 400;
}
.hero-meta {
  display: flex;
  gap: 36px;
  margin-bottom: 44px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── Buttons con micro-interacciones ─── */
.btn {
  display: inline-block;
  padding: 16px 30px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-body);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  background: var(--ink);
  color: var(--ivory);
  box-shadow: 0 12px 30px rgba(28,25,23,0.18);
}
.btn-primary:hover { background: var(--accent); box-shadow: 0 16px 40px rgba(194,84,46,0.3); }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 10px 30px rgba(194,84,46,0.12); }
.btn-block { width: 100%; text-align: center; }

/* ═══ SECTIONS ═══ */
.section { padding: 130px 0; }
.section-head { max-width: 680px; margin-bottom: 72px; }
.section-head .badge { margin-bottom: 18px; }
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 17px;
  color: var(--muted);
  font-weight: 400;
}

/* ─── About — proceso editorial ─── */
.process-list { display: flex; flex-direction: column; gap: 8px; }
.process-row {
  display: grid;
  grid-template-columns: 120px 1fr 2fr;
  gap: 32px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), padding 0.3s var(--ease);
}
.process-row:first-child { border-top: 1px solid var(--line); }
.process-row:hover {
  background: var(--paper);
  padding-left: 18px;
  padding-right: 18px;
}
.process-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.process-row h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
}
.process-row p { color: var(--muted); font-size: 15.5px; }

/* ─── Products — BENTO GRID ASIMÉTRICO ─── */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.bento-item {
  grid-column: span 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--spring), box-shadow 0.45s var(--ease), border-color 0.3s;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
}
.bento-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}
.bento-wide  { grid-column: span 8; min-height: 380px; }
.bento-tall  { grid-column: span 4; grid-row: span 2; min-height: 720px; }
.bento-img {
  flex: 1;
  background-size: cover;
  background-position: center;
  min-height: 180px;
  transition: transform 0.6s var(--ease);
}
.bento-item:hover .bento-img { transform: scale(1.04); }
.bento-body { padding: 24px 26px 26px; }
.bento-body h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}
.bento-body p { font-size: 14.5px; color: var(--muted); }
.bento-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}
.bento-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color 0.2s;
}
.bento-item:hover .bento-link { color: var(--accent); }

/* ─── Solutions — asimétrico 2/3 + 1/3 ─── */
.solutions-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
.solution-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: transform 0.45s var(--spring), box-shadow 0.45s var(--ease);
}
.solution-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.solution-card:first-child { grid-row: span 2; }
.solution-img { height: 220px; background-size: cover; background-position: center; }
.solution-card:first-child .solution-img { height: 300px; }
.solution-body { padding: 26px 28px 30px; }
.solution-body h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin-bottom: 10px; }
.solution-body p { font-size: 14.5px; color: var(--muted); }

/* ─── Services — lista editorial ─── */
.services-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 56px; }
.service-item {
  padding: 30px 4px;
  border-top: 1px solid var(--line);
  transition: padding 0.3s var(--ease), background 0.3s var(--ease);
}
.service-item:hover { background: var(--paper); padding-left: 16px; padding-right: 16px; }
.service-item h3 { font-family: var(--font-display); font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.service-item h3::before {
  content: '↳ ';
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 14px;
}
.service-item p { font-size: 14.5px; color: var(--muted); }

/* ─── Global ─── */
.global-section { background: var(--ink); color: var(--ivory); }
.global-section .badge { color: #E8A78C; }
.global-section .badge::before { background: #E8A78C; }
.global-section .section-title { color: var(--ivory); }
.global-section .section-sub { color: rgba(250,246,240,0.65); }
.global-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
  border-top: 1px solid rgba(250,246,240,0.15);
  padding-top: 40px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  color: #E8A78C;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.5);
  margin-top: 6px;
}

/* ─── Contact ─── */
.contact-section { background: var(--ivory-2); }
.contact-inner { max-width: 880px; }
.contact-card {
  background: var(--paper);
  border-radius: 24px;
  padding: 60px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 500;
  margin-bottom: 12px;
}
.contact-sub { color: var(--muted); margin-bottom: 38px; }
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s;
  background: var(--ivory);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(194,84,46,0.12);
  background: var(--paper);
}
.contact-form textarea { margin-bottom: 22px; resize: vertical; }

/* ─── Footer ─── */
.site-footer { background: var(--ink); color: var(--ivory); padding: 76px 0 30px; }
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-brand .brand { color: var(--ivory); }
.footer-tag { color: rgba(250,246,240,0.5); font-size: 14px; margin-top: 12px; max-width: 260px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(250,246,240,0.4);
  margin-bottom: 18px;
}
.footer-col a {
  display: block;
  color: rgba(250,246,240,0.75);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.2s, padding 0.2s var(--ease);
}
.footer-col a:hover { color: #E8A78C; padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(250,246,240,0.12);
  padding-top: 26px;
  font-size: 13px;
  color: rgba(250,246,240,0.4);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .bento-item { grid-column: span 6; }
  .bento-wide { grid-column: span 12; }
  .bento-tall { grid-column: span 6; grid-row: auto; min-height: 340px; }
  .solutions-grid { grid-template-columns: 1fr; }
  .solution-card:first-child { grid-row: auto; }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero { min-height: 92vh; }
  .header-inner { gap: 16px; }
  .container { padding: 0 20px; }
  .brand-logo { height: 31px; }
  .brand-logo-footer { height: 28px; }
  .lang-btn { padding: 6px 10px; font-size: 11px; }
  .process-row { grid-template-columns: 80px 1fr; gap: 12px; }
  .process-row p { grid-column: 2; }
  .services-list { grid-template-columns: 1fr; }
  .contact-card { padding: 36px 24px; }
  .contact-form .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .global-stats { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 520px) {
  .bento-item { grid-column: span 12; }
  .bento-wide, .bento-tall { grid-column: span 12; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .btn { text-align: center; }
  .hero-meta { flex-direction: column; gap: 12px; }
}
