:root {
    --ink: #191d20;
    --muted: #515b62;
    --paper: #f4f4ef;
    --white: #fff;
    --red: #bd242b;
    --red-hover: #9d1720;
    --dark: #171b1e;
    --line: #dddeda;
    --gutter: clamp(.875rem, 1.8vw, 2.5rem);
    --text: clamp(1.1875rem, .7vw + .95rem, 1.5rem);
    --label: clamp(1.0625rem, .35vw + .95rem, 1.25rem);
    --card-heading: clamp(1.65rem, 1vw + 1.2rem, 2.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: var(--text)/1.55 system-ui, "Segoe UI", sans-serif; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #1686bd; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.06; letter-spacing: -.032em; overflow-wrap: anywhere; }
h2 { font-size: clamp(2.625rem, 4vw + 1rem, 5.75rem); }
h3 { font-size: var(--card-heading); }
.wrap { width: 100%; padding-inline: var(--gutter); }
.skip-link { position: fixed; inset: .5rem auto auto .5rem; z-index: 10; padding: .65rem 1rem; color: var(--ink); background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { background: var(--white); position: sticky; inset-block-start: 0; z-index: 4; box-shadow: 0 1px 0 #161a1c22; }
.site-nav { min-height: 5.75rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { flex: none; display: block; }
.brand img { width: clamp(9rem, 16vw, 13.5rem); height: clamp(3.4rem, 5vw, 4.65rem); object-fit: contain; }
.site-nav nav, .footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(.8rem, 1.6vw, 2rem); }
.site-nav nav a, .footer-links a { font-size: var(--label); font-weight: 650; text-decoration: none; }
.site-nav nav a:not(.button):hover, .footer-links a:hover { text-decoration: underline; text-underline-offset: .25em; }
.menu-toggle { padding: .45rem .75rem; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: .25rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .75rem 1.2rem; border: 1px solid transparent; border-radius: .2rem; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; }
.button-primary { color: var(--white); background: var(--red); }
.button-primary:hover { background: var(--red-hover); }
.button-outline { border-color: currentColor; color: inherit; background: transparent; }
.button-outline:hover { background: #838b921f; }
.hero { position: relative; color: var(--white); background: var(--dark); }
.hero-slide { display: grid; align-items: center; min-height: clamp(35rem, 86svh, 76rem); position: relative; isolation: isolate; }
.hero-slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#101619f5 0%,#101619c9 35%,#10161955 70%,#10161936); z-index: -1; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; }
.hero-body { min-width: 0; padding-block: clamp(3rem, 7vh, 7rem) 6rem; }
.eyebrow { display: flex; align-items: center; gap: .6rem; color: var(--red); font-size: var(--label); font-weight: 800; text-transform: uppercase; letter-spacing: .085em; margin-bottom: .9rem; }
.eyebrow::before { content: ""; width: 1.6rem; height: .17rem; background: currentColor; flex: none; }
.hero .eyebrow, .projects .eyebrow, .contact .eyebrow { color: #ff979b; }
.hero h1, .hero h2 { max-width: 17ch; font-size: clamp(2.5rem, 5.6vw + .35rem, 9rem); text-wrap: balance; letter-spacing: -.05em; }
.hero-description { max-width: 52ch; margin-top: 1.35rem; color: #f0f1ef; font-size: clamp(1.25rem, 1.1vw + .9rem, 2rem); white-space: pre-line; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.hero-controls { position: absolute; inset: auto 0 1.1rem; display: flex; align-items: center; justify-content: flex-end; gap: .75rem; pointer-events: none; }
.hero-controls button { width: 3.25rem; height: 3.25rem; background: #161a1cdd; color: inherit; border: 1px solid #ffffff70; border-radius: .2rem; pointer-events: auto; }
.hero-controls button:hover { background: var(--red); }
.hero-controls .hero-playback { width: auto; padding-inline: .65rem; font-size: var(--label); }
.hero-controls span { background: #161a1cdd; padding: .2rem .5rem; border-radius: .2rem; }
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-lead { margin-top: 1rem; max-width: 64ch; color: var(--muted); font-size: clamp(1.25rem, .9vw + .95rem, 1.75rem); }
.services-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.85rem, 1.5vw, 2rem); margin-top: 2rem; }
.service-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: .35rem; overflow: hidden; }
.service-card { padding: clamp(1.1rem, 1.7vw, 2.5rem); border-top: .2rem solid var(--red); }
.service-card i { color: var(--red); font-size: clamp(1.75rem, 2vw, 2.6rem); margin-bottom: 1rem; }
.service-card p { margin-top: .65rem; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.about { background: var(--white); }
.about-grid, .contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .35rem; }
.long-copy { margin-top: 1rem; color: var(--muted); white-space: pre-line; }
.about :is(.section-lead, .long-copy) a { color: #9d1720; text-decoration: underline; text-underline-offset: .16em; }
.about :is(.section-lead, .long-copy) > * + * { margin-top: .65em; }
.projects, .contact { background: var(--dark); color: var(--white); }
.projects .section-lead, .contact .section-lead { color: #d0d6d9; }
.projects .button { margin-top: 1.5rem; }

.contact-layout { align-items: start; }
.contact-details { display: grid; gap: 1rem; margin-top: 2rem; font-style: normal; }
.contact-details > * { display: flex; align-items: start; gap: .8rem; overflow-wrap: anywhere; text-decoration: none; }
.contact-details a:hover { text-decoration: underline; }
.contact-details strong { display: block; font-size: var(--label); }
.contact-details i { color: #ff979b; width: 1.2rem; margin-top: .35rem; }
.form-card { background: var(--white); color: var(--ink); border-radius: .35rem; padding: clamp(1rem, 3vw, 2rem); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.form-wide { grid-column: 1 / -1; }
.form-grid label { display: grid; align-content: start; gap: .35rem; font-size: var(--label); font-weight: 650; }
.form-grid :is(input, textarea):not([type=hidden]) { width: 100%; min-width: 0; min-height: 3.3rem; padding: .65rem .8rem; border: 1px solid #aab0b4; border-radius: .2rem; background: #fbfbfa; font-size: var(--text); font-weight: 400; color: inherit; }
.form-grid textarea { resize: vertical; }
.form-grid #contacto_respuesta { max-width: 7rem; }
.form-actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.form-notice { padding: .75rem; margin-bottom: 1rem; background: #ecf8ed; border-left: 4px solid #277339; }
.form-error { background: #fff0ee; border-color: var(--red); }
.site-footer { background: var(--white); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; padding-block: 1.3rem; }
.footer-inner p { color: var(--muted); font-size: var(--label); }
@media (max-width: 74rem) {
    .site-nav { flex-wrap: wrap; }
    .site-nav nav { flex-basis: 100%; padding-bottom: 1rem; }
    .site-nav nav a { min-height: 2.75rem; display: inline-flex; align-items: center; }
}
@media (max-width: 67rem) {
    .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}
@media (max-width: 52rem) {
    .site-nav { min-height: 4.5rem; }
    .site-nav nav { gap: .35rem 1rem; }
    .hero-slide::before { background: linear-gradient(90deg,#101619ef,#101619ae); }
    .about-grid, .contact-layout { grid-template-columns: minmax(0, 1fr); }
    .about-grid img { order: 1; }
    .service-card { padding: 1rem; }
}
@media (max-width: 38rem) {
    .services-grid, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-controls { flex-wrap: wrap; gap: .4rem; }
    .hero-controls [data-step] { width: 3rem; }
    .hero-controls .hero-playback { padding-inline: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

.project-grid, .adviser-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.85rem, 1.35vw, 2rem);
    margin-top: clamp(1.5rem, 3vw, 2.75rem);
}
.project-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #454b50;
    border-radius: .55rem;
    background: #21272b;
    transition: border-color .28s ease, box-shadow .28s ease;
}
.project-card:focus-within, .project-card:hover {
    border-color: #c57e81;
    box-shadow: 0 12px 24px #070a0b44;
}
.project-photo {
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    aspect-ratio: 4 / 3;
    background: #111517;
}
.project-photo:focus-visible { outline-offset: -4px; z-index: 1; }
.project-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s cubic-bezier(.2,.65,.25,1), filter .35s ease;
}
.project-photo:is(:hover, :focus-visible) img {
    transform: scale(1.09);
    filter: brightness(1.09);
}
.project-zoom {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    right: .7rem;
    bottom: .7rem;
    padding: .5rem .7rem;
    background: #15191ce8;
    border: 1px solid #ffffff48;
    border-radius: .3rem;
    color: #fff;
    font-size: var(--label);
    font-weight: 650;
    transition: background .25s ease;
}
.project-photo:is(:hover, :focus-visible) .project-zoom { background: var(--red); }
.project-copy { padding: clamp(1rem, 1.5vw, 2.25rem); overflow-wrap: anywhere; }
.project-copy h3 { line-height: 1.2; }
.project-subtitle, .project-detail { margin-top: .55rem; color: #d0d6d9; white-space: pre-line; }
.project-subtitle { color: #ffabb0; font-size: var(--label); font-weight: 650; }
.photo-dialog {
    width: calc(100% - var(--gutter) * 2);
    max-width: none;
    max-height: 94dvh;
    padding: 0;
    color: #fff;
    background: #191e21;
    border: 1px solid #666e74;
    border-radius: .65rem;
}
.photo-dialog[open] { animation: photo-enter .25s ease both; }
.photo-dialog::backdrop { background: #080b0de8; }
@supports (transition-behavior: allow-discrete) {
    .photo-dialog {
        opacity: 0;
        transform: translateY(.45rem) scale(.99);
        transition: opacity .24s ease, transform .24s ease, display .24s allow-discrete, overlay .24s allow-discrete;
    }
    .photo-dialog[open] { opacity: 1; transform: none; animation: none; }
    .photo-dialog::backdrop {
        opacity: 0;
        transition: opacity .24s ease, display .24s allow-discrete, overlay .24s allow-discrete;
    }
    .photo-dialog[open]::backdrop { opacity: 1; }
    @starting-style {
        .photo-dialog[open] { opacity: 0; transform: translateY(.45rem) scale(.99); }
        .photo-dialog[open]::backdrop { opacity: 0; }
    }
}
.photo-toolbar, .photo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .65rem clamp(.6rem, 2vw, 1.15rem);
}
.photo-toolbar h3 { font-size: clamp(1.25rem, 1.6vw, 2.25rem); line-height: 1.25; overflow-wrap: anywhere; }
.photo-count { color: #bfc7cb; font-size: var(--label); }
.photo-toolbar form { margin: 0; }
.photo-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 2.75rem;
    min-height: 3.2rem;
    padding-inline: .7rem;
    border: 1px solid #657078;
    border-radius: .3rem;
    color: #fff;
    background: transparent;
    font-size: var(--label);
    font-weight: 650;
}
.photo-control:hover, .photo-control[aria-pressed="true"] { background: #41494e; }
.photo-control:disabled { opacity: .5; cursor: default; }
.photo-viewport {
    width: 100%;
    height: 68dvh;
    overflow: hidden;
    background: #101416;
}
.photo-stage { position: relative; width: 100%; height: 100%; }
.photo-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity .38s ease, transform .38s ease;
}
.photo-stage img.is-current { opacity: 1; transform: none; }
.photo-viewport.is-zoomed { overflow: auto; touch-action: pan-x pan-y; }
.photo-viewport.is-zoomed .photo-stage { width: 165%; height: 165%; }
@keyframes photo-enter {
    from { opacity: 0; transform: translateY(.4rem); }
    to { opacity: 1; transform: none; }
}
.advisers { background: #edf1f2; }
.advisers-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; }
.adviser-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #cad3d9;
    border-radius: .75rem;
    box-shadow: 0 7px 18px #24323d12;
    text-align: center;
}
.adviser-band {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(6.8rem, 7.5vw, 10rem);
    align-content: start;
    padding: .8rem 1rem;
    border-bottom: 3px solid #e0a026;
    background: linear-gradient(118deg, #142c4f 0 71%, #193960 71% 88%, #204672 88%);
}
.adviser-logo {
    width: clamp(7.5rem, 8vw, 10rem);
    height: clamp(2.6rem, 3vw, 3.5rem);
    padding: .17rem .3rem;
    object-fit: contain;
    background: #fff;
    border-radius: .2rem;
}
.adviser-photo {
    position: relative;
    display: grid;
    place-items: center;
    width: min(clamp(8.75rem, 10vw, 13.5rem), 65%);
    aspect-ratio: 1;
    margin: -2.5rem auto 0;
    object-fit: contain;
    border: .28rem solid #fff;
    border-radius: .65rem;
    background: #e5ebef;
    box-shadow: 0 5px 12px #122a4422;
}
.adviser-placeholder { color: #657583; font-size: 2.55rem; }
.adviser-copy { padding: clamp(1rem, 1.5vw, 2.25rem); overflow-wrap: anywhere; }
.adviser-copy h3 { color: #142c4f; line-height: 1.18; }
.adviser-role { margin-top: .36rem; color: #a12027; font-size: var(--text); font-weight: 750; }
.adviser-detail { margin-top: .55rem; color: var(--muted); white-space: pre-line; }
.entered-view { animation: card-enter .48s cubic-bezier(.22,.61,.36,1) both; }
@keyframes card-enter {
    from { opacity: .35; translate: 0 .7rem; }
    to { opacity: 1; translate: 0 0; }
}
@media (min-width: 57rem) {
    .entered-view:nth-child(3n + 2) { animation-delay: 60ms; }
    .entered-view:nth-child(3n) { animation-delay: 120ms; }
}
@media (max-width: 57rem) {
    .project-grid, .adviser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 36rem) {
    .project-grid, .adviser-grid { grid-template-columns: minmax(0, 1fr); }
    .photo-viewport { height: 52dvh; }
    .photo-actions { flex-wrap: wrap; justify-content: center; }
    .photo-actions .photo-control { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .project-card, .project-photo img, .project-zoom, .photo-dialog, .photo-dialog::backdrop, .photo-stage img { transition: none; }
    .project-photo:is(:hover, :focus-visible) img { transform: none; }
    .photo-dialog[open], .entered-view { animation: none; }
}
