/* Exem — Acompañamiento Empresarial
   Marca: negro, blanco y rojo. Fondo 3D animado en canvas (bg3d.js). */

:root {
  --negro: #000;
  --blanco: #fff;
  --rojo: #e30613;
  --rojo-hover: #ff1f2d;
  --gris: #f1f1f1;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-texto: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --pad: clamp(20px, 4vw, 48px);
}

/* Temas de sección: definen color de texto, texto secundario y líneas */
.tema-oscuro { --fg: #fff; --mut: #bdbdbd; --lin: rgba(255, 255, 255, .25); color: var(--fg); }
.tema-claro  { --fg: #000; --mut: #555; --lin: #d6d6d6; color: var(--fg); background: rgba(255, 255, 255, .95); }
.tema-rojo   { --fg: #fff; --mut: rgba(255, 255, 255, .9); --lin: rgba(255, 255, 255, .45); color: var(--fg); background: var(--rojo); }

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; background: var(--negro); }

body {
  margin: 0;
  background: var(--negro);
  color: #fff;
  font-family: var(--f-texto);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; max-width: 62ch; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 2px; box-shadow: 0 0 0 6px var(--rojo); }
.tema-claro :focus-visible, dialog :focus-visible { outline-color: #000; box-shadow: 0 0 0 6px var(--rojo); }

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

/* Fondo 3D */
#fondo3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
.site-header, main, .site-footer { position: relative; z-index: 1; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--rojo); color: #fff; padding: 10px 16px; z-index: 100;
  font-family: var(--f-display);
}
.skip:focus { left: 8px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 16px 28px; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-rojo { background: var(--rojo); color: #fff; }
.btn-rojo:hover { background: var(--rojo-hover); }
.btn-negro { background: #000; color: #fff; }
.btn-negro:hover { background: #222; }
.tema-rojo .btn-negro:hover { background: #1a1a1a; }
.btn-borde { border-color: currentColor; color: inherit; background: transparent; }
.tema-oscuro .btn-borde:hover { background: rgba(255, 255, 255, .14); }
.tema-claro .btn-borde:hover, dialog .btn-borde:hover { background: rgba(0, 0, 0, .07); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, .62); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--lin);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 24px; }
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 12px; }
.brand-mark { font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; letter-spacing: .06em; }
.brand-mark i { font-style: normal; color: var(--rojo); }
.brand-sub { font-family: var(--f-display); font-size: .9rem; color: var(--mut); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { font-family: var(--f-display); font-weight: 500; text-decoration: none; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--rojo); }
.nav .btn { padding: 12px 22px; }

.menu-btn {
  display: none; font-family: var(--f-display); font-weight: 600; font-size: 1rem;
  background: none; border: 2px solid #fff; color: #fff;
  border-radius: 999px; padding: 10px 18px; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(64px, 11vw, 150px) clamp(56px, 8vw, 104px); min-height: min(86vh, 860px); display: flex; align-items: center; }
.hero h1 {
  font-size: clamp(2.7rem, 7vw, 6rem);
  font-weight: 700; line-height: .96; letter-spacing: -0.035em;
  max-width: 10.5em;
}
.hero h1 em { font-style: normal; color: var(--rojo); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: clamp(28px, 4vw, 48px); max-width: 620px; }
.hero-lede { font-size: clamp(1.15rem, 1.6vw, 1.32rem); line-height: 1.5; margin: 0; color: #e8e8e8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-place {
  font-family: var(--f-display); font-size: 1rem; color: var(--mut);
  border-left: 3px solid var(--rojo); padding-left: 16px; margin: 0;
}
.hero-place strong { display: block; color: #fff; font-size: 1.15rem; font-weight: 600; }

.reveal { opacity: 0; transform: translateY(18px); animation: entra .8s cubic-bezier(.2, .7, .2, 1) forwards; }
.reveal.d1 { animation-delay: .14s; }
.reveal.d2 { animation-delay: .28s; }
@keyframes entra { to { opacity: 1; transform: none; } }

/* ---------- Cifras ---------- */
.cifras { background: rgba(0, 0, 0, .55); border-block: 1px solid var(--lin); }
.cifras ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.cifras li { padding: clamp(28px, 4vw, 48px) clamp(16px, 2vw, 32px); border-left: 1px solid var(--lin); }
.cifras li:first-child { border-left: 0; padding-left: 0; }
.cifra-n { display: block; font-family: var(--f-display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1; color: var(--rojo); letter-spacing: -0.03em; }
.cifra-t { display: block; margin-top: 10px; font-family: var(--f-display); font-size: 1rem; }

/* ---------- Secciones ---------- */
.seccion { padding-block: clamp(64px, 9vw, 128px); }
.seccion-titulo { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 700; max-width: 18ch; }
.seccion-intro { margin-top: 20px; font-size: 1.2rem; color: var(--mut); max-width: 56ch; }

/* Declaración (banda roja) */
.declaracion-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
.declaracion h2 { font-size: clamp(2.2rem, 5.2vw, 4.4rem); font-weight: 700; letter-spacing: -0.035em; line-height: .98; }
.declaracion p { font-size: 1.2rem; margin: 0 0 28px; }

/* Nosotros */
.fundadores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 72px); margin-top: clamp(36px, 5vw, 64px); }
.fundador { border-top: 4px solid var(--rojo); padding-top: 28px; }
.fundador-cab { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.avatar {
  flex: none; width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: #000; color: #fff;
  font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: .02em;
  box-shadow: inset 0 0 0 3px var(--rojo);
}
.fundador h3 { font-size: 1.7rem; font-weight: 700; }
.fundador .rol { font-family: var(--f-display); color: var(--mut); font-size: 1rem; margin: 4px 0 0; }
.fundador p.bio { margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--f-display); font-size: .92rem; font-weight: 500; border: 1.5px solid currentColor; border-radius: 999px; padding: 5px 14px; }

.principios { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 7vw, 96px); border-top: 1px solid var(--lin); }
.principios li { padding: 28px 28px 8px 0; }
.principios li + li { padding-left: 28px; border-left: 1px solid var(--lin); }
.principios h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.principios p { margin: 0; color: var(--mut); font-size: 1.02rem; line-height: 1.5; }

/* Servicios */
.lineas-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.lineas-nav a {
  font-family: var(--f-display); font-weight: 600; text-decoration: none;
  border: 2px solid #fff; border-radius: 999px; padding: 10px 20px;
  transition: background-color .15s, border-color .15s;
}
.lineas-nav a:hover { background: var(--rojo); border-color: var(--rojo); }
.lineas-nav span { font-weight: 400; opacity: .75; margin-left: 8px; }

.linea { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); padding-top: clamp(48px, 7vw, 88px); }
.linea-cab { align-self: start; position: sticky; top: 104px; }
.linea-cab h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 700; }
.linea-cab p { margin: 8px 0 0; font-family: var(--f-display); color: var(--mut); }

.svc { border-top: 1.5px solid #fff; }
.svc:last-child { border-bottom: 1.5px solid #fff; }
.svc summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start;
  padding: 22px 0; cursor: pointer; list-style: none;
}
.svc summary::-webkit-details-marker { display: none; }
.svc summary::after {
  content: "+"; font-family: var(--f-display); font-weight: 500; font-size: 2rem; line-height: 1;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1.5px solid #fff; border-radius: 50%;
  transition: background-color .15s, border-color .15s;
}
.svc[open] summary::after { content: "\2212"; background: var(--rojo); border-color: var(--rojo); }
.svc summary:hover::after { background: var(--rojo); border-color: var(--rojo); }
.svc-titulo { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.015em; line-height: 1.15; }
.svc-cita { display: block; margin-top: 6px; font-style: italic; color: var(--mut); font-size: 1.05rem; line-height: 1.45; max-width: 52ch; }
.nuevo {
  display: inline-block; vertical-align: middle; margin-left: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: .78rem; letter-spacing: 0;
  background: var(--rojo); color: #fff; padding: 4px 10px; border-radius: 999px;
}
.svc-detalle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; padding: 4px 0 32px; }
.svc-detalle dt { font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: var(--rojo); margin-bottom: 4px; }
.svc-detalle dd { margin: 0; font-size: 1.02rem; line-height: 1.5; }

/* Bolsa de trabajo */
.caminos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(32px, 5vw, 56px); perspective: 1200px; }
.camino {
  background: var(--gris); border-radius: 20px; padding: clamp(28px, 4vw, 48px);
  display: flex; flex-direction: column; align-items: flex-start;
  transform-style: preserve-3d; transition: transform .25s ease-out, box-shadow .25s;
  will-change: transform;
}
.camino.oscuro { background: #000; color: #fff; }
.camino.tilt { box-shadow: 0 24px 48px rgba(0, 0, 0, .25); }
.camino h3 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 14px; }
.camino p { flex: 1; margin-bottom: 28px; }

