/* Nopal Hospitality Marketing — ver DESIGN.md para el sistema completo.
   Colores: cal (fondo), agave (sección suave), nopal (verde profundo), nopal-2 (verde medio),
   tuna (fucsia de la fruta del nopal, acento), flor (amarillo de la flor del nopal). */

:root {
  /* Color */
  --cal: #fbfbf6;
  --agave: #e4ece0;
  --nopal: #123524;
  --nopal-2: #1e5a3c;
  --nopal-deep: #0c2418;
  --tuna: #d4206a;
  --tuna-dark: #b01558;
  --flor: #f4c430;
  --ink: #14261c;
  --muted: #4d5f54;

  /* Tipografía */
  --ff: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ff-head: "Fraunces", Georgia, "Times New Roman", serif;
  --sage: #77827a;
  --line: rgba(119, 130, 122, .5);
  --fs-sm: 0.9375rem;
  --fs-ui: 1rem;
  --fs-base: 1.0625rem;
  --fs-lead: 1.25rem;
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-h2: clamp(2rem, 4.6vw, 3.5rem);
  --fs-h1: clamp(2.75rem, 7.4vw, 6.25rem);
  --fs-display: clamp(2.25rem, 5.6vw, 4.75rem);

  /* Forma */
  --r-sm: 12px;
  --r-md: 18px;
  --r-pill: 999px;
  --paddle-radius: 50% 50% 50% 50% / 36% 36% 64% 64%;

  /* Espacio */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 56px);
  --header-h: 72px;
  --section-y: clamp(64px, 10vw, 128px);
  --section-y-lg: clamp(72px, 11vw, 144px);
  --tap: 44px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--cal);
  color: var(--ink);
  font-family: var(--ff);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
strong { font-weight: 600; }

:focus-visible { outline: 3px solid var(--tuna); outline-offset: 3px; border-radius: 4px; }
.site-header :focus-visible, .site-footer :focus-visible, .about :focus-visible,
.ai :focus-visible, .contact :focus-visible { outline-color: var(--flor); }

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--nopal); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Tipografía ---------- */
h1, h2, h3 { font-family: var(--ff-head); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; font-optical-sizing: auto; }
h1 { font-size: var(--fs-h1); line-height: 0.98; letter-spacing: -0.04em; font-weight: 750; }
h2 { font-size: var(--fs-h2); line-height: 1.05; }
h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.02em; }
p { max-width: 62ch; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.75em 1.6em;
  background: var(--tuna); color: #fff; font-weight: 600; font-size: var(--fs-ui);
  text-decoration: none; border-radius: var(--r-pill);
  border: 0; font-family: inherit; line-height: 1.2; cursor: pointer; /* también se usa en <button> */
  transition: background-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--tuna-dark); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--light { background: var(--cal); color: var(--nopal); }
.btn--light:hover { background: var(--flor); color: var(--nopal); }

.text-link {
  display: inline-flex; align-items: center; min-height: var(--tap);
  font-weight: 600; text-decoration-color: var(--tuna); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.text-link:hover { color: var(--tuna); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background-color: var(--nopal);
  color: var(--cal);
  border-bottom: 1px solid rgba(251, 251, 246, .08);
  transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(12, 36, 24, .25); }
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; min-height: var(--tap); text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand-name { display: none; font-family: var(--ff-head); font-weight: 600; font-size: var(--fs-lead); letter-spacing: -0.03em; color: var(--cal); }
img.is-missing { display: none; }
img.is-missing + .brand-name { display: inline; }

.site-nav ul { display: flex; gap: clamp(20px, 3vw, 40px); }
.site-nav a {
  display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 2px;
  font-weight: 500; text-decoration: none;
  background: linear-gradient(var(--flor), var(--flor)) 0 calc(100% - 8px) / 0 2px no-repeat;
  transition: background-size .2s ease;
}
.site-nav a:hover, .site-nav a[aria-current] { background-size: 100% 2px; }
.site-nav a[aria-current] { color: var(--flor); }

.nav-toggle { display: none; width: var(--tap); height: var(--tap); border: 0; background: transparent; color: var(--cal); cursor: pointer; border-radius: 8px; }
.nav-toggle__lines, .nav-toggle__lines::before {
  display: block; width: 24px; height: 2px; background: var(--cal); margin: 0 auto; position: relative;
  transition: transform .2s ease;
}
.nav-toggle__lines::before { content: ""; position: absolute; left: 0; top: 7px; }
.nav-toggle__lines { top: -4px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines::before { transform: translateY(-7px) rotate(-90deg); top: 7px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--nopal); border-top: 1px solid rgba(251, 251, 246, .16);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: flex; font-size: var(--fs-lead); font-weight: 600; background: none; }
}

/* ---------- Nopal: la forma de la pala ---------- */
.paddle { position: relative; width: min(100%, 440px); aspect-ratio: 3 / 4; margin-inline: auto; }
.paddle::before {
  content: ""; position: absolute; inset: -14px;
  border: 2px solid var(--tuna); border-radius: var(--paddle-radius);
  transform: rotate(6deg);
}
.paddle__frame {
  position: absolute; inset: 0; overflow: hidden; border-radius: var(--paddle-radius);
  background: linear-gradient(160deg, var(--nopal-2), var(--nopal));
}
.paddle__frame img { width: 100%; height: 100%; object-fit: cover; }
.paddle--tilt { transform: rotate(-4deg); }
.paddle--tilt::before { transform: rotate(-8deg); border-color: var(--nopal); }

/* ---------- Hero ---------- */
/* Foto a ancho completo; el degradado oscuro sostiene el texto sobre la imagen */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end;
  min-height: clamp(580px, 100svh, 900px);
  padding-block: clamp(48px, 8vw, 112px);
  background: var(--nopal); color: var(--cal);
}
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 36, 24, .86) 0%, rgba(12, 36, 24, .58) 36%, rgba(12, 36, 24, 0) 64%),
    linear-gradient(0deg, rgba(12, 36, 24, .6) 0%, rgba(12, 36, 24, 0) 48%);
}
.hero__inner { position: relative; }
.hero__copy { max-width: 33rem; }
.hero h1 { color: var(--cal); font-size: clamp(2.5rem, 5.4vw, 4.5rem); margin-bottom: clamp(20px, 2.6vw, 32px); }
.hero__lead { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 8px; }
.hero__text { font-size: var(--fs-lead); color: rgba(251, 251, 246, .92); margin-bottom: 32px; }
.hero__text strong { color: var(--flor); }
.hero :focus-visible { outline-color: var(--flor); }

/* En pantallas anchas la foto se amplía un poco desde la izquierda: la modelo queda a la derecha del texto */
@media (min-width: 641px) {
  .hero__bg { width: 122%; max-width: none; object-position: 50% 58%; transform-origin: 0 50%; }
}

/* Anchos medios (panel angosto, tablet vertical): más zoom hacia la derecha para que la modelo no quede bajo el texto */
@media (min-width: 641px) and (max-width: 900px) {
  .hero__bg { width: 168%; object-position: 50% 56%; }
}

