/* Variables de color y medidas reutilizables en toda la página. */
:root {
  --black: #111111;
  --near-black: #1b1b1b;
  --orange: #ff5a1f;
  --soft-orange: #ffede6;
  --white: #ffffff;
  --off-white: #f6f5f2;
  --gray: #66645f;
  --line: #dedcd6;
  --whatsapp: #25d366;
  --display: "Space Grotesk", sans-serif;
  --body: "DM Sans", sans-serif;
}

/* Reinicio pequeño para que márgenes y tamaños sean predecibles. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--off-white); color: var(--black); font-family: var(--body); }
a { color: inherit; text-decoration: none; }

/* Barra superior y navegación de escritorio. */
.header { align-items: center; background: rgba(246, 245, 242, .93); border-bottom: 1px solid transparent; display: flex; justify-content: space-between; padding: 22px clamp(24px, 6vw, 96px); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); transition: border-color .2s; }
.header.scrolled { border-color: var(--line); }
.brand { font: 700 1.35rem/1 var(--display); letter-spacing: -.08em; }
.brand span { color: var(--orange); }
.navigation { display: flex; gap: 30px; font-size: .92rem; font-weight: 600; }
.navigation a { transition: color .2s; }
.navigation a:hover { color: var(--orange); }
.menu-button { display: none; }

