:root {
  color-scheme: dark;
  --surface: #161616;
  --surface-deep: #111111;
  --surface-soft: #191c1e;
  --surface-slate: #1a2129;
  --surface-raised: #242628;
  --surface-hover: #2d3033;
  --stroke: #383c40;
  --control-line: #73787d;
  --text: #f4f4f3;
  --text-muted: #b9bec3;
  --accent: #bcc7d1;
  --action: #d9dfe4;
  --action-hover: #edf0f2;
  --on-action: #191c1e;
  --white: #ffffff;
  --shell: 82rem;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --header-height: 4.6rem;
  font-family: Inter, 'Segoe UI', Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--surface); }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, summary { cursor: pointer; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
:is(main section, details) { scroll-margin-top: 5.5rem; }

.shell { width: min(calc(100% - 2 * var(--gutter)), var(--shell)); margin-inline: auto; }
.section { padding-block: clamp(4.6rem, 8vw, 8.4rem); }
.skip { position: fixed; z-index: 5; top: 1rem; left: 1rem; transform: translateY(-200%); background: var(--action); color: var(--on-action); border-radius: .375rem; padding: .75rem 1rem; }
.skip:focus { transform: none; }

.site-header { position: fixed; inset: 0 0 auto; z-index: 3; color: var(--text); background: var(--header-rest, transparent); transition: background-color .22s ease; }
.site-header.is-scrolled,
.site-header:has(.nav-section-toggle[aria-expanded='true'], .nav-toggle[aria-expanded='true'], .language-picker[open], :focus-visible) { background: var(--surface-deep); }
@media (hover: hover) and (pointer: fine) {
  .site-header:hover { background: var(--surface-deep); }
}
body:is(:not(.inner-page), .image-mast-page) .site-header:not(.is-scrolled) :is(.brand, .nav-section-link, .nav-contact) { text-shadow: 0 1px 5px #000d; }
.header-inner { width: min(calc(100% - 2 * var(--gutter)), 90rem); min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: clamp(.75rem, 1.7vw, 2.2rem); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: clamp(1.27rem, 2.5vw, 1.55rem); font-weight: 760; letter-spacing: -.064em; white-space: nowrap; }
.brand img { border-radius: .46rem; background-color: var(--surface-raised); }
.site-header .brand { font-size: clamp(1.02rem, 1.49vw, 1.52rem); line-height: 1.04; letter-spacing: -.04em; }
.site-header .brand img { width: clamp(2.55rem, 3.75vw, 3.75rem); height: auto; border-radius: 0; background: none; }
.main-nav { display: flex; flex: 1; align-items: center; justify-content: center; gap: clamp(.85rem, 3vw, 3.2rem); color: var(--text, #f4f4f3); font-size: clamp(.86rem, 1.12vw, 1.13rem); font-weight: 650; white-space: nowrap; }
.main-nav a:not(.button):hover { color: var(--white); }
.nav-toggle { display: none; }
.button { display: inline-flex; min-height: 3.1rem; width: fit-content; align-items: center; justify-content: center; padding: .85rem 1.27rem; background: var(--action); color: var(--on-action); border: 1px solid transparent; border-radius: .45rem; font-size: .94rem; font-weight: 700; transition: background-color .18s ease, color .18s ease; }
.button:hover { background: var(--action-hover); }
.nav-contact { min-height: 3.2rem; margin-left: auto; padding: .7rem clamp(1rem, 1.8vw, 1.9rem); border: 1px solid var(--control-line); border-radius: 0; background: var(--surface-soft); color: var(--text); }
body:is(:not(.inner-page), .image-mast-page) .site-header:not(.is-scrolled) .nav-contact:not(:hover) { background: transparent; border-color: #e8e8e8bf; }

.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--surface); color: var(--white); }
.hero-layout { position: relative; width: min(76%, 81rem); min-height: 100vh; min-height: 100svh; margin-inline: auto; display: grid; align-content: end; padding-block: 8rem clamp(5.4rem, 11vh, 7rem); pointer-events: none; }
.hero-copy { pointer-events: auto; width: fit-content; max-width: 100%; opacity: calc(1 - var(--hero-exit, 0)); transform: translateY(calc(-1.7rem * var(--hero-exit, 0))); }
.hero-copy:focus-within { opacity: 1; transform: none; }
.eyebrow { font-size: .875rem; line-height: 1.35; font-weight: 740; letter-spacing: .105em; text-transform: uppercase; }
h1 { font-size: clamp(3.45rem, 5.8vw, 6.3rem); line-height: .95; font-weight: 480; letter-spacing: -.063em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-intro { max-width: 30rem; margin-top: clamp(1.45rem, 4.4vw, 4.4rem); color: var(--text); font-size: clamp(1.04rem, 1.32vw, 1.3rem); line-height: 1.55; }
.hero-projects { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem clamp(.65rem, 1.18vw, 1.85rem); margin-top: clamp(1.55rem, 4vw, 4rem); }
.hero-projects > span { font-size: .825rem; color: var(--text-muted); white-space: nowrap; }
.client-logo { position: relative; display: grid; place-items: center; width: 5.6rem; min-height: 3rem; padding: .2rem 0; border: 0; background: none; transition: opacity .2s ease; }
.client-logo:hover { opacity: .76; }
.client-logo img { width: 100%; height: 2.65rem; object-fit: contain; }
.client-logo--university { width: clamp(8.25rem, 14vw, 12rem); }
.client-logo--university img { height: 3.35rem; }
.client-logo--mayorga { width: 3.45rem; }
.client-logo--mayorga img { filter: brightness(1.16); }
.client-logo--campus { width: 7.15rem; }
.client-logo--iae { width: 6.1rem; }
.client-logo--iae img { filter: brightness(1.25); }
.hero-frame { position: absolute; z-index: -1; inset: 0; background: var(--surface); opacity: calc(1 - var(--hero-exit, 0)); }
.hero-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #161616fa 0%, #161616f0 22%, #17191bc7 43%, #191c1e38 67%, #191c1e1f 100%), linear-gradient(180deg, #16161670 0%, transparent 23%, transparent 69%, #161616cf 100%); pointer-events: none; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: center; filter: saturate(.55); }

h2 { font-size: clamp(2.55rem, 5.15vw, 5.25rem); line-height: 1; letter-spacing: -.071em; font-weight: 750; text-wrap: balance; }
.section h2 { margin-top: .85rem; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, .38fr); align-items: end; gap: 1.4rem 3rem; }
.section-heading > p, .contact-grid > div > p:last-child { max-width: 23rem; color: var(--text-muted); font-size: clamp(1.02rem, 1.5vw, 1.16rem); line-height: 1.58; }
.section-heading > p { padding-bottom: .14rem; }
.service-overview { padding-top: clamp(3rem, 6.3vw, 6rem); }
.service-overview-shell { max-width: 70rem; }
.service-overview h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1.05; font-weight: 520; letter-spacing: -.055em; }
.service-overview h2 strong { font-weight: 760; }
.service-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2.9rem, 6vw, 5.5rem) clamp(2rem, 5.3vw, 4.85rem); align-items: start; margin-top: clamp(2.2rem, 5vw, 4.75rem); }
@media (min-width: 701px) {
  .service-grid { --row-inset: clamp(1.35rem, 4.8vw, 4.75rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card { width: calc(100% - var(--row-inset)); }
  .service-card:nth-child(even) { margin-top: clamp(2.35rem, 5.3vw, 5rem); }
  .service-card:is(:nth-child(4n + 3), :nth-child(4n + 4)) { justify-self: end; }
}
.service-card, .article-list article { position: relative; min-width: 0; }
.service-art { margin: 0; overflow: hidden; aspect-ratio: 1; background: var(--surface-raised); }
.service-art img { width: 100%; height: 100%; object-fit: contain; transition: scale .35s ease; }
.service-art.service-art--photo img { object-fit: cover; }
.service-card:is(:hover, :focus-within) .service-art img { scale: 1.025; }
.service-card h3 { margin-top: clamp(.9rem, 1.8vw, 1.35rem); font-size: clamp(1.5rem, 2.7vw, 2.15rem); font-weight: 700; line-height: 1.13; letter-spacing: -.043em; }
.service-card:is(:hover, :focus-within) h3 a { text-decoration: underline; text-underline-offset: .2em; }
.service-card p { margin-top: .6rem; max-width: 37ch; color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.service-overview-link { display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: clamp(2.6rem, 5.3vw, 4.65rem); font-size: 1rem; font-weight: 680; text-decoration: underline; text-underline-offset: .24em; }
.service-overview-link:hover { color: var(--accent); }

.article-list article { display: grid; grid-template-columns: 1fr auto; gap: .23rem 1rem; align-items: center; }
.article-list article > p { color: var(--text-muted); font-size: .91rem; }
.article-list h3 { grid-column: 1; font-weight: 720; letter-spacing: -.043em; line-height: 1.1; }
.article-list button { padding: 0; border: 0; background: none; font-weight: inherit; letter-spacing: inherit; text-align: left; }
:is([data-detail], .service-card-link)::after { content: ''; position: absolute; inset: 0; border-radius: .55rem; }
:is([data-detail], .service-card-link):focus-visible { outline: none; }
:is([data-detail], .service-card-link):focus-visible::after { outline: 3px solid var(--accent); outline-offset: 4px; }
.card-link { display: grid; width: 2.65rem; height: 2.65rem; grid-column: 2; grid-row: 1 / span 2; place-items: center; border: 1px solid var(--control-line); border-radius: 50%; font-size: 1.5rem; line-height: 1; transition: background-color .18s ease; }
.article-list article:is(:hover, :focus-within) .card-link { background: var(--action); border-color: var(--action); color: var(--on-action); }

.capability-showcase { padding-block: clamp(3.6rem, 7vw, 6.8rem); background: #2c2c2d; }
.capability-shell { max-width: 70rem; }
.capability-showcase h2 { margin: 0; font-size: clamp(1.85rem, 3.45vw, 3.2rem); font-weight: 520; line-height: 1.12; letter-spacing: -.045em; }
.capability-showcase h2 strong { font-weight: 740; }
.capability-rows {
  --entry-distance: clamp(3.1rem, 8.2vw, 6rem);
  margin: clamp(1.75rem, 4.25vw, 3.85rem) 0 0;
  padding: 0;
  padding-inline-end: var(--entry-distance);
  list-style: none;
}
.capability-row {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: baseline;
  gap: .65rem clamp(1.25rem, 4vw, 3.8rem);
  padding-block: clamp(1.25rem, 2.6vw, 2.5rem);
  border-bottom: 1px solid #575758;
  scroll-margin-top: 6rem;
}
.capability-row h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.17; letter-spacing: -.032em; }
.capability-row h3 a:hover { text-decoration: underline; text-underline-offset: .2em; }
.capability-row p { max-width: 50ch; color: var(--text-muted); font-size: 1rem; line-height: 1.55; }
.capability-motion .capability-row:not(:focus-within, :target) {
  opacity: var(--row-opacity, 1);
  translate: calc(var(--row-entry, 0) * var(--entry-distance)) 0;
}

.insights-grid, .contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); align-items: start; gap: clamp(2.4rem, 6.5vw, 7.25rem); }
.insights h2, .contact h2 { max-width: 12ch; text-wrap: initial; }

.approach { background: var(--surface-soft); }
.approach-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin-top: clamp(2rem, 4vw, 3.75rem); }
.approach-grid article { padding: 1.45rem 1rem 0 0; border-top: 2px solid var(--control-line); }
.approach-grid h3 { font-size: 1.63rem; letter-spacing: -.044em; }
.approach-grid p { margin-top: .6rem; max-width: 26rem; color: var(--text-muted); line-height: 1.6; }
.article-list { border-top: 1px solid var(--stroke); }
.article-list article { min-height: 6.35rem; align-content: center; padding-block: 1.05rem; border-bottom: 1px solid var(--stroke); }
.article-list h3 { font-size: clamp(1.17rem, 2.2vw, 1.66rem); }

