/* ================================
   RESET & BASE
   ================================ */

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

:root {
    --black: #0a0a0a;
    --white: #ffffff;
    --grey: #f0f0f0;
    --grey-mid: #888;
    --grey-dark: #333;
    --font-display: 'Anton SC', sans-serif;
    --font-body: 'Inter', sans-serif;
    --nav-h: 70px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--black);
    background: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    transition: background 0.35s ease, border-color 0.35s ease, backdrop-filter 0.35s ease;
}

.header.scrolled {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav {
    display: flex;
    align-items: center;
    height: var(--nav-h);
    padding: 0 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
}

.nav-logo {
    flex: 0 0 48%;
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    color: var(--white);
    transition: color 0.35s ease;
}

.header.scrolled .nav-logo {
    color: var(--black);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding-left: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--black);
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.5;
}

.nav-cta {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.nav-cta:hover {
    opacity: 0.5;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    transition: all 0.3s;
}

.nav-mobile {
    display: none;
    padding: 1.5rem 2.5rem 2rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.nav-mobile ul {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.nav-mobile a {
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-mobile.open {
    display: block;
}

/* ================================
   STICKY SPLIT — Carousel + Hero/Intro
   ================================ */

.sticky-split {
    display: grid;
    grid-template-columns: 48% 52%;
    align-items: start;
}

.sticky-split__left {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: var(--grey);
}

.sticky-split__right {
    /* normal flow: hero-panel + intro-panel apilados */
}

/* ================================
   CAROUSEL (dentro del sticky left)
   ================================ */

.hero-carousel {
    position: relative;
    overflow: hidden;
    height: 100vh;
    background: var(--grey);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

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

.carousel-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.72);
}

.carousel-label {
    position: absolute;
    bottom: 3rem;
    left: 2.5rem;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--white);
    line-height: 1.05;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 5;
}

.carousel-prev { left: 1.5rem; }
.carousel-next { right: 1.5rem; }

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255,255,255,0.3);
}

.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--white);
}

/* Hero panel — primer panel del right (100vh, TAC TAC) */
.hero-panel {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--nav-h) 3rem 3.5rem;
    background: var(--white);
    overflow: hidden;
}

.hero-brand {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.hero-brand-line {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(4rem, 13vw, 16rem);
    line-height: 1.1;
    color: var(--black);
    letter-spacing: -0.01em;
}

.hero-bottom {
    /* tagline at bottom */
}

.hero-eyebrow {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--grey-mid);
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--black);
    max-width: 480px;
    margin-bottom: 1rem;
}

.hero-sub {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--grey-mid);
}

/* ================================
   INTRO PANEL (segundo panel del right)
   ================================ */

.intro-panel {
    background: var(--white);
    padding: 4rem 3rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    min-height: 100vh;
    justify-content: center;
}

.intro-eyebrow {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--grey-mid);
}

.intro-heading-wrap {
    /* stacks the two headings */
}

.intro-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 7.5rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
}

.intro-heading span {
    display: block;
}

.heading-indent {
    padding-left: 0;
}

.intro-body p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 520px;
}

.intro-link {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
}

.intro-link:hover {
    opacity: 0.5;
}

.btn-outline {
    display: inline-block;
    padding: 0.75rem 2rem;
    border: 2px solid var(--black);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--black);
    transition: background 0.2s, color 0.2s;
    margin-top: 0.5rem;
}

.btn-outline:hover {
    background: var(--black);
    color: var(--white);
}

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

.projects {
    padding: 0;
    background: var(--grey);
}

.projects .section-intro {
    padding: 4rem 2.5rem 3rem;
    position: relative;
}

.section-intro {
    max-width: 1400px;
    margin: 0 auto 3rem;
}

.section-eyebrow {
    display: block;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--grey-mid);
    margin-bottom: 0.5rem;
}