/* Único momento animado: la foto se asienta al cargar */
@keyframes hero-settle { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero__bg { animation: hero-settle 2.2s cubic-bezier(.2, .7, .2, 1) both; }

/* Móvil: sigue siendo un solo hero. La foto ocupa la parte alta (la modelo queda a la vista),
   se funde con el verde hacia abajo y el texto se monta sobre ese degradado. */
@media (max-width: 640px) {
  .hero { display: block; min-height: 0; padding-block: 0 clamp(40px, 10vw, 64px); }
  .hero__bg {
    position: relative; inset: auto; z-index: -2;
    display: block; width: 100%; height: min(118vw, 600px);
    object-position: 50% 64%;
  }
  .hero::after {
    inset: 0 0 auto 0; height: min(118vw, 600px);
    background: linear-gradient(0deg, var(--nopal) 0%, rgba(12, 36, 24, .88) 20%, rgba(12, 36, 24, 0) 58%);
  }
  .hero__inner { margin-top: calc(min(118vw, 600px) * -0.17); }
}

/* ---------- Agencia ---------- */
.about { background: var(--nopal); color: var(--cal); padding-block: var(--section-y); }
.about__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.about h2 { color: var(--cal); }
.about__body > p:first-child { font-size: var(--fs-lead); line-height: 1.55; margin-bottom: 40px; }
.about__body strong { color: var(--flor); }
.offers li {
  font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em;
  padding: 18px 0; border-top: 1px solid rgba(251, 251, 246, .28);
}
.offers li:last-child { border-bottom: 1px solid rgba(251, 251, 246, .28); }
.about__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 36px; font-size: var(--fs-lead); font-weight: 600; }

@media (max-width: 820px) { .about__grid { grid-template-columns: 1fr; } }

/* ---------- Servicios ---------- */
.services { padding-block: var(--section-y); }
.services__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.services__intro { position: sticky; top: calc(var(--header-h) + 32px); }
.services__intro h2 { margin-bottom: 24px; color: var(--nopal); }
.services__intro p { color: var(--muted); font-size: var(--fs-lead); }
.services__intro strong { color: var(--ink); }

.service { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding-block: 28px; border-top: 1px solid var(--line); }
.service:last-child { border-bottom: 1px solid var(--line); }
.service__badge { position: relative; display: grid; place-items: center; width: 56px; height: 56px; color: var(--tuna); }
.service__badge::before { content: ""; position: absolute; inset: -2px; background: var(--tuna); -webkit-mask: url(../img/blob-contorno.webp) center / contain no-repeat; mask: url(../img/blob-contorno.webp) center / contain no-repeat; transform: rotate(var(--r, 0deg)); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.service:nth-child(2) .service__badge { --r: 80deg; }
.service:nth-child(3) .service__badge { --r: 160deg; }
.service:nth-child(4) .service__badge { --r: 250deg; }
@media (hover: hover) { .service:hover .service__badge::before { transform: rotate(calc(var(--r, 0deg) + 40deg)) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .service__badge::before { transition: none; } }
.service h3 { color: var(--nopal); margin-bottom: 6px; }
.service p { color: var(--muted); }

@media (max-width: 820px) {
  .services__grid { grid-template-columns: 1fr; }
  .services__intro { position: static; }
}

/* ---------- IA como servicio ---------- */
.ai { background: var(--nopal-2); color: var(--cal); padding-block: var(--section-y); }
.ai__head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 96px); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.ai h2 { color: var(--cal); }
.ai__head p { font-size: var(--fs-lead); }
.ai strong { color: var(--flor); }

.ai__list { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 64px) clamp(32px, 6vw, 96px); margin-bottom: 48px; }
.ai__item { padding-top: 24px; border-top: 1px solid rgba(251, 251, 246, .35); }
.ai__item--lead { grid-row: span 2; }
.ai__icon { color: var(--flor); margin-bottom: 16px; }
.ai__item h3 { margin-bottom: 8px; }
.ai__item p { color: rgba(251, 251, 246, .9); }

/* Ejemplo ilustrativo de conversación */
.chat { margin-top: 32px; padding: clamp(16px, 3vw, 28px); background: var(--nopal-deep); border-radius: var(--r-md); display: grid; gap: 12px; }
.chat__label { font-size: var(--fs-sm); color: rgba(251, 251, 246, .75); }
.chat__msg { max-width: 88%; padding: 12px 16px; font-size: var(--fs-ui); line-height: 1.45; border-radius: var(--r-md); }
.chat__msg--guest { justify-self: end; background: var(--cal); color: var(--nopal); border-bottom-right-radius: 4px; }
.chat__msg--ai { justify-self: start; background: var(--flor); color: var(--nopal-deep); border-bottom-left-radius: 4px; }

@media (max-width: 820px) {
  .ai__head, .ai__list { grid-template-columns: 1fr; }
  .ai__item--lead { grid-row: auto; }
}

/* ---------- Foto y video ---------- */
.gallery { padding-block: var(--section-y); }
.gallery h2 { color: var(--nopal); max-width: 16ch; margin-bottom: clamp(32px, 5vw, 56px); }
.gallery__rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2.4vw, 32px); }
/* Sin JS o con "reducir movimiento": cada fila se desliza con el dedo / trackpad */
.gallery__grid { display: flex; gap: clamp(12px, 2vw, 28px); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; }
.gallery__grid li { flex: none; width: clamp(150px, 17vw, 230px); scroll-snap-align: start; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 52% 48% 50% 50% / 40% 36% 38% 42%; background: var(--agave); }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Por qué nosotros ---------- */
.why { background: var(--agave); padding-block: var(--section-y); overflow: hidden; }
.why__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 112px); align-items: center; }
.why h2 { color: var(--nopal); margin-bottom: 24px; }
.why__copy p { font-size: var(--fs-lead); }
.why__copy strong { color: var(--nopal-2); }
.why__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 32px; }

@media (max-width: 820px) {
  .why__grid { grid-template-columns: 1fr; }
  .why .paddle { width: min(70%, 320px); }
}

/* ---------- Noticias ---------- */
.news { padding-block: var(--section-y); }
.news__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.news h2 { color: var(--nopal); margin-bottom: 16px; }
.news p { color: var(--muted); font-size: var(--fs-lead); }
.news strong { color: var(--ink); }

