/*
  TALIUM Landing Styles
  - Diseño moderno, full responsive
  - Paleta basada en manual de marca (placeholders) con auto-extracción opcional (via JS)
*/

:root {
  /* Colores base (ajusta con los valores exactos del manual de marca) */
  --color-bg: #0b0f14;
  --color-surface: #111722;
  --color-primary: #4cc9f0; /* Ajustar al azul/cian corporativo si aplica */
  --color-secondary: #7209b7; /* Ajustar a acento secundario */
  --color-accent: #f72585; /* Acento vibrante opcional */
  --color-text: #e6eef7;
  --color-muted: #9aa8bc;
  --color-border: #223048;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --container: 1160px;
  --shadow-1: 0 8px 30px rgba(0,0,0,0.25);
  --shadow-2: 0 16px 50px rgba(0,0,0,0.35);
  --blur: saturate(180%) blur(14px);
}

/* Reset mínimo y tipografía */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  scroll-behavior: smooth;
}
img { max-width: 100%; display: block; border-radius: var(--radius-sm); }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}
.section { padding: clamp(56px, 8vw, 96px) 0; scroll-margin-top: 80px; }
.section-header { text-align: center; margin-bottom: 32px; }
.section-header h2 { font-size: clamp(24px, 4vw, 40px); margin: 0 0 8px; letter-spacing: -0.02em; }
.section-header p { margin: 0; color: var(--color-muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--color-bg) 85%, black 15%);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--color-border);
}
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none; font-weight: 700; letter-spacing: 0.08em; }
.brand-mark { color: var(--color-primary); }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 4px 8px; border-radius: 8px; background: #07252e; }
.brand-logo img { height: 100%; width: auto; display: block; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.brand.small { font-size: 14px; }
/* Ajuste de tamaño de logo para variante compacta */
.brand.small .brand-logo { height: 28px; padding: 2px 6px; }

.nav-toggle { display: none; background: none; border: 0; color: var(--color-text); }
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: var(--color-text); margin: 5px 0; border-radius: 1px; }

