/* ============================================================================
   MarckTM — Site layout & page components
   Depends on: brand.css (design tokens + base components).
   This layer consumes brand tokens only — it never redefines them.
   Dependency direction:  pages(html) → site.css → brand.css → (nothing)
   ============================================================================ */

body { background: var(--bg); }

/* ── Skip link (accesibilidad por teclado) ───────────────────────────── */
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--mk-ink-900); color: #fff;
  font-family: var(--font-mono); font-size: 13px;
  padding: 10px 16px; border-radius: var(--r-1);
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 12px; outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,246,250,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-in { max-width: 1180px; margin: 0 auto; padding: 16px 40px; display: flex; align-items: center; justify-content: space-between; }
.nav .wordmark { font-size: 21px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .02em; color: var(--fg-3); transition: color 160ms var(--ease); }
.nav-links a:hover { color: var(--accent); }
.nav-links a.nav-cta {
  font-family: var(--font-sans); font-weight: 600; font-size: 13.5px;
  padding: 9px 18px; border-radius: var(--r-1); background: var(--mk-ink-900); color: #fff;
  transition: background 160ms var(--ease);
}
.nav-links a.nav-cta:hover { background: var(--accent); color: #fff; }

/* ── Hero (light) ────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(80% 60% at 82% 0%, var(--mk-violet-100), transparent 60%),
    var(--bg);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,20,28,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,20,28,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(90% 90% at 60% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(90% 90% at 60% 0%, #000 35%, transparent 78%);
  pointer-events: none;
}
.hero-in { position: relative; max-width: 1180px; margin: 0 auto; padding: 120px 40px 72px; }

/* Sección sin borde ni doble espacio superior (va pegada al hero) */
.section-tight { padding-top: 56px; border-top: 0; }
.hero-in .eyebrow { margin-bottom: 30px; }
.hero h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.035em;
  font-size: clamp(38px, 6vw, 68px); line-height: 1.04; max-width: 15ch; text-wrap: balance;
  color: var(--fg-1);
}
.hero h1 b { color: var(--accent); font-weight: 600; }
.hero .en {
  font-family: var(--font-mono); font-size: 14px; color: var(--fg-3);
  margin-top: 20px; letter-spacing: .01em;
}
.hero p.lead {
  font-size: 17.5px; color: var(--fg-2); max-width: 52ch; margin-top: 26px; text-wrap: pretty;
}
.hero-row { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-p {
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: var(--r-1); background: var(--mk-ink-900); color: #fff; border: 0;
  cursor: pointer;
  transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.btn-p:hover { background: var(--accent); }
.btn-s {
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: var(--r-1); background: transparent; color: var(--fg-1);
  border: 1px solid var(--border-strong); cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
.btn-s:hover { border-color: var(--accent); color: var(--accent); }

.hero-chips { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px; }
.chip-l {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .01em;
  padding: 7px 13px; border-radius: var(--r-pill);
  border: 1px solid var(--border); color: var(--fg-3); background: var(--surface);
}
.chip-l b { color: var(--accent); font-weight: 600; margin-right: 6px; }

/* ── Servicios grid ──────────────────────────────────────────────────── */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.svc-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3);
  padding: 28px 24px; position: relative; overflow: hidden;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease);
}
.svc-card h3 { min-height: 2.4em; }
.svc-card p { flex: 1; }
.svc-card .svc-tag { margin-top: auto; }
.svc-card:hover { transform: translateY(-4px); box-shadow: var(--elev-2); border-color: var(--border-strong); }
.svc-num {
  font-family: var(--font-mono); font-size: 12px; color: var(--mk-violet-400); letter-spacing: .04em;
}
.svc-icon {
  width: 38px; height: 38px; margin-top: 18px;
  display: grid; place-items: center; border-radius: var(--r-2);
  background: var(--mk-violet-50); color: var(--accent);
}
.svc-icon svg { width: 19px; height: 19px; }
.svc-card h3 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em;
  font-size: 19.5px; color: var(--fg-1); margin-top: 20px;
}
.svc-card p {
  font-size: 14.5px; color: var(--fg-2); margin-top: 10px; line-height: 1.6; text-wrap: pretty;
}
.svc-tag {
  margin-top: 18px; display: inline-flex; font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-3); letter-spacing: .04em;
}

