:root {
    --space: #0b0e14;
    --cosmic: #151b26;
    --gold: #e5b25d;
    --amber: #ffd27b;
    --white: #f0f2f5;
    --grey: #9ba1a6;
    --line: rgba(229, 178, 93, 0.28);
    --header: 72px;
    --font-display: "Cinzel", "Times New Roman", serif;
    --font-heading: "Montserrat", "Arial Narrow", sans-serif;
    --font-body: "Inter", "Segoe UI", sans-serif;
    --pad: clamp(20px, 4vw, 64px);
    color-scheme: dark;
}

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

html {
    scroll-behavior: auto;
    scrollbar-color: var(--gold) var(--space);
}

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

img {
    max-width: 100%;
    display: block;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button,
[role="button"] {
    cursor: pointer;
}

a {
    color: inherit;
}

h1, h2, h3, p {
    margin: 0;
}

h1, h2, h3 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}

::selection {
    background: var(--gold);
    color: var(--space);
}

.preloader {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    background: #0B0E14;
}

.preloader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.preloader p {
    margin: 0;
    white-space: nowrap;
    color: #F0F2F5;
}

@media (prefers-reduced-motion: reduce) {
    .preloader.is-done { transition: none; }
}

.skip {
    position: absolute;
    left: 16px;
    top: -40px;
    z-index: 20;
    background: var(--gold);
    color: var(--space);
    padding: 8px 12px;
    font-family: var(--font-heading);
    font-weight: 700;
}

.skip:focus {
    top: 12px;
}

.progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    width: 100%;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: 0 50%;
    pointer-events: none;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
    height: var(--header);
    padding: 0 var(--pad);
    transition: background 0.25s ease, border-color 0.25s ease;
    border-bottom: 1px solid transparent;
}

.header.is-scrolled,
body.nav-open .header {
    background: rgba(11, 14, 20, 0.92);
    border-bottom-color: var(--line);
    backdrop-filter: blur(10px);
}

.logo {
    justify-self: start;
    display: flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo__mark {
    width: 28px;
    height: 28px;
    flex: none;
}

.logo__type {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo__type span {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.22em;
    font-size: 0.92rem;
}

.logo__type small {
    margin-top: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.42em;
    font-size: 0.52rem;
    color: var(--white);
}

.nav {
    justify-self: center;
    display: flex;
    align-items: center;
}

.header__end {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 4px;
}

.social {
    display: flex;
    align-items: center;
}

.social a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.social a:hover {
    color: var(--gold);
}

.social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav__links a {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--grey);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav__links a.is-active,
.nav__links a:hover {
    color: var(--gold);
}

.nav__cta {
    display: none;
}

.nav__toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 4px;
    padding: 0;
}

.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--white);
    position: absolute;
    left: 12px;
}

.nav__toggle span {
    top: 21px;
}

.nav__toggle span::before,
.nav__toggle span::after {
    content: "";
    left: 0;
}

.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }

body.nav-open .nav__toggle span {
    background: transparent;
}

body.nav-open .nav__toggle span::before {
    top: 0;
    transform: rotate(45deg);
}

body.nav-open .nav__toggle span::after {
    top: 0;
    transform: rotate(-45deg);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 4px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: var(--space);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
    background: var(--amber);
    border-color: var(--amber);
    transform: translateY(-2px);
}

.btn--ghost {
    background: transparent;
    color: var(--gold);
}

.btn--ghost:hover {
    background: var(--gold);
    color: var(--space);
}

.btn--small {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.68rem;
}

.btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #0b0e14;
}

.hero__photo {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#space-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

#space-background canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
}

.hero__veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(11, 14, 20, 0.55) 0%, rgba(11, 14, 20, 0.18) 42%, rgba(11, 14, 20, 0) 68%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 3;
    width: min(760px, 100%);
    padding: calc(var(--header) + 28px) var(--pad) 56px;
}

@media (min-width: 981px) {
    .hero__content {
        width: 60%;
        max-width: 60%;
        flex: 0 0 60%;
    }
}

.brand {
    margin-bottom: 22px;
}

.brand__name {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.28em;
    font-size: clamp(1.7rem, 4vw, 3rem);
    line-height: 1;
    text-shadow: 0 0 20px rgba(229, 178, 93, 0.35);
}

