/* MagariTech — sitio corporativo. Monocromo sobrio; el azul solo como señal (isotipo, foco, enlaces activos). */
:root {
  --ink: #111318;        /* Negro MagariTech */
  --ink-2: #3A3F47;      /* texto secundario fuerte */
  --muted: #5B616B;      /* Gris Tech */
  --line: #E3E5E9;       /* divisores */
  --paper: #FFFFFF;      /* fondo */
  --paper-2: #F5F6F8;    /* fondo alterno */
  --night: #0B0C0F;      /* secciones oscuras */
  --night-ink: #F4F5F7;
  --night-muted: #9AA0A8;
  --signal: #1A73E8;     /* azul del isotipo */
  --font: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --r: 18px;
  color-scheme: light;
  /* Layout: cabecera fija, secciones a todo el ancho con contenido centrado en --wrap; ritmo vertical de 96px. */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: clamp(18px, 1.9vw, 21px); color: var(--muted); max-width: 62ch; line-height: 1.55; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section.alt { background: var(--paper-2); }
.section.dark { background: var(--night); color: var(--night-ink); }
.section.dark .lead, .section.dark .eyebrow, .section.dark .muted { color: var(--night-muted); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 48px; }
.muted { color: var(--muted); }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink-2); padding: 10px 12px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav .lang { border: 1px solid var(--line); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; padding: 8px 12px; }
.nav .btn { margin-left: 6px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background 0.15s, color 0.15s, border-color 0.15s; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.section.dark .btn-dark { background: var(--night-ink); color: var(--ink); }
.section.dark .btn-ghost { color: var(--night-ink); border-color: #2E3238; }
.nav .btn { min-height: 40px; padding: 0 18px; color: #fff; }
.nav .btn:hover { background: #000; color: #fff; }

/* Hero */
.hero { padding: 88px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.panel { background: var(--night); color: var(--night-ink); border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 30px 60px -30px rgba(17, 19, 24, 0.45); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head strong { font-size: 15px; font-weight: 600; }
.panel-head img { height: 22px; width: auto; }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-top: 1px solid #1E2127; font-size: 15px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--night-muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3DBE7A; box-shadow: 0 0 0 4px rgba(61, 190, 122, 0.14); }
.panel-note { font-size: 12px; color: #6B717B; margin-top: 8px; }

/* Servicios */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
a.card:hover { border-color: var(--ink); transform: translateY(-2px); }
.card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
.card.wide h3, .card.wide p { grid-column: 2; }
.card.wide .icon { grid-row: 1 / span 2; }
.card.wide .more { grid-column: 3; grid-row: 1 / span 2; margin-top: 0; padding-top: 0; }
.card .more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-2); display: inline-flex; align-items: center; justify-content: center; }
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Proceso */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid #22262D; }
.step { padding: 28px 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.step-n { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; color: var(--night-muted); font-variant-numeric: tabular-nums; }
.step p { color: var(--night-muted); font-size: 15px; }

/* Por qué */
.why { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.why-item { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); }
.why-item p { color: var(--muted); }

/* CTA */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-copy { display: flex; flex-direction: column; gap: 10px; }

/* Página de servicio */
.page-head { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.page-head .wrap { display: flex; flex-direction: column; gap: 18px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.group { border: 1px solid var(--line); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 14px; background: var(--paper); }
.group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.group li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.group li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 1.5px; background: var(--ink); }
.outcome { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 32px; align-items: start; }
.outcome p { font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; max-width: 40ch; }
.others { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.chip:hover { border-color: var(--ink); color: var(--ink); }

/* Nosotros */
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 68ch; color: var(--ink-2); }
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* Contacto */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 32px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field label .req { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%; }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: transparent; background: var(--paper); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 14px; color: var(--muted); }
.form-msg.ok { color: #1F7A4D; }
.form-msg.err { color: #B42318; }

.phone-block { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.phone { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); font-variant-numeric: tabular-nums; }
.phone:hover { text-decoration: underline; }

.wa-inline { align-self: flex-start; margin-top: 10px; }
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; box-shadow: 0 12px 30px -10px rgba(17, 19, 24, 0.55); transition: transform 0.15s, background 0.15s; }
.wa-float:hover { background: #000; transform: translateY(-2px); }
.wa-float svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; }
.wa-float::before { content: ""; position: absolute; top: 12px; left: 32px; width: 9px; height: 9px; border-radius: 50%; background: #3DBE7A; border: 2px solid var(--ink); }
@media (max-width: 640px) { .wa-float { right: 16px; bottom: 16px; padding: 0 16px; } .wa-float span { display: none; } }

/* Pie */
.site-footer { border-top: 1px solid #1E2127; background: var(--night); color: var(--night-muted); padding: 56px 0 40px; font-size: 14px; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 32px; }
.foot-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; gap: 14px; max-width: 34ch; }
.foot-brand img { height: 30px; width: auto; }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-col strong { color: var(--night-ink); font-weight: 600; font-size: 14px; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { color: var(--night-ink); }
.foot-bottom { border-top: 1px solid #1E2127; padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Responsivo */
@media (max-width: 980px) {
  .hero .wrap, .contact, .outcome { grid-template-columns: minmax(0, 1fr); }
  .grid, .groups, .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
}
@media (max-width: 640px) {
  .card.wide { display: flex; }
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 72px; }
  .grid, .groups, .values, .why, .steps, .form { grid-template-columns: minmax(0, 1fr); }
  .form { padding: 22px; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { padding: 10px 8px; font-size: 14px; }
  .nav .btn { display: none; }
}