.post { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: center; text-decoration: none; padding: 20px; border: 2px solid var(--nopal); border-radius: var(--r-md); transition: background-color .2s ease, color .2s ease; }
.post__thumb { display: grid; place-items: center; background: var(--nopal); border-radius: var(--r-sm); aspect-ratio: 1; padding: 12px; }
.post__thumb img { width: 100%; height: auto; }
.post:hover .post__thumb { background: var(--nopal-2); }
.post__title { font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
.post:hover { background: var(--nopal); color: var(--cal); }

@media (max-width: 820px) {
  .news__grid { grid-template-columns: 1fr; }
  .post { grid-template-columns: 96px 1fr; gap: 16px; padding: 14px; }
}

/* ---------- Partners ---------- */

/* ---------- Contacto ---------- */
.contact { background: var(--nopal); color: var(--cal); padding-block: var(--section-y-lg); }
.contact__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contact__grid > * { min-width: 0; }
.contact__intro { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; position: sticky; top: calc(var(--header-h) + 32px); }
.contact h2 { font-size: clamp(2rem, 4.4vw, 3.75rem); line-height: 1.02; letter-spacing: -0.04em; color: var(--cal); }
.contact__lead { font-size: var(--fs-lead); color: rgba(251, 251, 246, .88); max-width: 28ch; }
.contact__mail {
  display: inline-flex; align-items: center; min-height: var(--tap);
  font-size: var(--fs-base); font-weight: 600; text-decoration-color: var(--flor); text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.contact__mail:hover { color: var(--flor); }

/* Formulario: panel claro sobre el verde para que los campos se lean con contraste alto */
.form { display: grid; gap: 20px; background: var(--cal); color: var(--ink); padding: clamp(20px, 3.4vw, 40px); border-radius: var(--r-md); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form__row > *, .form .field { min-width: 0; }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--nopal); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid rgba(18, 53, 36, .45); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.5; }
.field input::placeholder { color: #6f7f75; }
.field input:hover, .field textarea:hover { border-color: var(--nopal); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--tuna); box-shadow: 0 0 0 3px rgba(212, 32, 106, .28); }
.field [aria-invalid="true"] { border-color: #b3123f; background: #fff7f9; }
.field__error { font-size: var(--fs-sm); color: #a30f38; font-weight: 500; }
.form :focus-visible { outline-color: var(--tuna); }

/* Campo trampa anti-spam: fuera de pantalla, sin display:none (algunos bots lo detectan) */
.form__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__captcha:empty { display: none; }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form .btn:disabled { opacity: .65; cursor: progress; transform: none; }
.form__status { font-size: var(--fs-sm); font-weight: 600; min-width: 0; flex: 1 1 14rem; }
.form__status.is-ok { color: var(--nopal-2); }
.form__status.is-error { color: #a30f38; }

@media (max-width: 820px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__intro { position: static; }
}
@media (max-width: 480px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--nopal-deep); color: var(--cal); padding-block: 56px 32px; }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; align-items: start; }
.footer__title { font-size: var(--fs-ui); font-weight: 700; margin-bottom: 4px; color: var(--flor); }
.site-footer nav a, .footer__mail {
  display: inline-flex; align-items: center; min-height: var(--tap);
  text-decoration: none; text-underline-offset: 4px;
}
.site-footer nav a:hover, .footer__mail:hover { color: var(--flor); text-decoration: underline; }
.footer__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(251, 251, 246, .18); color: rgba(251, 251, 246, .75); font-size: var(--fs-sm); }

@media (max-width: 820px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================================================================
   Páginas interiores: Website Fair, Website Building, Consulting, Contact
   ====================================================================== */
.page-hero { background: var(--nopal); color: var(--cal); padding-block: clamp(48px, 8vw, 104px) clamp(56px, 9vw, 112px); overflow: hidden; }
.page-hero :focus-visible { outline-color: var(--flor); }
.page-hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.page-hero__grid--single { grid-template-columns: 1fr; }
.page-hero__grid > * { min-width: 0; }
.page-hero h1 { font-size: clamp(2.5rem, 6.2vw, 5rem); line-height: 1; letter-spacing: -0.04em; margin-bottom: clamp(20px, 2.6vw, 32px); }
.page-hero__lead { font-size: var(--fs-h3); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 8px; }
.page-hero__text { font-size: var(--fs-lead); color: rgba(251, 251, 246, .92); margin-bottom: 32px; max-width: 36ch; }
.page-hero strong { color: var(--flor); }
.page-hero__note { margin-top: 16px; font-size: var(--fs-sm); color: rgba(251, 251, 246, .8); }
.page-hero--soft { background: var(--agave); color: var(--ink); }
.page-hero--soft h1 { color: var(--nopal); }
.page-hero--soft .page-hero__text { color: var(--muted); }
.page-hero--soft strong { color: var(--nopal); }
.page-hero--soft :focus-visible { outline-color: var(--tuna); }

.page-hero .paddle { width: min(100%, 400px); }
.fair-banner { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 9; background: #9bb78b; }
.fair-banner img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero .paddle { width: min(72%, 320px); margin-top: 16px; }
}

/* Website Fair: la oferta */
.offer { padding-block: var(--section-y); }
.offer__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.offer__grid > * { min-width: 0; }
.offer h2 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.01em; color: var(--muted); margin-bottom: 12px; }
.offer h3 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.035em; color: var(--nopal); }
.offer h3 strong { color: var(--tuna-dark); }
.offer__body p { font-size: var(--fs-lead); }
.offer__body p + p { margin-top: 16px; }
@media (max-width: 820px) { .offer__grid { grid-template-columns: 1fr; } }

/* Lista de lo que incluye (Website Fair) y áreas de ayuda (Consulting) */
.includes { background: var(--agave); padding-block: var(--section-y); }
.includes h2 { color: var(--nopal); margin-bottom: clamp(32px, 5vw, 56px); }
.includes__list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: clamp(32px, 6vw, 96px); border-bottom: 1px solid var(--line); }
.includes__item { display: grid; grid-template-columns: 32px 1fr; gap: 16px; padding-block: 24px; border-top: 1px solid var(--line); min-width: 0; }
.includes__item--plain { grid-template-columns: 1fr; gap: 0; }
.includes__icon { color: var(--tuna-dark); margin-top: 2px; }
.includes__item h3 { color: var(--nopal); font-size: var(--fs-lead); letter-spacing: -0.02em; margin-bottom: 4px; }
.includes__item p { color: var(--muted); }
@media (max-width: 820px) { .includes__list { grid-template-columns: 1fr; } }

/* Intro de Building y Consulting */
.intro { background: var(--agave); padding-block: var(--section-y); }
.intro__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.intro__grid > * { min-width: 0; }
.intro h2 { color: var(--nopal); }
.intro__body p { font-size: var(--fs-lead); }
.intro__body .includes__list { margin-top: 32px; grid-template-columns: 1fr; }
@media (max-width: 820px) { .intro__grid { grid-template-columns: 1fr; } }

/* Proyectos: índice tipográfico (nombre y ubicación) */
.projects { padding-block: var(--section-y); }
.projects h2 { color: var(--nopal); margin-bottom: clamp(24px, 4vw, 48px); }
.projects__list { border-top: 2px solid var(--nopal); }
.projects__list li { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4px 32px; align-items: baseline; padding-block: clamp(16px, 2.2vw, 26px); border-bottom: 1px solid var(--line); }
.projects__name { font-size: var(--fs-h3); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; color: var(--nopal); }
.projects__place { color: var(--muted); }
@media (max-width: 640px) { .projects__list li { grid-template-columns: 1fr; } }

/* Preguntas frecuentes */
.faq { background: var(--agave); padding-block: var(--section-y); }
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__grid > * { min-width: 0; }
.faq h2 { color: var(--nopal); position: sticky; top: calc(var(--header-h) + 32px); }
.faq__item { border-top: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--tap); padding-block: 20px; cursor: pointer; list-style: none;
  font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; color: var(--nopal);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border: 1.5px solid var(--nopal); border-radius: 50%; font-size: 1.25rem; line-height: 1; font-weight: 500;
}
.faq__item[open] summary::after { content: "\2013"; background: var(--nopal); color: var(--cal); }
.faq__item p { padding-bottom: 24px; max-width: 60ch; }
@media (max-width: 820px) {
  .faq__grid { grid-template-columns: 1fr; }
  .faq h2 { position: static; }
}

/* Franja final con llamada a la acción */
.cta-band { background: var(--nopal); color: var(--cal); padding-block: var(--section-y-lg); }
.cta-band :focus-visible { outline-color: var(--flor); }
.cta-band__grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(32px, 6vw, 88px); align-items: end; }
.cta-band__grid > * { min-width: 0; }
.cta-band h2 { font-size: clamp(2rem, 4.8vw, 4rem); line-height: 1.02; letter-spacing: -0.04em; }
.cta-band__lead { margin-top: 16px; font-size: var(--fs-lead); color: rgba(251, 251, 246, .9); }
.cta-band__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.cta-band__fine { font-size: var(--fs-sm); color: rgba(251, 251, 246, .8); max-width: 30ch; }
@media (max-width: 820px) { .cta-band__grid { grid-template-columns: 1fr; align-items: start; } }