.section-num {
    display: block;
    font-size: 0.85rem;
    color: var(--grey-mid);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.projects .section-num {
    position: absolute;
    top: 4rem;
    right: 2.5rem;
    margin: 0;
}

.projects .section-eyebrow {
    margin-bottom: 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 8rem);
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.projects .section-title {
    font-size: clamp(4rem, 10vw, 13rem);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-sub {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    max-width: 700px;
    font-weight: 500;
}

.projects .section-sub {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    font-weight: 700;
    color: var(--black);
    max-width: 900px;
    line-height: 1.4;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-item {
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
}

.project-item img {
    aspect-ratio: 4/3;
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.project-item:hover img {
    transform: scale(1.04);
}

.project-placeholder {
    aspect-ratio: 4/3;
    background: var(--grey);
}

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1.1rem 1.5rem;
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.08);
}

.project-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
}

.project-year {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--grey-mid);
}

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

.services {
    padding: 0;
    background: var(--white);
}

.services .section-intro {
    padding: 4rem 2.5rem 3rem;
    position: relative;
}

.services .section-num {
    position: absolute;
    top: 4rem;
    right: 2.5rem;
    margin: 0;
}

.services .section-eyebrow {
    margin-bottom: 5rem;
}

.services .section-title {
    font-size: clamp(4rem, 10vw, 13rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.services .section-sub {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 700;
    color: var(--black);
    max-width: 780px;
    line-height: 1.35;
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 75vh;
}

/* Alternancia automática: fila par (hija 3ª, 5ª… del padre) → img derecha */
.service-row:nth-child(odd) .service-img {
    order: 2;
}
.service-row:nth-child(odd) .service-content {
    order: 1;
}

.service-img {
    overflow: hidden;
    background: var(--grey);
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-row:hover .service-img img {
    transform: scale(1.03);
}

.service-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 3.5rem;
    background: var(--grey);
}

.service-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 9rem);
    line-height: 0.95;
    letter-spacing: 0.01em;
    margin-bottom: 1.5rem;
}

.service-desc {
    font-size: clamp(1rem, 1.3vw, 1.3rem);
    line-height: 1.5;
    color: #444;
    max-width: 420px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.service-category {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    color: var(--grey-mid);
    margin-bottom: 1.5rem;
}

.service-tags {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: auto auto;
    gap: 0.7rem 3rem;
}

.service-tags li {
    font-size: 1rem;
    font-weight: 500;
    color: var(--black);
}

/* ================================
   TESTIMONIALS
   ================================ */

.testimonials {
    padding: 0;
    background: var(--white);
}

.testimonials .section-intro {
    padding: 4rem 2.5rem 3rem;
    position: relative;
}

.testimonials .section-num {
    position: absolute;
    top: 4rem;
    right: 2.5rem;
    margin: 0;
}

.testimonials .section-eyebrow {
    margin-bottom: 3rem;
}

.testimonials .section-title {
    color: var(--black);
    font-size: clamp(4rem, 10vw, 13rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
}

.testimonials .section-sub {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 700;
    color: var(--black);
    max-width: 780px;
    line-height: 1.35;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.testimonial-card {
    background: var(--grey);
    padding: 3rem;
}

.testimonial-card:nth-child(even) {
    background: var(--white);
}

.testimonial-quote {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--black);
    margin-bottom: 2rem;
    font-family: Georgia, serif;
}

.testimonial-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: rgba(0,0,0,0.7);
}

.testimonial-card p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: rgba(0,0,0,0.55);
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(0,0,0,0.7);
}

.testimonial-author span {
    display: block;
    font-size: 0.8rem;
    color: rgba(0,0,0,0.4);
    font-family: Georgia, serif;
    font-style: italic;
}

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

