/* ============================================================
   ACUC · Marca Blanca para agencias
   Dirección de arte oscura. Editorial, tipográfico.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --color-bg: #0A0A0B;
  --color-surface: #141416;
  --color-text: #F4F4F2;
  --color-text-dim: #8A8A90;
  --color-acento: #0097F4;
  --color-acento-hover: #33B1FF;

  --font-display: "Clash Grotesk", sans-serif;
  --font-body: "Satoshi", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --space-2xs: 0.5rem;  --space-xs: 0.75rem;  --space-s: 1.25rem;
  --space-m: 2rem;      --space-l: 3rem;      --space-xl: 4rem;
  --space-2xl: 6rem;

  --container: 1440px;
  --pad-x: clamp(1.5rem, 5vw, 6rem);
  --grid-gap: clamp(1rem, 2vw, 2rem);

  --r-btn: 8px;
  --r-card: 12px;
  --r-lg: 16px;

  --t-fast: 0.24s;
  --ease-firma: cubic-bezier(0.16, 0, 0.1, 1);

  --border: 1px solid rgba(244, 244, 242, 0.08);
}

/* ---------- Reset base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--color-acento); color: #fff; }

/* ---------- Tipografía ---------- */
.h-display {
  font-family: var(--font-display); font-weight: 700;
  line-height: 0.95; letter-spacing: -0.02em;
  font-size: clamp(2.8rem, 8vw, 7rem);
}
.h1 {
  font-family: var(--font-display); font-weight: 600;
  line-height: 1.02; letter-spacing: -0.01em;
  font-size: clamp(2.2rem, 5vw, 4rem);
}
.h2 {
  font-family: var(--font-display); font-weight: 600;
  line-height: 1.05;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}
.body {
  font-family: var(--font-body); font-weight: 400;
  line-height: 1.6;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
}
.label {
  font-family: var(--font-mono); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.8rem; color: var(--color-text-dim);
}
strong { font-weight: 500; color: var(--color-text); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section {
  padding-block: var(--space-xl);
  position: relative;
}
@media (min-width: 768px) {
  .section { padding-block: var(--space-2xl); }
}
.section > .container > .label { display: block; margin-bottom: var(--space-s); }
.section > .container > .h1 { max-width: 20ch; }

/* ---------- Botones (los cuatro estados) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2xs);
  font-family: var(--font-body); font-weight: 500;
  font-size: 1rem; line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--r-btn);
  transition: background-color var(--t-fast) var(--ease-firma),
              color var(--t-fast) var(--ease-firma),
              border-color var(--t-fast) var(--ease-firma),
              transform var(--t-fast) var(--ease-firma);
}
.btn--primary { background: var(--color-acento); color: #fff; }
.btn--ghost { border: 1px solid rgba(244, 244, 242, 0.22); color: var(--color-text); }
.btn--text { color: var(--color-text-dim); padding: 0.95rem 0.25rem; }
.btn--text::after { content: ""; }
.btn--xl { padding: 1.25rem 2.4rem; font-size: 1.15rem; }

.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--color-acento); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--color-acento-hover); }
  .btn--ghost:hover { border-color: var(--color-text); }
  .btn--text:hover { color: var(--color-text); }
}

/* ---------- Reveal (JS agrega estados) ---------- */
.reveal, .mask-line { will-change: transform, opacity; }

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--color-bg);
}
.preloader__inner { position: relative; z-index: 2; }
.preloader__mark {
  width: auto; height: clamp(2.6rem, 7vw, 4rem);
}
.preloader__curtain {
  position: absolute; inset: 0; z-index: 1;
  background: var(--color-bg);
  transform-origin: top;
}
body.is-loaded .preloader { pointer-events: none; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  transition: background-color 0.4s var(--ease-firma), border-color 0.4s var(--ease-firma);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: var(--border);
}
.header__inner {
  max-width: var(--container); margin-inline: auto;
  padding: var(--space-s) var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
}
.header__logo { display: inline-block; line-height: 0; }
.header__logo-img { display: block; width: auto; height: 26px; }
.header__cta { padding: 0.6rem 1.1rem; font-size: 0.92rem; }