.nav-list { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-list a { color: var(--color-text); text-decoration: none; opacity: 0.9; }
.nav-list a:hover { color: var(--color-primary); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 999px; text-decoration: none; border: 1px solid transparent; transition: .2s ease; }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: white; box-shadow: var(--shadow-1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn-outline { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-ghost { background: transparent; color: var(--color-muted); }

/* Hero */
.hero { position: relative; overflow: clip; }
.bg-gradient {
  position: absolute; inset: -20% -10% -10% -10%;
  background: radial-gradient(60% 60% at 20% 20%, color-mix(in oklab, var(--color-primary) 30%, transparent), transparent 60%),
              radial-gradient(60% 60% at 80% 10%, color-mix(in oklab, var(--color-secondary) 30%, transparent), transparent 60%),
              radial-gradient(60% 60% at 50% 80%, color-mix(in oklab, var(--color-accent) 20%, transparent), transparent 70%);
  filter: blur(50px) saturate(160%);
  opacity: .4;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; min-height: clamp(520px, 75vh, 760px); }
.headline { font-size: clamp(32px, 6vw, 64px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.subtitle { color: var(--color-muted); margin: 0 0 24px; }
.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }
.trust-badges { display: flex; gap: 10px; margin-top: 24px; opacity: .9; }
.trust-badges img { width: 68px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); }
.glass-card { background: color-mix(in oklab, var(--color-surface) 60%, transparent); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; backdrop-filter: var(--blur); }
.glass-card img { aspect-ratio: 4/5; object-fit: cover; }
.scroll-down { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); color: var(--color-muted); text-decoration: none; animation: float 2s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }

/* Fade-in por palabras para títulos */
.fade-words { vertical-align: baseline; /* mantener inline metrics sin forzar display */ }
.fade-words .word { display: inline-block; opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; margin-right: 0; }
.fade-words.in .word { opacity: 1; transform: none; }
.fade-words .word { transition-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  .fade-words .word { transition: opacity .01s linear, transform .01s linear; }
}

/* Cards de servicios */
.grid.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: linear-gradient(180deg, color-mix(in oklab, var(--color-surface) 85%, #000 15%), color-mix(in oklab, var(--color-surface) 65%, #000 35%)); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-1); transition: .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: color-mix(in oklab, var(--color-primary) 30%, var(--color-border)); }
.card .icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; color: var(--color-primary); background: color-mix(in oklab, var(--color-primary) 12%, transparent); margin-bottom: 10px; }
.card h3 { margin: 8px 0; }
.card p { color: var(--color-muted); margin-top: 0; }
.bullets { padding-left: 18px; margin: 12px 0 0; color: var(--color-text); }

/* Proyectos */
.projects .swiper { margin-top: 22px; }
.projects .swiper-slide { height: clamp(240px, 38vw, 420px); }
.projects .swiper-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-md); }

/* Marca */
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.brand-story { max-width: 900px; margin: 0 auto 18px; color: var(--color-muted); text-wrap: pretty; }
.brand-story p { margin: 0 0 10px; }
.brand-card { background: color-mix(in oklab, var(--color-surface) 85%, #000 15%); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; }
.brand-card .pdf { width: 100%; height: min(80vh, 640px); border: 0; border-radius: 12px; }
.brand-card .hint { color: var(--color-muted); font-size: 14px; margin: 8px 0 0; }
.note { margin-top: 12px; color: var(--color-muted); text-align: center; }

/* Equipo */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.person { background: linear-gradient(180deg, color-mix(in oklab, var(--color-surface) 85%, #000 15%), color-mix(in oklab, var(--color-surface) 65%, #000 35%)); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 22px; }
.person h3 { margin: 0 0 8px; }
.person p { margin: 0; color: var(--color-muted); }

/* CTA */
.cta-inner { text-align: center; background: radial-gradient(80% 80% at 50% 0%, color-mix(in oklab, var(--color-primary) 12%, transparent), transparent), linear-gradient(180deg, color-mix(in oklab, var(--color-surface) 80%, #000 20%), color-mix(in oklab, var(--color-surface) 60%, #000 40%)); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: clamp(24px, 6vw, 48px); box-shadow: var(--shadow-2); }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.form { background: color-mix(in oklab, var(--color-surface) 85%, #000 15%); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; }
.field { display: grid; gap: 8px; margin-bottom: 12px; }
label { color: var(--color-muted); font-size: 14px; }
input, textarea { background: #0d131c; color: var(--color-text); border: 1px solid var(--color-border); border-radius: 10px; padding: 12px 12px; outline: none; }
input:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary) 25%, transparent); }
.actions { display: flex; gap: 10px; align-items: center; }
.form-note { color: var(--color-muted); font-size: 13px; }
.contact-info { display: grid; gap: 12px; }
.info-card { background: color-mix(in oklab, var(--color-surface) 85%, #000 15%); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px; }

/* Footer */
.site-footer { padding: 28px 0; border-top: 1px solid var(--color-border); background: #0a0f16; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.socials { display: flex; gap: 12px; }
.social { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-muted); text-decoration: none; }
.social:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  text-decoration: none;
  background: transparent; /* la imagen ocupará todo el círculo */
  overflow: hidden; /* recorta cualquier borde de la imagen */
  box-shadow: 0 12px 30px rgba(18, 140, 126, 0.45), 0 2px 6px rgba(0,0,0,.2);
  z-index: 60;
  transition: transform .18s ease, box-shadow .2s ease, filter .2s ease;
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 34px rgba(18, 140, 126, 0.55), 0 2px 10px rgba(0,0,0,.25); }
.whatsapp-float:active { transform: translateY(0) scale(.98); }
.whatsapp-float img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

@media (max-width: 560px) {
  .whatsapp-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}

/* Responsivo */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .grid.cards { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .brand-grid { grid-template-columns: 1fr; }
  .nav-list { position: fixed; inset: 64px 16px auto 16px; top: 64px; background: color-mix(in oklab, var(--color-surface) 90%, #000 10%); border: 1px solid var(--color-border); border-radius: 12px; padding: 12px; flex-direction: column; gap: 8px; transform-origin: top right; transform: scale(.98); opacity: 0; pointer-events: none; transition: .2s ease; }
  .nav-toggle { display: inline-block; }
  .nav.open #nav-list { transform: scale(1); opacity: 1; pointer-events: auto; }
}
@media (max-width: 560px) {
  .grid.cards { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .trust-badges img { width: 56px; height: 40px; }
  /* Footer móvil: logo + redes arriba, derechos abajo */
  .site-footer .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand socials"
      "copy copy";
    align-items: center;
    row-gap: 12px;
  }
  .site-footer .footer-inner .brand { grid-area: brand; }
  .site-footer .footer-inner .socials { grid-area: socials; justify-self: end; }
  .site-footer .footer-inner .copyright {
    grid-area: copy;
    margin: 0;
    text-align: left;
  }
}
