/* =========================================================
   1MX — Media Consulting Agency
   Paleta extraída de la cartelera / portafolio comercial real:
   negro cálido, dorado antiguo, crema — editorial, sobrio.
   ========================================================= */

:root {
  --bg: #161410;
  --bg-raised: #1e1a14;
  --bg-sunken: #0f0d09;
  --ink: #f2eada;
  --ink-dim: #a39b87;
  --ink-faint: #8c8268;
  --gold: #b1813e;         /* dorado de marca (muestreado de la cartelera) */
  --gold-bright: #c99a55;
  --bronze: #8a6530;        /* tono más profundo — para Panorámicos */
  --gold-ink: #161410;      /* texto sobre relleno dorado */
  --line: #2c2620;
  --line-soft: #201c16;
  --mountain: #201c15;
  --mountain-back: #1c1811;
  --mountain-front: #2b2419;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-label: "Manrope", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;

  --container: 1180px;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1px;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); line-height: 1.08; font-weight: 460; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.14; font-weight: 480; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.25; font-weight: 600; }

h2 em, h1 em { color: var(--gold); font-style: normal; }

p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-dim); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-dim);
  max-width: 56ch;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(22, 20, 16, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.2px;
}
.brand-word em { color: var(--gold); font-style: normal; }

.brand-tag {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-left: 4px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

nav.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

nav.primary-nav a {
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  padding: 10px 16px;
  border-radius: 3px;
  transition: color 0.15s ease, background 0.15s ease;
}
nav.primary-nav a:hover { color: var(--ink); background: var(--bg-raised); }
nav.primary-nav a.is-active { color: var(--gold-bright); position: relative; }
nav.primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 5px;
  height: 1px;
  background: var(--gold);
}

.nav-cta {
  font-family: var(--font-label);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--gold);
  color: var(--gold-ink) !important;
  padding: 11px 20px !important;
  border-radius: 3px;
  margin-left: 8px;
}
.nav-cta:hover { background: var(--gold-bright) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  width: 42px; height: 42px;
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 15px 26px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, background 0.15s ease, border-color .15s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .55); }
.btn-accent, .btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-accent:hover, .btn-gold:hover { background: var(--gold-bright); }
.btn-outline { border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--gold); background: var(--bg-raised); }

/* Spotlight: un brillo suave que sigue al cursor, actualizado por
   interactions.js vía las variables --mx/--my. Solo aparece con :hover,
   así que en móvil (sin mousemove) simplemente nunca se activa. */