/* ============================================================
   01 · HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-block: clamp(8rem, 14vh, 12rem) var(--space-xl);
  overflow: hidden;
}
.hero__mural {
  position: absolute; inset: -8% -2% -8% -2%;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.4rem);
}
.mural__col {
  display: flex; flex-direction: column;
  gap: clamp(0.75rem, 1.5vw, 1.4rem);
  will-change: transform;
}
.mural__col:nth-child(2) { margin-top: -8%; }
.mural__cell {
  position: relative;
  border-radius: var(--r-card);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: var(--border);
  transition: transform var(--t-fast) var(--ease-firma),
              filter var(--t-fast) var(--ease-firma);
}
.mural__cell::after {
  content: attr(data-nombre);
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--color-text);
  background: linear-gradient(to top, rgba(10,10,11,0.9), transparent);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-fast) var(--ease-firma), transform var(--t-fast) var(--ease-firma);
}
@media (hover: hover) and (pointer: fine) {
  .mural__cell:hover { transform: scale(1.04); filter: brightness(1.12); z-index: 3; }
  .mural__cell:hover::after { opacity: 1; transform: translateY(0); }
}

.hero__veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, var(--color-bg) 6%, rgba(10,10,11,0.62) 44%, rgba(10,10,11,0.5) 100%),
    linear-gradient(to right, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.15) 55%, transparent 100%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; }
.hero__claim { max-width: 16ch; }
.hero__sub {
  max-width: 46ch; margin-top: var(--space-m);
  color: var(--color-text);
}
.hero__actions {
  margin-top: var(--space-l);
  display: flex; align-items: center; gap: var(--space-s); flex-wrap: wrap;
}

/* ============================================================
   02 · EL PROBLEMA
   ============================================================ */
.problema__title { margin-bottom: var(--space-xl); }
.problema__list { display: flex; flex-direction: column; gap: var(--space-l); }
.problema__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-m);
  align-items: start;
  padding-bottom: var(--space-l);
  border-bottom: var(--border);
}
.problema__num { font-size: 1rem; padding-top: 0.5rem; }
.problema__body { max-width: 60ch; }
.problema__body .body { margin-top: var(--space-xs); color: var(--color-text-dim); }
.problema__cierre {
  margin-top: var(--space-xl);
  color: var(--color-text);
}
@media (min-width: 768px) {
  .problema__item { grid-template-columns: 8rem 1fr; gap: var(--space-l); }
  .problema__num { font-size: 1.1rem; }
}

/* ============================================================
   03 · LA CUARTA OPCIÓN
   ============================================================ */
.cuarta__title { margin-bottom: var(--space-xl); max-width: 22ch; }
.cuarta__manifiesto { display: flex; flex-direction: column; gap: var(--space-s); }
.cuarta__manifiesto .h2 { max-width: 30ch; }
.cuarta__manifiesto .h2:nth-child(2) { color: var(--color-acento); }
.cuarta__refuerzo {
  margin-top: var(--space-l); max-width: 50ch;
  color: var(--color-text-dim);
}

/* mask-line: contenedor de recorte para la máscara vertical */
.mask-line { display: block; overflow: hidden; }

/* ============================================================
   04 · PORTFOLIO
   ============================================================ */
.portfolio__lead { margin-top: var(--space-s); color: var(--color-text-dim); }
.portfolio__grid {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}
@media (min-width: 768px) { .portfolio__grid { grid-template-columns: repeat(3, 1fr); } }
.proj {
  position: relative;
  display: block;
  border-radius: var(--r-card);
  overflow: hidden;
  border: var(--border);
  background: var(--color-surface);
  transition: transform var(--t-fast) var(--ease-firma),
              border-color var(--t-fast) var(--ease-firma);
}
.proj__thumb { aspect-ratio: 16 / 9; width: 100%; }
.proj__name {
  display: block; padding: var(--space-xs) var(--space-s);
  color: var(--color-text);
}
.proj:focus-visible { outline: 2px solid var(--color-acento); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .proj:hover { transform: scale(1.04); border-color: rgba(244,244,242,0.2); z-index: 2; }
}
.portfolio__cta { margin-top: var(--space-xl); }

