@font-face {
    font-display: swap;
    font-family: "Universal Sans";
    font-style: normal;
    font-weight: 100 900;
    src: url("../fonts/UniversalSansGX.woff2") format("woff2");
}

@font-face {
    font-display: swap;
    font-family: "Universal Sans Display";
    font-style: normal;
    font-weight: 100 900;
    src: url("../fonts/UniversalSansDisplayGX.woff2") format("woff2");
}

:root {
    --accent: #1d78b8;
    --focus-ring: #525a65;
    --font-display: "Universal Sans Display", "Universal Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-sans: "Universal Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --gradient-start: #064f9f;
    --gradient-middle: #0f76b9;
    --gradient-end: #238ec7;
    --motion-reveal-opacity: 900ms;
    --motion-reveal-shift: 700ms;
    --section-space: clamp(6rem, 10vw, 9rem);
    --site-gradient: linear-gradient(105deg, var(--gradient-start) 0%, var(--gradient-middle) 48%, var(--gradient-end) 100%);
}

html {
    background: #f5f7fa;
    color-scheme: light dark;
    scroll-padding-top: 5rem;
    scrollbar-gutter: stable;
}

body {
    font-family: var(--font-sans);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.site-container {
    margin-inline: auto;
    width: min(calc(100% - clamp(3rem, 10vw, 6rem)), 76rem);
}

.page-gutter-x {
    padding-inline: clamp(1.5rem, 5vw, 3rem);
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgb(29 120 184 / 28%);
}

:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 4px;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
}

[data-header][data-surface="dark"] {
    color: #f5f7fa;
}

[data-header][data-surface="dark"][data-scrolled="true"] {
    background: rgb(5 6 8 / 95%);
}

[data-header][data-surface="dark"] [data-santiago-zone] {
    color: #f5f7fa;
}

[data-header][data-surface="dark"] [data-santiago-time] {
    color: #9da4af;
}

[data-header][data-surface="dark"] a[href="#contact"] {
    background: #f5f7fa;
    color: #17191d;
}

[data-header][data-surface="dark"] a[href="#contact"]:hover {
    background: #dfe3e8;
}