.contact { background: var(--surface-slate); }
.contact-grid > div > p:last-child { margin-top: 1.35rem; }
.brief-form { display: grid; gap: .42rem; }
.brief-form label { margin-top: .55rem; font-weight: 670; }
.brief-form :is(input, select, textarea) { min-width: 0; width: 100%; border: 1px solid var(--control-line); border-radius: .34rem; padding: .75rem .9rem; background: var(--surface-deep); color: var(--text); }
.brief-form select { appearance: none; padding-right: 2.45rem; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.brief-form textarea { resize: vertical; }
.brief-form .button { margin-top: .42rem; }
.form-status { font-size: .93rem; margin-top: .18rem; }
.form-status:empty { display: none; }

.site-footer { background: var(--surface-deep); color: var(--text); }

.dialog { position: fixed; width: min(43rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto; border: 1px solid var(--stroke); border-radius: .72rem; padding: 0; color: var(--text); background: var(--surface-raised); }
.dialog::backdrop { background: #080808cc; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-actions { position: absolute; top: .85rem; right: .85rem; }
.close { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; padding: 0; border: 1px solid var(--control-line); background: var(--surface); color: var(--text); border-radius: 50%; font-size: 1.62rem; line-height: 1; }
.close:hover { background: var(--surface-hover); }
.dialog-content { padding: clamp(1.25rem, 4.7vw, 3.1rem); }
.dialog-content .eyebrow { padding-right: 3rem; }
.dialog-content h2 { margin-top: .65rem; font-size: clamp(2.05rem, 5.3vw, 3.6rem); }
.dialog-intro { margin: 1rem 0 1.55rem; font-size: 1.12rem; line-height: 1.58; }
#detail-sections section + section { margin-top: 1rem; }
#detail-sections h3 { font-size: 1.19rem; }
#detail-sections p { margin-top: .3rem; color: var(--text-muted); line-height: 1.58; }
@media (max-width: 980px) {
  .hero-projects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .15rem .75rem; }
  .hero-projects > span { grid-column: 1 / -1; }
  .client-logo { width: 100%; }
  .client-logo--university { grid-column: span 2; justify-self: start; width: min(100%, 11rem); }
}

@media (max-width: 900px) {
  .main-nav { gap: 1.25rem; }
  .section-heading { grid-template-columns: minmax(0, 1fr) minmax(13rem, .48fr); }
}

@media (max-width: 1040px) {
  body:has(.main-nav.is-open) :is(.cookie-preferences-trigger, .assistant-widget) { visibility: hidden; }
}

@media (max-width: 820px) {
  :root { --header-height: 4rem; }
  .header-inner { width: calc(100% - 2 * var(--gutter)); flex-wrap: wrap; gap: 0; }
  .nav-toggle { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.65rem; padding: .4rem .55rem; background: none; border: 1px solid #ffffff36; border-radius: .35rem; color: var(--white); font-size: .91rem; }
  .nav-toggle i { display: block; width: .46rem; height: .46rem; margin: -.2rem .13rem 0 0; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
  .nav-toggle[aria-expanded='true'] i { margin-block: .2rem 0; transform: rotate(225deg); }
  .main-nav { display: none; flex: 1 0 100%; width: 100%; align-items: stretch; justify-content: initial; gap: .2rem; padding: .75rem 1rem 1rem; background: var(--surface-soft); border: 1px solid var(--stroke); }
  .main-nav.is-open { display: grid; }
  .main-nav a:not(.button) { min-height: 2.65rem; padding: .66rem 0; border-top: 1px solid #ffffff26; }
  .main-nav .button { margin: .45rem 0 0; }

  .hero { --hero-media-height: clamp(11rem, 60vw, 28rem); }
  .hero-frame { inset: 0 0 auto; height: var(--hero-media-height); }
  .hero-frame::after {
    background: linear-gradient(180deg, #1012149c 0%, #1616160a 32%, #16161612 52%, #1616169e 80%, var(--surface) 100%);
  }
  .hero-video { object-position: 64% 50%; }
  .hero-layout {
    width: calc(100% - 2 * var(--gutter));
    min-height: 0;
    align-content: start;
    padding-block: calc(var(--hero-media-height) - clamp(1.15rem, 4vw, 2.25rem)) clamp(2.5rem, 6vw, 4rem);
  }
  .hero-copy { opacity: 1; transform: none; }
  .hero h1 { font-size: clamp(2.6rem, 11vw, 5.15rem); line-height: .99; }
  .hero-intro { max-width: 42ch; margin-top: .9rem; font-size: clamp(1rem, 2.2vw, 1.16rem); line-height: 1.54; }
  .hero-projects { width: min(100%, 29rem); gap: .35rem clamp(.45rem, 2vw, .9rem); margin-top: 1.25rem; }
  .hero-projects > span { white-space: normal; }
  .hero-projects .client-logo { min-height: 2.75rem; }
  .hero-projects .client-logo img { height: clamp(1.85rem, 6vw, 2.65rem); }
  .hero-projects .client-logo--university img { height: clamp(2.3rem, 7vw, 3.15rem); }
}

@media (max-width: 700px) {
  .section-heading, .capability-row, .insights-grid, .contact-grid { grid-template-columns: 1fr; }
  .section { padding-block: clamp(2.7rem, 8vw, 4.6rem); }
  .section h2 { font-size: clamp(2rem, 8.5vw, 3.6rem); line-height: 1.05; }
  .capability-rows { --entry-distance: 1.2rem; }
  h1 { font-size: clamp(3.05rem, 12.5vw, 5.45rem); }
  .service-overview { padding-top: 2.65rem; }
  .service-grid { gap: 2.25rem; }
  .service-art { aspect-ratio: 4 / 3; }
  .service-art img { height: 100%; object-fit: contain; }
  .approach-grid { grid-template-columns: 1fr; gap: 1.15rem; }
  .approach-grid article { padding-top: .85rem; }
  .insights h2, .contact h2 { max-width: 15ch; }
  .brief-form :is(input, select, textarea) { min-height: 2.75rem; font-size: 1rem; }
  .brief-form .button { width: 100%; }
}

@media (max-width: 480px) {
  :root { --gutter: clamp(1rem, 5vw, 1.25rem); }
}

@media (max-width: 359px) {
  .hero-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-projects .client-logo { grid-column: auto; width: 100%; }
  .hero-projects .client-logo img { width: min(100%, 8.6rem); }
}

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