/* ============================================================
   05 · CÓMO FUNCIONA
   ============================================================ */
.como__steps {
  margin-top: var(--space-xl);
  display: flex; flex-direction: column; gap: var(--space-l);
}
.como__step {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-m);
  align-items: baseline;
  padding-bottom: var(--space-l); border-bottom: var(--border);
}
.como__num {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--color-text-dim); line-height: 1;
}
.como__body { max-width: 55ch; }
.como__body .body { margin-top: var(--space-xs); color: var(--color-text-dim); }
.como__cierre { margin-top: var(--space-xl); color: var(--color-text); max-width: 40ch; }
@media (min-width: 768px) {
  .como__step { grid-template-columns: 10rem 1fr; gap: var(--space-l); }
}

/* ============================================================
   06 · QUÉ INCLUYE
   ============================================================ */
.incluye__grid {
  margin-top: var(--space-xl);
  display: grid; grid-template-columns: 1fr; gap: var(--space-l);
}
@media (min-width: 768px) { .incluye__grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-xl); } }
.incluye__item {
  padding-top: var(--space-s); border-top: var(--border);
}
.incluye__idx { display: block; margin-bottom: var(--space-xs); color: var(--color-acento); }
.incluye__item .body { margin-top: var(--space-xs); color: var(--color-text-dim); max-width: 48ch; }
.incluye__cierre {
  margin-top: var(--space-2xl); max-width: 30ch;
  color: var(--color-text);
  border-left: 2px solid var(--color-acento);
  padding-left: var(--space-m);
}

/* ============================================================
   07 · PRODUCTOS
   ============================================================ */
.productos__lead { margin-top: var(--space-s); color: var(--color-text-dim); max-width: 50ch; }
.productos__list {
  margin-top: var(--space-xl);
  display: flex; flex-direction: column;
}
.prod {
  display: grid; grid-template-columns: 1fr; gap: var(--space-m);
  padding-block: var(--space-l);
  border-top: var(--border);
}
.prod:last-child { border-bottom: var(--border); }
.prod__name { color: var(--color-text); }
.prod__desc { margin-top: var(--space-xs); color: var(--color-text-dim); max-width: 46ch; }
.prod__nums {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-s);
  align-content: start;
}
.prod__nums dt { margin-bottom: 0.35rem; }
.prod__nums dd {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  color: var(--color-text);
}
.prod__nums div:last-child dd { color: var(--color-acento); }
@media (min-width: 900px) {
  .prod { grid-template-columns: 1.1fr 1fr; align-items: center; gap: var(--space-xl); }
}
.productos__cta { margin-top: var(--space-xl); }

/* ============================================================
   08 · LO QUE NO VAS A HACER
   ============================================================ */
.nohacer__grid {
  margin-top: var(--space-xl);
  display: grid; grid-template-columns: 1fr; gap: 0;
}
@media (min-width: 768px) { .nohacer__grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-xl); } }
.nohacer__item {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 2rem); line-height: 1.15;
  padding-block: var(--space-s);
  border-bottom: var(--border);
  color: var(--color-text);
}

/* ============================================================
   09 · GARANTÍAS
   ============================================================ */
.garantias__list {
  margin-top: var(--space-xl);
  display: flex; flex-direction: column; gap: var(--space-l);
}
.gar { padding-bottom: var(--space-l); border-bottom: var(--border); max-width: 62ch; }
.gar__title { color: var(--color-text); }
.gar .body { margin-top: var(--space-s); color: var(--color-text-dim); }

/* ============================================================
   10 · FAQ
   ============================================================ */
