/* ============================================================
   Agentic Solutions — Home corporativo
   Paleta monocroma oscura de la marca (#161616) + acento arena.
   Display: Old Standard TT (serif) | Cuerpo: Karla
   ============================================================ */

:root {
  /* Color */
  --ink:        #161616;
  --ink-2:      #1e1e1e;
  --ink-3:      #242424;
  --paper:      #f7f7f7;
  --paper-dim:  #cfcfcf;
  --muted:      #a4a4a4;
  --accent:     #c9a876;
  --accent-soft: rgba(201, 168, 118, 0.14);
  --line:       rgba(247, 247, 247, 0.12);
  --whatsapp:   #25d366;

  /* Tipografía */
  --font-body:    'Karla', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-display: 'Old Standard TT', Georgia, 'Times New Roman', serif;

  /* Layout */
  --container: 1160px;
  --radius: 10px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  border-radius: 6px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  min-height: 48px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--paper);
  color: var(--ink);
}
.btn-primary:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
}
.btn-outline:hover { background: var(--paper); color: var(--ink); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.btn-light {
  background: var(--paper);
  color: var(--ink);
}
.btn-light:hover { background: var(--accent); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #0b2f1a;
}
.btn-whatsapp:hover { background: #1db954; transform: translateY(-2px); }

.btn-sm {
  padding: 8px 18px;
  min-height: 40px;
  font-size: 14px;
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(22, 22, 22, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(14, 14, 14, 0.96);
  border-bottom-color: var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.brand span { color: var(--accent); font-weight: 400; }

.main-nav__list {
  display: flex;
  gap: 36px;
}

.main-nav a {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--paper-dim);
  text-decoration: none;
  padding-block: 6px;
  transition: color 0.25s var(--ease);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.main-nav a:hover { color: var(--paper); }
.main-nav a:hover::after { transform: scaleX(1); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.25s var(--ease);
}
.site-header__phone:hover { color: var(--accent); }

/* Hamburguesa */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--paper);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 85vh;
  padding-block: 120px 96px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(22, 22, 22, 0.55) 0%, rgba(22, 22, 22, 0.78) 100%),
    url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  animation: heroZoom 18s var(--ease) forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.06); }
  to   { transform: scale(1.02); }
}

.hero__inner {
  position: relative;
  text-align: center;
  animation: heroIn 1s var(--ease) both 0.15s;
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 16px 3px;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  max-width: 15ch;
  margin-inline: auto;
  margin-bottom: 20px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}

.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--paper-dim);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: 40px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

/* ---------- Secciones genéricas ---------- */
.section { padding-block: 100px; }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

/* ---------- Servicios ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.service-card__media { overflow: hidden; aspect-ratio: 16 / 9; }
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.service-card:hover .service-card__media img { transform: scale(1.05); }

.service-card__body { padding: 28px 28px 32px; }

.service-card__body h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--paper);
}

.service-card__body p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Banda CTA ---------- */
.cta-band {
  position: relative;
  padding-block: 120px;
  overflow: hidden;
}
.cta-band__bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, rgba(22, 22, 22, 0.82), rgba(22, 22, 22, 0.88)),
    url('../img/cta-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.cta-band__inner {
  position: relative;
  text-align: center;
}
.cta-band__inner h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  max-width: 20ch;
  margin-inline: auto;
  margin-bottom: 14px;
}
.cta-band__inner p:not(.eyebrow) {
  font-size: 1.15rem;
  color: var(--paper-dim);
  margin-bottom: 36px;
}

/* ---------- Contacto ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.contact__info h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 8px;
}
.contact__intro {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 16px;
}
.contact__text {
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 46ch;
}

.contact__details {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
}
.contact__details li { color: var(--paper-dim); }
.contact__details a { color: var(--paper); text-decoration: none; font-weight: 700; }
.contact__details a:hover { color: var(--accent); }
.contact__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

.contact__media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* ---------- Suscripción ---------- */
.subscribe {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.subscribe__inner { max-width: 560px; margin-inline: auto; text-align: center; }
.subscribe__inner h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin-bottom: 10px;
}
.subscribe__text { color: var(--muted); margin-bottom: 32px; }