/* Contact: enlaces de contacto bajo el título */
.contact__links { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.contact__item { display: grid; gap: 2px; justify-items: start; }
.contact__label { font-size: var(--fs-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--flor); }

/* ---------- Widget de WhatsApp (solo ícono) ---------- */
.wa-widget {
  position: fixed; z-index: 40;
  right: max(clamp(24px, 3vw, 44px), env(safe-area-inset-right, 0px));
  bottom: max(clamp(40px, 5vh, 56px), env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; padding: 0;
  background: #0b6b3a; color: #fff; text-decoration: none;
  border-radius: 50%;
  /* anillo claro: se distingue igual sobre fondos verdes oscuros y claros */
  box-shadow: 0 0 0 2px var(--cal), 0 8px 24px rgba(12, 36, 24, .35);
  transition: background-color .18s ease, transform .18s ease;
}
.wa-widget:hover { background: #095a31; transform: translateY(-2px); }
.wa-widget:active { transform: translateY(0); }
.wa-widget:focus-visible { outline: 3px solid var(--tuna); outline-offset: 4px; }
.wa-widget svg { flex: none; width: 32px; height: 32px; }
@media (prefers-reduced-motion: reduce) { .wa-widget { transition: none; } }

/* ---------- Pie de página: Instagram, enlaces legales ---------- */
.footer__ig { display: inline-flex; align-items: center; gap: 8px; }
.footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer__legal a, .linklike {
  color: inherit; text-decoration: underline; text-underline-offset: 3px;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  min-height: 24px;
}
.footer__legal a:hover, .linklike:hover { color: var(--flor); }
.linklike:focus-visible { outline: 3px solid var(--flor); outline-offset: 3px; }

/* ---------- Proyectos con foto (Website Building) ---------- */
.projects__lead { margin: calc(-1 * clamp(8px, 2vw, 24px)) 0 clamp(24px, 4vw, 44px); color: var(--muted); max-width: 52ch; }
.projects__grid { display: grid; gap: clamp(14px, 2vw, 24px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--nopal); isolation: isolate; }
.project--feature { grid-column: span 2; aspect-ratio: auto; }
.project__link { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; }
.project__media { position: absolute; inset: 0; display: block; background: var(--agave); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.project__link::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12, 36, 24, .92) 0%, rgba(12, 36, 24, .66) 38%, rgba(12, 36, 24, 0) 72%); transition: opacity .4s ease; }
.project__badge { position: absolute; z-index: 2; top: 14px; right: 14px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: rgba(251, 251, 246, .92); color: var(--nopal); font-size: 20px; line-height: 1; transition: background .3s ease, color .3s ease, transform .4s cubic-bezier(.2, .7, .2, 1); }
.project__body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: 4px; padding: clamp(16px, 2.2vw, 26px); }
.project__place { font-size: var(--fs-sm); letter-spacing: .04em; color: rgba(251, 251, 246, .92); }
.project__name { font-family: var(--ff-head); font-size: clamp(1.25rem, 1.7vw, 1.6rem); font-weight: 500; letter-spacing: -0.01em; line-height: 1.15; color: #fff; }
.project--feature .project__name { font-size: clamp(1.6rem, 2.6vw, 2.4rem); }
.project__visit { margin-top: 6px; font-weight: 600; font-size: var(--fs-sm); color: var(--flor); }
.project__link:focus-visible { outline: 3px solid var(--tuna); outline-offset: -3px; }
@media (hover: hover) {
  .project__visit { max-height: 0; opacity: 0; overflow: hidden; margin-top: 0; transition: max-height .4s ease, opacity .4s ease, margin-top .4s ease; }
  .project__link:hover .project__visit, .project__link:focus-visible .project__visit { max-height: 2em; opacity: 1; margin-top: 6px; }
  .project__link:hover .project__media img { transform: scale(1.07); }
  .project__link:hover .project__badge, .project__link:focus-visible .project__badge { background: var(--tuna); color: #fff; transform: rotate(45deg); }
}
@media (max-width: 900px) { .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .project--feature { aspect-ratio: 16 / 9; } }
@media (max-width: 560px) { .projects__grid { grid-template-columns: minmax(0, 1fr); } .project--feature { aspect-ratio: 4 / 3; grid-column: auto; } }
@media (prefers-reduced-motion: no-preference) {
  .js .projects__grid:not(.is-live) .project { opacity: 0; transform: translateY(28px); }
  .js .projects__grid .project { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .projects__grid .project:nth-child(2) { transition-delay: .1s; }
  .js .projects__grid .project:nth-child(3) { transition-delay: .2s; }
  .js .projects__grid .project:nth-child(4) { transition-delay: .1s; }
  .js .projects__grid .project:nth-child(5) { transition-delay: .2s; }
  .js .projects__grid .project:nth-child(6) { transition-delay: .3s; }
  .js .projects__grid .project:nth-child(n+7) { transition-delay: .15s; }
}
@media (prefers-reduced-motion: reduce) { .project__media img, .project__badge { transition: none; } }
.projects__list a.projects__name { text-decoration: none; }
.projects__list a.projects__name:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Aviso de cookies ---------- */
.btn--ghost { background: transparent; color: var(--nopal); box-shadow: inset 0 0 0 2px var(--nopal); }
.btn--ghost:hover { background: var(--agave); }
.cookie-banner {
  position: fixed; z-index: 60; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 32px));
  background: var(--cal); color: var(--ink); border-radius: var(--r-md);
  padding: 20px; display: grid; gap: 10px;
  box-shadow: 0 0 0 1px rgba(18, 53, 36, .18), 0 16px 48px rgba(12, 36, 24, .35);
}
.cookie-banner__title { font-weight: 700; color: var(--nopal); font-size: var(--fs-lead); }
.cookie-banner__text { font-size: var(--fs-ui); color: var(--muted); }
.cookie-banner__text a { color: var(--nopal); font-weight: 600; text-underline-offset: 3px; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.cookie-banner .btn { flex: 1 1 140px; justify-content: center; }
@media (max-width: 640px) { .cookie-banner { right: 16px; width: auto; } }

/* ---------- Texto largo (política de cookies) ---------- */
.prose-section { padding-block: var(--section-y); }
.prose { max-width: 760px; }
.prose h2 { color: var(--nopal); font-size: var(--fs-h3); margin: 2em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 1.2em; list-style: disc; display: grid; gap: 8px; }
.prose a { color: var(--nopal); text-underline-offset: 3px; }

/* ---------- Insignias de socios en el pie de página ---------- */
.footer__partners ul {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 24px clamp(24px, 4vw, 56px);
  margin-top: 40px; padding: 24px clamp(16px, 3vw, 32px);
  background: var(--cal); border-radius: var(--r-md);
}
.footer__partners img { height: clamp(56px, 7vw, 76px); width: auto; }

/* Foto bajo "Hospitality marketing agency" */
.about__lead { display: grid; gap: clamp(28px, 4vw, 48px); justify-items: start; }
.about__photo { width: min(100%, 340px); margin-inline: 14px 0; }
@media (max-width: 820px) { .about__photo { width: min(100%, 300px); margin-inline: 14px 0; } }

/* Logo más grande en el pie de página (escritorio) */
@media (min-width: 821px) { .site-footer .brand img { height: 72px; } }

/* ---------- Página 404 ---------- */
.page-hero__code { font-family: var(--ff-head); font-size: clamp(3rem, 8vw, 6rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--flor); margin-bottom: 8px; }
.nf-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 8px; }

/* ---------- Página Services: lista numerada de servicios ---------- */
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-list > li { list-style: none; }
.svc { padding-block: clamp(36px, 6vw, 72px); border-top: 1px solid var(--line); background: var(--cal); scroll-margin-top: calc(var(--header-h) + 12px); }
.svc:nth-child(even) { background: var(--agave); }
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc__grid { display: grid; grid-template-columns: clamp(72px, 9vw, 124px) 1.1fr 1fr; gap: 8px clamp(20px, 4vw, 64px); align-items: start; }
.svc__num { position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; max-width: 124px; font-family: var(--ff-head); font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; color: var(--tuna-dark); }
.svc__num::before { content: ""; position: absolute; inset: 0; background: var(--tuna-dark); -webkit-mask: url(../img/blob-contorno.webp) center / contain no-repeat; mask: url(../img/blob-contorno.webp) center / contain no-repeat; transform: rotate(var(--r, 0deg)); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.svc:nth-child(2) .svc__num { --r: 70deg; }
.svc:nth-child(3) .svc__num { --r: 150deg; }
.svc:nth-child(4) .svc__num { --r: 230deg; }
.svc:nth-child(5) .svc__num { --r: 300deg; }
.svc__title { color: var(--nopal); font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; margin: 0; }
.svc__toggle { all: unset; box-sizing: border-box; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; cursor: default; }
.svc__plus { display: none; flex: none; position: relative; width: 36px; height: 36px; margin-top: .1em; border: 1.5px solid currentColor; border-radius: 50%; transition: background-color .25s ease, color .25s ease; }
.svc__plus::before, .svc__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); transition: transform .3s ease; }
.svc__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc__text { font-size: var(--fs-lead); line-height: 1.5; color: var(--muted); max-width: 46ch; margin: 0; }
.svc__points { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; max-width: 46ch; }
.svc__points li { position: relative; padding-left: 26px; line-height: 1.45; color: var(--nopal); }
.svc__points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 14px; height: 2px; background: var(--tuna); border-radius: 2px; }
.js .svc__toggle { cursor: pointer; }
.js .svc__toggle:focus-visible { outline: 2px solid var(--tuna-dark); outline-offset: 4px; border-radius: 6px; }
.js .svc__plus { display: block; }
.js .svc__panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s cubic-bezier(.2,.7,.2,1), opacity .35s ease; }
.js .svc__panel.is-open { grid-template-rows: 1fr; opacity: 1; }
.svc__panel-in { overflow: hidden; min-height: 0; }
.js .svc { transition: background-color .3s ease; }
.js .svc.is-open { background: color-mix(in srgb, var(--flor) 22%, var(--cal)); }
.svc.is-open .svc__plus::after { transform: translate(-50%, -50%) rotate(0deg); }
.svc.is-open .svc__num::before { transform: rotate(calc(var(--r, 0deg) + 40deg)) scale(1.06); }
@media (hover: hover) {
  .js .svc:hover { background: color-mix(in srgb, var(--flor) 16%, var(--cal)); }
  .svc:hover .svc__num::before { transform: rotate(calc(var(--r, 0deg) + 40deg)) scale(1.06); }
  .js .svc:hover .svc__plus { background: var(--nopal); color: var(--cal); }
}
@media (prefers-reduced-motion: reduce) {
  .svc__num::before, .js .svc, .js .svc__panel, .svc__plus, .svc__plus::before, .svc__plus::after { transition: none; }
}
@media (max-width: 820px) {
  .svc__grid { grid-template-columns: 72px 1fr; gap: 6px 18px; align-items: center; }
  .svc__num { grid-row: 1; max-width: 72px; font-size: 1.3rem; }
  .svc__title { grid-column: 2; }
  .svc__body { grid-column: 1 / -1; }
  .svc__text { margin-top: 6px; }
}