/* ── Proceso ─────────────────────────────────────────────────────────── */
.proc-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.proc-item { padding: 26px 22px 0 0; border-top: 2px solid var(--mk-ink-900); position: relative; }
.proc-item .n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.proc-item h4 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-top: 10px; letter-spacing: -.01em; }
.proc-item p { font-size: 13.5px; color: var(--fg-2); margin-top: 8px; line-height: 1.55; }

/* ── Detalle de servicio (páginas internas) ──────────────────────────── */
.svc-hero { position: relative; overflow: hidden; background: var(--bg); border-bottom: 1px solid var(--border); }
.svc-hero-in { max-width: 1180px; margin: 0 auto; padding: 88px 40px 64px; }
.crumbs { font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); margin-bottom: 22px; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--fg-4); margin: 0 8px; }
.svc-title {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em;
  font-size: clamp(32px, 5vw, 52px); line-height: 1.05; max-width: 18ch; color: var(--fg-1);
}
.svc-sub { font-size: 17.5px; color: var(--fg-2); max-width: 56ch; margin-top: 22px; text-wrap: pretty; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-3);
  padding: 26px 24px;
}
.feature .f-icon {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r-2);
  background: var(--mk-violet-50); color: var(--accent); margin-bottom: 16px;
}
.feature .f-icon svg { width: 18px; height: 18px; }
.feature h4 { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.feature p { font-size: 14px; color: var(--fg-2); margin-top: 8px; line-height: 1.6; }

.deliver { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; }
.deliver li {
  list-style: none; padding-left: 28px; position: relative;
  font-size: 15px; color: var(--fg-2); line-height: 1.5;
}
.deliver li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px;
  border-radius: 3px; border: 2px solid var(--accent);
}

/* ── CTA band ────────────────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(155deg, var(--mk-ink-900), #0A0E14);
  color: var(--on-dark-1); border-radius: var(--r-5);
  padding: 64px 56px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(91,69,217,.38), transparent 65%);
}
.cta-band h3 {
  position: relative; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px,3.4vw,34px);
  letter-spacing: -.025em; max-width: 16ch; line-height: 1.12;
}
.cta-band .actions { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }
.btn-p.on-dark-btn { background: var(--mk-violet-600); }
.btn-p.on-dark-btn:hover { background: var(--mk-violet-500); }
.btn-s.on-dark-btn { color: #fff; border-color: rgba(255,255,255,.22); }
.btn-s.on-dark-btn:hover { border-color: var(--mk-violet-400); color: var(--mk-violet-300); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); }
.footer-in {
  max-width: 1180px; margin: 0 auto; padding: 48px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer .wordmark { font-size: 19px; }
.footer-links { display: flex; gap: 24px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-3); }
.footer-links a:hover { color: var(--accent); }
.footer-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-4); }

/* ============================================================================
   RESPONSIVE  — mobile-first refinements (desktop styles above are the base)
   Breakpoints:  ≤940 tablet · ≤760 large phone · ≤620/≤480 phone
   ============================================================================ */
@media (max-width: 940px){
  .svc-grid { grid-template-columns: repeat(2,1fr); }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 760px){
  .nav-links a:not(.nav-cta) { display: none; }
  .nav-in { padding: 14px 22px; }
  .hero-in { padding: 76px 22px 56px; }
  .svc-hero-in { padding: 60px 22px 44px; }
  .section { padding: 52px 0; }
  .section-tight { padding-top: 40px; }
  .proc-row { grid-template-columns: repeat(2,1fr); gap: 28px 22px; }
  .deliver { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 26px; }
  .footer-in { padding: 40px 22px; }
}
@media (max-width: 620px){
  .svc-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .svc-card h3 { min-height: 0; }
  .hero-chips { margin-top: 40px; }
  .hero-row .btn-p, .hero-row .btn-s { flex: 1 1 auto; text-align: center; }
}
@media (max-width: 480px){
  .proc-row { grid-template-columns: 1fr; }
}

/* ── Accesibilidad: respeta reduce-motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce){
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .svc-card:hover { transform: none; }
}
