/* =========================================================
   devnull.com.mx — hoja de estilos
   ========================================================= */

:root {
  /* Color */
  --bg: #0e0f10;
  --bg-alt: #141517;
  --surface: #1a1b1e;
  --surface-2: #212226;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #f4f5f6;
  --text-2: #c9ccd1;
  --muted: #9ba0a8;
  --brand: #9bd14b;          /* verde del logotipo */
  --brand-hover: #b4e271;
  --brand-ink: #0e0f10;
  --brand-soft: rgba(155, 209, 75, .12);

  /* Tipografía */
  --font-head: 'League Spartan', Arial, Helvetica, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Escala */
  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.35rem, 1.1rem + 1vw, 1.6rem);
  --step-3: clamp(1.75rem, 1.3rem + 1.8vw, 2.4rem);
  --step-4: clamp(2.3rem, 1.4rem + 3.6vw, 4.25rem);

  /* Espaciado y forma */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 120px);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 76px;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--brand); color: var(--brand-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--brand);
  --_fg: var(--brand-ink);
  --_bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;               /* objetivo táctil */
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--_bd);
  background: var(--_bg);
  color: var(--_fg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { --_bg: var(--brand-hover); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .icon { transition: transform .2s var(--ease); }
.btn:hover .icon-arrow { transform: translateX(3px); }

.btn-ghost {
  --_bg: transparent;
  --_fg: var(--text);
  --_bd: var(--border-strong);
}
.btn-ghost:hover { --_bg: rgba(255, 255, 255, .06); --_bd: rgba(255, 255, 255, .3); }

.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .9rem; }
.btn-lg { min-height: 56px; padding: 14px 30px; font-size: 1rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--brand-hover); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(14, 15, 16, .82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
/* En inicio el encabezado flota sobre el hero hasta hacer scroll */
.has-hero .site-header {
  position: fixed;
  inset: 0 0 auto 0;
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.has-hero .site-header.scrolled {
  background: rgba(14, 15, 16, .82);
  border-color: var(--border);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 44px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}
.nav ul a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color .2s, background-color .2s;
}
.nav ul a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav ul a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, .08); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-menu { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px var(--gutter) 40px;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
    overflow-y: auto;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav-open .site-header { background: var(--bg); border-color: var(--border); }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a {
    padding: 16px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-head);
    font-size: 1.5rem;
  }
  .nav ul a:hover, .nav ul a[aria-current="page"] { background: none; }
  .nav ul a[aria-current="page"] { color: var(--brand); }
  .nav .btn { min-height: 56px; }
  body.nav-open { overflow: hidden; }
  .brand img { height: 38px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 96px;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: hero-zoom 18s var(--ease) both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(14, 15, 16, .55) 70%),
    linear-gradient(180deg, rgba(14, 15, 16, .35) 0%, rgba(14, 15, 16, .15) 45%, var(--bg) 100%);
}
@keyframes hero-zoom { from { transform: scale(1.12); } to { transform: scale(1.02); } }

.hero-content { max-width: 880px; margin-inline: auto; text-align: center; }
.hero h1 { font-size: var(--step-4); margin-bottom: .35em; }
.hero h1 .hl { color: var(--brand); }
.hero p.lead {
  font-size: clamp(1.05rem, .95rem + .5vw, 1.3rem);
  color: var(--text-2);
  max-width: 640px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--text-2);
  animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Eyebrow / etiquetas ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-2);
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section.tight-top { padding-top: 0; }

.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--muted); font-size: var(--step-1); margin: 0; }

.section-foot { margin-top: 48px; text-align: center; }

/* Encabezado de páginas interiores */
.page-hero {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 0 clamp(48px, 6vw, 72px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto;
  height: 120%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(155, 209, 75, .14), transparent 70%);
  pointer-events: none;
}
.page-hero h1 { font-size: var(--step-4); margin-bottom: .3em; }
.page-hero p { color: var(--text-2); font-size: var(--step-1); max-width: 620px; margin: 0 auto; }

/* ---------- Rejillas y tarjetas ---------- */
.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px 24px 28px; }
.card-body h3 { font-size: var(--step-2); margin-bottom: .4em; }
.card-body p { color: var(--muted); margin: 0; }
.card-body .link-arrow { margin-top: auto; padding-top: 20px; }
.card-num {
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--brand);
  letter-spacing: .08em;
  margin-bottom: 10px;
}

