/* =========================================================
   PL Integraciones — Design tokens & base system
   "Tecnología que se siente, no se nota."
   ========================================================= */

/* ---- Self-hosted fonts ---- */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/poppins-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/poppins-700.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibmplexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibmplexmono-500.woff2') format('woff2');
}

/* ---- Design tokens ---- */
:root {
  /* Brand colors (Manual de Marca v1.0) */
  --pl-teal: #0F6E56;
  --pl-teal-rgb: 15, 110, 86;
  --pl-teal-deep: #04342C;
  --pl-teal-light: #1D9E75;
  --pl-teal-mist: #E1F5EE;
  --pl-carbon: #1A1A1A;
  --pl-carbon-soft: #262624;
  --pl-white: #FFFFFF;
  --pl-gray: #5F5E5A;
  --pl-gray-soft: #E8E7E3;
  --pl-border: rgba(26, 26, 26, 0.1);
  --pl-border-on-dark: rgba(255, 255, 255, 0.14);
  --pl-error: #B3261E;

  /* Semantic surfaces */
  --surface-page: var(--pl-white);
  --surface-dark: var(--pl-carbon);
  --surface-mist: var(--pl-teal-mist);
  --text-body: var(--pl-carbon);
  --text-muted: var(--pl-gray);
  --text-on-dark: var(--pl-white);
  --text-on-dark-muted: rgba(255, 255, 255, 0.68);

  /* Type */
  --font-display: 'Poppins', -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --fs-hero: clamp(2.5rem, 1.85rem + 3vw, 4.75rem);
  --fs-h1: clamp(2rem, 1.65rem + 1.6vw, 3rem);
  --fs-h2: clamp(1.625rem, 1.4rem + 1vw, 2.5rem);
  --fs-h3: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem);
  --fs-body-lg: 1.1875rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.75rem;

  --lh-tight: 1.12;
  --lh-snug: 1.32;
  --lh-body: 1.6;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  --section-pad: clamp(4rem, 4rem + 4vw, 8rem);
  --container-w: 1240px;
  --container-pad: clamp(1.25rem, 1rem + 2vw, 2.5rem);

  /* Shape: derived from the circular PL badge — pill controls, round corners */
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(26, 26, 26, 0.06);
  --shadow-md: 0 8px 24px -8px rgba(4, 52, 44, 0.22);
  --shadow-lg: 0 24px 60px -20px rgba(4, 52, 44, 0.3);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med: 320ms;

  color-scheme: light;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
svg.icon { width: 1.2em; height: 1.2em; flex: none; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  text-wrap: balance;
  color: var(--pl-carbon);
}
p { text-wrap: pretty; }

/* ---- Accessibility helpers ---- */
.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;
  left: 1rem;
  top: -3rem;
  background: var(--pl-teal);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top var(--dur-fast) var(--ease-out);
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}
:focus-visible {
  outline: 3px solid var(--pl-teal-light);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) { outline: none; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}