/* ---------- Tono salvia (#77827a), solo en detalles ---------- */
::selection { background: rgba(119, 130, 122, .4); color: var(--ink); }
.footer__legal { border-top-color: rgba(119, 130, 122, .55); }
:root { accent-color: var(--sage); scrollbar-color: var(--sage) var(--cal); }

/* ---------- Animación de entrada (una vez por sesión, ver js/intro.js) ---------- */
html.has-intro::before, html.has-intro::after { content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
html.has-intro::before { background: var(--nopal); animation: intro-veil .5s ease 1.15s forwards; }
html.has-intro::after {
  background: url("../img/logo-n.webp") center / 64px auto no-repeat;
  animation: intro-n 1.65s cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes intro-n { 0% { opacity: 0; transform: translateY(10px) scale(.92); } 35% { opacity: 1; transform: none; } 70% { opacity: 1; transform: scale(1.04); } 100% { opacity: 0; transform: scale(1.12); } }
@keyframes intro-veil { to { opacity: 0; visibility: hidden; } }

/* ---------- Home: header y WhatsApp ocultos al cargar, entran suave al bajar (en las demás páginas el header queda fijo) ---------- */
.js .is-home .site-header {
  position: fixed; inset: 0 0 auto 0; width: 100%;
  transform: translateY(-100%); visibility: hidden;
  transition: transform .7s cubic-bezier(.22, .8, .2, 1), visibility 0s linear .7s, box-shadow .3s ease;
}
.js .is-home .site-header.is-stuck, .js .is-home .site-header:focus-within {
  transform: none; visibility: visible;
  transition: transform .7s cubic-bezier(.22, .8, .2, 1), visibility 0s, box-shadow .3s ease;
}
.js .is-home .wa-widget {
  translate: 0 120px; opacity: 0; visibility: hidden;
  transition: translate .7s cubic-bezier(.22, .8, .2, 1), opacity .7s ease, visibility 0s linear .7s, background-color .18s ease, transform .18s ease;
}
.js.nav-in .is-home .wa-widget, .js .is-home .wa-widget:focus-visible {
  translate: 0 0; opacity: 1; visibility: visible;
  transition: translate .7s cubic-bezier(.22, .8, .2, 1), opacity .7s ease, visibility 0s, background-color .18s ease, transform .18s ease;
}

/* Hero del home: texto centrado en vertical, a la izquierda (escritorio) */
@media (min-width: 641px) { .hero { align-items: center; } }

/* ---------- Contact Us: la sección del formulario en 3 franjas de verde ---------- */
.is-contact .contact {
  background: linear-gradient(180deg, var(--nopal-deep) 0 var(--section-y-lg), var(--nopal) var(--section-y-lg) calc(100% - var(--section-y-lg)), var(--nopal-2) calc(100% - var(--section-y-lg)) 100%);
}

/* ---------- Heros de página: mismo alto que Website Fair (el home conserva el suyo) ---------- */
.page-hero { --hero-h: clamp(560px, 78svh, 720px); display: flex; align-items: center; min-height: 770px; padding-block: 56px; }
.page-hero > .wrap { width: 100%; }
@media (min-width: 861px) {
  .page-hero { height: var(--hero-h); min-height: 0; }
  .page-hero .paddle { height: calc(var(--hero-h) - 128px); width: auto; aspect-ratio: 3 / 4; max-width: 100%; }
}

/* ---------- Contact Us: franjas 2 y 3 del formulario en blanco (la 1 queda en verde oscuro) ---------- */
.is-contact .contact {
  background: #fff;
  color: var(--ink);
}
.is-contact .contact h2 { color: var(--nopal); }
.is-contact .contact__lead { color: var(--muted); }
.is-contact .contact__label { color: var(--tuna-dark); }
.is-contact .contact__mail { color: var(--nopal); }
.is-contact .contact__mail:hover { color: var(--tuna-dark); }
.is-contact .contact :focus-visible { outline-color: var(--tuna); }
.is-contact .contact .form { box-shadow: 0 0 0 1px var(--line), 0 18px 48px rgba(12, 36, 24, .12); }
.is-contact .contact__mail { text-decoration-color: var(--tuna); }

/* Contact Us: noticias con el mismo verde claro de "What's included" */
.is-contact .news { background: var(--agave); }

.form__note { font-size: var(--fs-sm); color: var(--muted); margin: 4px 0 16px; }
.form__note a { color: var(--nopal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- AI Solutions: texto de la burbuja del huésped (la regla .ai__item p lo dejaba crema sobre crema) ---------- */
.ai__item .chat__msg--guest { color: var(--nopal); }
.ai__item .chat__msg--ai { color: var(--nopal-deep); }

/* ---------- Contacto sin formulario: bloque centrado ---------- */
.contact__grid--single { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.contact__grid--single .contact__intro { position: static; align-items: center; }
.contact__grid--single .contact__lead { max-width: 36ch; }
.contact__grid--single .contact__links { align-items: center; }
.contact__grid--single .contact__item { justify-items: center; }

/* ---------- Galería en movimiento (js/main.js clona las fotos y activa .is-marquee) ---------- */
.gallery { overflow: hidden; }
/* js/main.js duplica cada fila y activa .is-marquee: la fila A va a la izquierda y la B a la derecha */
.gallery__grid.is-marquee {
  --g: clamp(12px, 2vw, 28px);
  overflow: visible; scroll-snap-type: none; width: max-content; gap: var(--g);
  margin-left: calc(50% - 50vw); padding: 0 var(--g) 0 0;
  animation: gallery-scroll var(--dur, 110s) linear infinite;
}
.gallery__grid--a.is-marquee { --dur: 64s; }
.gallery__grid--b.is-marquee { --dur: 58s; animation-direction: reverse; }
@keyframes gallery-scroll { to { transform: translateX(-50%); } }

/* ---------- Selector de idioma (discreto, a la derecha de Contacto) ---------- */
.site-nav .lang-switch {
  display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 12px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .1em; background: none;
  border: 1px solid rgba(251, 251, 246, .38); border-radius: var(--r-pill); color: rgba(251, 251, 246, .85);
}
.site-nav .lang-switch:hover { color: var(--cal); border-color: var(--cal); background: none; }
@media (max-width: 820px) {
  .site-nav .nav-lang { padding-block: 12px; }
  .site-nav .lang-switch { font-size: .9375rem; min-height: var(--tap); padding: 0 18px; }
}
.site-nav .nav-lang { display: flex; align-items: center; }
@media (min-width: 821px) { .site-nav .lang-switch { margin-top: -2px; } }

/* ---------- AI Solutions: versión dinámica ---------- */
.ai { position: relative; overflow: hidden; isolation: isolate; }
.ai .wrap { position: relative; z-index: 1; }
.ai::before, .ai::after { content: ""; position: absolute; z-index: 0; width: 46vmax; height: 46vmax; border-radius: 50%; pointer-events: none; }
.ai::before { top: -22vmax; right: -14vmax; background: radial-gradient(closest-side, rgba(244, 196, 48, .16), transparent); }
.ai::after { bottom: -26vmax; left: -16vmax; background: radial-gradient(closest-side, rgba(212, 32, 106, .16), transparent); }

.ai__item { padding: clamp(20px, 3vw, 32px); background: rgba(251, 251, 246, .06); border: 1px solid rgba(251, 251, 246, .16); border-radius: var(--r-md); transition: transform .35s ease, border-color .35s ease, background .35s ease; }
.ai__icon { box-sizing: border-box; width: 52px; height: 52px; padding: 11px; border-radius: 50%; background: rgba(244, 196, 48, .14); }
.chat { margin-top: 24px; }
.chat__label { display: flex; align-items: center; gap: 8px; }
.chat__live { width: 8px; height: 8px; border-radius: 50%; background: #5fd38d; }

/* Burbujas: todas ocupan su lugar; el turno de la IA comparte celda con el indicador de escritura */
.chat__turn { display: grid; }
.chat__turn > * { grid-area: 1 / 1; }
.chat__typing { display: none; justify-self: start; align-self: start; gap: 5px; padding: 15px 16px; background: rgba(251, 251, 246, .14); border-radius: var(--r-md); border-bottom-left-radius: 4px; }
.chat__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--cal); opacity: .7; }

/* Tarjetas de contenido y búsqueda */
.aiviz { margin-top: 24px; padding: 16px; background: var(--nopal-deep); border-radius: var(--r-md); display: grid; gap: 12px; font-size: var(--fs-ui); }
.aiviz__chips { display: flex; gap: 8px; }
.aiviz__chips span { padding: 3px 12px; border: 1px solid rgba(251, 251, 246, .3); border-radius: 999px; font-size: var(--fs-sm); color: rgba(251, 251, 246, .75); }
.aiviz__chips .k1 { background: var(--flor); border-color: var(--flor); color: var(--nopal-deep); }
.aiviz__stack { display: grid; }
.aiviz__stack p { grid-area: 1 / 1; margin: 0; line-height: 1.5; }
.aiviz__stack .s2, .aiviz__stack .s3 { opacity: 0; }
.aiviz__ok { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 12px 4px 8px; border-radius: 999px; background: rgba(95, 211, 141, .16); color: #8be0ad; font-size: var(--fs-sm); }

.aiviz__q { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(251, 251, 246, .1); border-radius: 999px; color: var(--cal); }
.aiviz__q svg { flex: none; color: var(--flor); }
.aiviz__typed { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aiviz__res { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(251, 251, 246, .06); }
.aiviz__res--top { background: rgba(244, 196, 48, .14); border: 1px solid rgba(244, 196, 48, .55); }
.aiviz__res b { display: block; color: var(--cal); font-weight: 600; }
.aiviz__res small { color: rgba(251, 251, 246, .75); font-size: var(--fs-sm); }
.aiviz__res em { flex: none; font-style: normal; font-size: var(--fs-sm); padding: 3px 10px; border-radius: 999px; background: var(--flor); color: var(--nopal-deep); font-weight: 600; }
.aiviz__res--dim { display: grid; gap: 8px; }
.aiviz__res--dim i { display: block; height: 8px; border-radius: 4px; background: rgba(251, 251, 246, .16); }
.aiviz__res--dim i + i { width: 62%; }

@media (hover: hover) {
  .ai.is-live .ai__item:hover { transform: translateY(-5px); border-color: rgba(244, 196, 48, .6); background: rgba(251, 251, 246, .09); }
}

@media (prefers-reduced-motion: no-preference) {
  .js .ai::before { animation: ai-drift 22s ease-in-out infinite alternate; }
  .js .ai::after { animation: ai-drift 28s ease-in-out infinite alternate-reverse; }
  .js .ai:not(.is-live) .ai__item { opacity: 0; transform: translateY(28px); }
  .js .ai .ai__item { transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), border-color .35s ease, background .35s ease; }
  .js .ai .ai__item:nth-child(2) { transition-delay: .15s, .15s, 0s, 0s; }
  .js .ai .ai__item:nth-child(3) { transition-delay: .3s, .3s, 0s, 0s; }

  .ai.is-live .chat__live { animation: ai-blink 1.8s ease-in-out infinite; }
  .ai.is-live .ai__icon { animation: ai-ring 3.2s ease-out infinite; }
  .ai.is-live .ai__item:nth-child(2) .ai__icon { animation-delay: .8s; }
  .ai.is-live .ai__item:nth-child(3) .ai__icon { animation-delay: 1.6s; }

  /* Chat: escribe, responde, segunda pregunta, y vuelve a empezar (18 s) */
  .ai.is-live .chat__typing { display: inline-flex; opacity: 0; }
  .ai.is-live .chat__typing i { animation: ai-dot 1s ease-in-out infinite; }
  .ai.is-live .chat__typing i:nth-child(2) { animation-delay: .15s; }
  .ai.is-live .chat__typing i:nth-child(3) { animation-delay: .3s; }
  .ai.is-live .chat__msg--guest:not(.chat__msg--2) { animation: ai-g1 18s infinite both; }
  .ai.is-live .chat__turn:not(.chat__turn--2) .chat__typing { animation: ai-t1 18s infinite both; }
  .ai.is-live .chat__turn:not(.chat__turn--2) .chat__msg--ai { animation: ai-a1 18s infinite both; }
  .ai.is-live .chat__msg--2 { animation: ai-g2 18s infinite both; }
  .ai.is-live .chat__turn--2 .chat__typing { animation: ai-t2 18s infinite both; }
  .ai.is-live .chat__turn--2 .chat__msg--ai { animation: ai-a2 18s infinite both; }
  .ai.is-live .chat__typing i { animation-name: ai-dot; }

  /* Contenido: el texto se escribe en tres idiomas (12 s) */
  .ai.is-live .aiviz__stack .s1 { animation: ai-s1 12s infinite both; }
  .ai.is-live .aiviz__stack .s2 { animation: ai-s2 12s infinite both; }
  .ai.is-live .aiviz__stack .s3 { animation: ai-s3 12s infinite both; }
  .ai.is-live .aiviz__chips .k1 { animation: ai-k1 12s infinite both; }
  .ai.is-live .aiviz__chips .k2 { animation: ai-k2 12s infinite both; }
  .ai.is-live .aiviz__chips .k3 { animation: ai-k3 12s infinite both; }
  .ai.is-live .aiviz__ok { animation: ai-ok 4s infinite both; }

  /* Búsqueda IA: se escribe la consulta y aparece la recomendación (10 s) */
  .ai.is-live .aiviz__typed { animation: ai-type 10s steps(40, end) infinite both; }
  .ai.is-live .aiviz__res--top { animation: ai-res1 10s infinite both; }
  .ai.is-live .aiviz__res--top em { animation: ai-pop 10s infinite both; }
  .ai.is-live .aiviz__res--dim { animation: ai-res2 10s infinite both; }
  .ai.is-live .aiviz__res--dim2 { animation-name: ai-res3; }
}

@keyframes ai-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-6vmax, 5vmax) scale(1.18); } }
@keyframes ai-blink { 0%, 100% { box-shadow: 0 0 0 0 rgba(95, 211, 141, .6); } 60% { box-shadow: 0 0 0 7px rgba(95, 211, 141, 0); } }
@keyframes ai-ring { 0% { box-shadow: 0 0 0 0 rgba(244, 196, 48, .45); } 70%, 100% { box-shadow: 0 0 0 14px rgba(244, 196, 48, 0); } }
@keyframes ai-dot { 0%, 100% { transform: translateY(0); opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }

@keyframes ai-g1 { 0%, 2% { opacity: 0; transform: translateY(10px); } 5%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes ai-t1 { 0%, 8% { opacity: 0; } 10%, 17% { opacity: 1; } 18%, 100% { opacity: 0; } }
@keyframes ai-a1 { 0%, 17% { opacity: 0; transform: translateY(10px); } 20%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes ai-g2 { 0%, 42% { opacity: 0; transform: translateY(10px); } 45%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes ai-t2 { 0%, 48% { opacity: 0; } 50%, 57% { opacity: 1; } 58%, 100% { opacity: 0; } }
@keyframes ai-a2 { 0%, 57% { opacity: 0; transform: translateY(10px); } 60%, 93% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }

@keyframes ai-s1 { 0% { opacity: 0; clip-path: inset(0 100% 0 0); } 2% { opacity: 1; } 12%, 29% { opacity: 1; clip-path: inset(0 0 0 0); } 32%, 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
@keyframes ai-s2 { 0%, 33% { opacity: 0; clip-path: inset(0 100% 0 0); } 35% { opacity: 1; } 45%, 62% { opacity: 1; clip-path: inset(0 0 0 0); } 65%, 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
@keyframes ai-s3 { 0%, 66% { opacity: 0; clip-path: inset(0 100% 0 0); } 68% { opacity: 1; } 78%, 96% { opacity: 1; clip-path: inset(0 0 0 0); } 99%, 100% { opacity: 0; clip-path: inset(0 0 0 0); } }
@keyframes ai-k1 { 0%, 31% { background: var(--flor); border-color: var(--flor); color: var(--nopal-deep); } 33%, 100% { background: transparent; border-color: rgba(251, 251, 246, .3); color: rgba(251, 251, 246, .75); } }
@keyframes ai-k2 { 0%, 32% { background: transparent; border-color: rgba(251, 251, 246, .3); color: rgba(251, 251, 246, .75); } 34%, 64% { background: var(--flor); border-color: var(--flor); color: var(--nopal-deep); } 66%, 100% { background: transparent; border-color: rgba(251, 251, 246, .3); color: rgba(251, 251, 246, .75); } }
@keyframes ai-k3 { 0%, 65% { background: transparent; border-color: rgba(251, 251, 246, .3); color: rgba(251, 251, 246, .75); } 67%, 98% { background: var(--flor); border-color: var(--flor); color: var(--nopal-deep); } 100% { background: transparent; border-color: rgba(251, 251, 246, .3); color: rgba(251, 251, 246, .75); } }
@keyframes ai-ok { 0%, 40% { opacity: .55; } 60%, 100% { opacity: 1; } }

@keyframes ai-type { 0% { clip-path: inset(0 100% 0 0); } 30%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes ai-res1 { 0%, 33% { opacity: 0; transform: translateY(12px); } 40%, 92% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes ai-pop { 0%, 44% { transform: scale(.6); opacity: 0; } 50% { transform: scale(1.12); opacity: 1; } 54%, 92% { transform: scale(1); opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes ai-res2 { 0%, 42% { opacity: 0; transform: translateY(12px); } 48%, 92% { opacity: .75; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes ai-res3 { 0%, 48% { opacity: 0; transform: translateY(12px); } 54%, 92% { opacity: .55; transform: none; } 97%, 100% { opacity: 0; transform: none; } }

/* AI Solutions: ajustes de layout */
.ai__list { gap: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 56px); }
.ai__item { min-width: 0; }
.ai__item--lead { display: flex; flex-direction: column; }
.ai__item--lead .chat { flex: 1; align-content: center; width: 100%; box-sizing: border-box; }
.chat, .aiviz { min-width: 0; max-width: 100%; }

/* AI Solutions: la tarjeta del chat ocupa todo el ancho en escritorio; las otras dos van debajo */
.chat, .aiviz { grid-template-columns: minmax(0, 1fr); }
.ai__item--lead { grid-row: auto; grid-column: 1 / -1; }
@media (min-width: 821px) {
  .ai__item--lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: auto auto auto; column-gap: clamp(32px, 5vw, 72px); align-content: center; align-items: start; }
  .ai__item--lead > .ai__icon, .ai__item--lead > h3, .ai__item--lead > p { grid-column: 1; }
  .ai__item--lead > .chat { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; align-self: center; flex: none; }
  .ai__item--lead > h3 { align-self: end; }
}

.ai__item { display: flex; flex-direction: column; }
.aiviz { flex: 1; align-content: center; }
@media (min-width: 821px) {
  .ai__item--lead { display: grid; grid-template-rows: 1fr auto auto auto 1fr; align-content: stretch; }
  .ai__item--lead > .ai__icon { grid-row: 2; }
  .ai__item--lead > h3 { grid-row: 3; align-self: start; }
  .ai__item--lead > p { grid-row: 4; }
  .ai__item--lead > .chat { grid-row: 1 / span 5; }
}

/* AI Solutions: tarjeta de búsqueda legible en pantallas angostas */
.aiviz__res--top { flex-wrap: wrap; }
.aiviz__res--top > div { flex: 1 1 150px; min-width: 0; }
.aiviz__res small { display: block; }
@media (max-width: 600px) {
  .aiviz__q { align-items: flex-start; border-radius: var(--r-md); padding: 12px 14px; }
  .aiviz__q svg { margin-top: 3px; }
  .aiviz__typed { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
  .aiviz__stack p { overflow-wrap: anywhere; }
}

/* ---------- Agencia: profundidad ---------- */
.about { position: relative; overflow: hidden; isolation: isolate; }
.about__grid { position: relative; z-index: 1; }
.about__deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.about__blob { position: absolute; background: var(--flor); opacity: .16; -webkit-mask: url(../img/blob-contorno.webp) center / contain no-repeat; mask: url(../img/blob-contorno.webp) center / contain no-repeat; will-change: transform; }
.about__blob--1 { width: clamp(220px, 34vw, 480px); aspect-ratio: 1; left: -6%; top: -8%; transform: translate3d(0, calc(var(--p, 0) * -70px), 0) rotate(calc(var(--p, 0) * 90deg)); }
.about__blob--2 { width: clamp(160px, 22vw, 320px); aspect-ratio: 1; right: 4%; top: 14%; opacity: .22; transform: translate3d(0, calc(var(--p, 0) * 110px), 0) rotate(calc(var(--p, 0) * -140deg)); }
.about__blob--3 { width: clamp(280px, 40vw, 560px); aspect-ratio: 1; right: -10%; bottom: -22%; opacity: .12; transform: translate3d(0, calc(var(--p, 0) * -50px), 0) rotate(calc(var(--p, 0) * 60deg)); }
.about__photo .paddle__frame { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 10px 24px -8px rgba(0, 0, 0, .35); }
.about__body > p:first-child strong { background: linear-gradient(transparent 62%, rgba(244, 198, 60, .28) 62%); }
@media (prefers-reduced-motion: no-preference) {
  .js .about__lead, .js .about__body > *, .js .offers li { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js .about.is-live .about__lead, .js .about.is-live .about__body > *, .js .about.is-live .offers li { opacity: 1; transform: none; }
  .js .about.is-live .about__body > :nth-child(2) { transition-delay: .12s; }
  .js .about.is-live .about__body > :nth-child(3) { transition-delay: .24s; }
  .js .about.is-live .offers li:nth-child(1) { transition-delay: .3s; }
  .js .about.is-live .offers li:nth-child(2) { transition-delay: .42s; }
  .js .about.is-live .about__body > .about__cta { transition-delay: .54s; }
}

/* Agencia: fondo vivo (blobs reaccionan al cursor y a los servicios) */
.about__blob { translate: calc(var(--mx, 0) * var(--d, 20px)) calc(var(--my, 0) * var(--d, 20px)); scale: 1; transition: translate .9s cubic-bezier(.2, .7, .2, 1), scale 1s cubic-bezier(.2, .7, .2, 1), opacity .6s ease, background-color .6s ease; }
.about__blob--1 { --d: -34px; }
.about__blob--2 { --d: 52px; }
.about__blob--3 { --d: -22px; }
.about__blob--4 { --d: 40px; width: clamp(90px, 12vw, 170px); aspect-ratio: 1; left: 44%; bottom: 8%; opacity: .2; transform: translate3d(0, calc(var(--p, 0) * -90px), 0) rotate(calc(var(--p, 0) * 200deg)); }
.about__blob--5 { --d: -60px; width: clamp(70px, 9vw, 120px); aspect-ratio: 1; left: 36%; top: 6%; opacity: .2; transform: translate3d(0, calc(var(--p, 0) * 80px), 0) rotate(calc(var(--p, 0) * -220deg)); }
.offers li { cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .about__blob { animation: blob-drift 14s ease-in-out infinite alternate; }
  .about__blob--2 { animation-duration: 17s; animation-direction: alternate-reverse; }
  .about__blob--3 { animation-duration: 21s; }
  .about__blob--4 { animation-duration: 11s; animation-direction: alternate-reverse; }
  .about__blob--5 { animation-duration: 12s; }
  @keyframes blob-drift { from { rotate: -8deg; } to { rotate: 12deg; } }
  .about.is-hot .about__blob { opacity: .34; background: var(--flor); }
  .about[data-hot="1"] .about__blob--1, .about[data-hot="1"] .about__blob--2, .about[data-hot="1"] .about__blob--5 { scale: 1.22; animation-duration: 4s; }
  .about[data-hot="2"] .about__blob--3, .about[data-hot="2"] .about__blob--4 { scale: 1.22; animation-duration: 4s; }
  .about[data-hot="photo"] .about__blob { scale: 1.12; animation-duration: 6s; }
  .about[data-hot="cta"] .about__blob { scale: .9; animation-duration: 3s; }
}

/* Heros internos: el círculo que rodea la imagen se anima */
.page-hero .paddle::before, .page-hero .paddle::after { transition: scale .8s cubic-bezier(.2, .7, .2, 1), inset .8s cubic-bezier(.2, .7, .2, 1), border-color .5s ease, opacity .5s ease; }
.page-hero .paddle::after { content: ""; position: absolute; inset: -14px; border: 1.5px solid var(--flor); border-radius: var(--paddle-radius); transform: rotate(-10deg); opacity: .0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .page-hero .paddle::before { animation: ring-sway 9s ease-in-out infinite alternate; }
  .page-hero .paddle::after { opacity: .75; inset: -26px; animation: ring-sway-2 12s ease-in-out infinite alternate; }
  @keyframes ring-sway { from { rotate: -5deg; } to { rotate: 7deg; } }
  @keyframes ring-sway-2 { from { rotate: 8deg; } to { rotate: -9deg; } }
}
@media (prefers-reduced-motion: no-preference) {
  .page-hero .paddle::before { scale: calc(var(--hs, 1) + var(--p, 0) * .07); translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 14px); }
  .page-hero .paddle::after { scale: calc(var(--hs, 1) + var(--p, 0) * .12); translate: calc(var(--mx, 0) * -22px) calc(var(--my, 0) * -22px); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .page-hero:hover { --hs: 1.05; }
  .page-hero:hover .paddle::before { border-color: var(--flor); animation-duration: 3.5s; }
  .page-hero:hover .paddle::after { inset: -38px; opacity: 1; border-color: var(--tuna); animation-duration: 5s; }
}

/* Website Fair: el último elemento ocupa todo el ancho si queda solo */
.includes__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
.includes__item:last-child:nth-child(odd) p { max-width: 70ch; }
