:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --white: #fdfbf6;
  --ink: #1b3252;
  --muted: #45586b;
  --blue: #1644ad;
  --deep-blue: #173a92;
  --orange: #b84423;
  --rule: #caccc1;
  --display: Georgia, "Times New Roman", serif;
  --gutter: clamp(1rem, 5vw, 4.75rem);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 1rem; line-height: 1.65; }
p, h1, h2, h3 { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
svg { flex: none; }
::selection { background: #d5e1ff; color: var(--deep-blue); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
main:focus { outline: none; }
section[id] { scroll-margin-top: 1rem; }

.shell { width: min(calc(100% - 2 * var(--gutter)), 80rem); margin-inline: auto; }
.skip { position: fixed; z-index: 2; top: .6rem; left: var(--gutter); padding: .65rem 1rem; background: var(--blue); color: white; clip-path: inset(50%); }
.skip:focus { clip-path: none; }
.header { background: var(--paper); }
.header-layout { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 5.15rem; gap: 1rem 2rem; align-items: center; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; width: fit-content; gap: .62rem; align-items: center; text-decoration: none; color: var(--deep-blue); font-size: 1rem; font-weight: 780; letter-spacing: .035em; white-space: nowrap; }
.brand-rest { margin-left: .25em; font-weight: 620; }
.brand img { width: 2.15rem; height: 2.15rem; }
.nav, .language { display: flex; align-items: center; }
.nav { gap: clamp(1.2rem, 3.2vw, 2.8rem); }
.nav a, .language a { display: inline-flex; min-height: 2.75rem; align-items: center; text-decoration: none; }
.nav a { color: var(--muted); font-size: .9rem; font-weight: 650; white-space: nowrap; }
.nav a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: .25em; }
.language { justify-self: end; gap: .14rem; }
.language a { justify-content: center; min-width: 2.35rem; color: var(--muted); font-size: .74rem; font-weight: 740; }
.language a[aria-current] { color: var(--blue); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: .42em; }
.language a:hover { color: var(--blue); }

.hero { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1fr); gap: clamp(1.6rem, 5.3vw, 5rem); align-items: center; padding-block: clamp(3.1rem, 6.3vw, 5.8rem); }
.hero-content { padding-block: .7rem; }
.eyebrow { display: flex; align-items: center; gap: .62rem; color: var(--deep-blue); font-size: clamp(.64rem, 1.25vw, .75rem); font-weight: 760; letter-spacing: .11em; line-height: 1.45; text-transform: uppercase; }
.status { width: 1.5rem; height: 2px; background: var(--orange); flex: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; }
h1, h2 { line-height: .99; letter-spacing: -.055em; }
h1 { margin-top: 1.3rem; font-size: clamp(3.05rem, 5.7vw, 5.8rem); text-wrap: initial; }
h1 em { display: block; margin-top: .08em; color: var(--blue); font-weight: 400; }
:lang(es) h1 { font-size: clamp(2.8rem, 4.9vw, 5.2rem); }
.hero-intro, .section-intro { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); }
.hero-intro { max-width: 30rem; margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.3rem; margin-top: 1.85rem; }
.button { display: inline-flex; min-height: 3.05rem; max-width: 100%; align-items: center; justify-content: center; gap: .67rem; padding: .65rem .95rem; border: 1px solid transparent; text-decoration: none; line-height: 1.35; font-size: .89rem; font-weight: 710; }
.button svg { width: 1rem; height: 1rem; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--deep-blue); }
.button-secondary { padding-inline: 0; color: var(--deep-blue); text-decoration: underline; text-underline-offset: .23em; }
.button-secondary:hover { color: var(--orange); }

