/* =========================================================
   Mina Software — estilos base
   Paleta: claro minimalista + un único color corporativo
   ========================================================= */

:root {
  --color-brand: #2447c9;
  --color-brand-dark: #1a35a0;
  --color-accent: #ff7a45;

  --color-bg: #ffffff;
  --color-bg-alt: #f6f7fb;
  --color-text: #1b1d29;
  --color-text-muted: #5a5f73;
  --color-border: #e6e8f0;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --container-width: 1140px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 24, 40, 0.08);
  --transition: 200ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }

p { margin: 0 0 1em; color: var(--color-text-muted); }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn-primary {
  background: var(--color-brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-brand-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-brand); color: var(--color-brand); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-accent { color: var(--color-brand); }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--color-text); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--color-brand);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(36, 71, 201, 0.10), transparent 70%),
    var(--color-bg);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-brand);
  margin-bottom: 14px;
}
.hero-lead {
  font-size: 1.15rem;
  max-width: 620px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin: 28px 0 48px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin: 0;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}
.hero-stats dt {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-text);
}
.hero-stats dd {
  margin: 2px 0 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---------- Secciones ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-lead {
  max-width: 620px;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

.grid { display: grid; gap: 24px; margin-top: 40px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(36, 71, 201, 0.08);
  color: var(--color-brand);
  margin-bottom: 18px;
}
.card p { margin-bottom: 0; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 10px;
}

/* ---------- Nosotros ---------- */
.check-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  gap: 12px;
}
.check-list li {
  padding-left: 28px;
  position: relative;
  color: var(--color-text);
  font-weight: 500;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-brand);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 8px;
  width: 8px; height: 4px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.stat-panel {
  background: var(--color-brand);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  gap: 28px;
  color: #fff;
}
.stat-number { display: block; font-size: 2rem; font-weight: 800; }
.stat-label { font-size: 0.9rem; opacity: 0.85; }

/* ---------- Cómo trabajamos (proceso) ---------- */
.process-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}
.process-card {
  position: relative;
  padding-top: 34px;
}
.process-number {
  position: absolute;
  top: -16px;
  left: 24px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.process-card p { margin-bottom: 0; }

/* ---------- Contacto ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 26px 0 0;
  display: grid;
  gap: 18px;
}
.contact-list strong { display: block; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 2px; }
.contact-list a { color: var(--color-brand); font-weight: 600; }
.edit-note { color: var(--color-accent); font-size: 0.8rem; font-weight: 600; }

.contact-form {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
}
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(36, 71, 201, 0.15);
}
.form-note {
  font-size: 0.8rem;
  color: var(--color-accent);
  background: rgba(255, 122, 69, 0.08);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}
.form-status { font-size: 0.9rem; font-weight: 600; min-height: 1.2em; margin-top: 12px; }
.form-status.success { color: #1a8f5e; }
.form-status.error { color: #d1453b; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
  background: var(--color-bg-alt);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-inner p { margin: 0; font-size: 0.85rem; }
.footer-legal { color: var(--color-accent); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-brand);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed;
    inset: 68px 16px auto 16px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .primary-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .primary-nav ul { flex-direction: column; gap: 14px; }
  .nav-cta { text-align: center; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 56px; }
  .section { padding: 64px 0; }
}

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