/* AppsGT — Design System */
:root {
  --bg: #FAFAF7;
  --bg-alt: #F2F1EC;
  --surface: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #1F1F1F;
  --muted: #6B6B66;
  --muted-2: #A1A19B;
  --line: #E6E5DE;
  --line-2: #D5D4CB;
  --accent: #2B4BFF;
  --accent-ink: #1B2E99;
  --accent-soft: #EEF1FF;
  --lime: #D4FF4E;
  --lime-ink: #2A3A00;
  --dark: #0D0E0C;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Geist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.mono { font-family: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace; }

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

/* Layout */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

/* Typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(43, 75, 255, 0.18);
}

h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}

h1 { font-size: clamp(44px, 6.5vw, 88px); letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4vw, 56px); letter-spacing: -0.03em; }
h3 { font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; }

p { line-height: 1.55; color: var(--ink-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  transition: all 160ms ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: #1f1f1f; transform: translateY(-1px); }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { color: var(--ink); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #223dd4; }
.btn-lime {
  background: var(--lime);
  color: var(--lime-ink);
}
.btn-lime:hover { background: #c9f53e; }

.btn .arrow {
  transition: transform 200ms ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 200ms ease, transform 200ms ease;
}
.card:hover {
  border-color: var(--line-2);
}

/* Dividers */
.hairline { height: 1px; background: var(--line); border: 0; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Pulse */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Fade-in */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Grid bg */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
}

/* Section padding */
.section-pad {
  padding: 96px 0;
}
@media (max-width: 768px) {
  .section-pad { padding: 64px 0; }
}

/* Utility */
.row { display: flex; align-items: center; gap: 12px; }
.stack { display: flex; flex-direction: column; }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 280px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  font-size: 13px;
  z-index: 9999;
}
.tweaks-panel h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
  font-family: 'Geist Mono', monospace;
}
.tweaks-panel label { display: block; margin-bottom: 12px; }
.tweaks-panel label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tweak-swatches { display: flex; gap: 6px; }
.tweak-sw {
  width: 24px; height: 24px; border-radius: 6px;
  border: 2px solid transparent; cursor: pointer;
}
.tweak-sw.on { border-color: var(--ink); }

/* ============================================================
   RESPONSIVE / MOBILE
   Overrides para las grids con estilos inline (usa !important).
   ============================================================ */

/* Nav hamburguesa */
.nav-burger { display: none; }
.nav-mobile-panel { display: none; }

@media (max-width: 920px) {
  .container-wide, .container { padding: 0 18px; }

  /* Nav */
  .nav-desktop, .nav-cta-desktop { display: none !important; }
  .nav-burger { display: inline-flex !important; }

  /* Encabezados de sección de 2 columnas → apilados */
  .sec-head { grid-template-columns: 1fr !important; gap: 18px !important; align-items: start !important; }
  .sec-head p { margin-top: 0 !important; padding-bottom: 0 !important; max-width: 100% !important; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr !important; gap: 48px !important; }

  /* Servicios / conectores */
  .svc-grid { grid-template-columns: 1fr 1fr !important; }
  .conn-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Diferenciador */
  .diff-grid { grid-template-columns: 1fr !important; gap: 36px !important; }

  /* Proceso / casos / shaders / números */
  .proc-grid { grid-template-columns: 1fr 1fr !important; }
  .cases-grid { grid-template-columns: 1fr 1fr !important; }
  .shader-grid { grid-template-columns: 1fr 1fr !important; }
  .num-grid { grid-template-columns: 1fr 1fr !important; }

  /* CTA / footer / showcase */
  .cta-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .footer-grid > div:first-child { grid-column: 1 / -1 !important; }
  .show-stats { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 600px) {
  .container-wide, .container { padding: 0 16px; }

  h1 { line-height: 1.02 !important; }

  /* Una sola columna en casi todo */
  .svc-grid { grid-template-columns: 1fr !important; }
  .conn-grid { grid-template-columns: 1fr 1fr !important; }
  .proc-grid { grid-template-columns: 1fr !important; }
  .cases-grid { grid-template-columns: 1fr !important; }
  .shader-grid { grid-template-columns: 1fr !important; }
  .num-grid { grid-template-columns: 1fr 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }

  /* Paddings más compactos */
  .section-pad { padding: 56px 0 !important; }
  .cta-panel { padding: 44px 22px !important; }

  /* Hero builder: ocultar sidebar y cursor, contenido a ancho completo */
  .builder-screen { grid-template-columns: 1fr !important; height: auto !important; min-height: 380px; }
  .builder-sidebar { display: none !important; }
  .builder-cursor { display: none !important; }

  /* Reducir tipografías grandes inline donde aplique */
  .hero-builder-wrap { margin-top: 8px; }
}

/* Menú móvil desplegable */
.nav-mobile-panel.open {
  display: block;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 99;
  background: rgba(250, 250, 247, 0.97);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 84px 24px 28px;
  animation: nav-slide 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes nav-slide {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.nav-mobile-panel .nav-mobile-link {
  display: block;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.burger-box {
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