.brand__system {
    display: block;
    margin-top: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.62em;
    font-size: 0.78rem;
    color: var(--white);
}

.hero h1 {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: -0.02em;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 1.05;
    max-width: 12em;
}

.rise__line {
    display: block;
    clip-path: inset(-0.2em 0);
}

.rise__word {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, -110%, 0);
}

.js .rise__word {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transition-delay: calc(var(--index, 0) * 0.12s);
}

.rise.is-in .rise__word {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

html:not(.js) .rise__word {
    opacity: 1;
    transform: none;
}

.js .hero__rest {
    opacity: 0;
}

.js .hero__rest.is-in {
    opacity: 1;
    transition: opacity 0.9s ease;
}

.hero__lead {
    margin-top: 22px;
    max-width: 46ch;
    color: var(--grey);
    font-size: 1.02rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
    max-width: 560px;
}

.chips li {
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px 10px;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero__cta {
    margin-top: 32px;
}

.hero__cta-label {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--amber);
    margin-bottom: 12px;
}

.hero__cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chapter {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(var(--header) + 36px) var(--pad) 64px;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
}

.chapter--cosmic {
    background:
        radial-gradient(900px 420px at 90% 0%, rgba(229, 178, 93, 0.08), transparent 60%),
        var(--space);
}

.kicker {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--gold);
}

.chapter__head {
    max-width: 760px;
    margin-bottom: 32px;
}

.chapter h2,
.sector h3,
.project h3,
.solution h3,
.block h3 {
    font-family: var(--font-heading);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--white);
}

.chapter h2 {
    margin-top: 10px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.05;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: center;
}

.lead {
    margin-top: 18px;
    color: var(--white);
    font-size: 1.05rem;
}

.muted {
    margin-top: 14px;
    color: var(--grey);
}

.nosotros__actions {
    margin-top: 26px;
}

.nosotros__more {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.nosotros__more h3 {
    font-size: 1.15rem;
    margin-top: 22px;
}

.nosotros__more h3:first-child {
    margin-top: 0;
}

.nosotros__more p {
    margin-top: 8px;
    color: var(--grey);
}

.steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}

.step {
    background: var(--cosmic);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 14px 14px 16px;
}

.step span {
    display: block;
    font-family: var(--font-display);
    color: var(--gold);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.step strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

.step p {
    margin-top: 4px;
    color: var(--grey);
    font-size: 0.92rem;
}

.portrait {
    position: relative;
    min-height: 460px;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--line);
}

.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 460px;
}

.solutions {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.solution {
    grid-column: span 2;
    background: var(--cosmic);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.solution:nth-child(4),
.solution:nth-child(5) {
    grid-column: span 3;
}

.solution__icon {
    width: 36px;
    height: 36px;
    color: var(--gold);
}

.solution__icon svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.solution .tag {
    color: var(--amber);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.solution h3 {
    font-size: 1.35rem;
}

.solution .stack {
    color: var(--grey);
    font-size: 0.92rem;
}

.solution p {
    color: var(--grey);
    font-size: 0.95rem;
}

.solution .btn {
    margin-top: auto;
    align-self: flex-start;
}

.sectores {
    position: relative;
    height: 100vh;
    height: 100dvh;
    background: var(--space);
}

.sectores__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.sectores__track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.sector {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
}

.sector img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sector__shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 14, 20, 0.35) 0%, rgba(11, 14, 20, 0.15) 35%, rgba(11, 14, 20, 0.88) 100%);
}

.sector__copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 var(--pad) 72px;
    max-width: 760px;
}

.sector h3 {
    margin-top: 8px;
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 0.95;
}

.sector p {
    margin-top: 12px;
    max-width: 36ch;
    color: var(--white);
    font-size: 1.05rem;
}

.sectores__hud {
    position: absolute;
    top: var(--header);
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 18px var(--pad) 28px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(11, 14, 20, 0.78), transparent);
}