.subscribe__form {
  display: flex;
  gap: 12px;
}
.subscribe__form input {
  flex: 1;
  min-width: 0;
  padding: 0 20px;
  min-height: 50px;
  font: inherit;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease);
}
.subscribe__form input::placeholder { color: var(--muted); }
.subscribe__form input:focus { outline: none; border-color: var(--accent); }

.subscribe__msg {
  margin-top: 16px;
  font-size: 15px;
  min-height: 22px;
  color: var(--accent);
}
.subscribe__msg.is-error { color: #e07b7b; }

/* ---------- Páginas legales (prosa) ---------- */
.legal { max-width: 880px; margin-inline: auto; }
.legal__intro {
  color: var(--paper-dim);
  font-size: 1.08rem;
  max-width: 64ch;
  margin-bottom: 48px;
}
.legal__block { margin-bottom: 44px; }
.legal__block h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  color: var(--paper);
  margin-bottom: 14px;
}
.legal__block h3 {
  font-size: 1.15rem;
  color: var(--accent);
  margin: 22px 0 8px;
}
.legal__block p,
.legal__block li { color: var(--muted); line-height: 1.8; }
.legal__block ul { list-style: disc; padding-left: 24px; display: grid; gap: 8px; }
.legal__block a { color: var(--accent); }
.legal__block .legal__note {
  font-size: 14px;
  color: var(--muted);
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: var(--ink-2);
  border-radius: 6px;
  margin-top: 20px;
}

/* ---------- Footer ---------- */
.site-footer { background: #101010; }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.6fr;
  gap: 48px;
  padding-block: 64px;
}

.site-footer__brand p {
  color: var(--muted);
  margin-top: 14px;
  max-width: 34ch;
  font-size: 15px;
}

.site-footer__contact { color: var(--paper-dim); font-size: 15px; display: grid; gap: 8px; align-content: start; }
.site-footer__contact a { color: var(--paper); text-decoration: none; font-weight: 700; }
.site-footer__contact a:hover { color: var(--accent); }

.site-footer__nav ul { display: grid; gap: 10px; }
.site-footer__nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.25s var(--ease);
}
.site-footer__nav a:hover { color: var(--accent); }

.site-footer__bottom {
  border-top: 1px solid var(--line);
  padding-block: 22px;
}
.site-footer__bottom p {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- FAB WhatsApp ---------- */
.fab-whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease);
}
.fab-whatsapp:hover { transform: translateY(-4px) scale(1.04); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 560px;
  padding: 20px 24px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(20px);
  visibility: hidden;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.cookie-banner.is-visible { opacity: 1; transform: translateY(0); visibility: visible; }
.cookie-banner h4 { font-size: 1.1rem; margin-bottom: 4px; }
.cookie-banner p { color: var(--muted); font-size: 13.5px; }
.cookie-banner__text { flex: 1; }
.cookie-banner .btn { white-space: nowrap; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; gap: 28px; }
  .contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
  .section { padding-block: 72px; }
  .cta-band { padding-block: 88px; }
}

@media (max-width: 767px) {
  /* Nav móvil deslizante */
  .site-header__cta { display: none; }

  .main-nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    z-index: 1001;
    background: var(--ink-2);
    border-left: 1px solid var(--line);
    padding: 96px 32px 32px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0.35s;
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }

  .main-nav__list { flex-direction: column; gap: 24px; }
  .main-nav a { font-size: 20px; }

  .nav-toggle { display: flex; }

  .site-header__phone { font-size: 13px; }
  .site-header__phone svg { display: none; }

  .hero { min-height: 70vh; padding-block: 96px 72px; }
  .hero__eyebrow::before, .hero__eyebrow::after { width: 24px; margin-inline: 10px; }
  .hero__actions .btn { width: 100%; }

  .cookie-banner {
    left: 16px; right: 16px; bottom: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .cookie-banner .btn { white-space: normal; }

  .subscribe__form { flex-direction: column; }
  .subscribe__form input { min-height: 50px; text-align: center; }

  .cta-band__bg { background-attachment: scroll; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