.hero-visual { position: relative; isolation: isolate; margin: 0 .72rem .72rem 0; }
.hero-visual::before { position: absolute; z-index: -1; inset: .72rem -.72rem -.72rem .72rem; border: 1px solid #7590ca; content: ""; }
.hero-visual::after { position: absolute; inset: auto -.72rem -.72rem auto; width: 1.55rem; height: 1.55rem; background: var(--orange); content: ""; }
.hero-visual img { width: 100%; height: auto; aspect-ratio: 1.42; object-fit: cover; background: #e8e6e0; }

.services { display: grid; grid-template-columns: minmax(0, .57fr) minmax(0, 1fr); gap: clamp(1.75rem, 6vw, 6rem); align-items: start; padding-block: clamp(3.5rem, 7vw, 6.3rem); border-top: 1px solid var(--rule); }
h2 { margin-top: .68rem; font-size: clamp(2.35rem, 4.45vw, 4.25rem); }
.section-heading .section-intro { max-width: 22rem; margin-top: 1.2rem; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 1.85rem; }
.service { min-width: 0; }
.service-card { display: flex; flex-direction: column; align-items: flex-start; height: 100%; padding-bottom: .6rem; border-bottom: 1px solid #91a1be; text-decoration: none; }
.service-card img { width: 100%; height: auto; aspect-ratio: 1.68; object-fit: cover; margin-bottom: 1.05rem; background: #e8e6e0; }
.service h3 { color: var(--deep-blue); font-size: clamp(1.42rem, 2.15vw, 1.94rem); line-height: 1.13; letter-spacing: -.025em; text-wrap: pretty; }
.service p { margin-block: .6rem .85rem; color: var(--muted); }
.service-link, .return-link { display: inline-flex; min-height: 2.75rem; align-items: center; gap: .5rem; color: var(--deep-blue); font-size: .85rem; font-weight: 710; text-decoration: underline; text-underline-offset: .23em; }
.service-link { margin-top: auto; }
.service-link svg, .return-link svg, .related-links svg { width: .95rem; height: .95rem; }
.service-card:hover .service-link, .return-link:hover, .related-links a:hover { color: var(--orange); }

.detail-hero h1 { font-size: clamp(2.9rem, 5vw, 5.25rem); text-wrap: pretty; }
.detail-body { border-top: 1px solid var(--rule); }
.detail-section { display: grid; grid-template-columns: minmax(0, .58fr) minmax(0, 1fr); gap: .8rem clamp(1.75rem, 6vw, 6rem); align-items: start; padding-block: clamp(1.6rem, 4.2vw, 3.4rem); border-bottom: 1px solid var(--rule); }
.detail-section h2 { margin: 0; color: var(--deep-blue); font-size: clamp(1.8rem, 3.1vw, 3.1rem); line-height: 1.08; }
.detail-section p { max-width: 42rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.16rem); }
.related { padding-block: 1.5rem clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--rule); }
.related h2 { margin-top: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.related-links { display: flex; flex-wrap: wrap; gap: .25rem 2rem; margin-top: .7rem; }
.related-links a { display: inline-flex; min-height: 2.75rem; gap: .5rem; align-items: center; color: var(--deep-blue); font-size: .9rem; font-weight: 680; text-underline-offset: .2em; }

.approach { background: #e6edfa; border-block: 1px solid #c5d1e6; }
.approach-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem clamp(1.5rem, 6vw, 6rem); align-items: center; padding-block: clamp(3.35rem, 7vw, 6rem); }
.approach h2 { max-width: 32rem; font-style: italic; color: var(--deep-blue); }
.approach-copy { padding-left: 1.4rem; border-left: 2px solid var(--orange); }
.approach-copy p + p { margin-top: .8rem; }

.contact { padding-block: clamp(3.3rem, 7vw, 6.2rem); }
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.3rem 2.5rem; align-items: center; padding: clamp(1.45rem, 5.2vw, 4.5rem); color: white; background: var(--blue); border-left: .4rem solid #d4613d; }
.contact-card .eyebrow { color: #e4ebff; }
.contact-card h2 { max-width: 45rem; }
.contact-intro { max-width: 33rem; margin-top: .95rem; color: #edf1ff; }
.contact-actions { display: grid; gap: .68rem; justify-items: start; }
.button-light { background: var(--white); color: var(--deep-blue); }
.button-light:hover { background: #e5edff; }
.contact-address { max-width: 100%; overflow-wrap: anywhere; color: white; font-size: .84rem; font-weight: 650; text-underline-offset: .2em; }
.contact a:focus-visible { outline-color: white; }

.footer { background: #f1eee4; border-top: 1px solid var(--rule); }
.footer-layout { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .9rem 2rem; padding-block: 1.55rem; }
.footer p, .copyright { color: var(--muted); font-size: .85rem; }
.footer .brand + p { margin-top: .45rem; }
.footer-location { white-space: nowrap; }
.back { display: flex; gap: .3rem; align-items: center; color: var(--deep-blue); font-size: .82rem; font-weight: 650; text-decoration: none; }
.back:hover { text-decoration: underline; }
.back svg { width: .95rem; height: .95rem; }
.copyright { padding-block: .85rem 1.2rem; border-top: 1px solid var(--rule); }
.copyright small { font-size: inherit; }

@media (max-width: 58rem) {
  .header-layout { gap: .9rem; }
  .hero { gap: 1.6rem; }
  .services { gap: 1.75rem; }
  .service-grid { gap: 1.35rem; }
}

@media (max-width: 45rem) {
  .header-layout { grid-template-columns: 1fr auto; gap: .22rem .7rem; padding-top: .5rem; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--rule); }
  .nav a { font-size: .84rem; }
  .language { grid-column: 2; grid-row: 1; }
  .hero { grid-template-columns: 1fr; gap: 1.35rem; padding-block: 2.4rem 3rem; }
  .hero-content { padding: 0; }
  h1, :lang(es) h1 { font-size: clamp(2.85rem, 8.5vw, 4.3rem); }
  .hero-intro { margin-top: 1rem; }
  .hero-actions { margin-top: 1.25rem; }
  .hero-visual img { aspect-ratio: 1.45; }
  .services, .approach-layout, .contact-card, .detail-section { grid-template-columns: 1fr; }
  .service-grid { gap: 1.35rem 1rem; }
  .footer-layout { grid-template-columns: 1fr auto; }
  .footer-location { grid-column: 1; grid-row: 2; }
  .back { grid-column: 2; grid-row: 1; }
}

@media (max-width: 31rem) {
  .service-grid { grid-template-columns: 1fr; }
  .contact-card { gap: 1.15rem; }
}

@media (max-width: 23rem) {
  h1, :lang(es) h1 { font-size: 2.6rem; }
  .footer-layout { grid-template-columns: 1fr; }
  .back { grid-column: 1; grid-row: 3; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