.areas { margin-top: clamp(40px, 6vw, 72px); }
.areas h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

.pasos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(48px, 7vw, 96px); counter-reset: paso; }
.pasos li { counter-increment: paso; border-top: 4px solid #000; padding-top: 18px; }
.pasos li::before {
  content: counter(paso); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 16px;
  background: var(--rojo); color: #fff; font-family: var(--f-display); font-weight: 700;
}
.pasos h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.pasos p { margin: 0; color: var(--mut); font-size: 1.02rem; line-height: 1.5; }
.pasos-titulo { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; margin-top: clamp(56px, 8vw, 104px); }

.siguiente { margin-top: clamp(56px, 8vw, 104px); padding-top: clamp(32px, 5vw, 56px); border-top: 1px solid var(--lin); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.siguiente h3 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; }
.siguiente p { margin: 12px 0 0; color: var(--mut); }
.siguiente .acciones { display: flex; flex-wrap: wrap; gap: 12px; }

/* Contacto */
.contacto { background: rgba(0, 0, 0, .55); border-top: 1px solid var(--lin); }
.contacto h2 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 700; letter-spacing: -0.035em; line-height: .98; max-width: 12em; }
.contacto-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); margin-top: clamp(28px, 4vw, 48px); align-items: start; }
.contacto-grid p { font-size: 1.2rem; margin-bottom: 28px; }
.medios { border-top: 1px solid var(--lin); }
.medios li { border-bottom: 1px solid var(--lin); }
.medios a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; text-decoration: none; font-family: var(--f-display); font-size: 1.1rem; }
.medios a:hover .medio-dato { color: var(--rojo-hover); text-decoration: underline; text-underline-offset: 5px; }
.medio-tipo { color: var(--mut); }
.medio-dato { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Pie */
.site-footer { background: #000; border-top: 1px solid var(--lin); padding-block: 32px; font-family: var(--f-display); font-size: .95rem; --lin: rgba(255, 255, 255, .25); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rojo); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ---------- Formularios (diálogos) ---------- */
dialog {
  width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px);
  border: 0; border-radius: 20px; padding: 0; background: #fff; color: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  --mut: #555;
}
dialog::backdrop { background: rgba(0, 0, 0, .7); }
.form { padding: clamp(24px, 4vw, 40px); border-top: 6px solid var(--rojo); border-radius: 20px 20px 0 0; }
.form h2 { font-size: 1.9rem; font-weight: 700; }
.form > p { margin: 10px 0 24px; color: var(--mut); font-size: 1.05rem; }
.campos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo.ancho { grid-column: 1 / -1; }
.campo label { font-family: var(--f-display); font-weight: 600; font-size: .95rem; }
.campo input, .campo select, .campo textarea {
  font: inherit; font-size: 1rem; color: #000;
  background: #fff; border: 1.5px solid #bdbdbd; border-radius: 10px; padding: 12px 14px; width: 100%;
}
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 3px solid #000; outline-offset: 1px; border-color: var(--rojo); box-shadow: none; }
.campo textarea { min-height: 96px; resize: vertical; }
.form-acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .declaracion-grid, .contacto-grid, .siguiente { grid-template-columns: 1fr; }
  .linea { grid-template-columns: 1fr; }
  .linea-cab { position: static; }
  .principios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principios li:nth-child(3) { padding-left: 0; border-left: 0; }
  .principios li:nth-child(n+3) { border-top: 1px solid var(--lin); margin-top: 24px; padding-top: 28px; }
  .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cifras ul { grid-template-columns: repeat(2, 1fr); }
  .cifras li:nth-child(3) { border-left: 0; padding-left: 0; }
  .cifras li:nth-child(n+3) { border-top: 1px solid var(--lin); }
}

@media (max-width: 760px) {
  .menu-btn { display: inline-block; }
  .brand-sub { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(0, 0, 0, .96); border-bottom: 1px solid var(--lin); padding: 8px var(--pad) 24px;
  }
  .nav.abierto { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--lin); font-size: 1.1rem; }
  .nav .btn { margin-top: 16px; }
  .fundadores, .caminos { grid-template-columns: 1fr; }
  .svc-detalle { grid-template-columns: 1fr; }
  .campos { grid-template-columns: 1fr; }
  .hero { min-height: 0; }
}

@media (max-width: 520px) {
  .principios, .pasos { grid-template-columns: 1fr; }
  .principios li, .principios li + li { padding-left: 0; border-left: 0; }
  .principios li + li { border-top: 1px solid var(--lin); margin-top: 24px; padding-top: 28px; }
  .medios a { flex-direction: column; gap: 2px; }
  .medio-dato { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; opacity: 1; transform: none; }
  * { transition: none !important; }
}