.section { padding-block: var(--section-pad); }
.section--tight { padding-block: calc(var(--section-pad) * 0.6); }
.section--dark { background: var(--surface-dark); color: var(--text-on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--pl-white); }
.section--mist { background: var(--surface-mist); }
.section--border-top { border-top: 1px solid var(--pl-border); }
.stack { display: flex; flex-direction: column; }
.grid { display: grid; gap: var(--space-6); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pl-teal);
}
.section--dark .eyebrow { color: var(--pl-teal-light); }
.eyebrow::before {
  content: '';
  width: 1.6em;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.section-head {
  max-width: 46rem;
  margin-bottom: var(--space-8);
}
.section-head h2 { font-size: var(--fs-h2); margin-top: var(--space-3); }
.section-head p { font-size: var(--fs-body-lg); color: var(--text-muted); margin-top: var(--space-4); }
.section--dark .section-head p { color: var(--text-on-dark-muted); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.95em 1.7em;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1;
  white-space: normal;
  transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--pl-teal);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--pl-teal-light); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--pl-white);
  border-color: var(--pl-border-on-dark);
}
.btn-ghost:hover { border-color: var(--pl-white); background: rgba(255,255,255,0.06); }
.btn-outline {
  background: transparent;
  color: var(--pl-carbon);
  border-color: var(--pl-border);
}
.btn-outline:hover { border-color: var(--pl-carbon); background: var(--pl-gray-soft); }
.btn-whatsapp {
  background: #1FA855;
  color: #fff;
}
.btn-whatsapp:hover { background: #189146; box-shadow: var(--shadow-md); }
.btn-lg { padding: 1.05em 2.1em; font-size: 1.0625rem; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--pl-border-on-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: 0.9rem;
}
.brand-lockup { display: flex; align-items: center; gap: 0.65rem; color: #fff; }
.brand-lockup svg { height: 34px; width: auto; }
.brand-lockup .brand-wordmark { display: flex; flex-direction: column; line-height: 1; }
.brand-lockup .brand-wordmark strong { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-lockup .brand-wordmark span { font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.22em; color: var(--pl-teal-light); margin-top: 2px; }

.primary-nav { display: flex; align-items: center; gap: var(--space-6); }
.primary-nav ul { display: flex; align-items: center; gap: var(--space-6); }
.primary-nav a {
  color: rgba(255,255,255,0.82);
  font-size: 0.9375rem;
  font-weight: 500;
  position: relative;
  padding-block: 0.3rem;
}
.primary-nav a:hover, .primary-nav a:focus-visible { color: #fff; }
.primary-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -2px;
  height: 2px;
  background: var(--pl-teal-light);
  transition: right var(--dur-med) var(--ease-out);
}
.primary-nav a:hover::after, .primary-nav a:focus-visible::after { right: 0; }
.header-cta { display: flex; align-items: center; gap: var(--space-4); }
.header-cta .btn { padding: 0.7em 1.3em; font-size: 0.9375rem; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  color: #fff;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--pl-carbon);
  color: #fff;
  overflow: hidden;
  min-height: min(48rem, 92vh);
  min-height: min(48rem, 92dvh);
  display: flex;
  align-items: center;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%; object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(10,10,10,0.94) 0%, rgba(10,10,10,0.78) 32%, rgba(10,10,10,0.4) 58%, rgba(10,10,10,0.62) 100%),
    linear-gradient(to top, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0) 26%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: var(--space-10) var(--space-9);
  max-width: 40rem;
}
.hero-inner .eyebrow { color: var(--pl-teal-light); }
.hero h1 {
  color: #fff;
  font-size: var(--fs-hero);
  letter-spacing: -0.01em;
  margin-top: var(--space-4);
}
.hero .lede {
  margin-top: var(--space-5);
  font-size: var(--fs-body-lg);
  color: rgba(255,255,255,0.82);
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}
.hero-signal {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  z-index: 1;
  opacity: 0.55;
}
.hero-signal path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: signal-draw 2.6s var(--ease-out) 0.4s forwards;
}
@keyframes signal-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-signal path { animation: none; stroke-dashoffset: 0; }
}

/* ---- Signal divider (signature motif) ---- */
.signal-divider { display: block; width: 100%; height: 48px; color: var(--pl-teal-light); opacity: 0.5; }
.signal-divider--dark { color: rgba(255,255,255,0.35); }

/* ---- Stats ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding-block: var(--space-8);
}
.stat { text-align: left; border-left: 2px solid var(--pl-teal); padding-left: var(--space-4); }
.stat .stat-value {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 3rem);
  font-weight: 500;
  color: var(--pl-carbon);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat .stat-label { margin-top: var(--space-2); color: var(--text-muted); font-size: var(--fs-small); }

/* ---- Service / cluster cards ---- */
.services-grid {
  grid-template-columns: repeat(5, 1fr);
}
.service-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
}
.service-card:hover, .service-card:focus-within {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.service-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: var(--pl-teal-mist);
  color: var(--pl-teal);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: var(--fs-h3); }
