/* ============================================================
   ROLAPRO — sistema de diseño
   Dark-first: carbón + violeta eléctrico + off-white
   Tipografía: Inter Tight (display) / Inter (texto)
   ============================================================ */

:root {
  --bg: #151318;
  --bg-2: #1d1a21;
  --paper: #f4f3f1;
  --ink: #26222a;
  --violet: #5b4de0;
  --violet-deep: #4941c4;
  --violet-bright: #8b7df6;
  --muted: #a7a3b0;
  --muted-ink: #5c5764;
  --line: rgba(244, 243, 241, 0.14);
  --line-ink: rgba(38, 34, 42, 0.16);
  --radius: 20px;
  --radius-lg: 28px;
  --pad: clamp(20px, 5vw, 72px);
  --maxw: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--paper);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

::selection { background: var(--violet); color: #fff; }

/* ---------- Tipografía display ---------- */

.display {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 900;
  font-size: clamp(2.9rem, 9vw, 7.2rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.display--md { font-size: clamp(2.2rem, 6vw, 4.6rem); }
.display--hero { font-size: clamp(2.5rem, 7.2vw, 5.8rem); }

.display em {
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.display__line { display: block; }
.display__line--violet { color: var(--violet-bright); }
.display--ink { color: var(--ink); }

/* ---------- Pills ---------- */

.pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  margin-bottom: 26px;
}

.pill em { font-style: normal; color: var(--violet-bright); }

.pill--outline { border: 1px solid var(--line); color: var(--paper); }
.pill--violet { background: var(--violet); color: #fff; }
.pill--ink { border: 1.5px solid var(--ink); color: var(--ink); }
.pill--dark { background: rgba(21, 19, 24, 0.85); color: var(--paper); }

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 30px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--violet); color: #fff; }
.btn--primary:hover { background: var(--violet-deep); }

.btn--ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--paper); }

.btn--lg { padding: 16px 34px; }
.btn--xl { padding: 19px 42px; font-size: 1.08rem; }

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

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(21, 19, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.is-scrolled { border-bottom-color: var(--line); }

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--pad);
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav__logo img { height: 34px; width: auto; }

.nav__links {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav__links a:hover { color: var(--paper); }

.nav__cta { padding: 11px 24px; font-size: 0.95rem; }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  margin-left: auto;
}

.nav__burger span {
  display: block;
  height: 2px;
  background: var(--paper);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px var(--pad) 28px;
  border-bottom: 1px solid var(--line);
}

.nav__mobile a {
  color: var(--paper);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 10px 0;
}

.nav__mobile .btn { text-align: center; margin-top: 10px; }

.nav.is-open .nav__mobile { display: flex; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(140px, 20vh, 210px) var(--pad) 0;
  max-width: calc(var(--maxw) + 2 * var(--pad));
  margin: 0 auto;
}

.hero::before {
  /* retícula sutil, como los fondos de la presentación */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 90px 90px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero__inner { position: relative; }

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 36px;
  margin-top: 44px;
}

.hero__sub {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ---------- Logos / marquee ---------- */

.logos { margin: 76px 0 0; position: relative; }

.logos__card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 30px 0 34px;
  overflow: hidden;
}

.logos__label {
  display: block;
  text-align: center;
  color: var(--muted-ink);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(40px, 6vw, 84px);
  padding-right: clamp(40px, 6vw, 84px);
  flex-shrink: 0;
  animation: marquee 36s linear infinite;
}

.marquee__track img { height: 64px; width: auto; mix-blend-mode: multiply; }

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* ---------- Stats ---------- */

.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
}

.stat { border-top: 1px solid var(--line); padding-top: 22px; }

.stat__num {
  display: block;
  font-family: "Inter Tight", sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--violet-bright);
}

.stat__label {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 220px;
}

/* ---------- Secciones: cabecera ---------- */

.section-head { margin-bottom: clamp(50px, 8vh, 90px); }