.footer {
    background: var(--black);
    color: var(--white);
    padding: 5rem 2.5rem 3rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: clamp(5rem, 18vw, 16rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: var(--white);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-top {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ================================
   FADE-IN ANIMATIONS
   ================================ */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ================================
   PROJECT PAGE
   ================================ */

/* Elimina el sticky del split en project page */
.project-page .header {
    position: fixed;
}

/* Cabecera del proyecto */
.project-header {
    padding: calc(var(--nav-h) + 4rem) 2.5rem 4rem;
    background: var(--white);
}

.project-header-inner {
    max-width: 1400px;
    margin: 0 auto;
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 10vw, 13rem);
    line-height: 1.0;
    letter-spacing: -0.01em;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.project-tagline {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    font-weight: 700;
    line-height: 1.35;
    color: var(--black);
    max-width: 900px;
    margin-bottom: 3.5rem;
}

.project-meta-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.12);
}

.project-meta-label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
    margin-bottom: 0.5rem;
}

.project-meta-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--black);
}

/* Hero image */
.project-hero {
    width: 100%;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

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

/* EDITAR el color del overlay en el HTML con style inline,
   o cambia el valor aquí globalmente */
.project-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 160, 140, 0.55);
    mix-blend-mode: multiply;
}

/* Sección de contenido split */
.project-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 5rem;
    padding: 6rem 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.project-content-left {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
}

.project-content-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 6rem);
    line-height: 1.05;
    color: var(--black);
}

.project-content-lead {
    font-size: clamp(1.2rem, 1.8vw, 1.7rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--black);
    margin-bottom: 2rem;
}

.project-content-body {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

.project-content-body p + p {
    margin-top: 1.25rem;
}

/* Galería de imágenes */
.project-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.project-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4/3;
    transition: transform 0.6s ease;
}

.project-gallery-item:hover img {
    transform: scale(1.03);
}

.project-gallery-item {
    overflow: hidden;
}

/* Navegación entre proyectos */
.project-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 2.5rem;
    border-top: 1px solid rgba(0,0,0,0.1);
    max-width: 1400px;
    margin: 0 auto;
}

.project-nav-back {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    transition: opacity 0.2s;
}

.project-nav-back:hover {
    opacity: 0.5;
}

.project-nav-sides {
    display: flex;
    gap: 3rem;
}

.project-nav-prev,
.project-nav-next {
    text-align: right;
    text-decoration: none;
    transition: opacity 0.2s;
}

.project-nav-prev {
    text-align: left;
}

.project-nav-prev:hover,
.project-nav-next:hover {
    opacity: 0.5;
}

.project-nav-hint {
    display: block;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-bottom: 0.25rem;
}

.project-nav-name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--black);
}

/* ── Variante oscura (project-page--dark) ── */
.project-page--dark {
    background: var(--black);
}

.project-page--dark .header {
    background: var(--black);
    border-bottom-color: rgba(255,255,255,0.08);
}

.project-page--dark .nav-logo,
.project-page--dark .nav-links a,
.project-page--dark .nav-cta {
    color: var(--white);
}

.project-page--dark .menu-toggle span {
    background: var(--white);
}

.project-page--dark .nav-mobile {
    background: var(--black);
}

.project-page--dark .project-title,
.project-page--dark .project-tagline,
.project-page--dark .project-meta-value,
.project-page--dark .project-content-title,
.project-page--dark .project-content-lead,
.project-page--dark .project-nav-name,
.project-page--dark .project-nav-back {
    color: var(--white);
}

.project-page--dark .project-meta-label,
.project-page--dark .project-nav-hint {
    color: rgba(255,255,255,0.45);
}

.project-page--dark .project-meta-bar,
.project-page--dark .project-nav {
    border-color: rgba(255,255,255,0.12);
}

.project-page--dark .project-content-body {
    color: rgba(255,255,255,0.65);
}

.project-page--dark .project-nav-back:hover,
.project-page--dark .project-nav-prev:hover,
.project-page--dark .project-nav-next:hover {
    opacity: 0.5;
}