.btn::before, .card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(201, 154, 85, .16), transparent 62%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.btn:hover::before, .card:hover::before { opacity: 1; }
.btn-accent::before, .btn-gold::before { background: radial-gradient(160px circle at var(--mx, 50%) var(--my, 50%), rgba(22, 20, 16, .18), transparent 62%); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- Sections ---------- */

section { padding-block: 88px; border-bottom: 1px solid var(--line-soft); }
section:last-of-type { border-bottom: none; }
.section-tight { padding-block: 60px; }

.hero {
  position: relative;
  padding-block: 100px 0;
  background:
    radial-gradient(ellipse 820px 440px at 84% -12%, rgba(177, 129, 62, 0.16), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: end;
  position: relative;
  z-index: 2;
  padding-bottom: 64px;
}

.hero-figure {
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  border-top: 2px solid var(--gold);
  border-radius: 2px;
  padding: 24px;
}

.hero-figure .num {
  font-family: var(--font-display);
  font-size: 2.9rem;
  color: var(--gold);
  line-height: 1;
}
.hero-figure .label {
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-top: 10px;
}

/* Skyline silhouette — Cerro de la Silla, guiño a Monterrey.
   Tres capas superpuestas (grid-area compartida): fondo desenfocado con
   niebla atmosférica, frente con degradado de luz (más claro en las
   crestas, se hunde en sombra abajo) y un rim de luz dorada encima —
   más un resplandor tipo "luna/sol poniéndose" detrás del pico. Esto es
   lo que hace que se lea como una escena cinematográfica y no solo un
   recorte plano de un solo color. */
.skyline-wrap {
  display: grid;
  width: 100%;
  margin-top: -1px;
  position: relative;
  z-index: 1;
}
.skyline-wrap .skyline {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: auto;
}
.skyline-back {
  opacity: 0.62;
  filter: blur(1.1px);
}
.skyline-rim path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-opacity: 0.45;
  vector-effect: non-scaling-stroke;
}

/* ---------- Stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
  background: var(--bg-raised);
}
.stat {
  padding: 30px 22px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat .n {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--ink);
}
.stat .n em { color: var(--gold); font-style: normal; }
.stat .d {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* ---------- Cards / grids ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.category-stat { margin-top: 16px; }
.category-stat .n { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); }
.category-stat .d { font-family: var(--font-label); font-size: 0.7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; margin-top: 3px; }
.avatar-dots { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.avatar-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-sunken); border: 1.5px solid var(--gold); flex-shrink: 0; }
.avatar-count { margin-left: 6px; color: var(--ink-faint); font-size: 0.8rem; white-space: nowrap; }

.card {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 30px;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 34px -16px rgba(0, 0, 0, .6);
  border-color: var(--line);
}

.card-accent { border-top: 2px solid var(--bronze); }
.card-gold { border-top: 2px solid var(--gold); }

.card h3 { margin-bottom: 12px; }
.card p { color: var(--ink-dim); }

.icon-tag {
  width: 38px; height: 38px;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 18px;
  color: var(--gold-ink);
  background: var(--gold);
}

/* ---------- Process steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  counter-reset: step;
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.step {
  padding: 32px 26px;
  border-right: 1px solid var(--line);
  background: var(--bg-raised);
  position: relative;
}
.step:last-child { border-right: none; }
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-ink);
  background: var(--gold);
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { font-size: 0.94rem; }

/* ---------- Logo wall ---------- */

.logo-wall {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.logo-wall span {
  background: var(--bg-raised);
  padding: 22px 14px;
  text-align: center;
  font-family: var(--font-label);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  transition: color 0.15s ease, background 0.15s ease;
}
.logo-wall span:hover { color: var(--gold-bright); background: #241f18; }

/* ---------- Table ---------- */

.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.96rem;
}
.info-table th {
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.info-table td { color: var(--ink-dim); font-family: var(--font-display); }
.info-table tr:last-child td, .info-table tr:last-child th { border-bottom: none; }

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, #1d1712, #171310 55%, #161410);
  border-top: 1px solid var(--line-soft);
  border-bottom: none;
  padding-block: 84px;
}
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

/* ---------- Footer ---------- */

.site-footer { padding-block: 56px 40px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer-grid h4 {
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--ink-dim); font-size: 0.95rem; }
.footer-links a:hover { color: var(--gold-bright); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-label);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- Contact form ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.field input, .field select, .field textarea {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 13px 14px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.98rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.field textarea { resize: vertical; min-height: 120px; }

/* ---------- Utility ---------- */

.tag {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 2px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
}
.tag-gold { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.tag-accent { color: var(--ink); background: var(--bronze); border-color: var(--bronze); }

.page-hero {
  position: relative;
  padding-block: 76px 0;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 2; padding-bottom: 56px; }
.page-hero.warm {
  background: radial-gradient(ellipse 820px 400px at 85% -10%, rgba(177, 129, 62, 0.15), transparent 60%), var(--bg);
}
.page-hero.steel {
  background: radial-gradient(ellipse 820px 400px at 85% -10%, rgba(138, 101, 48, 0.18), transparent 60%), var(--bg);
}

.breadcrumb {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 22px;
}
.breadcrumb .accent { color: var(--gold); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }

.list-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.list-check li { display: flex; gap: 12px; color: var(--ink-dim); }
.list-check li::before {
  content: "";
  width: 7px; height: 7px;
  margin-top: 8px;
  background: var(--gold);
  flex-shrink: 0;
}

/* ---------- Micro-interacciones (interactions.js) ---------- */

/* Transición entre páginas: un fundido breve antes de navegar. Sin JS o
   con motion reducido nunca se activa la clase, así que el body por
   defecto siempre está visible — no hay riesgo de contenido oculto. */
body {
  opacity: 1;
  transition: opacity .16s ease;
}
body.is-leaving { opacity: 0; }

/* Cursor personalizado — solo en pantallas con mouse real (pointer:fine)
   y sin motion reducido; interactions.js decide cuándo agregar la clase,
   así que en móvil/touch esto nunca se activa y el cursor nativo sigue
   normal. */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
  opacity: 0;
}
body.has-custom-cursor .cursor-dot,
body.has-custom-cursor .cursor-ring {
  opacity: 1;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--gold-bright);
}
.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(201, 154, 85, .5);
  transition: width .18s ease, height .18s ease, border-color .18s ease, background .18s ease;
}
.cursor-ring.is-active {
  width: 50px;
  height: 50px;
  border-color: var(--gold);
  background: rgba(201, 154, 85, .08);
}
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button, body.has-custom-cursor .btn {
  cursor: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: none; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .form-grid { grid-template-columns: 1fr; }

  nav.primary-nav {
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    gap: 4px;
    display: none;
    overflow-y: auto;
  }
  nav.primary-nav.is-open { display: flex; }
  nav.primary-nav a { padding: 16px 12px; font-size: 1rem; border-bottom: 1px solid var(--line-soft); }
  .nav-cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: block; }
}

@media (max-width: 520px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .grid-5 { grid-template-columns: 1fr; }
  section { padding-block: 64px; }
  .hero { padding-block: 72px 0; }
}