.section-head__sub {
  margin-top: 24px;
  color: var(--muted);
  max-width: 520px;
  font-size: 1.08rem;
}

/* ---------- Casos ---------- */

.casos {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 8vh, 90px) var(--pad) clamp(80px, 12vh, 150px);
}

.caso {
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 7fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vh, 84px) 0;
  border-top: 1px solid var(--line);
}

.caso--flip { grid-template-columns: 7fr minmax(300px, 5fr); }
.caso--flip .caso__text { order: 2; }
.caso--flip .caso__media { order: 1; }

.caso__client {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-bright);
  margin-bottom: 14px;
}

.caso__title {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.caso__desc { color: var(--muted); margin-bottom: 24px; }

.caso__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.caso__tags li {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}

.caso__media { position: relative; }

/* marco tipo navegador para capturas web */
.frame {
  background: #211e26;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.frame__bar {
  display: flex;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.frame__bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(244, 243, 241, 0.22);
}

.caso__phone {
  width: clamp(140px, 16vw, 210px);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

/* teléfono flotando sobre la captura web (Liveri) */
.caso__media > .caso__phone {
  position: absolute;
  right: -14px;
  bottom: -34px;
  transform: rotate(3deg);
}

/* dúo de teléfonos (Vibes) */
.caso__media--phones {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 4vw, 48px);
  background: radial-gradient(ellipse 75% 85% at 50% 50%, rgba(91, 77, 224, 0.28), transparent 70%);
}

.caso__media--phones .caso__phone { position: static; width: clamp(170px, 19vw, 250px); }
.caso__phone--a { transform: rotate(-3deg) translateY(14px); }
.caso__phone--b { transform: rotate(3deg) translateY(-10px); }

/* ---------- Servicios (sección clara) ---------- */

.servicios {
  background: var(--paper);
  color: var(--ink);
  border-radius: clamp(28px, 4vw, 48px);
  margin: 0 clamp(8px, 1.2vw, 20px);
}

.servicios__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad);
}

.servicio { border-top: 1px solid var(--line-ink); }
.servicio:last-of-type { border-bottom: 1px solid var(--line-ink); }

.servicio__head {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: clamp(24px, 4vh, 38px) 0;
  font-family: inherit;
  color: inherit;
}

.servicio__num {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--violet);
}

.servicio__name {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.05;
  transition: color 0.18s ease;
}

.servicio__head:hover .servicio__name { color: var(--violet); }

.servicio__hint {
  color: var(--muted-ink);
  font-size: 0.92rem;
  font-style: italic;
}

.servicio__toggle {
  position: relative;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  flex-shrink: 0;
}

.servicio__toggle::before,
.servicio__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease;
}

.servicio__toggle::after { transform: translate(-50%, -50%) rotate(90deg); }

.servicio.is-open .servicio__toggle::after { transform: translate(-50%, -50%) rotate(0deg); }
.servicio.is-open .servicio__toggle { background: var(--violet); border-color: var(--violet); }
.servicio.is-open .servicio__toggle::before,
.servicio.is-open .servicio__toggle::after { background: #fff; }

.servicio__body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.35s ease;
}

.servicio__body > * { overflow: hidden; min-height: 0; }

.servicio.is-open .servicio__body { grid-template-rows: 1fr; }

.servicio__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 0;
  transition: padding-bottom 0.35s ease;
}

.servicio.is-open .servicio__cols { padding-bottom: clamp(28px, 5vh, 44px); }

.servicio__pack {
  background: #fff;
  border: 1px solid var(--line-ink);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
}

.servicio__pack h4 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--violet-deep);
}

.servicio__pack p { color: var(--muted-ink); font-size: 0.97rem; }

/* Sectores */

.sectores { margin-top: clamp(56px, 9vh, 90px); }