.project-page--dark .footer {
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── Responsive project page ── */
@media (max-width: 900px) {
    .project-header {
        padding: calc(var(--nav-h) + 2rem) 1.5rem 3rem;
    }

    .project-meta-bar {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-hero {
        aspect-ratio: 4/3;
    }

    .project-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3rem 1.5rem;
    }

    .project-content-left {
        position: static;
    }

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

    .project-gallery-item img {
        aspect-ratio: 16/9;
    }

    .project-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
        padding: 2.5rem 1.5rem;
    }

    .project-nav-sides {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    .project-nav-next {
        text-align: left;
    }
}

/* ================================ */

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 900px) {
    .sticky-split {
        grid-template-columns: 1fr;
    }

    .sticky-split__left {
        position: relative;
        height: 100vw;
        min-height: 350px;
    }

    .hero-carousel {
        height: 100%;
    }

    .hero-brand-line {
        font-size: clamp(4rem, 28vw, 10rem);
        line-height: 0.92;
    }

    .hero-panel {
        height: auto;
        padding: 3rem 1.5rem 3.5rem;
    }

    .intro-panel {
        padding: 3rem 1.5rem 4rem;
    }

    .intro-heading {
        font-size: clamp(2.5rem, 15vw, 7.5rem);
    }

    .heading-right {
        padding-left: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .service-row {
        grid-template-columns: 1fr;
    }

    /* En móvil siempre imagen arriba, texto abajo */
    .service-row:nth-child(odd) .service-img {
        order: 0;
    }
    .service-row:nth-child(odd) .service-content {
        order: 0;
    }

    .service-img {
        min-height: 50vw;
    }

    .service-content {
        padding: 3rem 1.5rem;
    }

    /* Section intros: padding uniforme con el resto del contenido */
    .projects .section-intro,
    .services .section-intro,
    .testimonials .section-intro {
        padding: 3rem 1.5rem 2rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* Testimonials a sangre: sin padding lateral en la sección */
    .testimonials {
        padding-left: 0;
        padding-right: 0;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
        margin-left: 1rem;
    }
}

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

/* Nav adaptativa al modo */
.about-page .nav-logo {
    color: var(--black);
}

.about-page .header.scrolled {
    background: rgba(255,255,255,0.95);
    border-bottom-color: rgba(0,0,0,0.08);
}

.about-page .header.scrolled .nav-logo,
.about-page .nav-links a,
.about-page .nav-cta {
    color: var(--black);
}

.about-page .menu-toggle span {
    background: var(--black);
}

.about-page .nav-mobile {
    background: var(--white);
    border-top-color: rgba(0,0,0,0.08);
}

/* Hero: split título izquierda / foto derecha */
.about-hero {
    display: grid;
    grid-template-columns: 48% 52%;
    min-height: 100vh;
}

.about-hero-left {
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: calc(var(--nav-h) + 2rem) 3rem 5rem;
}

.about-hero-right {
    overflow: hidden;
    position: relative;
}

.about-hero-right img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.about-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 9vw, 13rem);
    line-height: 0.95;
    color: var(--black);
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

.about-subtitle {
    font-size: clamp(1.2rem, 2vw, 2.2rem);
    font-weight: 700;
    color: var(--black);
    line-height: 1.3;
    max-width: 480px;
}

/* Bio: adapta al modo */
.about-bio {
    padding: 7rem 2.5rem;
    background: var(--white);
}

.about-bio-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 6rem;
    align-items: start;
}

.about-bio-left {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
}

.about-bio-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 8rem);
    line-height: 1.0;
    color: var(--black);
    letter-spacing: 0.01em;
}

.about-bio-lead {
    font-size: clamp(1.2rem, 1.8vw, 1.6rem);
    font-weight: 700;
    line-height: 1.4;
    color: var(--black);
    margin-bottom: 2rem;
}

.about-bio-body p {
    font-size: 1rem;
    line-height: 1.85;
    color: #555;
    margin-bottom: 1.25rem;
}

[data-theme="dark"] .about-bio-body p {
    color: rgba(255,255,255,0.6);
}

.about-cta {
    display: inline-block;
    margin-top: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--black);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
}

.about-cta:hover {
    opacity: 0.5;
}