.gradient-text {
    background: var(--site-gradient);
    background-clip: text;
    color: transparent;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-heading {
    display: inline-block;
    font-weight: 650;
    margin-bottom: -0.08em;
    padding-bottom: 0.08em;
}

.santiago-sky {
    height: 100%;
    inset: 0;
    mask-image: linear-gradient(to bottom, #000 0%, #000 84%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 1200ms cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 84%, transparent 100%);
}

#top::after {
    background: radial-gradient(ellipse at center, rgb(5 6 8 / 45%) 0%, rgb(5 6 8 / 18%) 50%, transparent 80%);
    content: "";
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.music-progress-fill {
    background: var(--site-gradient);
    clip-path: inset(0 calc(100% - var(--music-progress, 0%)) 0 0 round 999px);
    transition: clip-path 200ms linear;
}

@keyframes hero-line-reveal {
    from {
        opacity: 0;
        transform: translateY(0.2em);
    }
}

@keyframes hero-content-reveal {
    from {
        opacity: 0;
    }
}

[data-hero-line] {
    animation: hero-line-reveal 880ms cubic-bezier(0.22, 1, 0.36, 1) both;
    display: inline-block;
}

[data-hero-line="second"] {
    animation-delay: 150ms;
}

[data-hero-copy] {
    animation: hero-content-reveal 680ms cubic-bezier(0.22, 1, 0.36, 1) 360ms both;
}

[data-hero-action] {
    animation: hero-content-reveal 680ms cubic-bezier(0.22, 1, 0.36, 1) 480ms both;
}

[data-reveal-ready] [data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity var(--motion-reveal-opacity) cubic-bezier(0.45, 0, 0.55, 1), transform var(--motion-reveal-shift) cubic-bezier(0.45, 0, 0.55, 1);
}

[data-reveal-ready] [data-reveal][data-revealed="true"] {
    opacity: 1;
    transform: translateY(0);
}

.statement-word {
    opacity: var(--word-opacity, 0.46);
    transition: opacity 90ms linear;
}

.faq-panel {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 260ms ease;
}

.faq-panel > div {
    overflow: hidden;
}

.faq-item.is-open .faq-panel {
    grid-template-rows: 1fr;
    opacity: 1;
}

.faq-item.is-open [data-faq-icon] {
    color: #f5f7fa;
    transform: rotate(45deg);
}

.faq-item button:focus-visible {
    border-radius: 0.5rem;
    outline-offset: -2px;
}

[data-music-modal] {
    opacity: 0;
    transition: opacity 220ms ease;
}

[data-music-modal]:focus {
    outline: none;
}

[data-music-modal-panel] {
    transform: translateY(10px) scale(0.985);
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-music-modal-panel] :focus-visible {
    outline-color: rgb(255 255 255 / 72%);
    outline-offset: -3px;
}

[data-music-modal][data-open="true"] {
    opacity: 1;
}

[data-music-modal][data-open="true"] [data-music-modal-panel] {
    transform: translateY(0) scale(1);
}

@keyframes music-loading {
    0%,
    100% {
        opacity: 0.42;
    }

    50% {
        opacity: 0.72;
    }
}

[data-music-section][data-loading="true"] [data-music-title] {
    animation: music-loading 1.6s ease-in-out infinite;
    background: rgb(23 25 29 / 9%);
    border-radius: 999px;
    height: 0.78rem;
    width: min(13rem, 62%);
}

[data-music-placeholder]:not([hidden]) {
    animation: music-loading 1.6s ease-in-out infinite;
    background: rgb(23 25 29 / 9%);
}

.services-intro {
    align-items: end;
    display: grid;
    gap: clamp(1.75rem, 4vw, 4.5rem);
    grid-template-columns: minmax(0, 1.28fr) minmax(18rem, 0.72fr);
}

.section-heading {
    font-size: clamp(2.15rem, 3.75vw, 3.55rem);
    font-weight: 455;
    letter-spacing: -0.05em;
    line-height: 1.055;
    margin: 0;
    text-wrap: balance;
}

.section-lead {
    font-size: clamp(1.35rem, 2.3vw, 2.15rem);
    font-weight: 455;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin: 0.5rem 0 0;
    text-wrap: balance;
}

.services-intro__summary {
    color: #6b727d;
    font-size: 0.97rem;
    line-height: 1.67;
    margin: 0 0 0.3rem;
    max-width: 28rem;
}

/* Navigation and cards share one grid so their sticky boundaries stay aligned. */
.services-stage {
    --services-card-height: clamp(29rem, 68svh, 40rem);
    --services-card-top: max(6.25rem, calc((100svh - var(--services-card-height)) / 2));
    align-items: start;
    column-gap: clamp(2.25rem, 4.5vw, 5rem);
    display: grid;
    grid-template-columns: clamp(10.75rem, 14vw, 12rem) minmax(0, 1fr);
    margin-top: clamp(5rem, 8vw, 7rem);
    padding-bottom: calc(var(--services-card-top) + clamp(4.5rem, 8svh, 6.5rem));
    position: relative;
    row-gap: clamp(6rem, 14svh, 11rem);
}

.services-nav-shell {
    align-self: start;
    display: grid;
    grid-column: 1;
    grid-row: 1 / span 4;
    height: var(--services-card-height);
    min-width: 0;
    place-items: center end;
    position: sticky;
    top: var(--services-card-top);
    z-index: 10;
}

.services-nav {
    --services-nav-dot: 0.34rem;
    --services-nav-row: 4.1rem;
    max-width: 100%;
    position: relative;
    width: 100%;
}

.services-nav__link {
    align-items: center;
    color: #6b727d;
    display: flex;
    font-size: 0.95rem;
    font-weight: 500;
    justify-content: flex-end;
    letter-spacing: -0.018em;
    line-height: 1.35;
    min-height: var(--services-nav-row);
    padding-left: calc(var(--services-nav-dot) + 0.35rem);
    position: relative;
    text-align: right;
    transition: color 240ms ease;
    width: 100%;
}

.services-nav__link > span {
    max-width: 100%;
    min-width: 0;
    position: relative;
    text-wrap: balance;
}

.services-nav__link > span::before {
    background: var(--accent);
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: var(--services-nav-dot);
    margin-left: calc((var(--services-nav-dot) + 0.35rem) * -1);
    margin-right: 0.35rem;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 240ms ease, transform 240ms ease;
    vertical-align: 0.08em;
    width: var(--services-nav-dot);
}

.services-nav__link + .services-nav__link::before {
    background: rgb(23 25 29 / 9%);
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.services-nav__link:hover,
.services-nav__link[data-active="true"] {
    color: #17191d;
}

.services-nav__link[data-active="true"] > span::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.service-card {
    align-items: center;
    background: #ffffff;
    border-radius: clamp(2rem, 3.25vw, 2.75rem);
    display: grid;
    gap: clamp(2.5rem, 6vw, 6rem);
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 15rem);
    grid-column: 2;
    height: var(--services-card-height);
    overflow: hidden;
    padding: clamp(2.25rem, 4.5vw, 4rem);
    position: sticky;
    scroll-margin-top: var(--services-card-top);
    top: var(--services-card-top);
}

/* Later cards cover earlier cards as they enter from below. */
.service-card:nth-of-type(1) {
    z-index: 1;
}

.service-card:nth-of-type(2) {
    z-index: 2;
}

.service-card:nth-of-type(3) {
    z-index: 3;
}

.service-card:nth-of-type(4) {
    z-index: 4;
}

.service-card__content {
    max-width: 38rem;
}

.service-card h3 {
    font-size: clamp(2rem, 3.3vw, 2.8rem);
    font-weight: 455;
    letter-spacing: -0.045em;
    line-height: 1.06;
    margin: 0;
    text-wrap: balance;
}

.service-card__content > p {
    color: #6b727d;
    font-size: clamp(0.98rem, 1.25vw, 1.08rem);
    line-height: 1.7;
    margin: 1.4rem 0 0;
    max-width: 35rem;
}

.service-card__visual {
    display: grid;
    justify-items: end;
    width: 100%;
}

.service-card__icon {
    align-items: center;
    aspect-ratio: 1;
    background: #f2f4f7;
    border-radius: clamp(1.5rem, 2.4vw, 2rem);
    display: inline-flex;
    justify-content: center;
    width: clamp(10.5rem, 15vw, 14rem);
}

.service-card__icon i {
    color: #737b86;
    font-size: clamp(2.1rem, 3vw, 2.7rem);
    opacity: 0.76;
    transition: color 300ms ease, opacity 300ms ease;
}

.service-card[data-active="true"] .service-card__icon i {
    color: #4f5661;
    opacity: 0.92;
}

.process-layout {
    align-items: start;
    display: grid;
    gap: clamp(3.5rem, 7vw, 6.5rem);
    grid-template-columns: minmax(15rem, 0.72fr) minmax(0, 1.28fr);
}

.process-intro {
    align-self: start;
    max-width: 32rem;
    position: sticky;
    top: 8rem;
}

.process-list {
    list-style: none;
    margin: 0;
    max-width: 48rem;
    padding: 0;
}

.process-step {
    column-gap: clamp(1.25rem, 2.5vw, 2rem);
    display: grid;
    grid-template-columns: 2.75rem minmax(0, 1fr);
    padding-bottom: clamp(2.85rem, 5vw, 4.25rem);
    position: relative;
}

.process-step:not(:last-child)::before {
    background: rgb(23 25 29 / 14%);
    bottom: 0.55rem;
    content: "";
    left: 1.34375rem;
    position: absolute;
    top: 3.25rem;
    transform-origin: top;
    width: 1px;
}

[data-reveal-ready] .process-step:not(:last-child)::before {
    transform: scaleY(0);
    transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1) 90ms;
}

[data-reveal-ready] .process-step[data-revealed="true"]:not(:last-child)::before {
    transform: scaleY(1);
}

.process-step:last-child {
    padding-bottom: 0;
}

.process-step__number {
    align-items: center;
    border: 1px solid rgb(23 25 29 / 20%);
    border-radius: 0.82rem;
    color: #4f5661;
    display: inline-flex;
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
    font-weight: 560;
    height: 2.75rem;
    justify-content: center;
    letter-spacing: -0.02em;
    line-height: 1;
    position: relative;
    width: 2.75rem;
    z-index: 1;
}

.process-step__content {
    min-width: 0;
    padding-top: 0.18rem;
}

.process-step h3 {
    font-size: clamp(1.38rem, 2.1vw, 1.78rem);
    font-weight: 455;
    letter-spacing: -0.042em;
    line-height: 1.12;
    margin: 0;
    text-wrap: balance;
}

.process-step p {
    color: #6b727d;
    font-size: clamp(0.96rem, 1.12vw, 1.02rem);
    line-height: 1.7;
    margin: 0.72rem 0 0;
    max-width: 42rem;
}

/*
 * One section rhythm:
 * 6rem on mobile, scaling up to 9rem on desktop.
 * Adjacent sections therefore keep exactly 12rem–18rem between content.
 */
#services {
    padding: var(--section-space) 0 0;
}

