/* =========================================================
   CYA Consultores & Auditores Generales S.A.C.
   ========================================================= */

:root {
  /* Brand */
  --navy-950: #00122f;
  --navy-900: #001a42;
  --navy-800: #00255c;           /* logo navy */
  --navy-700: #0b3577;
  --blue-600: #1d5bd6;           /* primary action */
  --blue-700: #1649b0;
  --blue-50:  #eef3fc;
  --gray-logo: #6b6b6b;          /* logo gray */

  /* Neutrals */
  --ink: #0e1b33;
  --text: #2c3a52;
  --muted: #5b677c;
  --line: #e2e8f1;
  --surface: #f5f7fb;
  --white: #ffffff;

  /* Feedback */
  --success: #137a4b;
  --error: #b42318;

  /* Type */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Libre Baskerville", Georgia, "Times New Roman", serif;

  /* Layout */
  --container: 1760px;
  --gutter: clamp(16px, 3vw, 40px);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --header-h: 76px;

  --shadow-card: 0 1px 2px rgba(0, 26, 66, .06), 0 8px 24px rgba(0, 26, 66, .07);
  --shadow-float: 0 24px 60px rgba(0, 18, 47, .28);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 16px; height: 16px; }
.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: 16px; top: -60px; z-index: 1000;
  background: var(--navy-800); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  cursor: pointer; touch-action: manipulation;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--blue-600); color: var(--white); }
.btn-primary:hover { background: var(--blue-700); }
.btn-navy { background: var(--navy-800); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline-light { border-color: rgba(255, 255, 255, .85); color: var(--white); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); border-color: var(--white); }
.btn-light { background: var(--white); color: var(--navy-800); }
.btn-light:hover { background: var(--blue-50); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-800); }
.brand img { width: 54px; height: auto; }
.brand-name {
  font-family: var(--font-brand); font-weight: 700;
  font-size: 12.5px; line-height: 1.3; letter-spacing: .02em; text-transform: uppercase;
}
.brand-name span { display: block; }

.main-nav { display: flex; align-items: center; gap: 36px; }
.nav-list { display: flex; gap: 28px; }
.nav-list a {
  position: relative; display: inline-block; padding: 8px 0;
  font-size: 14.5px; font-weight: 500; color: var(--text);
  transition: color .2s var(--ease);
}
.nav-list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--navy-800); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-list a:hover { color: var(--navy-800); }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--navy-800); font-weight: 700; }
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.header-cta { min-height: 44px; padding: 10px 20px; font-size: 14px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--navy-800); cursor: pointer;
}

/* ---------- Eyebrow / headings ---------- */
.eyebrow {
  display: block; margin-bottom: 12px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue-600);
}
.on-dark .eyebrow, .eyebrow.on-dark { color: #9fbdf5; }
.section { padding-block: clamp(48px, 6vw, 80px); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); color: var(--navy-800); }
.section-head p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Hero (shared) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--navy-900); color: var(--white);
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(0, 26, 66, .94) 38%, rgba(0, 26, 66, .55) 62%, rgba(0, 26, 66, .15) 100%);
}
.hero-inner { padding-block: clamp(72px, 10vw, 120px); }
.hero-content { max-width: 600px; }
.hero h1 { color: var(--white); font-size: clamp(32px, 4.6vw, 50px); line-height: 1.12; }
.hero p.lead { margin-top: 20px; font-size: 17px; line-height: 1.7; color: #d6e0f2; max-width: 540px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
/* Home hero: photo fills the band; navy solid on the left third, clear from ~70% */
.hero-home::before {
  background: linear-gradient(90deg,
    rgba(0, 26, 66, .9) 0%,
    rgba(0, 26, 66, .8) 24%,
    rgba(0, 26, 66, .6) 42%,
    rgba(0, 26, 66, .28) 57%,
    rgba(0, 26, 66, 0) 70%);
}
.hero-home h1, .hero-home p.lead { text-shadow: 0 2px 18px rgba(0, 18, 47, .35); }
.hero-home .hero-inner { display: flex; align-items: center; min-height: clamp(520px, 44vw, 640px); padding-block: 64px; }
.hero-home .hero-content { width: 100%; max-width: 720px; }
.hero-home h1 { font-size: clamp(30px, 3.3vw, 44px); }
.hero-home p.lead { max-width: 560px; }
/* Inner-page hero: same photo + gradient treatment as home, a bit shorter */
.hero-page .hero-inner { min-height: clamp(440px, 38vw, 600px); }
.hero-page .hero-media img { object-position: right 75%; }
.hero-servicios .hero-media img { object-position: right center; }
.hero-page .hero-content { max-width: 620px; }
.hero-page h1 { font-size: clamp(30px, 3.4vw, 46px); }
.hero.compact .hero-inner { padding-block: clamp(64px, 8vw, 96px); }
.hero.compact h1 { font-size: clamp(30px, 4vw, 44px); }

/* ---------- Benefits strip ---------- */
.benefits { border-bottom: 1px solid var(--line); background: var(--white); }
/* Desktop: spread edge to edge so the first/last items align with the content edges */
.benefits-list { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: 24px; padding-block: 32px; }
.benefit { display: flex; align-items: center; gap: 14px; color: var(--navy-800); }
.benefit-icon { width: 40px; height: 40px; flex: none; }
.benefit span { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--navy-800); }

