/* ============================================================================
   Estética Medusa (design system del storefront NewLine/Medusa 2.0)
   Tokens copiados de apps/storefront/tailwind.config.js + src/styles/globals.css
   ========================================================================== */

:root {
  /* Acento dinámico de marca — en Medusa se inyecta como CSS var en el root */
  --color-primary: #1b6bff;
  --color-primary-contrast: #ffffff;
  --color-secondary: #00b8a9;

  /* Paleta Medusa */
  --black: #050505;
  --white: #fdfdfd;
  --gray-800: #1f1f20;
  --gray-700: #3a3a3b;
  --gray-600: #545457;
  --gray-500: #808080;
  --gray-400: #a3a3a3;
  --gray-300: #bbbbbb;
  --gray-200: #d1d1d1;
  --gray-100: #e7e7e7;
  --gray-50: #f4f4f4;
  --gray-30: #f8f8f9;
  --gray-20: #fbfbfb;

  /* Radios Medusa: 2xs 4px / xs 4px / md 24px / lg 30px */
  --radius-xs: 4px;
  --radius-md: 24px;
  --radius-lg: 30px;
  --radius-full: 100%;

  --shadow-modal: 0px 0px 40px -16px rgba(0, 0, 0, 0.2);

  --maxw: 1440px;
  --header-h: 74px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color: var(--black);
  font-weight: 400;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: "Mona Sans Variable", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; letter-spacing: -0.01em; }
strong { font-weight: 650; }

a { color: inherit; }