.service-card p { color: var(--text-muted); font-size: var(--fs-small); flex: 1; }
.service-card .service-list { margin-top: var(--space-2); display: flex; flex-direction: column; gap: 0.4rem; }
.service-card .service-list a {
  font-size: var(--fs-small);
  color: var(--pl-teal-deep);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.service-card .service-list a:hover { color: var(--pl-teal); text-decoration: underline; }
.service-card .card-link {
  margin-top: auto;
  font-weight: 600;
  color: var(--pl-teal);
  display: inline-flex; align-items: center; gap: 0.4em;
}
.service-card .card-link svg { width: 1em; height: 1em; transition: transform var(--dur-fast) var(--ease-out); }
.service-card:hover .card-link svg { transform: translateX(3px); }

/* ---- Case studies / before-after ---- */
.case-list { display: flex; flex-direction: column; gap: var(--space-8); }
.case-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.case-card:nth-child(even) { direction: rtl; }
.case-card:nth-child(even) > * { direction: ltr; }
.case-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--pl-carbon-soft); }
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pl-teal);
}
.case-card h3 { font-size: var(--fs-h2); margin-top: var(--space-3); }
.case-card p { margin-top: var(--space-4); color: var(--text-muted); font-size: var(--fs-body-lg); }
.case-result {
  margin-top: var(--space-5);
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  font-family: var(--font-mono);
  color: var(--pl-teal-deep);
  font-size: var(--fs-small);
}
.case-card .card-link { margin-top: var(--space-5); display: inline-flex; align-items: center; gap: 0.5em; font-weight: 600; color: var(--pl-teal); }

