/* =========================================================
   FONTS
========================================================= */

@font-face {
    font-family: "Halogen";
    src: url("fonts/Halogen-Regular.otf") format("opentype");
    font-weight: 400;
}

@font-face {
    font-family: "Halogen";
    src: url("fonts/Halogen-Medium.otf") format("opentype");
    font-weight: 500;
}

@font-face {
    font-family: "Halogen";
    src: url("fonts/Halogen-Black.otf") format("opentype");
    font-weight: 900;
}

@font-face {
    font-family: "Manrope";
    src: url("fonts/Manrope-Variable.woff2") format("woff2");
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* =========================================================
   THEME
========================================================= */

:root {
    --bg: #f4f4f0;
    --text: #111;
    --border: #111;
    --shadow: rgba(0, 0, 0, 0.22);

    --ink: #0e0e14;
    --mint: #91ecdc;
    --pink: #ff98e1;
    --coral: #fb424c;
    --violet: #5a27bd;
    --aurora: linear-gradient(90deg, var(--mint) 0%, var(--pink) 38%, var(--coral) 68%, var(--violet) 100%);
}

:root[data-theme="dark"] {
    --bg: #111;
    --text: #f4f4f0;
    --border: #f4f4f0;
    --shadow: rgba(0, 0, 0, 0.55);
}

/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", Arial, Helvetica, sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    transition: background-color .35s ease, color .35s ease;
}

/* =========================================================
   HEADER
========================================================= */

header {
    position: relative;
    width: 100%;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 32px;
    border-bottom: 2px solid var(--border);
    background: var(--bg);
    transition: background-color .35s ease, border-color .35s ease;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

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

.logo-img-dark {
    display: none;
}

[data-theme="dark"] .logo-img-light {
    display: none;
}

[data-theme="dark"] .logo-img-dark {
    display: block;
}

.theme-toggle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: opacity .25s ease, border-color .35s ease, color .35s ease;
}

.theme-toggle:hover {
    opacity: .6;
}

.theme-toggle .icon {
    width: 18px;
    height: 18px;
}

.theme-toggle .icon-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: block;
}

nav {
    display: flex;
    gap: 28px;
    color: var(--text);
}

.nav-link {
    position: relative;
    display: inline-block;
    color: inherit;
    text-decoration: none;
    transition: opacity .25s ease;
}

.nav-link:hover {
    opacity: .5;
}

.nav-link.active .nav-text {
    color: var(--coral);
}

.nav-text {
    display: block;
    color: inherit;
    font-family: "Halogen", Arial, sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* =========================================================
   HERO
========================================================= */

.hero {
    display: flex;
    align-items: stretch;
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.hero-content {
    flex: 0 1 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-height: 480px;
    padding: 40px 48px 40px 32px;
    border-right: 2px solid var(--border);
    color: var(--text);
    transition: border-color .35s ease, color .35s ease;
}

.hero-video-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-family: "Halogen", Arial, sans-serif;
    font-size: clamp(40px, 6vw, 110px);
    line-height: .9;
    letter-spacing: -0.06em;
    font-weight: 600;
    transform: translateY(-15px);
}

/* =========================================================
   ABOUT HERO
========================================================= */

.about-hero {
    display: flex;
    align-items: stretch;
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.about-hero-logo-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg);
    transition: background-color .35s ease;
}

.about-hero-logo-mark {
    position: absolute;
    inset: 0;
    margin: auto;
    width: min(60%, 460px);
    aspect-ratio: 1200 / 956;
    background-image: url('images/site/liquid-texture.jpg');
    background-size: 320% 320%;
    background-position: 50% 50%;
    -webkit-mask-image: url('images/site/logo-mark-white.png');
    mask-image: url('images/site/logo-mark-white.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    filter: saturate(1) brightness(1);
    transition: filter .5s ease;
    will-change: background-position;
}

.about-hero-logo-wrap.is-active .about-hero-logo-mark {
    filter: saturate(1.15) brightness(1.05);
}

.about-hero-content {
    flex: 0 1 60%;
    max-width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    min-height: 480px;
    padding: 40px 32px 40px 48px;
    border-left: 2px solid var(--border);
    color: var(--text);
    transition: border-color .35s ease, color .35s ease;
}

.about-hero-text {
    font-family: "Halogen", Arial, sans-serif;
    max-width: 950px;
    font-size: clamp(38px, 5vw, 75px);
    line-height: .95;
    letter-spacing: -0.055em;
    font-weight: 400;
}

/* =========================================================
   PROJECTS
========================================================= */

.projects-section {
    padding: 64px 32px 90px;
}

.section-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 80px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.projects {
    position: relative;
}

.project {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 24px;
    align-items: baseline;
    border-bottom: 2px solid var(--border);
    padding: 13px 0;
    cursor: pointer;
    z-index: 2;
    transition: opacity .5s ease, border-color .35s ease;
}

.project-name {
    font-size: clamp(32px, 5vw, 75px);
    line-height: .95;
    letter-spacing: -0.055em;
    transition: transform .35s cubic-bezier(.2,.8,.2,1);
}

.project-category {
    min-width: 0;
    font-size: 13px;
    text-transform: uppercase;
    text-align: right;
    white-space: nowrap;
}

.project:hover .project-name {
    transform: translateX(18px);
}

.projects:hover .project {
    opacity: .25;
}

.projects:hover .project:hover {
    opacity: 1;
}

/* =========================================================
   FLOATING PROJECT IMAGE
========================================================= */

.project-image {
    position: fixed;
    display: block;
    border-radius: 6px;
    border: 2px solid var(--border);
    box-shadow: 0 14px 34px var(--shadow);
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.92);
    transition:
        opacity .25s ease,
        transform .35s cubic-bezier(.2,.8,.2,1),
        border-color .35s ease;
    will-change: transform;
}

