/* AltChat — Redesign 2026
   Design system: typography, palette, components
   Positioning: consultoría tecnológica + chatbots + plataformas a medida
*/

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { padding: 0; margin: 0; list-style: none; }

/* ---------- Tokens ---------- */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0B1220;
  --ink: #0F172A;
  --ink-muted: #475569;
  --ink-soft: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --accent: #00A8E8;
  --accent-strong: #0086BA;
  --accent-soft: #E6F6FD;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;

  --container: 1200px;
  --space: 8px;

  --max-prose: 720px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; color: var(--ink-muted); }
p { margin: 0 0 1em; color: var(--ink-muted); }
.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin: 0 0 1rem;
}
.lead {
  font-size: 1.125rem;
  color: var(--ink-muted);
  max-width: var(--max-prose);
}
.accent { color: var(--accent-strong); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
section { padding: 6rem 0; }
section.tight { padding: 4rem 0; }
section.alt { background: var(--bg-alt); }
section.dark { background: var(--bg-dark); color: #E2E8F0; }
section.dark h1, section.dark h2, section.dark h3 { color: #F8FAFC; }
section.dark p { color: #CBD5E1; }
.section-head { max-width: var(--max-prose); margin: 0 auto 3rem; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-accent:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 1.125rem 2rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
}
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-list a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 0.2s ease;
}
.nav-list a:hover { color: var(--ink); }
.nav-list .nav-cta {
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
}
.nav-list .nav-cta:hover { background: var(--accent-strong); color: #FFFFFF; }
.nav-list .nav-secondary {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  border: 1px solid var(--border-strong);
  padding: 0.4375rem 0.875rem;
  border-radius: var(--radius-sm);
}
.nav-list .nav-secondary:hover { border-color: var(--ink); color: var(--ink); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 4rem;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.hero-text h1 strong, .hero-text h1 .accent {
  color: var(--accent-strong);
  font-weight: 800;
}
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.hero-trust {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.hero-trust strong { color: var(--ink); display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.2; }

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-dark);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-lg);
}
.hero-visual .device-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  color: #E2E8F0;
}
.hero-visual .device-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8125rem; color: #94A3B8;
}
.hero-visual .device-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: #34D399; box-shadow: 0 0 0 4px rgba(52,211,153,0.18);
}
.chat-flow {
  display: flex; flex-direction: column; gap: 0.875rem; margin-top: 1.5rem; flex: 1;
}
.bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.45;
}
.bubble.in { background: #1E293B; color: #F1F5F9; border-bottom-left-radius: 4px; }
.bubble.out { background: var(--accent); color: #FFFFFF; align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.system {
  align-self: center; background: rgba(255,255,255,0.06);
  color: #94A3B8; font-size: 0.75rem; padding: 0.375rem 0.75rem; border-radius: 999px;
}
.device-footer {
  margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem; color: #64748B; display: flex; justify-content: space-between;
}

/* ---------- Logos / trust strip ---------- */
.trust-strip {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.trust-strip .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1.5rem 3rem;
}
.trust-strip .trust-label {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.trust-strip .trust-item {
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 1rem;
  opacity: 0.7;
}

/* ---------- Servicios (3 pilares) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pillar {
  padding: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.pillar:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.pillar-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.25rem;
}
.pillar h3 { margin-bottom: 0.5rem; font-size: 1.25rem; }
.pillar p { margin-bottom: 1rem; }
.pillar-list { margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--border); }
.pillar-list li {
  font-size: 0.875rem;
  color: var(--ink-muted);
  padding: 0.375rem 0 0.375rem 1.25rem;
  position: relative;
}
.pillar-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Metodología ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
  counter-reset: step;
}
.step {
  padding: 1.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-strong);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.step h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9375rem; margin: 0; }

/* ---------- Casos / industries ---------- */
.cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.case-card {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.case-card:hover { border-color: var(--accent); }
.case-card .tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
  display: block;
}
.case-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.case-card .case-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem;
}
.case-card .case-tags span {
  font-size: 0.8125rem;
  padding: 0.25rem 0.625rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--ink-muted);
}

