/* ============================================================
   Visualnet 4K — Estilos compartidos
   Variables de marca, reset, tipografía global,
   componentes reutilizables, header / nav / footer.
   Mobile-first: base < 640px, luego 640px / 1024px / 1280px
   ============================================================ */

/* ---------- Variables de marca ---------- */
:root {
  /* Color */
  --background: oklch(0.17 0.06 300);
  --foreground: oklch(0.97 0.01 300);
  --card: oklch(0.22 0.08 300);
  --popover: oklch(0.22 0.08 300);
  --primary: oklch(0.58 0.24 300);
  --primary-foreground: oklch(0.99 0.01 300);
  --secondary: oklch(0.28 0.09 300);
  --muted-foreground: oklch(0.75 0.04 300);
  --mint: oklch(0.82 0.16 175);
  --mint-foreground: oklch(0.18 0.06 300);
  --whatsapp: oklch(0.72 0.18 150);
  --border: oklch(0.35 0.08 300 / 0.5);

  /* Tipografía */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;

  /* Radios */
  --radius: 0.875rem;
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 999rem;

  /* Espaciado */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* Sombras */
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.35), 0 8px 10px -6px rgb(0 0 0 / 0.35);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);

  /* Layout */
  --container: 80rem;
}

/* ---------- Reset / normalización ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; border: 0 solid var(--border); }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, oklch(0.24 0.11 300) 0%, oklch(0.13 0.05 300) 60%, oklch(0.10 0.04 300) 100%);
  background-attachment: fixed;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

button, input, textarea, select { font: inherit; color: inherit; background: none; }
button { cursor: pointer; }

ul, ol { list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* ---------- Tipografía global ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 700;
}
h1 { font-size: clamp(1.875rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 4vw, 3rem); }
h3 { font-size: clamp(1rem, 1.4vw, 1.125rem); }
p  { font-size: 1rem; }

.muted { color: var(--muted-foreground); }
.mint  { color: var(--mint); }

/* ---------- Layout compartido ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, oklch(0.82 0.16 175 / 0.4), transparent);
}

/* ---------- Componentes reutilizables ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 2.75rem; /* 44px touch target */
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:hover { filter: brightness(1.1); }

.btn--wa {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn--mint {
  background: var(--mint);
  color: var(--mint-foreground);
}
.btn--lg {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.icon { width: 1rem; height: 1rem; flex: none; }
.icon--sm { width: 0.875rem; height: 0.875rem; }
.icon--md { width: 1.25rem; height: 1.25rem; }
.icon--lg { width: 2rem; height: 2rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid oklch(0.35 0.08 300 / 0.5);
  background: oklch(0.17 0.06 300 / 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-4);
}
.brand { display: flex; min-width: 0; align-items: center; gap: var(--space-2); }
.brand__logo {
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  overflow: hidden;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  box-shadow: 0 0 0 1px oklch(0.82 0.16 175 / 0.3), var(--shadow-lg);
}
.brand__logo img { width: 100%; height: 100%; object-fit: cover; }
.brand__text { min-width: 0; line-height: 1.2; }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand__tag {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Nav / menú hamburguesa ---------- */
.nav { position: relative; }
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid oklch(0.82 0.16 175 / 0.3);
  border-radius: var(--radius-md);
  background: oklch(0.22 0.08 300 / 0.6);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav__toggle:hover { border-color: oklch(0.82 0.16 175 / 0.6); background: var(--card); }
.nav__bars {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 1.25rem;
  height: 1rem;
}
.nav__bars span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: var(--radius-full);
  background: var(--mint);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] .nav__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.nav__menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 50;
  margin-top: var(--space-3);
  width: min(16rem, calc(100vw - 3rem));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: oklch(0.22 0.08 300 / 0.95);
  padding: var(--space-2);
  box-shadow: var(--shadow-2xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav__menu[hidden], .nav__overlay[hidden] { display: none; }
.nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 2.75rem;
  border-radius: var(--radius-md);
  padding: 0.625rem var(--space-3);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav__link:hover { background: var(--secondary); color: var(--foreground); }
.nav__link .icon { color: var(--mint); }
.nav__cta { margin-top: var(--space-2); width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-8);
  border-top: 1px solid oklch(0.35 0.08 300 / 0.5);
  background: oklch(0.17 0.06 300 / 0.6);
  backdrop-filter: blur(8px);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-8);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
}
.site-footer__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  color: var(--mint);
  transition: filter 0.2s ease;
}
.site-footer__link:hover { filter: brightness(1.1); }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  border-radius: var(--radius-full);
  background: var(--whatsapp);
  padding: 0.625rem var(--space-4);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-2xl);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.05); }

/* ---------- Tablet ---------- */
@media (min-width: 40em) { /* 640px */
  .site-footer__inner { text-align: left; }
}

/* ---------- Desktop ---------- */
@media (min-width: 64em) { /* 1024px */
  .site-footer__inner { flex-direction: row; }
}

/* ---------- Desktop grande ---------- */
@media (min-width: 80em) { /* 1280px */
  .container { padding-inline: var(--space-6); }
}

/* ---------- Animaciones compartidas ---------- */
@keyframes float-inline {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes glow-pulse-turquoise {
  0%, 100% {
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--mint) 39%, transparent),
                0 0 10px 1px color-mix(in oklab, var(--mint) 26%, transparent);
  }
  50% {
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--mint) 59%, transparent),
                0 0 18px 4px color-mix(in oklab, var(--mint) 42%, transparent);
  }
}
.animate-float-inline { animation: float-inline 3.2s ease-in-out infinite; }
.animate-glow-turquoise { animation: glow-pulse-turquoise 3.2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
