/* =====================================================================
   Tomás Prado Lynch — casa matriz
   ADN compartido con XenonTech / Monorden / Perspective.
   Cada tarjeta define su propio --acc (desde config.js).
   ===================================================================== */
:root {
  --bg: #0A0E17;
  --surface: #111827;
  --border: #1F2937;
  --text: #E5E9F0;
  --muted: #94A3B8;
  --wa: #15803D;
  --wa-hover: #166534;

  --font-title: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-card: 16px;
  --r-pill: 999px;
  --gutter: 16px;
  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

main, .footer { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

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

/* ---------- HERO (neutro: blanco y gris) ---------- */
.hero {
  text-align: center;
  padding: 56px 0 40px;
  display: flex; flex-direction: column; align-items: center;
}
.hero__avatar {
  width: 104px; height: 104px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface) center/cover no-repeat;
  border: 1.3px solid rgba(229, 233, 240, .55);
  box-shadow: 0 0 8px rgba(229, 233, 240, .35), 0 0 24px rgba(229, 233, 240, .12);
  font: 700 44px/1 var(--font-title);
  color: var(--text);
  margin-bottom: 22px;
}
.hero__nombre {
  font: 700 clamp(30px, 8vw, 48px)/1.1 var(--font-title);
  letter-spacing: -.02em;
}
.hero__rol { color: var(--muted); font-size: 15px; margin-top: 8px; }
.hero__frase {
  font-size: 18px; margin: 14px 0 28px; max-width: 30ch;
}

/* ---------- BOTONES (píldora) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--r-pill);
  font: 600 15px/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-hover); }

/* Botón "Ver": contorno del acento de la marca */
.btn--acc {
  border: 1.3px solid color-mix(in srgb, var(--acc) 40%, transparent);
  background: color-mix(in srgb, var(--acc) 10%, transparent);
  color: var(--acc);
}
.btn--acc:hover, .btn--acc:focus-visible {
  border-color: var(--acc);
  box-shadow: 0 0 8px color-mix(in srgb, var(--acc) 60%, transparent),
              0 0 24px color-mix(in srgb, var(--acc) 25%, transparent);
}

/* ---------- SECCIONES ---------- */
.section { padding: 28px 0; }
.section__title {
  font: 700 13px/1 var(--font-title);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ---------- TARJETAS DE MARCA ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* escritorio: 3 arriba + 2 abajo, sin huecos */
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(6, 1fr); }
  .grid > .card { grid-column: span 2; }
  .grid > .card:nth-child(n+4) { grid-column: span 3; }
}

.card {
  --acc: #E5E9F0;
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px 20px 20px;
  background: var(--surface);
  border: 1.3px solid var(--border);
  border-radius: var(--r-card);
  transition: border-color .25s, box-shadow .25s;
}
/* línea de luz del acento arriba de cada tarjeta */
.card::before {
  content: ""; position: absolute; left: 20px; right: 20px; top: -1px; height: 1.3px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--acc) 40%, transparent), transparent);
}
/* glow encendido: hover (mouse), foco o toque (.is-on desde app.js) */
.card:hover, .card:focus-within, .card.is-on {
  border-color: var(--acc);
  box-shadow: 0 0 8px color-mix(in srgb, var(--acc) 60%, transparent),
              0 0 24px color-mix(in srgb, var(--acc) 25%, transparent);
}
.card__head { display: flex; align-items: center; gap: 14px; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  color: var(--acc);
  background: color-mix(in srgb, var(--acc) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--acc) 40%, transparent);
}
.card__icon .ico { width: 24px; height: 24px; }
.card__title { font: 700 20px/1.2 var(--font-title); letter-spacing: -.01em; }
.card__desc { color: var(--muted); font-size: 15px; }
.card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 4px; }
.card__actions .btn { flex: 1 1 auto; }
.card__extras { display: flex; gap: 18px; font-size: 14px; }
.card__extras a {
  color: var(--muted); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px;
}
.card__extras a:hover { color: var(--acc); }
.card__extras .ico { width: 14px; height: 14px; }

/* ---------- TRABAJOS ---------- */
.works { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .works { grid-template-columns: repeat(3, 1fr); } }
.work {
  position: relative; overflow: hidden;
  border-radius: var(--r-card); border: 1px solid var(--border);
  aspect-ratio: 1; background: var(--surface);
}
.work img { width: 100%; height: 100%; object-fit: cover; }
.work figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px;
  font-size: 13px; font-weight: 500;
  background: linear-gradient(transparent, rgba(10, 14, 23, .9));
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 28px; padding-top: 28px; padding-bottom: 110px;
  text-align: center;
}
.footer__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.footer__links a {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s;
}
.footer__links a:hover { border-color: var(--muted); }
.footer__meta { color: var(--muted); font-size: 13px; margin-top: 16px; }

/* ---------- BOTÓN FLOTANTE WHATSAPP ---------- */
.fab {
  position: fixed; z-index: 10;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  transition: background-color .2s, transform .2s;
}
.fab:hover { background: var(--wa-hover); }
.fab .ico { width: 30px; height: 30px; }

/* ---------- ANIMACIÓN DE ENTRADA (liviana) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