/* ---------- Service cards (home) ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.service-card:hover { box-shadow: 0 2px 4px rgba(0, 26, 66, .06), 0 16px 36px rgba(0, 26, 66, .12); border-color: #cfd9e8; }
.service-card .media { aspect-ratio: 16 / 8; overflow: hidden; background: var(--surface); }
.service-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.service-card:hover .media img { transform: scale(1.04); }
.service-card .body { padding: 22px 24px 24px; flex: 1; }
.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-50); color: var(--navy-800);
}
.icon-badge .icon { width: 22px; height: 22px; }
.service-card h3 { font-size: 17px; color: var(--navy-800); }
.service-card p { margin-top: 6px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.link-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding-block: 4px;
  font-size: 14px; font-weight: 700; color: var(--navy-800);
}
.link-more .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-more:hover { color: var(--blue-600); }
.link-more:hover .icon { transform: translateX(3px); }

/* ---------- Ally band (full-width photo + gradient from the right) ---------- */
.ally-band { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-900); color: var(--white); }
.ally-media { position: absolute; inset: 0; z-index: -2; }
.ally-media img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.ally-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg,
    rgba(0, 26, 66, 0) 0%,
    rgba(0, 26, 66, 0) 28%,
    rgba(0, 26, 66, .55) 40%,
    rgba(0, 26, 66, .88) 50%,
    rgba(0, 26, 66, .97) 62%,
    var(--navy-900) 100%);
}
.ally-inner { display: flex; justify-content: flex-end; align-items: center; min-height: clamp(380px, 34vw, 500px); padding-block: 56px; }
.ally-content { width: min(100%, 540px); }
.ally-band h2 { color: var(--white); font-size: clamp(26px, 2.8vw, 36px); }
.ally-band p { margin-top: 16px; color: #d6e0f2; font-size: 16.5px; max-width: 46ch; }
.ally-band .btn { margin-top: 28px; }

/* ---------- Feature row (why us) ---------- */
.why .section-head { margin-bottom: 32px; }
.feature-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { display: flex; gap: 14px; align-items: center; }
.feature-icon { width: 44px; height: 44px; flex: none; }
.feature h3 { font-size: 15.5px; color: var(--navy-800); }
.feature p { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* ---------- About (nosotros) ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4 / 3.4; }
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-copy h2 { font-size: clamp(26px, 3.2vw, 34px); }
.about-copy p { margin-top: 18px; color: var(--muted); font-size: 16.5px; line-height: 1.75; max-width: 60ch; }

/* Values: open layout (no cards) — icon in a soft circle, title, short line */
.values { background: linear-gradient(180deg, var(--surface) 0%, var(--white) 100%); }
.values .section-head { margin-bottom: 44px; }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; max-width: 1100px; margin-inline: auto; }
.value { display: flex; flex-direction: column; align-items: center; text-align: center; }
.value .icon-badge { width: 76px; height: 76px; background: #e3ecfb; color: var(--blue-600); }
.value .icon-badge .icon { width: 34px; height: 34px; stroke-width: 2; }
.value h3 { margin-top: 18px; font-size: 18px; color: var(--navy-800); }
.value p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 22ch; }