.sectores__label {
  color: var(--muted-ink);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.sectores__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sectores__list li {
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 12px 26px;
  transition: background 0.18s ease, color 0.18s ease;
}

.sectores__list li:hover { background: var(--ink); color: var(--paper); }

/* ---------- Filosofía ---------- */

.filosofia {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(100px, 15vh, 170px) var(--pad);
}

.filosofia__sub {
  margin-top: 30px;
  max-width: 640px;
  color: var(--muted);
  font-size: 1.12rem;
}

.equipo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(50px, 8vh, 80px);
}

.equipo__item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
}

.equipo__item h3 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  color: var(--violet-bright);
}

.equipo__item p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Modelos (sección violeta) ---------- */

.modelos {
  background: var(--violet);
  border-radius: clamp(28px, 4vw, 48px);
  margin: 0 clamp(8px, 1.2vw, 20px);
}

.modelos__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 140px) var(--pad);
}

.section-head--onviolet .display em { color: #cfc8ff; }
.section-head__sub--onviolet { color: rgba(244, 243, 241, 0.88); }

.modelos__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.modelo {
  background: rgba(21, 19, 24, 0.35);
  border: 1px solid rgba(244, 243, 241, 0.25);
  border-radius: var(--radius);
  padding: 30px 28px 34px;
}

.modelo h3 {
  font-family: "Inter Tight", sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.modelo p { color: rgba(244, 243, 241, 0.85); font-size: 0.98rem; }

/* ---------- FAQ ---------- */

.faq {
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 150px) var(--pad) clamp(40px, 6vh, 80px);
}

.faq__item {
  border-top: 1px solid var(--line);
}

.faq__item:last-child { border-bottom: 1px solid var(--line); }

.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(20px, 3.5vh, 28px) 0;
  font-family: "Inter Tight", sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  letter-spacing: -0.005em;
  transition: color 0.15s ease;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--paper);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.faq__item summary:hover { color: var(--violet-bright); }

.faq__item[open] summary { color: var(--violet-bright); }

.faq__item[open] summary::after {
  transform: rotate(45deg);
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.faq__answer { padding: 0 0 clamp(22px, 3.5vh, 30px); max-width: 720px; }

.faq__answer p { color: var(--muted); }

.faq__answer a { color: var(--violet-bright); font-weight: 600; }

.faq__answer strong { color: var(--paper); }

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

.cta {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(110px, 18vh, 200px) var(--pad);
  text-align: center;
}

.cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 48px;
}

.cta__note { margin-top: 26px; color: var(--muted); font-size: 0.95rem; }

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

.footer { border-top: 1px solid var(--line); }

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(50px, 8vh, 80px) var(--pad) 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 40px;
}

.footer__brand img { height: 30px; width: auto; margin-bottom: 18px; }
.footer__brand p { color: var(--muted); font-size: 0.93rem; max-width: 320px; }
.footer__location { margin-top: 12px; font-weight: 600; color: var(--paper) !important; }

.footer__nav, .footer__social { display: flex; flex-direction: column; gap: 12px; }

.footer__nav a, .footer__social a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.footer__nav a:hover, .footer__social a:hover { color: var(--paper); }

.footer__legal {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 26px var(--pad) 34px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

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

@media (max-width: 960px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }

  .caso, .caso--flip { grid-template-columns: 1fr; }
  .caso--flip .caso__text { order: 1; }
  .caso--flip .caso__media { order: 2; }
  .caso__media > .caso__phone { right: 6px; bottom: -24px; }

  .equipo, .modelos__grid { grid-template-columns: 1fr; }

  .servicio__hint { display: none; }

  .footer__inner { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 780px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .hero__foot { margin-top: 34px; }
  .hero__actions { margin-left: 0; }

  .marquee__track img { height: 46px; }
  .stats__grid { gap: 30px 22px; }
}

/* ---------- Accesibilidad: reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
  .marquee { flex-wrap: wrap; justify-content: center; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .servicio__body { transition: none; }
}