/* ---- Segments ---- */
.segments-grid { grid-template-columns: repeat(4, 1fr); }
.segment-card {
  background: var(--pl-carbon);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-med) var(--ease-out);
}
.segment-card:hover { transform: translateY(-4px); }
.segment-card h3 { color: #fff; font-size: var(--fs-h3); }
.segment-card p { margin-top: var(--space-2); color: var(--text-on-dark-muted); font-size: var(--fs-small); }

/* ---- Process ---- */
.process-list { grid-template-columns: repeat(4, 1fr); counter-reset: step; }
.process-step { position: relative; padding-top: var(--space-6); border-top: 1px solid var(--pl-border); }
.process-step .step-index {
  font-family: var(--font-mono);
  color: var(--pl-teal);
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
}
.process-step h3 { margin-top: var(--space-3); font-size: var(--fs-h3); }
.process-step p { margin-top: var(--space-2); color: var(--text-muted); font-size: var(--fs-small); }

/* ---- Brands marquee ----
   Typographic wordmark treatment (no third-party logo files bundled) —
   swap .brand-chip spans for <img> logos here if/when official brand
   assets are supplied. */
.brands-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.brands-track {
  display: flex;
  align-items: center;
  width: max-content;
  gap: var(--space-9);
  animation: brands-scroll 28s linear infinite;
}
.brands-marquee:hover .brands-track,
.brands-marquee:focus-within .brands-track {
  animation-play-state: paused;
}
.brand-chip {
  flex: none;
  display: flex;
  align-items: center;
  height: 34px;
}
.brand-chip img {
  height: 100%;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
}
.brand-chip:hover img,
.brand-chip:focus-within img {
  filter: grayscale(0);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .brand-chip img { transition: none; }
}
@keyframes brands-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brands-track { animation: none; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 640px) {
  .brands-track { gap: var(--space-7); animation-duration: 18s; }
  .brand-chip { height: 26px; }
}

/* ---- Testimonials ---- */
.testimonial-grid { grid-template-columns: repeat(3, 1fr); }
.testimonial-card {
  background: var(--surface-mist);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.testimonial-card blockquote { font-size: var(--fs-body-lg); color: var(--pl-teal-deep); margin: 0; }
.testimonial-author { display: flex; flex-direction: column; font-size: var(--fs-small); }
.testimonial-author strong { color: var(--pl-carbon); }
.testimonial-author span { color: var(--text-muted); }

/* ---- FAQ ---- */
.faq-list { max-width: 46rem; }
.faq-item { border-bottom: 1px solid var(--pl-border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { transition: transform var(--dur-med) var(--ease-out); flex: none; width: 20px; height: 20px; color: var(--pl-teal); }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item p { padding-bottom: var(--space-5); color: var(--text-muted); max-width: 40rem; }

/* ---- CTA band ---- */
.cta-band {
  background: var(--pl-teal-deep);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; font-size: var(--fs-h2); max-width: 28rem; }
.cta-band-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* ---- Contact ---- */
.contact-grid { grid-template-columns: 1fr 1fr; align-items: start; }
.contact-info-card {
  background: var(--pl-carbon);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}
.contact-info-card .eyebrow { color: var(--pl-teal-light); }
.contact-channel { display: flex; align-items: center; gap: var(--space-4); padding-block: var(--space-4); border-top: 1px solid var(--pl-border-on-dark); }
.contact-channel:first-of-type { border-top: none; margin-top: var(--space-6); }
.contact-channel .icon { width: 22px; height: 22px; color: var(--pl-teal-light); flex: none; }
.contact-channel a, .contact-channel span { font-size: 0.95rem; }
.contact-coverage { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--pl-border-on-dark); font-size: var(--fs-small); color: var(--text-on-dark-muted); }

/* ---- Forms (WPForms override) ---- */
.wpforms-container { max-width: 100%; }
.wpforms-container .wpforms-field-label {
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  color: var(--pl-carbon) !important;
  font-size: var(--fs-small) !important;
  margin-bottom: 0.4rem !important;
}
.wpforms-container input[type=text],
.wpforms-container input[type=email],
.wpforms-container input[type=tel],
.wpforms-container input[type=url],
.wpforms-container select,
.wpforms-container textarea {
  border: 1px solid var(--pl-border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.85em 1em !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  background: #fff !important;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.wpforms-container input:focus,
.wpforms-container select:focus,
.wpforms-container textarea:focus {
  border-color: var(--pl-teal) !important;
  box-shadow: 0 0 0 3px rgba(var(--pl-teal-rgb), 0.18) !important;
  outline: none !important;
}
.wpforms-container select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  height: auto !important;
  line-height: 1.5 !important;
  padding-right: 2.75em !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F5E5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.9em center !important;
  background-size: 16px !important;
  color: var(--pl-carbon) !important;
}
.wpforms-container select::-ms-expand { display: none; }
.wpforms-container button[type=submit] {
  background: var(--pl-teal) !important;
  border-radius: var(--radius-full) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  padding: 0.95em 1.9em !important;
  border: none !important;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out) !important;
}
.wpforms-container button[type=submit]:hover { background: var(--pl-teal-light) !important; transform: translateY(-2px); }
.wpforms-container .wpforms-error { color: var(--pl-error) !important; font-size: var(--fs-small) !important; }

/* ---- Footer ---- */
.site-footer { background: var(--pl-carbon); color: rgba(255,255,255,0.72); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-7);
  padding-block: var(--space-9);
  border-bottom: 1px solid var(--pl-border-on-dark);
}
.footer-brand .brand-lockup { margin-bottom: var(--space-4); }
.footer-brand p { max-width: 24rem; font-size: var(--fs-small); color: var(--text-on-dark-muted); }
.footer-col h4 { color: #fff; font-size: var(--fs-small); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-mono); font-weight: 500; margin-bottom: var(--space-4); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { font-size: 0.9375rem; color: var(--text-on-dark-muted); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5);
  font-size: var(--fs-small);
  flex-wrap: wrap;
}
.footer-social { display: flex; gap: var(--space-4); }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--pl-border-on-dark); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { border-color: var(--pl-teal-light); color: var(--pl-teal-light); }
.footer-social svg { width: 17px; height: 17px; }

/* ---- WhatsApp floating button ---- */
.wa-float {
  position: fixed;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #1FA855;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; }

/* ---- Generic page hero (inner pages) ---- */
.page-hero { background: var(--pl-carbon); color: #fff; padding-block: var(--space-9) var(--space-8); }
.page-hero h1 { color: #fff; font-size: var(--fs-h1); margin-top: var(--space-3); }
.page-hero p { margin-top: var(--space-4); color: var(--text-on-dark-muted); font-size: var(--fs-body-lg); max-width: 42rem; }
.breadcrumbs { font-size: var(--fs-small); color: var(--text-on-dark-muted); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs span[aria-hidden] { margin-inline: 0.5em; opacity: 0.5; }

/* ---- Filters (proyectos) ---- */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-8); }
.filter-bar a {
  padding: 0.55em 1.1em;
  border-radius: var(--radius-full);
  border: 1px solid var(--pl-border);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--text-muted);
}
.filter-bar a:hover { border-color: var(--pl-teal); color: var(--pl-teal-deep); }
.filter-bar a[aria-current="true"] { background: var(--pl-carbon); border-color: var(--pl-carbon); color: #fff; }

.proyectos-grid { grid-template-columns: repeat(3, 1fr); }
.proyecto-card { border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--pl-border); transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.proyecto-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.proyecto-card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--pl-carbon-soft); }
.proyecto-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.proyecto-card:hover .thumb img { transform: scale(1.05); }
.proyecto-card .body { padding: var(--space-5); }
.proyecto-card .case-tag { display: block; margin-bottom: var(--space-2); }
.proyecto-card h3 { font-size: 1.1rem; }
.proyecto-card p { margin-top: var(--space-2); color: var(--text-muted); font-size: var(--fs-small); }

/* ---- Proyecto gallery ---- */
.proyecto-galeria {
  grid-template-columns: repeat(3, 1fr);
  margin-top: var(--space-6);
}
.proyecto-galeria .case-media { border-radius: var(--radius-md); overflow: hidden; }
@media (max-width: 780px) {
  .proyecto-galeria { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .proyecto-galeria { grid-template-columns: 1fr; }
}

/* ---- Servicio single ---- */
.servicio-body { grid-template-columns: 2fr 1fr; align-items: start; }
.servicio-content h2 { font-size: var(--fs-h3); margin-top: var(--space-7); }
.servicio-content h2:first-child { margin-top: 0; }
.servicio-content p { margin-top: var(--space-4); color: var(--text-muted); }
.servicio-content ul { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.servicio-content ul li {
  position: relative;
  padding-left: 1.6em;
  color: var(--text-muted);
}
.servicio-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pl-teal);
}
.servicio-sidebar { position: sticky; top: 6.5rem; background: var(--surface-mist); border-radius: var(--radius-lg); padding: var(--space-6); }
.servicio-sidebar h3 { font-size: var(--fs-h3); }
.servicio-sidebar ul { margin-top: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.servicio-sidebar a { font-size: var(--fs-small); color: var(--pl-teal-deep); }
.servicio-sidebar a[aria-current="true"] { font-weight: 700; color: var(--pl-teal); }
.servicio-sidebar .btn { margin-top: var(--space-6); width: 100%; }

/* ---- Utility ---- */
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0 !important; }
.visually-hidden-focusable:not(:focus):not(:focus-within) { @extend .sr-only; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .segments-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .proyectos-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1.2fr 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-7); }
}
@media (max-width: 780px) {
  .case-card { grid-template-columns: 1fr; }
  .case-card:nth-child(even) { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .servicio-body { grid-template-columns: 1fr; }
  .servicio-sidebar { position: static; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; text-align: left; }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .segments-grid, .process-list, .testimonial-grid, .proyectos-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: var(--space-6); }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .hero-inner { padding-block: var(--space-8) var(--space-7); }
  .wa-float { width: 52px; height: 52px; right: var(--space-4); bottom: var(--space-4); }
}