/* ---------- Equipo placeholder ---------- */
.team-placeholder {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  max-width: 560px;
  margin: 0 auto;
}
.team-placeholder h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.team-placeholder p { margin: 0; }

/* ---------- CTA section ---------- */
.cta-band {
  padding: 5rem 0;
  background: var(--bg-dark);
  color: #E2E8F0;
  text-align: center;
}
.cta-band h2 { color: #FFFFFF; margin-bottom: 1rem; }
.cta-band p { color: #CBD5E1; max-width: 560px; margin: 0 auto 2rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand p { margin-top: 0.75rem; max-width: 320px; font-size: 0.9375rem; }
.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.875rem;
}
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a {
  color: var(--ink-muted);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent-strong); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: 1rem;
}
.social-row { display: flex; gap: 0.75rem; }
.social-row a {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.social-row a:hover { border-color: var(--accent); background: var(--accent-soft); }
.social-row img { width: 18px; height: 18px; opacity: 0.8; }

/* ---------- Page hero (subpáginas) ---------- */
.page-hero {
  padding: 5rem 0 3rem;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero .container { max-width: 800px; text-align: center; }
.page-hero .eyebrow { margin-bottom: 1rem; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.page-hero p { font-size: 1.125rem; max-width: 640px; margin: 0 auto; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-group[open] { border-color: var(--accent); }
.faq-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 1.125rem 1.25rem;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-group > summary::-webkit-details-marker { display: none; }
.faq-group > summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--accent-strong);
  font-weight: 400;
  transition: transform 0.2s ease;
  line-height: 1;
}
.faq-group[open] > summary::after { content: '−'; }
.faq-group .faq-body { padding: 0 1.25rem 1.25rem; }
.faq-item {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}
.faq-item:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.faq-item details { margin: 0; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  padding: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '↓';
  color: var(--accent-strong);
  font-size: 0.875rem;
  transition: transform 0.2s ease;
}
.faq-item details[open] summary::after { transform: rotate(180deg); }
.faq-item .faq-content {
  padding: 0.5rem 0 0.75rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.faq-item .faq-content p { margin: 0 0 0.75em; }
.faq-item .faq-content p:last-child { margin-bottom: 0; }
.faq-item .faq-content ol,
.faq-item .faq-content ul { padding-left: 1.25rem; margin: 0.5rem 0; }
.faq-item .faq-content li { margin-bottom: 0.25rem; list-style: disc; }
.faq-item .faq-content ol li { list-style: decimal; }

/* ---------- Calendly / embeds ---------- */
.embed-wrap {
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.video-wrap {
  max-width: 880px;
  margin: 2.5rem auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-dark);
  aspect-ratio: 16 / 9;
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Industry case (página completa de casos) ---------- */
.industry-case {
  padding: 2.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}
.industry-case:last-child { margin-bottom: 0; }
.industry-case .industry-meta .tag {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.5rem;
  display: block;
}
.industry-case h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.industry-case .industry-meta p { font-size: 0.9375rem; }
.industry-case ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
.industry-case ul li {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  padding-left: 1.5rem;
  position: relative;
  list-style: none;
}
.industry-case ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent-strong);
  font-weight: 700;
}
@media (max-width: 800px) {
  .industry-case { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.75rem; }
  .industry-case ul { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  section { padding: 4.5rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .hero .container { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { aspect-ratio: 16 / 11; max-width: 540px; margin: 0 auto; }
  .pillars { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }

  .nav-toggle {
    display: flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink);
  }
  .nav-list {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.75rem;
    display: none;
  }
  .nav-list.open { display: flex; }
  .nav-list a { padding: 0.625rem 0; border-bottom: 1px solid var(--border); }
  .nav-list .nav-cta, .nav-list .nav-secondary { text-align: center; border-bottom: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding: 3.5rem 0; }
  .process { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-trust { gap: 1.5rem; }
}