/* ── Escala tipográfica (.type-*) — única fuente de verdad ─────────────── */
.type-display { font-size: 2rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.type-h1 { font-size: 1.5rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
.type-h2 { font-size: 1.25rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.type-h3 { font-size: 1rem; line-height: 1.3; font-weight: 600; }
.type-body { font-size: 0.9375rem; line-height: 1.5; font-weight: 400; }
.type-small { font-size: 0.8125rem; line-height: 1.4; font-weight: 400; }
.type-caption { font-size: 0.6875rem; line-height: 1.3; font-weight: 500; letter-spacing: 0.06em; }

@media (min-width: 768px) {
  .type-display { font-size: 2.875rem; line-height: 1.05; }
  .type-h1 { font-size: 2rem; line-height: 1.1; }
  .type-h2 { font-size: 1.5rem; }
  .type-h3 { font-size: 1.0625rem; }
  .type-body { font-size: 1rem; line-height: 1.55; }
}

/* ── Contenedor Medusa ─────────────────────────────────────────────────── */
.content-container { max-width: var(--maxw); width: 100%; margin-inline: auto; padding-inline: 24px; }

section { padding: 88px 0; }

/* ── Botones (variantes del Button.tsx de Medusa) ──────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding-inline: 24px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  cursor: pointer; white-space: nowrap;
}
.btn:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--color-primary), 0 0 0 4px rgba(59, 130, 246, 0.2); }

/* solid: bg-black hover:bg-grayscale-500 text-white */
.btn-solid { background: var(--black); color: var(--white); }
.btn-solid:hover { background: var(--gray-500); }

/* outline: border-black hover:border-grayscale-500 hover:text-grayscale-500 */
.btn-outline { border-color: var(--black); color: var(--black); background: transparent; }
.btn-outline:hover { border-color: var(--gray-500); color: var(--gray-500); }

/* accent: bg-gold (var --color-primary), texto de contraste de marca */
.btn-accent { background: var(--color-primary); color: var(--color-primary-contrast); font-weight: 600; }
.btn-accent:hover { background: color-mix(in srgb, var(--color-primary) 82%, #000); }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 9999;
  background: rgba(253, 253, 253, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 250ms ease, background 250ms ease;
}
.navbar.scrolled { border-bottom-color: var(--gray-100); background: rgba(253, 253, 253, 0.97); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: flex; align-items: center; text-decoration: none; color: var(--black); }
.brand-logo { display: block; height: 30px; width: auto; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  position: relative;
  color: var(--gray-600); text-decoration: none;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  padding: 6px 0; transition: color 200ms ease;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--black); transition: width 250ms ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--black); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }

.nav-cta { height: 38px; padding-inline: 16px; font-size: 11.5px; letter-spacing: 0.06em; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--black); border-radius: 2px; transition: 300ms; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 72px) 0 80px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg canvas { width: 100%; height: 100%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(760px 440px at 12% 28%, rgba(27, 107, 255, 0.07), transparent 70%),
    radial-gradient(620px 400px at 88% 72%, rgba(0, 184, 169, 0.07), transparent 70%),
    linear-gradient(180deg, rgba(253, 253, 253, 0.55), rgba(253, 253, 253, 0.94));
}
.hero-inner { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-block; text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid color-mix(in srgb, var(--color-primary) 30%, #fff);
  background: color-mix(in srgb, var(--color-primary) 6%, #fff);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 26px;
}
.hero-title { color: var(--black); max-width: 15ch; }
.hero-sub {
  margin-top: 18px;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.34em; font-weight: 600; color: var(--gray-500);
}
.hero-lead { margin-top: 20px; max-width: 620px; color: var(--gray-700); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-stats {
  list-style: none; display: flex; flex-wrap: wrap; gap: 44px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--gray-100);
}
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-size: 1.75rem; font-weight: 650; letter-spacing: -0.02em; color: var(--black); }
.hero-stats span { color: var(--gray-500); }

/* ── Secciones ─────────────────────────────────────────────────────────── */
.section-alt { background: var(--gray-30); border-block: 1px solid var(--gray-100); }

.section-head { max-width: 820px; margin-bottom: 48px; }
.tag {
  display: inline-block; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 16px; color: var(--black); }
.section-lead { color: var(--gray-600); max-width: 760px; }
.section-lead strong { color: var(--black); }

/* ── Objeto social ─────────────────────────────────────────────────────── */
.services-grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
  counter-reset: svc;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: border-color 250ms ease, background-color 250ms ease, transform 250ms ease;
}
.service-card:hover {
  border-color: var(--gray-400);
  background: var(--gray-20);
  transform: translateY(-3px);
}
.svc-num { display: block; color: var(--color-primary); text-transform: uppercase; margin-bottom: 14px; }
.service-card h3 { margin-bottom: 8px; color: var(--black); }
.service-card p { color: var(--gray-600); }

/* ── Gobierno corporativo ──────────────────────────────────────────────── */
.gov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.gov-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: border-color 250ms ease, transform 250ms ease;
}
.gov-card:hover { border-color: var(--gray-400); transform: translateY(-3px); }
.gov-card h3 { margin-bottom: 12px; color: var(--black); }
.gov-card p { color: var(--gray-600); }

.board-title { margin: 52px 0 22px; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.board-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  transition: border-color 250ms ease, transform 250ms ease;
}
.board-card:hover { border-color: var(--black); transform: translateY(-3px); }
.board-role { display: block; text-transform: uppercase; color: var(--color-primary); margin-bottom: 12px; }
.board-card h4 { color: var(--black); }
.board-line { display: block; width: 40px; height: 2px; margin-top: 16px; background: var(--black); }
.board-note { display: block; margin-top: 12px; color: var(--gray-500); font-style: italic; }

/* ── Aviso legal ───────────────────────────────────────────────────────── */
.legal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.legal-card {
  background: var(--gray-30);
  border: 1px solid var(--gray-100);
  border-left: 3px solid var(--black);
  border-radius: var(--radius-xs);
  padding: 24px;
}
.legal-note { border-left-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 5%, #fff); }
.legal-label { display: block; text-transform: uppercase; color: var(--gray-500); margin-bottom: 10px; }
.legal-card p { color: var(--gray-700); }
.mono { letter-spacing: 0.06em; color: var(--black) !important; font-variant-numeric: tabular-nums; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--gray-100); background: var(--gray-30); padding: 48px 0 32px; }
.footer-inner { display: grid; gap: 24px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-logo { width: 46px; height: 46px; display: block; flex: none; }
.footer-brand strong { display: block; color: var(--black); }
.footer-brand span { color: var(--gray-500); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--gray-600); text-decoration: none; transition: color 200ms ease; }
.footer-nav a:hover { color: var(--black); }
.footer-copy { color: var(--gray-500); border-top: 1px solid var(--gray-100); padding-top: 20px; }

/* ── Botón flotante de WhatsApp ────────────────────────────────────────── */
.wa-float {
  position: fixed; right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; padding: 0;
  border-radius: var(--radius-full);
  background: #25d366; color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 200ms ease, background-color 200ms ease;
}
.wa-float:hover { transform: translateY(-3px); background: #1eb955; }
.wa-float:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--color-primary), 0 0 0 4px rgba(59, 130, 246, 0.2); }
.wa-icon { width: 26px; height: 26px; flex: none; }
.wa-label { display: none; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }

@media (min-width: 480px) {
  .wa-float { width: auto; padding: 0 18px; gap: 8px; }
  .wa-label { display: inline; }
}

/* ── Reveal ────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1023.98px) {
  .nav-cta { display: none; }
}

@media (max-width: 940px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--header-h); right: 0;
    width: min(80vw, 340px);
    flex-direction: column; gap: 0;
    background: var(--white);
    border-left: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-modal);
    padding: 8px 0;
    transform: translateX(105%); transition: transform 350ms ease;
    height: calc(100svh - var(--header-h));
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 16px 24px; font-size: 12.5px; border-bottom: 1px solid var(--gray-100); }
  .nav-links a::after { display: none; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }
  .content-container { padding-inline: 20px; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 1.4rem; }
  .btn { width: 100%; }
  .hero-actions { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
