/*
 * Grisel Digital · site stylesheet (GR 04.4B)
 *
 * Shared by every page of the site.
 *
 * Breakpoints (mobile-first):
 *   40em (~640px)  tablet
 *   48em (~768px)  three-column service cards
 *   60em (~960px)  desktop (horizontal navigation; below this the JS hamburger menu applies)
 *
 * Contrast notes (WCAG 2.2 AA):
 *   - White on Primary Purple (#5B3FD6) and on Digital Blue (#2563EB) passes 4.5:1.
 *   - White on Accent Purple (#8B5CF6) does NOT pass 4.5:1 for small text, so
 *     Accent Purple is used only for decorative elements, never for text.
 *   - Form field borders use Secondary Text (#475569) to meet 3:1 non-text contrast.
 */

/* ---------- Fonts (self-hosted) ----------
 * Inter 400/500/600 and Manrope 700/800, latin subset, WOFF2. Same files Google Fonts
 * serves (v20), hosted locally so no page contacts a third-party font service.
 * Licensed under the SIL Open Font License 1.1: see /assets/fonts/OFL-*.txt. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter-v20-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/inter-v20-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter-v20-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/manrope-v20-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-v20-latin-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  /* Approved Grisel Digital palette */
  --color-primary: #5B3FD6;
  --color-blue: #2563EB;
  --color-accent: #8B5CF6;
  --color-text: #111827;
  --color-text-secondary: #475569;
  --color-bg-light: #F8FAFC;
  --color-white: #FFFFFF;
  --color-border: #E2E8F0;

  /* Form error state (contact form). #B42318 on white is 6.6:1; on --color-error-bg 6.1:1. */
  --color-error: #B42318;
  --color-error-bg: #FEF3F2;

  /* Official platform colors, used only on social icons (owner decision 2026-10-18).
   * Instagram uses its official gradient inside the footer SVG itself. */
  --color-whatsapp: #25D366;
  --color-linkedin: #0A66C2;
  --color-facebook: #1877F2;

  /* Derived state (restrained): darker primary for hover */
  --color-primary-hover: #4B32B8;

  --gradient-brand: linear-gradient(135deg, var(--color-primary), var(--color-blue));

  --font-heading: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.5rem;

  /* Handshake read by assets/js/navigation.js. The script only enables the
   * collapsed mobile menu when it sees this value, i.e. when this version of
   * the stylesheet (with the toggle rules) is actually applied. If a stale
   * stylesheet is served, the value is missing and the navigation safely stays
   * visible instead of showing an unstyled, non-functional button. */
  --nav-enhance: 1;

  --container-width: 70rem;
  --gutter: 1rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem);
  font-weight: 800;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--color-primary);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-primary-hover);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="-1"]:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 3px;
}