.process-section,
.about-section,
#faq,
#contact {
    padding: var(--section-space) 0;
}

/*
 * The service stack gets one section-space after its final card.
 * Together with the following section's top padding, this matches every other transition.
 */
.services-stage {
    padding-bottom: var(--section-space);
}

/* Contact uses the same section padding instead of viewport-dependent centering. */
#contact {
    min-height: 0;
}

#contact > div {
    padding-block: 0;
}

.about-layout {
    display: grid;
    max-width: 48rem;
}

.about-header {
    max-width: 48rem;
}

.about-copy {
    margin-top: clamp(1.25rem, 1.8vw, 1.65rem);
    max-width: 40rem;
}

@media (max-width: 900px) {
    .process-layout {
        gap: clamp(3.5rem, 8vw, 5rem);
        grid-template-columns: 1fr;
    }

    .process-intro {
        max-width: 48rem;
        position: static;
    }

    .process-list {
        max-width: 46rem;
    }
}

@media (max-width: 640px) {
    .process-layout {
        gap: 3.5rem;
    }

    .process-step {
        column-gap: 1.1rem;
        grid-template-columns: 2.5rem minmax(0, 1fr);
        padding-bottom: 3rem;
    }

    .process-step:not(:last-child)::before {
        left: 1.21875rem;
        top: 3rem;
    }

    .process-step__number {
        border-radius: 0.75rem;
        height: 2.5rem;
        width: 2.5rem;
    }

    .process-step__content {
        padding-top: 0.12rem;
    }

    .process-step h3 {
        font-size: 1.36rem;
    }

    .process-step p {
        line-height: 1.68;
        margin-top: 0.68rem;
    }

    .about-copy {
        margin-top: 1.35rem;
    }

}