/* Responsive about */
@media (max-width: 900px) {
    .about-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .about-hero-left {
        padding: calc(var(--nav-h) + 1.5rem) 1.5rem 3rem;
    }

    .about-hero-right {
        position: relative;
        height: 70vw;
        min-height: 260px;
    }

    .about-hero-right img {
        position: absolute;
    }

    .about-bio {
        padding: 4rem 1.5rem;
    }

    .about-bio-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-bio-left {
        position: static;
    }
}

/* ================================
   CONTACT PAGE
   ================================ */

/* Panel derecho: responde al toggle claro/oscuro */
.contact-panel {
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 4rem) 3.5rem 5rem;
}

.contact-title {
    font-family: var(--font-display);
    font-size: clamp(4.5rem, 10vw, 13rem);
    line-height: 0.95;
    color: var(--black);
    margin-bottom: 2.5rem;
    letter-spacing: -0.01em;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.contact-field label {
    display: block;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--grey-mid);
    margin-bottom: 0.5rem;
}

.contact-field input,
.contact-field textarea {
    width: 100%;
    background: var(--grey);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    color: var(--black);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: var(--grey-mid);
}

.contact-field input:focus,
.contact-field textarea:focus {
    border-color: rgba(0,0,0,0.3);
    background: var(--white);
}