.container {
  width: min(100% - (var(--gutter) * 2), var(--container-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  color: var(--color-primary);
  font-weight: 600;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: var(--gutter);
}

main:focus {
  outline: none;
}

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 20;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

/* Mobile-first: brand + menu toggle share the first row, navigation below.
 * From 60em the header becomes a single flex row (brand, navigation). */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-block: 0.75rem;
}

.brand {
  grid-column: 1;
  grid-row: 1;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-decoration: none;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.brand:hover {
  color: var(--color-primary);
}

/* Approved primary logo (Evolving G + "Grisel Digital"): the image's alt text is the link's accessible name */
.brand-logo {
  display: block;
  width: auto;
  height: 2.5rem;
}

@media (min-width: 60em) {
  .brand-logo {
    height: 2.75rem;
  }
}

.site-nav {
  grid-column: 1 / -1;
  grid-row: 3;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  color: var(--color-text);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.nav-list a:hover {
  color: var(--color-primary);
}

/* Current page is indicated by underline (not by color alone) */
.nav-list a[aria-current="page"] {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* ---------- Mobile navigation toggle (GR 04.4C) ----------
 * Progressive enhancement: the toggle only exists when navigation.js has added
 * the `js` class to <html>. Without JavaScript the navigation simply stays
 * visible and wraps (rules above). Below 60em the JS layout collapses it into
 * a dropdown panel; from 60em the desktop navigation is always visible.
 */
.nav-toggle {
  display: none;
}

/* The button ships with the `hidden` attribute (so it never shows unstyled if this
 * stylesheet is stale or missing). The script removes `hidden` only when the enhanced
 * menu is active; `.js .nav-toggle` below then controls its display. */
.js .nav-toggle {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  align-items: center;
  gap: 0.6rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  color: var(--color-primary);
  background: var(--color-white);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  /* Remove native button chrome (notably iOS Safari) and double-tap delay */
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.js .nav-toggle:hover {
  color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

/* Hamburger icon: three bars drawn with CSS (decorative; the button has a text label) */
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -6px;
}

.nav-toggle-icon::after {
  top: 6px;
}

/* Open state: bars become a close (X) */
.nav-toggle.is-open .nav-toggle-icon {
  background: transparent;
}

.nav-toggle.is-open .nav-toggle-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Collapsed dropdown panel (mobile / tablet, JS enabled) */
.js .site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 0.25rem var(--gutter) 1rem;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.5rem);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

.js .site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.js .nav-list {
  flex-direction: column;
  gap: 0;
}

.js .nav-list a {
  width: 100%;
  min-height: 3rem;
  padding: 0 0.5rem;
  font-size: 1.05rem;
  border-radius: 0;
}

.js .nav-list li + li a {
  border-top: 1px solid var(--color-border);
}

@media (min-width: 60em) {
  /* Desktop header: one flex row (brand, label, navigation) */
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }

  .site-nav {
    margin-left: auto;
  }

  /* Desktop: hide the toggle, restore the always-visible horizontal navigation */
  .js .nav-toggle {
    display: none;
  }

  .js .site-nav {
    position: static;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .nav-list {
    flex-direction: row;
    gap: 0 0.25rem;
  }

  .js .nav-list a {
    width: auto;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  .js .nav-list li + li a {
    border-top: 0;
  }
}

/* ---------- Services submenu (disclosure navigation) ----------
 * GR-04-site-information-architecture.md, Section E. "Servicios" is a link to the hub;
 * the separate .nav-sub-toggle button (revealed by navigation.js) opens the submenu:
 * an inline list inside the mobile menu, a dropdown panel on desktop. Without the
 * enhancement, the submenu opens on focus within the item (keyboard) or hover, and the
 * Services Hub links to every service page.
 */
.nav-item-has-sub {
  position: relative;
}

.nav-sub-toggle {
  display: none;
}

.nav-sublist {
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-sublist a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

/* Section that contains the current page (aria-current marks the page itself) */
.nav-list a.is-current-section {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* No enhancement: open on keyboard focus within the item, or on hover */
html:not(.js) .nav-item-has-sub:focus-within > .nav-sublist,
html:not(.js) .nav-item-has-sub:hover > .nav-sublist {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 30;
  display: block;
  min-width: 17rem;
  padding: 0.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
}

/* Enhanced, mobile/tablet: inline expandable list inside the menu panel */
.js .nav-item-has-sub {
  display: grid;
  grid-template-columns: 1fr auto;
}

.js .nav-sub-toggle:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  min-height: 3rem;
  margin: 0;
  padding: 0;
  color: var(--color-text);
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.js .nav-list > li + li > .nav-sub-toggle {
  border-top: 1px solid var(--color-border);
}

.js .nav-sub-toggle:hover {
  color: var(--color-primary);
}

/* Chevron (decorative): points down when closed, up when open */
.nav-sub-icon {
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-sub-toggle[aria-expanded="true"] .nav-sub-icon {
  transform: translateY(25%) rotate(-135deg);
}

.js .nav-item-has-sub.is-sub-open > .nav-sublist {
  display: block;
  grid-column: 1 / -1;
  padding: 0 0 0.25rem 1rem;
}

.js .nav-list .nav-sublist a {
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.5rem;
  font-size: 1rem;
  border-top: 1px solid var(--color-border);
}

@media (min-width: 60em) {
  /* Enhanced, desktop: dropdown panel below the item */
  .js .nav-item-has-sub {
    display: flex;
    align-items: center;
  }

  .js .nav-item-has-sub > a {
    padding-right: 0.25rem;
  }

  .js .nav-sub-toggle:not([hidden]) {
    width: 2rem;
    min-height: 2.75rem;
    border-radius: var(--radius-sm);
  }

  .js .nav-list > li + li > .nav-sub-toggle {
    border-top: 0;
  }

  .js .nav-item-has-sub.is-sub-open > .nav-sublist {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    z-index: 30;
    width: max-content;
    min-width: 17rem;
    padding: 0.5rem;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 24px rgba(17, 24, 39, 0.08);
  }

  .js .nav-list .nav-sublist a {
    flex-wrap: nowrap;
    padding: 0.35rem 0.75rem;
    font-size: 0.975rem;
    border-top: 0;
    border-radius: var(--radius-sm);
  }

  .js .nav-list .nav-sublist a:hover {
    background: var(--color-bg-light);
  }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-white);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-bg-light);
  color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-on-dark {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn-on-dark:hover {
  background: var(--color-bg-light);
  color: var(--color-primary-hover);
}

.btn-on-dark:focus-visible {
  outline-color: var(--color-white);
}

.cta-group {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

@media (min-width: 30em) {
  .cta-group {
    display: flex;
    flex-wrap: wrap;
  }
}

/* Subordinate navigation link (visually below the Hero / Final CTA) */
.text-link {
  display: inline-block;
  padding: 0.6rem 0;
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3rem, 2rem + 5vw, 5.5rem);
}

.section-alt {
  background: var(--color-bg-light);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 2rem;
}

.section-head p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.lead {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 40rem;
}

/* ---------- Hero ---------- */
.hero {
  overflow: clip;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5rem);
  background:
    radial-gradient(48rem 24rem at 90% 0%, rgba(139, 92, 246, 0.14), transparent 65%),
    var(--color-white);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  width: min(100%, 24rem);
  margin-inline: auto;
}

/* Decorative depth panel behind the portrait slot (no semantics) */
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0.75rem -0.75rem -0.75rem 0.75rem;
  z-index: -1;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  opacity: 0.12;
}

.identifier {
  margin: 1rem 0 0;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-secondary);
  text-align: center;
}

/* Homepage hero business illustration (SVG, 4:3); sits on the decorative depth panel above */
.hero-illustration {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

/* Approved portrait of Grisel Rojas (4:5): homepage About section and /sobre-grisel/ only */
.portrait {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

@media (min-width: 60em) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
  }

  .hero-visual {
    width: 100%;
    margin-inline: 0;
  }
}

/* ---------- Cards (Core Services and /servicios/) ---------- */
.card-grid {
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.card-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.card p:last-child {
  margin-bottom: 0;
  color: var(--color-text-secondary);
}

.section-cta {
  margin: 1.5rem 0 0;
}

@media (min-width: 48em) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* ---------- Value Proposition: connected concepts ---------- */
.flow {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.flow-step {
  position: relative;
  padding-left: 4rem;
  counter-increment: step;
}

/* Step numeral badge: decorative repeat of the list numbering */
.flow-step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-white);
  background: var(--gradient-brand);
  border-radius: 50%;
}

/* Vertical connector (mobile / tablet) */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 3rem;
  bottom: -1.75rem;
  left: 1.3rem;
  width: 2px;
  background: var(--color-border);
}

.flow-step p:last-child {
  margin-bottom: 0;
  color: var(--color-text-secondary);
}

@media (min-width: 60em) {
  .flow {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .flow-step {
    padding-left: 0;
    padding-top: 4rem;
  }

  /* Horizontal connector (desktop) */
  .flow-step:not(:last-child)::after {
    top: 1.3rem;
    bottom: auto;
    left: 3.5rem;
    right: -2.25rem;
    width: auto;
    height: 2px;
  }
}

/* Stacked variant: keeps the vertical numbered layout at every width (for more than three steps) */
@media (min-width: 60em) {
  .flow-stacked {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 46rem;
  }

  .flow-stacked .flow-step {
    padding-top: 0;
    padding-left: 4rem;
  }

  .flow-stacked .flow-step:not(:last-child)::after {
    top: 3rem;
    bottom: -1.75rem;
    left: 1.3rem;
    right: auto;
    width: 2px;
    height: auto;
  }
}

/* ---------- Trust ---------- */
.principles {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.principles li {
  padding: 1.1rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.trust-note {
  max-width: 46rem;
  margin: 2rem 0 0;
  padding: 1rem 1.25rem;
  color: var(--color-text-secondary);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

@media (min-width: 40em) {
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 60em) {
  .principles {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.about-copy {
  max-width: 40rem;
}

.about-visual {
  width: min(100%, 18rem);
  margin-inline: auto;
}

@media (min-width: 60em) {
  .about-grid {
    grid-template-columns: 1.3fr 0.7fr;
    gap: 4rem;
  }

  .about-visual {
    width: 100%;
    margin-inline: 0;
  }
}

/* ---------- Final CTA ---------- */
.cta-final {
  padding-block: clamp(3.5rem, 2rem + 6vw, 6rem);
  color: var(--color-white);
  text-align: center;
  background: var(--gradient-brand);
}

.cta-final h2 {
  color: var(--color-white);
}

.cta-final p {
  max-width: 36rem;
  margin-inline: auto;
  color: var(--color-white);
}

.cta-final .btn {
  margin-top: 0.75rem;
}

/* ---------- Inner pages (/servicios/, /contacto/) ---------- */
.page-hero {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  background:
    radial-gradient(40rem 20rem at 95% 0%, rgba(139, 92, 246, 0.12), transparent 65%),
    var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
}

.page-hero .lead {
  margin-bottom: 0;
}

/* Text + one supporting visual (about 60/40 from 60em): /servicios/ relationship section and homepage Value Proposition */
.relationship-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.relationship-visual {
  width: 100%;
  max-width: 32rem;
}

.relationship-visual img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

@media (min-width: 60em) {
  .relationship-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 3.5rem;
  }

  .relationship-visual {
    max-width: none;
  }
}

/* Inner-page hero with thematic illustration: stacked on mobile, text + visual from 60em */
.page-hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.page-hero-visual {
  width: 100%;
  max-width: 28rem;
}

.page-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

@media (min-width: 60em) {
  .page-hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }

  .page-hero-visual {
    max-width: none;
  }
}

.cta-band {
  padding-block: clamp(2.5rem, 2rem + 3vw, 4rem);
  text-align: center;
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
}

.cta-band .btn {
  margin: 0;
}

/* ---------- Breadcrumb (service pages, blog) ---------- */
.breadcrumb {
  margin: 0 0 1rem;
  font-size: 0.875rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-text-secondary);
}

/* Separator is decorative; the ordered list conveys the hierarchy */
.breadcrumb li + li::before {
  content: "›";
  content: "›" / "";
  margin-right: 0.5rem;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.breadcrumb [aria-current="page"] {
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- Content pages (Services Hub, service pages, blog) ---------- */
.content-narrow {
  max-width: 46rem;
}

/* Bulleted list with a decorative brand dot */
.check-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0.25rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--color-primary);
  border-radius: 50%;
}

@media (min-width: 48em) {
  .check-list-2col {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 2rem;
  }
}

.card .card-link {
  margin: 1rem 0 0;
}

/* Small decorative service identifier at the top of a homepage service card (the title names the service) */
.card-icon {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 0 1rem;
}

.card .card-link a {
  font-weight: 600;
}

.card-grid-2 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48em) {
  .card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

.cta-band h2 {
  margin-bottom: 0.75rem;
}

.cta-band p {
  max-width: 38rem;
  margin-inline: auto;
}

.cta-band p:last-child {
  margin-bottom: 0;
}

/* Honest empty state (no published articles yet) */
.empty-state {
  max-width: 46rem;
  padding: 1.5rem;
  background: var(--color-white);
  border: 1px dashed var(--color-text-secondary);
  border-radius: var(--radius-md);
}

.empty-state h2 {
  font-size: 1.25rem;
}

.empty-state p:last-child {
  margin-bottom: 0;
}

/* Blog: article list and article layout (docs/templates/blog-article.html) */
.post-list {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Blog index card: the article's featured illustration (decorative) + text.
 * Stacked on mobile; image about one third, text two thirds from 48em. The title link is
 * the only link and is stretched over the card; hover changes only the outline (no movement). */
.post-card {
  position: relative;
  display: grid;
  gap: 1.25rem;
}

.post-card-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.post-card .card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
}

.post-card:hover {
  box-shadow: 0 0 0 1px var(--color-accent);
}

@media (min-width: 48em) {
  .post-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 1.75rem;
    align-items: center;
  }
}

.article-meta {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

/* Article byline with a small decorative author avatar (the name is in the text) */
.article-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 3px var(--color-border);
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose h3 {
  margin-top: 2rem;
}

.prose ul:not(.check-list) {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.6rem;
}

/* Featured article illustration: self-hosted SVG (1200x630), same width as the article text */
.article-figure {
  max-width: 46rem;
  margin: 0 0 2.5rem;
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.related-service {
  max-width: 46rem;
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-bg-light);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
}

.related-service p:last-child {
  margin-bottom: 0;
}

/* ---------- Contact form ---------- */
.form-card {
  max-width: 40rem;
  padding: 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-text-secondary);
  border-radius: var(--radius-sm);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
  border-color: var(--color-blue);
}

/* Visible form notice (text, not color alone) */
.form-notice {
  display: inline-block;
  margin: 1rem 0 0;
  padding: 0.5rem 0.9rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-light);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
}

/* ---------- Contact form states ----------
 * Server-rendered by /contacto/ (contacto/index.php). The form works without JavaScript;
 * assets/js/contact-form.js only moves focus to the error summary and guards against
 * double submission. */
.form-intro {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.field-optional {
  font-weight: 500;
  color: var(--color-text-secondary);
}

.form-status {
  display: block;
  margin: 0 0 1.5rem;
}

.form-errors {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  color: var(--color-text);
  background: var(--color-error-bg);
  border: 2px solid var(--color-error);
  border-radius: var(--radius-sm);
}

.form-errors-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-error);
}

.form-errors ul {
  margin: 0;
  padding-left: 1.25rem;
}

.form-errors a {
  color: var(--color-error);
  font-weight: 600;
}

.field-error {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-error);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border: 2px solid var(--color-error);
}

.form-privacy {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

/* Required Privacy Policy acknowledgement checkbox. 24px control (WCAG 2.2 target size),
 * label beside it; the label is also clickable. */
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.field .checkbox-row input[type="checkbox"] {
  flex: none;
  width: 1.5rem;
  min-height: 0;
  height: 1.5rem;
  margin: 0.05rem 0 0;
  padding: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.field .checkbox-row input[type="checkbox"][aria-invalid="true"] {
  box-shadow: 0 0 0 2px var(--color-error);
}

.field .checkbox-row label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

.form-card .btn[disabled] {
  cursor: progress;
  opacity: 0.75;
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). The wrapper is
 * aria-hidden and the input has tabindex="-1", so it is outside the keyboard and
 * screen-reader flow. */
.form-trap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-card .btn {
  width: 100%;
}

@media (min-width: 30em) {
  .form-card .btn {
    width: auto;
  }
}

@media (min-width: 40em) {
  .form-card {
    padding: 2rem;
  }
}

/* ---------- Contact page layout (/contacto/) ----------
 * Form and direct-contact panel: one column below 60em, two columns (form wider) from 60em.
 * GR-04-contact-form-architecture.md, Section 10A. */
.contact-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.contact-layout > * {
  width: 100%;
  max-width: 44rem;
  min-width: 0;
}

.form-card-title,
.contact-panel-title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}

/* Optional phone: legend styled as a field label; prefix selector and number stacked below 30em,
 * side by side from 30em with the selector narrower than the number. */
.field-phone {
  min-width: 0;
  margin-inline: 0;
  padding: 0;
  border: 0;
}

.field-phone legend {
  margin-bottom: 0.4rem;
  padding: 0;
  font-weight: 600;
}

.field-hint {
  margin: -0.2rem 0 0.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.phone-row {
  display: grid;
  gap: 0.5rem;
}

.field select {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 2.5rem 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 0.85rem center / 1rem;
  border: 1px solid var(--color-text-secondary);
  border-radius: var(--radius-sm);
  appearance: none;
  text-overflow: ellipsis;
  cursor: pointer;
}

.field select:focus-visible {
  border-color: var(--color-blue);
}

.field select[aria-invalid="true"] {
  border: 2px solid var(--color-error);
}

@media (min-width: 30em) {
  .phone-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

.field textarea::placeholder {
  /* #64748B on white is 4.8:1 */
  color: #64748B;
  opacity: 1;
}

.contact-panel {
  padding: 1.5rem;
  background:
    radial-gradient(24rem 14rem at 100% 0%, rgba(139, 92, 246, 0.1), transparent 70%),
    var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
}

.contact-details {
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.contact-details dt {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.contact-details dd {
  margin: 0.15rem 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-whatsapp {
  padding-block: 1.25rem;
  border-block: 1px solid var(--color-border);
}

.contact-whatsapp h3 {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
}

.contact-whatsapp p {
  color: var(--color-text-secondary);
}

.btn-whatsapp {
  gap: 0.5rem;
  width: 100%;
  padding-inline: 0.75rem;
}

.btn-icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
}

.contact-assurance {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

@media (min-width: 40em) {
  .contact-panel {
    padding: 2rem;
  }
}

@media (min-width: 60em) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 2.5rem;
  }

  .contact-layout > * {
    max-width: none;
  }
}

/* ---------- Legal pages (aviso legal, privacidad, cookies) ---------- */
.legal-doc {
  max-width: 46rem;
}

.legal-doc h2 {
  margin-top: 2.5rem;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.legal-doc ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc li + li {
  margin-top: 0.35rem;
}

.legal-data {
  margin: 0 0 1rem;
  border-top: 1px solid var(--color-border);
}

.legal-data > div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.legal-data dt {
  font-weight: 600;
}

.legal-data dd {
  margin: 0;
}

.legal-status {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.55rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  vertical-align: middle;
  color: var(--color-text);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  white-space: nowrap;
}

.legal-status-active {
  border-color: var(--color-primary);
}

@media (min-width: 40em) {
  .legal-data > div {
    grid-template-columns: 14rem 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  color: var(--color-border);
  background: var(--color-text);
}

.footer-inner {
  display: grid;
  gap: 1.5rem;
  padding-block: 2.5rem 1.5rem;
}

.footer-brand {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-white);
}

/* Approved light logo on the dark footer. Its own background (about #061123) is darker than the
 * footer (#111827) in every channel, so "lighten" resolves it to the footer colour: no visible box. */
.footer-logo {
  display: inline-flex;
  margin: 0 0 0.5rem;
}

.footer-logo img {
  display: block;
  width: auto;
  height: 2.5rem;
  mix-blend-mode: lighten;
}

.footer-tagline {
  margin: 0;
  color: var(--color-border);
}

/* ---------- Footer channels (social + WhatsApp) ---------- */
.footer-whatsapp {
  margin-top: 0.85rem;
}

.footer-group-label {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-border);
}

.footer-social-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-channel {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.7rem;
  color: var(--color-border);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(226, 232, 240, 0.35);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.2;
}

.footer-channel-icon {
  display: inline-flex;
  flex: none;
  color: var(--color-border);
}

.footer-channel-icon svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
}

/* Social icons in their platform color (the icon only; text, border and hover stay as they are).
 * Matched by the verified URL, so every footer and the contact page share one rule. The icon is
 * decorative: the visible platform name identifies each link. */
.footer-channel-link[href^="https://wa.me/"] .footer-channel-icon,
.btn-whatsapp .btn-icon {
  color: var(--color-whatsapp);
}

.footer-channel-link[href*="linkedin.com/"] .footer-channel-icon {
  color: var(--color-linkedin);
}

.footer-channel-link[href*="facebook.com/"] .footer-channel-icon {
  color: var(--color-facebook);
}

.footer-channel-name {
  font-weight: 600;
  color: var(--color-white);
}

/* Channel link (verified URL): same chip, with a solid border instead of the base dashed border */
.footer-channel-link {
  min-height: 2.25rem;
  text-decoration: none;
  border-style: solid;
}

.footer-channel-link:hover {
  border-color: rgba(226, 232, 240, 0.7);
  background: rgba(255, 255, 255, 0.08);
}

/* Text for assistive technology only (for example "opens in a new tab") */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.5rem;
  color: var(--color-white);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.footer-nav a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline-color: var(--color-white);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-block: 1rem 1.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.25);
}

/* Legal navigation: secondary to .footer-nav (smaller, muted), but ordinary,
 * discoverable text links (GR-04-legal-privacy-cookie-architecture.md, Section 11). */
.footer-legal-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  font-size: 0.875rem;
  color: var(--color-border);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.footer-legal-nav a:hover,
.footer-legal-nav a[aria-current="page"] {
  color: var(--color-white);
  text-decoration: underline;
}

.footer-legal {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-border);
}

@media (min-width: 48em) {
  .footer-inner {
    /* Floor on the identity column: the auto columns would otherwise take its space at tablet widths. */
    grid-template-columns: minmax(15rem, 1.2fr) auto auto;
    column-gap: 3rem;
    align-items: start;
  }

  .footer-bottom {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 2rem;
  }
}

/* ---------- Mobile alignment (below 48em) ----------
 * Convention (GR-04-site-information-architecture.md, Mobile alignment convention): the visual
 * composition is centered on mobile; long-form reading content (article and legal bodies, long
 * paragraphs, lists) and form internals (labels, inputs, errors) stay left-aligned. The query mirrors
 * the existing 48em layout breakpoint, so tablet and desktop rules (48em and up) are untouched. */
@media (max-width: 47.99em) {
  /* Header: centered logo between the menu toggle and an equal spacer.
   * The toggle shows only its icon here; its accessible name stays on aria-label. */
  .header-inner {
    grid-template-columns: 3rem minmax(0, 1fr) 3rem;
  }

  .brand {
    grid-column: 2;
    justify-self: center;
  }

  .js .nav-toggle {
    grid-column: 3;
    justify-content: center;
    width: 3rem;
    padding: 0;
  }

  .nav-toggle-text {
    display: none;
  }

  /* Without JavaScript the navigation stays visible and wraps: center its rows */
  .nav-list {
    justify-content: center;
  }

  /* Menu panel: centered entries; the Servicios link is offset by the submenu button's width so its
   * label sits on the same axis as the others. */
  .js .nav-list a {
    justify-content: center;
    text-align: center;
  }

  .js .nav-item-has-sub > a {
    padding-left: 3.5rem;
  }

  .js .nav-item-has-sub.is-sub-open > .nav-sublist {
    padding-left: 0;
  }

  /* Heroes, section heads and short copy */
  .page-hero .container,
  .hero-copy,
  .section-head,
  .principles li,
  .trust-note,
  .card,
  .flow-step,
  .about-copy,
  .contact-panel,
  .form-card-title,
  .section-cta {
    text-align: center;
  }

  .lead,
  .section-head,
  .trust-note,
  .content-narrow,
  .prose,
  .legal-doc,
  .article-figure,
  .related-service,
  .page-hero-visual,
  .relationship-visual {
    margin-inline: auto;
  }

  .breadcrumb ol,
  .cta-group,
  .article-byline {
    justify-content: center;
  }

  /* Long reading content stays left-aligned inside its centered container */
  .about-copy p:not(.eyebrow):not(.lead):not(.section-cta),
  .content-narrow,
  .check-list,
  .prose,
  .legal-doc,
  .related-service {
    text-align: left;
  }

  /* Article byline: avatar above the centered byline text */
  .article-byline {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Card icons */
  .card-icon {
    margin-inline: auto;
  }

  /* Numbered steps: badge centered above the text, as on desktop; the connector is dropped
   * because a vertical line would cross the centered text. */
  .flow-step,
  .flow-stacked .flow-step {
    padding-left: 0;
    padding-top: 3.75rem;
  }

  .flow-step::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .flow-step:not(:last-child)::after {
    display: none;
  }

  /* Contact: reassurance list centered as a block, items still left-aligned; submit centered */
  .contact-assurance {
    width: fit-content;
    margin-inline: auto;
  }

  .form-card .btn {
    display: flex;
    margin-inline: auto;
  }

  /* Footer: every group centered; social chips stacked on the same axis */
  .footer-inner,
  .footer-bottom {
    text-align: center;
  }

  .footer-social-list,
  .footer-bottom {
    align-items: center;
  }

  .footer-nav ul,
  .footer-legal-nav ul {
    justify-content: center;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after,
  .js .site-nav {
    transition: none;
  }
}