/* Tarjeta con icono (servicios) */
.icon-badge {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 18px;
}
.icon-badge .icon { width: 24px; height: 24px; }

.service-card .card-media { aspect-ratio: 16 / 9; }
.service-card .icon-badge {
  position: absolute;
  top: calc((100% * 0) + 16px);
  left: 16px;
  margin: 0;
  background: rgba(14, 15, 16, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-strong);
}

/* Lista compacta de servicios (inicio) */
.service-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-list a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
  background: var(--surface);
  text-decoration: none;
  transition: background-color .2s var(--ease);
}
.service-list a:hover { background: var(--surface-2); }
.service-list h3 { font-size: 1.15rem; margin: 0; }
.service-list .icon-badge { margin-bottom: 14px; }
@media (max-width: 1060px) { .service-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .service-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px)  { .service-list { grid-template-columns: 1fr; } }

/* ---------- Bloques imagen + texto ---------- */
.feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.feature + .feature { margin-top: clamp(72px, 9vw, 128px); }
.feature.reverse { grid-template-columns: 1fr 1.05fr; }
.feature.reverse .feature-media { order: 2; }

.feature-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media.ratio img { aspect-ratio: 4 / 3; }
.feature-media.light { background: #f5f6f7; }
.feature-media.light img { object-fit: contain; padding: 12%; aspect-ratio: 4 / 3; }

.feature-body h2 { font-size: var(--step-3); }
.feature-body p { color: var(--text-2); max-width: 62ch; }
.feature-body strong { color: var(--text); font-weight: 600; }
.feature-body .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.feature-body .actions { margin-top: 24px; }

@media (max-width: 860px) {
  .feature, .feature.reverse { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
}

/* Índice de casos */
.chip-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.chip-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  text-decoration: none;
  font-size: .9rem;
  color: var(--text-2);
  transition: all .2s var(--ease);
}
.chip-nav a:hover { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }

/* Contenido largo plegable en casos */
.more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  color: var(--brand);
  font-weight: 600;
  margin-top: 4px;
}
.more summary::-webkit-details-marker { display: none; }
.more summary .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.more[open] summary .icon { transform: rotate(180deg); }
.more[open] summary .lbl-open, .more:not([open]) summary .lbl-close { display: none; }
.more > div { padding-top: 14px; }

/* ---------- Cita / visión ---------- */
.statement {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}
.statement blockquote {
  margin: 0;
  font-family: var(--font-head);
  font-size: var(--step-3);
  line-height: 1.25;
}
.statement blockquote .hl { color: var(--brand); }

/* ---------- Banda CTA ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: clamp(36px, 6vw, 64px);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, #1a2410 0%, var(--surface) 55%);
  border: 1px solid rgba(155, 209, 75, .25);
}
.cta-band::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  z-index: -1;
  border-radius: 50%;
  border: 1px dashed rgba(155, 209, 75, .3);
  box-shadow: 0 0 0 40px rgba(155, 209, 75, .04), 0 0 0 80px rgba(155, 209, 75, .03);
}
.cta-band h2 { font-size: var(--step-3); margin-bottom: .3em; }
.cta-band p { color: var(--text-2); margin: 0; max-width: 52ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
}
.contact-card {
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-card h2 { font-size: var(--step-3); }
.contact-card p { color: var(--text-2); }
.contact-card .btn { margin-top: 12px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list .icon-badge { margin: 0; width: 44px; height: 44px; }
.contact-list small { display: block; color: var(--muted); font-size: .85rem; }
.contact-list a, .contact-list span.v { font-weight: 600; text-decoration: none; color: var(--text); }
.contact-list a:hover { color: var(--brand); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  color: var(--muted);
  font-size: .95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand img { height: 40px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 36ch; margin: 0; }
.site-footer h3 {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--text); }
.footer-bottom { padding-top: 24px; font-size: .85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .5);
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float .icon { width: 28px; height: 28px; }

/* ---------- Animación de aparición ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* Rejilla centrada para un número impar de tarjetas */
.grid-center { display: flex; flex-wrap: wrap; justify-content: center; }
.grid-center > * { flex: 0 1 calc((100% - 2 * clamp(16px, 2.4vw, 28px)) / 3); }
@media (max-width: 960px) { .grid-center > * { flex-basis: calc((100% - clamp(16px, 2.4vw, 28px)) / 2); } }
@media (max-width: 640px) { .grid-center > * { flex-basis: 100%; } }