@media (prefers-color-scheme: dark) {
    :root {
        --focus-ring: #c7cdd5;
        --gradient-start: #2f78c4;
        --gradient-middle: #3e9dd3;
        --gradient-end: #62bfe1;
    }

    html {
        background: #050608;
    }

    #top:has(.santiago-sky:not([hidden]))::after {
        opacity: 1;
    }

    .santiago-sky[data-ready="true"] {
        opacity: 1;
    }

    .services-intro__heading > p,
    .services-intro__summary,
    .service-card__content > p {
        color: #9da4af;
    }

    .services-nav__link {
        color: #747c87;
    }

    .services-nav__link + .services-nav__link::before {
        background: rgb(255 255 255 / 10%);
    }

    .services-nav__link:hover,
    .services-nav__link[data-active="true"] {
        color: #f5f7fa;
    }

    .service-card {
        background: #0a0b0e;
    }

    .service-card__icon {
        background: #15171c;
    }

    .service-card__icon i {
        color: #8d95a0;
    }

    .service-card[data-active="true"] .service-card__icon i {
        color: #c0c6ce;
    }

    .process-step:not(:last-child)::before {
        background: rgb(255 255 255 / 14%);
    }

    .process-step__number {
        border-color: rgb(255 255 255 / 20%);
        color: #c0c6ce;
    }

    .process-step p {
        color: #9da4af;
    }

    [data-music-placeholder]:not([hidden]),
    [data-music-section][data-loading="true"] [data-music-title] {
        background: rgb(255 255 255 / 9%);
    }
}

@media (max-width: 900px), (max-height: 650px) {
    .services-intro {
        grid-template-columns: 1fr;
    }

    .services-intro__summary {
        margin: 0;
        max-width: 42rem;
    }

    .services-stage {
        display: grid;
        gap: 1rem;
        grid-template-columns: 1fr;
        margin-top: 3.5rem;
        padding-bottom: var(--section-space);
    }

    .services-nav-shell {
        display: none;
    }

    .service-card {
        gap: 1.75rem;
        grid-column: 1;
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
        padding: clamp(1.5rem, 6vw, 2.25rem);
        position: relative;
        scroll-margin-top: 5.5rem;
        top: auto;
        z-index: auto;
    }

    .service-card__visual {
        justify-items: start;
    }

    .service-card__icon {
        border-radius: 1.3rem;
        width: 4.35rem;
    }

    .service-card__icon i {
        font-size: 1.35rem;
    }

}

@media (min-width: 901px) and (min-height: 651px) and (max-height: 700px) {
    .services-stage {
        --services-card-height: clamp(25rem, 68svh, 35rem);
        --services-card-top: max(5.5rem, calc((100svh - var(--services-card-height)) / 2));
    }
}

@media (max-width: 640px) {

    .service-card {
        border-radius: 1.75rem;
    }

    .service-card__content > p {
        font-size: 0.98rem;
        line-height: 1.66;
        margin-top: 1rem;
    }

    [data-statement] > div {
        padding-bottom: 2rem;
        padding-top: 5.5rem;
    }

}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .statement-word {
        opacity: 1 !important;
    }

    [data-hero-line],
    [data-hero-copy],
    [data-hero-action] {
        animation: none !important;
    }
}