/* Dark mode: bordes visibles sobre fondo oscuro */
[data-theme="dark"] .contact-field input,
[data-theme="dark"] .contact-field textarea {
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .contact-field input:focus,
[data-theme="dark"] .contact-field textarea:focus {
    border-color: rgba(255,255,255,0.4);
}

.contact-field textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.contact-submit {
    width: 100%;
    background: var(--black);
    color: var(--white);
    border: none;
    border-radius: 99px;
    padding: 1.15rem 2rem;
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 0.5rem;
}

.contact-submit:hover {
    opacity: 0.88;
}

.contact-submit:active {
    transform: scale(0.98);
}

.contact-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.contact-msg {
    font-size: 0.95rem;
    text-align: center;
    min-height: 1.4rem;
    color: rgba(255,255,255,0.6);
}

.contact-msg.success { color: #4ade80; }
.contact-msg.error   { color: #f87171; }

/* Imagen izquierda (estática) */
.contact-image {
    width: 100%;
    height: 100%;
}

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

/* Nav de la página de contacto: adaptativa al modo */
.contact-page .nav-logo {
    color: var(--black);
}

.contact-page .header.scrolled {
    background: rgba(255,255,255,0.95);
    border-bottom-color: rgba(0,0,0,0.08);
}

.contact-page .header.scrolled .nav-logo,
.contact-page .nav-links a,
.contact-page .nav-cta {
    color: var(--black);
}

.contact-page .menu-toggle span {
    background: var(--black);
}

.contact-page .nav-mobile {
    background: var(--white);
    border-top-color: rgba(0,0,0,0.08);
}

/* Responsive contacto */
@media (max-width: 900px) {
    .contact-panel {
        padding: calc(var(--nav-h) + 2.5rem) 1.5rem 4rem;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }
}

/* ================================
   DARK MODE
   ================================ */

[data-theme="dark"] {
    --white: #111111;
    --black: #ffffff;
    --grey: #1e1e1e;
    --grey-mid: #999;
}

/* Header */
[data-theme="dark"] .header.scrolled {
    background: rgba(17,17,17,0.96);
    border-bottom-color: rgba(255,255,255,0.08);
}

/* El logo arranca blanco sobre imagen: en dark mantenerlo blanco siempre */
[data-theme="dark"] .nav-logo,
[data-theme="dark"] .header.scrolled .nav-logo {
    color: #ffffff;
}

/* Labels del slider: siempre blancos sobre la imagen oscura */
[data-theme="dark"] .carousel-label {
    color: #ffffff;
}

/* Menú móvil */
[data-theme="dark"] .nav-mobile {
    background: #111111;
    border-top-color: rgba(255,255,255,0.08);
}

/* Colores literales que no usan variables */
[data-theme="dark"] .intro-body p {
    color: rgba(255,255,255,0.55);
}

[data-theme="dark"] .section-sub,
[data-theme="dark"] .service-desc,
[data-theme="dark"] .project-content-body {
    color: rgba(255,255,255,0.6);
}

[data-theme="dark"] .testimonial-card h4,
[data-theme="dark"] .testimonial-author strong {
    color: rgba(255,255,255,0.85);
}

[data-theme="dark"] .testimonial-card p {
    color: rgba(255,255,255,0.55);
}

[data-theme="dark"] .testimonial-author span {
    color: rgba(255,255,255,0.4);
}

[data-theme="dark"] .testimonial-quote {
    color: rgba(255,255,255,0.9);
}

/* Bordes */
[data-theme="dark"] .project-item {
    border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .project-meta {
    border-top-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .project-meta-bar {
    border-top-color: rgba(255,255,255,0.12);
}

[data-theme="dark"] .project-meta-label,
[data-theme="dark"] .project-nav-hint {
    color: rgba(255,255,255,0.45);
}

[data-theme="dark"] .project-nav {
    border-top-color: rgba(255,255,255,0.1);
}

/* Footer: siempre oscuro independientemente del modo */
[data-theme="dark"] .footer {
    background: #0a0a0a;
    color: #ffffff;
    border-top: 1px solid rgba(255,255,255,0.08);
}

[data-theme="dark"] .footer-logo {
    color: #ffffff;
}

[data-theme="dark"] .footer-links a {
    color: rgba(255,255,255,0.6);
}

/* ================================
   THEME TOGGLE BUTTON
   ================================ */

.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 54px;
    height: 28px;
    border-radius: 99px;
    background: rgba(0,0,0,0.75);
    border: 1.5px solid rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0 3px;
    z-index: 9999;
    transition: background 0.3s, border-color 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.theme-toggle-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
}

.theme-toggle-thumb::before {
    content: '☀';
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(26px);
    background: #f0f0f0;
}

[data-theme="dark"] .theme-toggle-thumb::before {
    content: '🌙';
}

@media (max-width: 600px) {
    .nav {
        padding: 0 1.25rem;
    }

    .intro {
        padding: 4rem 1.25rem;
    }

    .projects {
        padding: 0;
    }

    .testimonials {
        padding: 0;
    }

    .footer {
        padding: 3rem 1.25rem 2rem;
    }

    .section-title {
        font-size: clamp(2.8rem, 14vw, 4rem);
    }

    .testimonials-grid {
        gap: 0;
    }
}

/* ================================
   CUSTOM CURSOR
   ================================ */

@media (pointer: fine) {
    body,
    a, button, input, textarea, select,
    [role="button"] {
        cursor: none !important;
    }

    #cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 10px;
        height: 10px;
        background: var(--black);
        border-radius: 50%;
        pointer-events: none;
        z-index: 99999;
        transform: translate(-50%, -50%);
        opacity: 0;
        transition:
            width  0.18s ease,
            height 0.18s ease,
            opacity 0.25s ease,
            background-color 0.3s ease;
        will-change: left, top;
    }

    #cursor.cursor--visible {
        opacity: 1;
    }

    #cursor.cursor--hover {
        width: 28px;
        height: 28px;
        opacity: 0.55;
    }
}

/* Header opaco cuando el menú móvil está abierto */
.header.menu-open {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .header.menu-open {
    background: rgba(17, 17, 17, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Alinear eyebrow y número en móvil (padding-top: 3rem en section-intro) */
@media (max-width: 900px) {
    .projects .section-num,
    .services .section-num,
    .testimonials .section-num {
        top: 3rem;
        right: 1.5rem;
    }
}

/* Hero con vídeo de YouTube */
.project-hero--video {
    background: #000;
}

.project-hero--video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Vídeo en carousel hero */
.carousel-slide--video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