.project-image img {
    display: block;
    max-width: min(950px, 70vw);
    max-height: min(700px, 55vw);
    width: auto;
    height: auto;
}

.icon-arrow {
    width: 0.85em;
    height: 0.85em;
    display: inline-block;
    vertical-align: -0.05em;
    stroke: currentColor;
    flex-shrink: 0;
}

.project-image-label {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    white-space: nowrap;
}

.project:hover + .project-image {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* =========================================================
   MARQUEE
========================================================= */

.marquee-section {
    padding: 0 0 120px;
}

.marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 16px;
    width: max-content;
    animation: marquee-scroll 45s linear infinite;
}

.marquee-track img {
    height: 480px;
    width: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    display: block;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* =========================================================
   SERVICES
========================================================= */

.services {
    padding: 0 32px 180px;
}

.gradient-text-boxed {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--aurora);
    color: var(--ink);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, minmax(190px, auto));
    gap: 12px;
}

.service {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease, border-color .35s ease;
}

.service-wide {
    grid-column: span 2;
}

.service:hover {
    background: var(--text);
    color: var(--bg);
}

.service-icon svg {
    width: 34px;
    height: 34px;
    stroke: currentColor;
    display: block;
}

.service-name {
    font-size: clamp(17px, 1.5vw, 24px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 24px;
}

/* =========================================================
   ABOUT PAGE
========================================================= */

.about {
    padding: 90px 32px 80px;
}

.about-grid {
    border-top: 2px solid var(--border);
    padding-top: 12px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    transition: border-color .35s ease;
}

.about-grid + .about-grid {
    margin-top: 60px;
}

.about > .about-grid:first-child {
    border-top: none;
    padding-top: 0;
}

.about-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.about-text-secondary {
    max-width: 750px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.5;
    letter-spacing: -0.015em;
}

.about-quemsomos {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-inline-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.7;
    transition: opacity .25s ease;
}

.about-inline-link:hover {
    opacity: 1;
}

.about-gallery {
    display: flex;
    border-top: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.about-gallery-item {
    flex: 1;
    aspect-ratio: 9 / 4;
    position: relative;
    overflow: hidden;
    border-left: 2px solid var(--border);
    transition: border-color .35s ease;
}

.about-gallery-item:last-child {
    border-right: 2px solid var(--border);
}

.about-gallery-carousel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.about-gallery-carousel-img.is-visible {
    opacity: 1;
}

.about-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
}

.about-tag {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    border: 2px solid var(--border);
    border-radius: 999px;
    font-size: 18px;
    white-space: nowrap;
    transition: border-color .35s ease;
}

.about-tag-small {
    padding: 8px 16px;
    border-width: 1px;
    border-radius: 6px;
    font-size: 14px;
}

/* =========================================================
   PROJECT DETAIL
========================================================= */

.project-link {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.project-detail-hero {
    padding: 64px 32px 40px;
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-title {
    font-family: "Halogen", Arial, sans-serif;
    font-size: clamp(40px, 6vw, 90px);
    line-height: .95;
    letter-spacing: -0.05em;
    font-weight: 900;
    margin-bottom: 24px;
}

.project-detail-intro {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.6;
}

.project-detail-cover {
    aspect-ratio: 21 / 9;
    overflow: hidden;
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

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

.project-detail-grid-crop {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
    border-left: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-grid-crop .project-detail-cell {
    position: relative;
    aspect-ratio: var(--grid-ratio, 1 / 1);
    overflow: hidden;
    cursor: pointer;
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-grid-crop .project-detail-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.project-detail-grid-crop .project-detail-cell:hover img {
    transform: scale(1.06);
}

.project-detail-cell-expand {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease, background .3s ease;
}

.project-detail-grid-crop .project-detail-cell:hover .project-detail-cell-expand {
    opacity: 1;
    background: rgba(0, 0, 0, 0.25);
}

.project-detail-cell-expand svg {
    width: 26px;
    height: 26px;
}

.project-detail-strips {
    border-top: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-strip {
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .35s ease;
}

.project-detail-strip img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}

.project-detail-strip:hover img {
    transform: scale(1.03);
}

.project-detail-video-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
    border-top: 2px solid var(--border);
    border-left: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-video-grid .project-detail-video-cell {
    aspect-ratio: 16 / 9;
    border-right: 2px solid var(--border);
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-video-grid iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: rgba(0, 0, 0, 0.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 100;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f4f4f0;
    border-radius: 999px;
    background: transparent;
    color: #f4f4f0;
    font-size: 18px;
    cursor: pointer;
    transition: background .25s ease, color .25s ease;
}

.lightbox-close:hover {
    background: #f4f4f0;
    color: #111;
}

.project-detail-video {
    aspect-ratio: 16 / 9;
    border-bottom: 2px solid var(--border);
    transition: border-color .35s ease;
}

.project-detail-video iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.project-detail-media {
    padding: 80px 32px 0;
}

.project-detail-media-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.project-detail-media .project-detail-video-grid {
    border-top: 2px solid var(--border);
    border-left: 2px solid var(--border);
}

.project-detail-credits {
    padding: 80px 32px;
}

/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 30px 32px 40px;
    background: #111;
    color: #f4f4f0;
    border-top: 2px solid #555;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 25px;
    margin-bottom: 110px;
}

.footer-headline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 36px;
    max-width: 900px;
}

.footer-title {
    font-family: "Halogen", Arial, sans-serif;
    font-size: clamp(22px, 3.4vw, 50px);
    line-height: .95;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.footer-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 17px;
    border: 1.5px solid #f4f4f0;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background .25s ease, color .25s ease;
}

.footer-whatsapp:hover {
    background: #f4f4f0;
    color: #111;
}

.footer-email {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 16px;
    text-align: right;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid #555;
    padding-top: 15px;
    font-size: 12px;
}

.footer-bottom a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    header {
        padding: 20px;
    }

    .logo-img {
        height: 17px;
    }

    nav {
        gap: 15px;
    }

    .nav-text {
        font-size: 14px;
    }

    .hero {
        flex-direction: column;
    }

    .hero-content {
        flex: none;
        max-width: 100%;
        min-height: 0;
        gap: 12px;
        padding: 32px 20px;
        border-right: none;
        border-bottom: 2px solid var(--border);
    }

    .hero-video-wrap {
        flex: none;
        height: 260px;
    }

    .hero-title {
        font-size: 11vw;
        transform: translateY(0px);
    }

    .about-hero {
        flex-direction: column-reverse;
    }

    .about-hero-content {
        flex: none;
        max-width: 100%;
        min-height: 0;
        gap: 12px;
        padding: 32px 20px;
        border-left: none;
        border-top: 2px solid var(--border);
    }

    .about-hero-logo-wrap {
        flex: none;
        height: 260px;
    }

    .about-hero-logo-mark {
        width: min(70%, 280px);
    }

    .about-hero-text {
        font-size: 9vw;
    }

    .project-detail-hero {
        padding: 40px 20px 28px;
    }

    .project-detail-title {
        font-size: 13vw;
    }

    .project-detail-grid-crop {
        grid-template-columns: 1fr;
    }

    .project-detail-video-grid {
        grid-template-columns: 1fr;
    }

    .project-detail-credits {
        padding: 48px 20px;
    }

    .project-detail-media {
        padding: 48px 20px 0;
    }

    .lightbox {
        padding: 20px;
    }

    .lightbox-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
    }

    .projects-section,
    .services,
    .about {
        padding-left: 20px;
        padding-right: 20px;
    }

    .marquee-section {
        padding-bottom: 60px;
    }

    .marquee-track {
        gap: 10px;
        animation-duration: 28s;
    }

    .marquee-track img {
        height: 264px;
    }

    .footer-headline {
        gap: 20px;
    }

    .footer-email {
        align-items: flex-start;
        text-align: left;
        margin-top: 0;
    }

    .section-label {
        margin-bottom: 40px;
    }

    .project {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px 0;
    }

    .project-name {
        font-size: 11vw;
    }

    .project-category {
        text-align: left;
    }

    .project-image {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }

    .about {
        padding-top: 100px;
    }

    .about-grid + .about-grid {
        margin-top: 40px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-quemsomos {
        gap: 28px;
    }

    .about-gallery-item {
        font-size: 10px;
    }

    .about-tag {
        padding: 10px 18px;
        font-size: 15px;
    }

    .about-tag-small {
        padding: 7px 14px;
        font-size: 13px;
    }

    footer {
        padding: 25px 20px 30px;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
        margin-bottom: 100px;
    }

    .footer-title {
        font-size: clamp(18px, 7.3vw, 36px);
    }

    .footer-bottom {
        gap: 20px;
    }
}
