/* Infogrupo - sitio moderno (empresa informatica) */

:root {
  --bg: #0e0814;
  --bg-card: #17101f;
  --bg-elevated: #22182c;
  --text: #f5eef8;
  --text-muted: #b9a5c8;
  --accent: #e879a8;
  --accent-2: #a855f7;
  --accent-glow: rgba(232, 121, 168, 0.28);
  --accent-soft: rgba(168, 85, 247, 0.14);
  --border: rgba(232, 121, 168, 0.12);
  --radius: 14px;
  --font: "DM Sans", system-ui, sans-serif;
  --header-h: 5.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(168, 85, 247, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(232, 121, 168, 0.1), transparent),
    linear-gradient(180deg, var(--bg) 0%, #08050c 100%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: #f5b8d4;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
  padding-inline: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(14, 8, 20, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-family: inherit;
  text-decoration: none;
}

.logo__svg {
  display: block;
  height: 3.75rem;
  width: auto;
  min-width: 14.5rem;
  max-width: min(340px, 58vw);
}

.logo__svg text {
  font-family: inherit;
}

.site-footer .logo__svg {
  height: 3.1rem;
  min-width: 12.5rem;
  max-width: 280px;
}

@media (min-width: 768px) {
  :root {
    --header-h: 5.75rem;
  }

  .logo__svg {
    height: 4.35rem;
    min-width: 16rem;
    max-width: 360px;
  }
}

.nav-desktop {
  display: none;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--accent-glow);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  color: #fff;
  filter: brightness(1.08);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile__contact {
  display: none;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  z-index: 999;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

body.nav-open .nav-mobile {
  display: block;
}

.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-mobile a {
  display: block;
  padding: 0.85rem 0.5rem;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(232, 121, 168, 0.28);
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero h1 .hero-highlight {
  font-style: normal;
  font-weight: inherit;
  text-transform: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-inline: 0.12em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  aspect-ratio: 4/3;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.28) 0%,
    rgba(232, 121, 168, 0.14) 40%,
    rgba(14, 8, 20, 0.25) 100%
  );
  pointer-events: none;
}

/* Card con imagen */
.card--media {
  padding: 0;
  overflow: hidden;
}

.card--media h3,
.card--media p,
.card--media .card-link {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.card--media h3 {
  padding-top: 1.15rem;
}

.card--media p {
  padding-bottom: 0;
}

.card--media .card-link {
  padding-bottom: 1.5rem;
}

.card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual-duo {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .visual-duo {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2.5rem;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-header h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Cards grid */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(232, 121, 168, 0.4);
  transform: translateY(-2px);
}

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--accent-soft);
  border-radius: 10px;
  margin-bottom: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.card a.card-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Page hero inner */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
}

/* Content blocks */
.content-block {
  max-width: 48rem;
}

.content-block h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.content-block h2:first-child {
  margin-top: 0;
}

.content-block p,
.content-block ul {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.content-block ul {
  padding-left: 1.25rem;
}

.content-block li {
  margin-bottom: 0.35rem;
}

.two-col {
  display: grid;
  gap: 2rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.contact-card h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.contact-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.contact-item strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
  min-height: 280px;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* CTA band */
.cta-band {
  margin: 3rem 0;
  padding: 2.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(232, 121, 168, 0.14), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(232, 121, 168, 0.22);
  border-radius: var(--radius);
}

.cta-band h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.cta-band p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

.footer-grid h4 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 0.4rem;
}

.footer-grid a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.social {
  display: flex;
  gap: 0.65rem;
}

.social a {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.social a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-block {
  width: 100%;
}

.btn-whatsapp__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Header movil: mas espacio, contacto en menu */
@media (max-width: 767.98px) {
  :root {
    --header-h: 4.25rem;
  }

  .site-header .container {
    gap: 0.4rem;
  }

  .logo {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .logo__svg {
    height: 2.45rem;
    min-width: 0;
    max-width: 100%;
  }

  .logo__tag {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .header-actions .btn-phone {
    display: none;
  }

  .header-actions .btn-whatsapp {
    padding: 0;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
  }

  .header-actions .btn-whatsapp__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .header-actions .btn-whatsapp__icon {
    width: 1.4rem;
    height: 1.4rem;
  }

  .nav-toggle {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
  }

  .nav-mobile__contact {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-bottom: 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-mobile__contact .btn {
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
  }

  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: max(1.25rem, env(safe-area-inset-left, 0px))
      max(1.25rem, env(safe-area-inset-right, 0px));
  }

  main {
    overflow-x: clip;
  }

  .hero {
    padding-top: 2.25rem;
    overflow: visible;
  }

  .hero-grid {
    min-width: 0;
  }

  .hero-copy {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding-inline: 0.15rem;
  }

  .hero-grid > div:first-child {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(1.65rem, 8.5vw, 2.25rem);
    letter-spacing: -0.01em;
    padding-left: 0.1rem;
    overflow-wrap: break-word;
    hyphens: manual;
    -webkit-hyphens: manual;
  }

  .hero h1 .hero-highlight {
    display: inline;
    color: var(--accent);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    padding-inline: 0;
  }

  .hero-lead {
    max-width: 100%;
    font-size: 1rem;
    padding-left: 0.1rem;
    overflow-wrap: break-word;
  }

  .hero-badge {
    margin-left: 0.1rem;
  }

  .hero .reveal,
  .hero .reveal--from-left,
  .hero .reveal--from-right {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .page-hero .container {
    padding-inline: max(1.25rem, env(safe-area-inset-left, 0px))
      max(1.25rem, env(safe-area-inset-right, 0px));
  }

  .page-hero h1,
  .page-hero p {
    max-width: 100%;
    padding-left: 0.1rem;
    overflow-wrap: break-word;
  }

  .page-hero .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-desktop {
    display: flex;
  }

  .nav-mobile {
    display: none !important;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .cards.cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Animaciones al cargar y al hacer scroll --- */
@media (prefers-reduced-motion: no-preference) {
  body:not(.is-loaded) .site-header {
    opacity: 0;
    transform: translateY(-100%);
  }

  body.is-loaded .site-header {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal {
    opacity: 0;
    transform: translateY(1.75rem);
    transition:
      opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0s);
  }

  .reveal--from-left {
    transform: translateX(-1.5rem);
  }

  .reveal--from-right {
    transform: translateX(1.5rem);
  }

  .reveal--scale {
    transform: scale(0.96);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translate(0) scale(1);
  }

  .card.reveal.is-visible:hover {
    transform: translateY(-4px);
  }

  body.is-loaded .hero-visual img {
    animation: heroFloat 7s ease-in-out infinite;
  }

  @keyframes heroFloat {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-8px);
    }
  }

  .btn-primary {
    background-size: 200% 200%;
    animation: btnShine 6s ease infinite;
  }

  @keyframes btnShine {
    0%, 100% {
      background-position: 0% 50%;
    }
    50% {
      background-position: 100% 50%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }

  body:not(.is-loaded) .site-header {
    opacity: 1;
    transform: none;
  }
}