/* Contenedor y tipografía de las secciones principales. */
.section, .hero { padding-left: clamp(24px, 8vw, 128px); padding-right: clamp(24px, 8vw, 128px); }
.hero { align-items: center; display: grid; gap: 40px; grid-template-columns: 1.2fr .8fr; min-height: calc(100vh - 77px); padding-bottom: 82px; padding-top: 70px; }
.eyebrow { color: var(--orange); font-size: .75rem; font-weight: 700; letter-spacing: .13em; margin: 0 0 18px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.055em; }
h1 { font-size: clamp(3.2rem, 7vw, 6.4rem); line-height: .96; margin-bottom: 28px; max-width: 780px; }
h1 em { color: var(--orange); font-style: normal; }
.hero-text { color: #42413d; font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.65; max-width: 610px; }
.hero-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 25px; margin-top: 34px; }
.button { align-items: center; border-radius: 3px; display: inline-flex; font-size: .92rem; font-weight: 700; gap: 9px; padding: 15px 20px; transition: transform .2s, background .2s; }
.whatsapp-icon { height: 20px; width: 20px; }
.button:hover { transform: translateY(-2px); }
.button-whatsapp { background: var(--whatsapp); color: #092d18; }
.button-whatsapp:hover { background: #1fbc5a; }
.text-link, .card-link { border-bottom: 1px solid currentColor; font-size: .9rem; font-weight: 700; padding-bottom: 3px; }
.text-link span, .card-link span { color: var(--orange); font-size: 1.1rem; margin-left: 5px; }

/* Ilustración abstracta de la portada. */
.hero-mark { background: var(--black); color: var(--white); height: min(34vw, 440px); min-height: 330px; overflow: hidden; padding: 30px; position: relative; }
.hero-mark p { bottom: 35px; font: 500 clamp(2.5rem, 5vw, 4.8rem)/.83 var(--display); letter-spacing: -.08em; margin: 0; position: absolute; z-index: 1; }
.hero-mark strong { color: var(--orange); font-weight: 700; }
.mark-brand { font: 700 1.05rem/1 var(--display); left: 50%; letter-spacing: -.07em; position: absolute; top: 30px; transform: translateX(-50%); }
.mark-brand strong { color: var(--orange); }
.mark-circle { border: 1px solid var(--orange); border-radius: 50%; height: 310px; position: absolute; right: -52px; top: -60px; width: 310px; }
.mark-circle::after { background: var(--orange); border-radius: 50%; content: ""; height: 16px; left: 37px; position: absolute; top: 40px; width: 16px; }

/* Tarjetas de servicio. */
.services { background: var(--white); padding-bottom: 120px; padding-top: 118px; }
.section-heading { align-items: flex-start; display: flex; flex-direction: column; margin-bottom: 55px; }
.section-heading .eyebrow { margin-bottom: 58px; }
h2 { font-size: clamp(2.25rem, 4vw, 4.2rem); line-height: 1; margin-bottom: 0; max-width: 770px; }
.service-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.service-card { border: 1px solid var(--line); display: flex; flex-direction: column; min-height: 460px; padding: 26px; transition: transform .25s, box-shadow .25s; }
.service-card:hover { box-shadow: 8px 8px 0 var(--orange); transform: translate(-4px, -4px); }
.service-card.featured { background: var(--black); border-color: var(--black); color: var(--white); }
.service-number { color: var(--gray); font: 600 .75rem var(--display); margin-bottom: 35px; }
.featured .service-number { color: #a3a3a3; }
.service-icon { align-items: center; background: var(--soft-orange); border-radius: 50%; color: var(--orange); display: flex; font: 700 2rem var(--display); height: 54px; justify-content: center; width: 54px; }
.featured .service-icon { background: var(--orange); color: var(--black); }
.camera-icon svg { height: 39px; width: 39px; }
.integrations-icon { border-radius: 27px; gap: 6px; justify-content: center; padding: 0 8px; width: 136px; }
.mini-logo { align-items: center; display: flex; height: 34px; justify-content: center; width: 38px; }
.n8n-logo { color: var(--black); }
.n8n-logo svg { height: 25px; width: 36px; }
.n8n-word { font: 700 1.15rem/1 var(--display); letter-spacing: -.06em; }
.google-mini { background: var(--white); border-radius: 50%; height: 31px; width: 31px; }
.google-mini svg { height: 23px; width: 23px; }
.google-icon { background: var(--white); }
.google-icon svg { height: 33px; width: 33px; }
.service-card h3 { font-size: 1.65rem; line-height: 1.05; margin: 26px 0 12px; }
.service-card > p:not(.service-number) { color: var(--gray); font-size: .93rem; line-height: 1.55; }
.featured > p:not(.service-number) { color: #c8c8c8; }
.service-card ul { color: var(--gray); font-size: .85rem; line-height: 1.6; list-style: none; margin: 17px 0 27px; padding: 0; }
.service-card li::before { color: var(--orange); content: "— "; }
.featured ul { color: #d1d1d1; }
.card-link { align-self: flex-start; margin-top: auto; }

/* Sección de filosofía iA aplicada. */
.iaplicada { background: var(--orange); display: grid; gap: 45px; grid-template-columns: .7fr 1.3fr; padding-bottom: 112px; padding-top: 112px; }
.iaplicada-label { align-self: start; font: 700 clamp(2.8rem, 5vw, 5.4rem)/.8 var(--display); letter-spacing: -.09em; }
.iaplicada .eyebrow { color: var(--black); }
.iaplicada-copy h2 { max-width: 750px; }
.iaplicada-copy > p:last-child { font-size: 1.08rem; line-height: 1.6; max-width: 730px; }
.principles { border-top: 1px solid rgba(0, 0, 0, .35); grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
.principles div { border-right: 1px solid rgba(0, 0, 0, .35); padding: 18px 24px 0 0; }
.principles div + div { padding-left: 24px; }
.principles div:last-child { border: 0; }
.principles span { font: 600 .76rem var(--display); }
.principles p { font: 600 1.02rem/1.35 var(--display); letter-spacing: -.03em; margin: 35px 0 0; max-width: 250px; }

/* Bloque breve sobre experiencia. */
.experience { align-items: start; display: grid; gap: 40px; grid-template-columns: .65fr 1.35fr; padding-bottom: 120px; padding-top: 120px; }
.experience h2 { font-size: clamp(2rem, 3.5vw, 3.6rem); }
.experience div > p { color: var(--gray); font-size: 1.05rem; line-height: 1.65; margin: 30px 0 0; max-width: 680px; }

/* Cierre de contacto y pie. */
.contact { background: var(--black); color: var(--white); padding: 105px clamp(24px, 8vw, 128px); }
.contact h2 { max-width: 680px; }
.contact > p:not(.eyebrow) { color: #c8c8c8; margin: 24px 0 0; }
.contact-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 24px; margin-top: 36px; }
.email-link, .phone-link { border-bottom: 1px solid var(--orange); color: var(--white); font-weight: 600; padding-bottom: 4px; }
.footer { align-items: center; background: var(--black); border-top: 1px solid #414141; color: #bdbdbd; display: flex; font-size: .78rem; gap: 30px; justify-content: space-between; padding: 25px clamp(24px, 8vw, 128px); }
.footer .brand { color: var(--white); }
.footer p { margin: 0; }

/* Botón flotante: mantiene el contacto a un toque de distancia. */
.whatsapp-float { align-items: center; animation: whatsapp-pulse 2s infinite; background: var(--whatsapp); border-radius: 50%; bottom: 24px; box-shadow: 0 5px 18px rgba(0, 0, 0, .25); color: #092d18; display: flex; height: 58px; justify-content: center; position: fixed; right: 24px; transition: transform .2s, background .2s; width: 58px; z-index: 20; }
.whatsapp-float:hover { animation-play-state: paused; background: #1fbc5a; transform: scale(1.08); }
.whatsapp-float svg { height: 30px; width: 30px; }
@keyframes whatsapp-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55), 0 5px 18px rgba(0, 0, 0, .25); } 50% { box-shadow: 0 0 0 11px rgba(37, 211, 102, 0), 0 5px 18px rgba(0, 0, 0, .25); } }

/* Ajustes para tablet y móvil. */
@media (max-width: 800px) {
  .header { padding-bottom: 18px; padding-top: 18px; }
  .menu-button { background: transparent; border: 0; cursor: pointer; display: grid; gap: 5px; padding: 6px 0 6px 12px; }
  .menu-button span { background: var(--black); display: block; height: 2px; transition: transform .2s; width: 25px; }
  .menu-button.active span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-button.active span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .navigation { background: var(--off-white); border-bottom: 1px solid var(--line); display: none; flex-direction: column; gap: 0; left: 0; padding: 12px 24px 22px; position: absolute; right: 0; top: 100%; }
  .navigation.open { display: flex; }
  .navigation a { padding: 12px 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 70px; padding-top: 80px; }
  .hero-mark { height: 360px; max-width: 540px; width: 100%; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 0; }
  .iaplicada, .experience { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .principles div, .principles div + div { border-bottom: 1px solid rgba(0, 0, 0, .35); border-right: 0; padding: 18px 0; }
  .principles div:last-child { border-bottom: 0; }
  .principles p { margin-top: 18px; max-width: 400px; }
}

@media (max-width: 500px) {
  h1 { font-size: 3.25rem; }
  .hero-mark { min-height: 300px; }
  .section-heading { display: block; }
  .footer { align-items: flex-start; flex-direction: column; gap: 15px; }
  .whatsapp-float { bottom: 18px; right: 18px; }
}