/* ---- Cookie consent banner ---- */
.cookie-banner {
  position: fixed;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 120;
  max-width: 34rem;
  background: var(--pl-carbon);
  color: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  border: 1px solid var(--pl-border-on-dark);
  transform: translateY(0);
  transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-leaving { transform: translateY(1rem); opacity: 0; }
.cookie-banner-text strong { font-size: 0.9375rem; }
.cookie-banner-text p { margin-top: 0.35rem; font-size: var(--fs-small); color: var(--text-on-dark-muted); }
.cookie-banner-text a { color: var(--pl-teal-light); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: var(--space-3); }
.cookie-banner-actions .btn { flex: 1; padding: 0.7em 1em; font-size: 0.9rem; }
.cookie-banner .btn-outline { color: #fff; border-color: var(--pl-border-on-dark); }
.cookie-banner .btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; }
@media (max-width: 480px) {
  .cookie-banner { left: var(--space-4); right: var(--space-4); bottom: var(--space-4); max-width: none; }
}

/* ---- Mobile nav drawer ---- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--pl-carbon);
  color: #fff;
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease-out);
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; }
.mobile-nav-close {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: none;
}
.mobile-nav-close svg { width: 22px; height: 22px; }
.mobile-nav ul { margin-top: var(--space-8); display: flex; flex-direction: column; gap: var(--space-6); }
.mobile-nav a { color: #fff; font-size: 1.5rem; font-weight: 600; }
.mobile-nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--space-4); }
body.nav-open { overflow: hidden; }