.mv-band { background: var(--navy-900); color: var(--white); }
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; }
.mv-item { padding: clamp(40px, 6vw, 72px) clamp(0px, 4vw, 56px) clamp(40px, 6vw, 72px) 0; }
.mv-item + .mv-item { border-left: 1px solid rgba(255, 255, 255, .16); padding-left: clamp(24px, 4vw, 56px); padding-right: 0; }
.mv-item .icon { width: 60px; height: 60px; color: #8fb1f0; }
.mv-item h2 { margin-top: 18px; color: var(--white); font-size: clamp(22px, 2.6vw, 28px); }
.mv-item p { margin-top: 12px; color: #d6e0f2; font-size: 16px; line-height: 1.7; max-width: 52ch; }

/* ---------- Services list (servicios) ---------- */
.service-list { display: grid; gap: 24px; }
.service-row {
  display: grid; grid-template-columns: 240px 1fr 48px; gap: 28px; align-items: center;
  padding: 16px; padding-right: 24px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.service-row .media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.service-row .media img { width: 100%; height: 100%; object-fit: cover; }
.service-row .content { min-width: 0; }
.service-row h2 { font-size: 20px; color: var(--navy-800); }
.service-row p { margin-top: 6px; color: var(--muted); font-size: 15px; }
.bullets { margin-top: 12px; display: grid; gap: 6px; }
.bullets li { display: flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--text); }
.bullets .icon { width: 16px; height: 16px; color: var(--blue-600); }
.round-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--navy-800); background: var(--white);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.round-link:hover { background: var(--navy-800); color: var(--white); border-color: var(--navy-800); }
.round-link .icon { width: 20px; height: 20px; }

/* ---------- Contact ---------- */
/* Three bands: copy on navy (faint desk photo) | form card | person photo bleeding to the right edge */
.contact-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(115deg, var(--navy-900) 0%, #0a2f6e 55%, var(--navy-800) 100%);
  color: var(--white);
}
.contact-bg {
  position: absolute; inset: 0 auto 0 0; width: 70%; z-index: -2;
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 55%, transparent 100%);
}
.contact-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 70%; opacity: .22; }
.contact-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0, 26, 66, .7) 0%, rgba(0, 26, 66, .35) 45%, rgba(0, 26, 66, .1) 62%, transparent 70%);
}
.contact-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 30%; z-index: -1; }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.contact-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--navy-800) 0%, rgba(0, 37, 92, .45) 18%, rgba(0, 37, 92, 0) 40%);
}
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 560px) minmax(0, .8fr);
  gap: clamp(28px, 3.5vw, 48px); align-items: center;
  padding-block: clamp(48px, 5vw, 72px);
}
.contact-intro { min-width: 0; }
.contact-intro h1 { color: var(--white); font-size: clamp(30px, 2.6vw, 44px); }
.contact-point > div { min-width: 0; overflow-wrap: anywhere; }
.contact-intro .lead { margin-top: 18px; color: #d6e0f2; font-size: 17px; max-width: 42ch; }
.contact-points { margin-top: 44px; display: grid; gap: 26px; }
.contact-point { display: flex; align-items: center; gap: 18px; }
.contact-point .ring {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); color: var(--white);
}
.contact-point .ring .icon { width: 26px; height: 26px; }
.contact-point strong { display: block; font-size: 14px; color: #c9d7f2; font-weight: 600; }
.contact-point a, .contact-point .contact-value { font-size: 17px; color: var(--white); font-weight: 500; }
.contact-point a:hover { text-decoration: underline; text-underline-offset: 3px; }

.form-card {
  background: var(--white); color: var(--text);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-float);
  padding: clamp(24px, 3.5vw, 36px);
}
.form-card h2 { font-size: 22px; color: var(--navy-800); }
.form-card .form-note { margin-top: 4px; font-size: 14px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--error); margin-left: 2px; }
.field label .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  font-size: 16px; color: var(--ink);
  background: var(--white); border: 1.5px solid #cdd6e3; border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 96px; resize: vertical; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300255c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.field input::placeholder, .field textarea::placeholder { color: #8a94a6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #aab8cc; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(29, 91, 214, .18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { display: none; align-items: center; gap: 6px; font-size: 13px; color: var(--error); }