.faq__list { margin-top: var(--space-l); }
.faq__item { border-bottom: var(--border); }
.faq__q {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-m);
  padding-block: var(--space-m);
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.2;
  color: var(--color-text);
  transition: color var(--t-fast) var(--ease-firma);
}
.faq__q:focus-visible { outline: 2px solid var(--color-acento); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .faq__q:hover { color: var(--color-acento); } }
.faq__icon {
  position: relative; flex: 0 0 auto; width: 18px; height: 18px;
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; top: 50%; left: 0;
  width: 100%; height: 2px; background: currentColor;
  transform: translateY(-50%);
  transition: transform var(--t-fast) var(--ease-firma);
}
.faq__icon::after { transform: translateY(-50%) rotate(90deg); }
.faq__item.is-open .faq__icon::after { transform: translateY(-50%) rotate(0); }
.faq__a { overflow: hidden; height: 0; }
.faq__a .body {
  padding-bottom: var(--space-m); max-width: 68ch;
  color: var(--color-text-dim);
}

/* ============================================================
   11 · CIERRE
   ============================================================ */
.cierre { text-align: center; }
.cierre .container { display: flex; flex-direction: column; align-items: center; }
.cierre__title { max-width: 18ch; }
.cierre__copy { margin-top: var(--space-m); max-width: 52ch; color: var(--color-text-dim); }
.cierre__cta { margin-top: var(--space-l); }
.cierre__micro { margin-top: var(--space-s); }

/* ============================================================
   12 · FOOTER
   ============================================================ */
.footer { border-top: var(--border); padding-block: var(--space-xl); }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: var(--space-m);
  align-items: center; justify-content: space-between;
}
.footer__logo-img { width: auto; height: 30px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: var(--space-s) var(--space-m); }
.footer__link {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: var(--color-text-dim);
  transition: color var(--t-fast) var(--ease-firma);
}
.footer__link:focus-visible { outline: 2px solid var(--color-acento); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .footer__link:hover { color: var(--color-text); } }
.footer__year { width: 100%; }

/* ============================================================
   PLACEHOLDER de previews (Ulises reemplaza por screenshots)
   ============================================================ */
/* Para insertar el screenshot real, agregá al div:
   style="background-image:url('screenshots/impormed.webp')"
   El patrón rayado y el nombre desaparecen solos cuando hay imagen. */
.preview-placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(244,244,242,0.03) 0 12px, rgba(244,244,242,0.06) 12px 24px),
    var(--color-surface);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  position: relative;
}
.preview-placeholder::before {
  content: attr(data-sitio);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em;
  color: var(--color-text-dim); text-transform: lowercase;
}
.preview-placeholder[style*="background-image"]::before { display: none; }

/* ============================================================
   RESPONSIVE · Hero mural en mobile
   ============================================================ */
@media (max-width: 767px) {
  .hero__mural {
    inset: 0; grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem; opacity: 0.5;
  }
  .mural__col:nth-child(2) { margin-top: 0; }
  .mural__col:nth-child(3) { display: none; }
  .hero__veil {
    background: linear-gradient(to top, var(--color-bg) 30%, rgba(10,10,11,0.6) 100%);
  }
}

/* ============================================================
   PÁGINAS LEGALES
   ============================================================ */
.legal { padding-block: clamp(7rem, 12vh, 10rem) var(--space-2xl); }
.legal .container { max-width: 720px; }
.legal__back { display: inline-block; margin-bottom: var(--space-l); }
.legal h1 { margin-bottom: var(--space-s); }
.legal__updated { margin-bottom: var(--space-xl); }
.legal h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-top: var(--space-l); margin-bottom: var(--space-s); }
.legal p, .legal li { color: var(--color-text-dim); }
.legal p { margin-bottom: var(--space-s); }
.legal ul { list-style: disc; padding-left: 1.4rem; margin-bottom: var(--space-s); }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--color-acento); }
@media (hover: hover) and (pointer: fine) { .legal a:hover { color: var(--color-acento-hover); } }

/* ============================================================
   ACCESIBILIDAD · Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: 0.01ms !important; }
  .hero__mural { opacity: 1; }
  .reveal, .mask-line { opacity: 1 !important; transform: none !important; }
}