.sectores__hud h2 {
    margin-top: 8px;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.sectores__count {
    font-family: var(--font-display);
    color: var(--gold);
    letter-spacing: 0.12em;
    font-size: 1rem;
}

.sectores__hint {
    position: absolute;
    right: var(--pad);
    bottom: 28px;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    transition: opacity 0.3s ease;
}

.sectores__hint.is-gone {
    opacity: 0;
}

.projects__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.project {
    position: relative;
    background: #0b0e14;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    min-height: 440px;
    min-width: 0;
}

.project[hidden] {
    display: none;
}

.project figure {
    position: absolute;
    inset: 0;
    margin: 0;
}

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project__body {
    position: relative;
    z-index: 1;
    width: 36%;
    min-height: 440px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    background: rgba(11, 14, 20, 0.8);
}

.project h3 {
    font-size: 1.35rem;
}

.project .field {
    color: var(--grey);
    font-size: 0.92rem;
}

.project .field span {
    display: block;
    color: var(--amber);
    font-family: var(--font-heading);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.carousel__bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.carousel__bar button {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--gold);
    font-size: 1.2rem;
}

.carousel__bar button:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--space);
}

.carousel__count {
    font-family: var(--font-display);
    letter-spacing: 0.12em;
    color: var(--white);
    min-width: 88px;
    text-align: center;
}

.contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(20px, 3vw, 40px);
    align-items: stretch;
}

.contact__list {
    margin-top: 22px;
    display: grid;
    gap: 12px;
}

.contact__list li {
    padding-left: 14px;
    border-left: 2px solid var(--gold);
    color: var(--grey);
}

.contact__list strong {
    display: block;
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 700;
}

.contact__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.contact address {
    margin-top: 18px;
    font-style: normal;
    color: var(--grey);
}

.contact address a {
    color: var(--white);
}

.map {
    position: relative;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 4px;
    overflow: hidden;
    background: var(--cosmic);
}

.map iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    filter: grayscale(0.4) contrast(1.05);
}

.map__activate {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
}

.map::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(11, 14, 20, 0.28);
    pointer-events: none;
}

.map.is-live::before {
    display: none;
}

.map.is-live .map__activate {
    display: none;
}

.lenis.lenis-smooth .map.is-live iframe {
    pointer-events: auto;
}

.legal {
    margin-top: 28px;
    color: var(--grey);
    font-size: 0.85rem;
}

.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.is-inview {
    opacity: 1;
    transform: none;
}

@media (max-width: 980px) {
    :root { --header: 64px; }

    .nav__links,
    .header .btn--small {
        display: none;
    }

    body.nav-open .nav__links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        inset: var(--header) 0 0 0;
        background: rgba(11, 14, 20, 0.97);
        padding: 28px var(--pad) 40px;
        gap: 4px;
        z-index: 25;
    }

    body.nav-open .nav__links a:not(.nav__cta) {
        font-size: 1.15rem;
        letter-spacing: 0.12em;
        min-height: 48px;
    }

    body.nav-open .nav__cta {
        display: inline-flex;
        margin-top: 12px;
        width: min(240px, 100%);
    }

    .nav__toggle {
        display: inline-block;
    }

    .split,
    .contact__grid,
    .solutions,
    .projects__grid,
    .steps {
        grid-template-columns: 1fr;
    }

    .solution,
    .solution:nth-child(4),
    .solution:nth-child(5) {
        grid-column: auto;
    }

    .project {
        min-height: 480px;
    }

    .project__body {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        min-height: 0;
    }

    .portrait,
    .portrait img {
        min-height: 280px;
    }

    .chapter {
        justify-content: flex-start;
    }
}

@media (max-width: 800px) {
    .sectores__hint { display: none; }
}

@media (max-width: 640px) {
    .hero h1 {
        max-width: none;
    }

    .brand__system {
        letter-spacing: 0.42em;
    }

    .hero__cta-row .btn {
        flex: 1 1 160px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .js .reveal,
    .sectores__hint {
        transition: none;
    }

    .sectores {
        height: auto;
    }

    .sectores__sticky {
        position: relative;
        height: auto;
        overflow: visible;
    }

    .sectores__track {
        flex-direction: column;
        transform: none !important;
    }

    .sector {
        min-height: 100vh;
        min-height: 100dvh;
        width: 100% !important;
        flex-basis: auto !important;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
    }

    .js .rise__word,
    .js .hero__rest {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