.field-error .icon { width: 14px; height: 14px; }
.field.has-error .field-error { display: flex; }
.form-actions { margin-top: 22px; }
.form-legal { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.form-status { display: none; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14.5px; }
.form-status .icon { width: 20px; height: 20px; margin-top: 1px; }
.form-status.is-success { display: flex; background: #e8f5ee; color: var(--success); }
.form-status.is-error { display: flex; background: #fdecea; color: var(--error); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #b9c6dd; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr .8fr 1.1fr 1fr; gap: 40px;
  padding-block: clamp(48px, 6vw, 72px) 40px;
}
.brand-light { color: var(--white); }
.brand-light img { filter: brightness(0) invert(1); }
.footer-brand p { margin-top: 18px; font-size: 14.5px; line-height: 1.7; max-width: 34ch; }
.footer-cta { margin-top: 22px; min-height: 44px; padding: 10px 20px; font-size: 14px; }
.footer-col h2 { font-size: 15px; font-weight: 700; color: var(--white); letter-spacing: 0; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 4px; }
.footer-col a { display: inline-block; padding-block: 5px; font-size: 14.5px; color: #b9c6dd; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.footer-contact { gap: 12px !important; font-size: 14.5px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; }
.footer-contact .icon { width: 18px; height: 18px; color: #8fb1f0; }
.footer-contact a { padding-block: 0; overflow-wrap: anywhere; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-block: 20px; font-size: 13.5px; color: #8e9bb3;
}

/* ---------- Page-load reveal (single orchestrated moment in heroes) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal > * { opacity: 0; transform: translateY(14px); animation: rise .7s var(--ease) forwards; }
  .reveal > *:nth-child(2) { animation-delay: .08s; }
  .reveal > *:nth-child(3) { animation-delay: .16s; }
  .reveal > *:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  /* Not enough room for three bands: drop the person photo, keep copy + form */
  .contact-photo { display: none; }
  .contact-bg { width: 100%; }
  .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
}

@media (max-width: 1080px) {
  .nav-list { gap: 20px; }
  .main-nav { gap: 24px; }
  .service-row { grid-template-columns: 200px 1fr 48px; }
}

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px var(--gutter) 24px;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 26, 66, .12);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .2s var(--ease), transform .2s var(--ease); }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a { display: block; padding: 14px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-list a::after { display: none; }
  .header-cta { width: 100%; min-height: 48px; }

  .benefits-list { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .ally-band::before {
    background: linear-gradient(90deg, rgba(0, 26, 66, .15) 0%, rgba(0, 26, 66, .7) 35%, rgba(0, 26, 66, .95) 55%, var(--navy-900) 100%);
  }
  .feature-row, .values-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { aspect-ratio: 16 / 10; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .hero::before { background: linear-gradient(180deg, rgba(0, 26, 66, .82) 0%, rgba(0, 26, 66, .94) 60%, var(--navy-900) 100%); }
  .contact-hero { background: var(--navy-900); }
  .contact-hero::before { background: none; }
  /* Phone: consultant photo behind the intro, fading into solid navy under the form */
  .contact-bg { display: none; }
  .contact-photo {
    display: block; width: 100%; bottom: auto; height: 560px;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  }
  .contact-photo img { object-position: 62% top; }
  .contact-photo::after { background: rgba(0, 18, 47, .58); }
  .contact-intro h1, .contact-intro .lead { text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
  .hero-actions .btn { flex: 1 1 100%; }
  /* Home hero: photo fills the whole hero behind the copy; light overlay only for legibility */
  .hero-home .hero-media img { object-position: 94% center; }
  .hero-page .hero-media img { object-position: 84% center; }
  .hero-servicios .hero-media img { object-position: 70% center; }
  .hero-home::before { background: linear-gradient(180deg, rgba(0, 18, 47, .62) 0%, rgba(0, 18, 47, .5) 45%, rgba(0, 18, 47, .68) 100%); }
  .hero-home .hero-inner { min-height: 0; padding-block: 48px 44px; }
  .hero-home h1, .hero-home p.lead { text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
  /* Band: photo visible on top, text on solid navy below */
  .ally-media { bottom: auto; height: 240px; }
  .ally-band::before { background: linear-gradient(180deg, rgba(0, 26, 66, 0) 0, rgba(0, 26, 66, .2) 140px, var(--navy-900) 240px); }
  .ally-inner { min-height: 0; padding-top: 220px; padding-bottom: 56px; justify-content: flex-start; }
  .cards-grid { grid-template-columns: 1fr; }
  .mv-grid { grid-template-columns: 1fr; }
  .mv-item { padding-right: 0; }
  .mv-item + .mv-item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .16); padding-left: 0; }
  .service-row { grid-template-columns: 1fr; padding: 12px 12px 20px; gap: 20px; }
  .service-row .media { aspect-ratio: 16 / 9; }
  .service-row .content { padding-inline: 8px; }
  .service-row .round-link { justify-self: end; margin-right: 8px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .brand img { width: 44px; }
  .brand-name { font-size: 10.5px; }
  .values-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
  .value .icon-badge { width: 64px; height: 64px; }
  .value .icon-badge .icon { width: 28px; height: 28px; }
  .value h3 { font-size: 16px; }
  .value p { font-size: 14px; }
  /* Two per row on phones: icon above the text */
  .benefits-list, .feature-row { grid-template-columns: repeat(2, 1fr); gap: 24px 16px; }
  .benefit, .feature { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
  .why .section-head { text-align: center; margin-inline: auto; }
  .benefit span { font-size: 14.5px; }
  /* Footer: stacked blocks separated by dividers */
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-block: 40px 8px; }
  .footer-brand { grid-column: auto; padding-bottom: 28px; }
  .footer-brand p { max-width: none; }
  .footer-cta { width: 100%; min-height: 48px; }
  .footer-col { padding-block: 24px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .footer-col h2 { margin-bottom: 12px; }
  .footer-col ul { gap: 2px; }
  .footer-col-nav ul { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .footer-col a { font-size: 15px; padding-block: 7px; }
  .footer-contact { gap: 14px !important; }
  .footer-bottom { text-align: center; }
}
