/* ============================================
   Cárdenas Arquitectos — estética editorial
   (referencia: hotblack.design)
   ============================================ */

:root {
    --bg: #0d0b09;
    --bg-soft: #14110d;
    --ink: #f5f2ec;
    --muted: #8a857c;
    --gold: #f4d68d;
    --line: rgba(245, 242, 236, 0.14);
    --font-display: 'Archivo', sans-serif;
    --font-body: 'Inter', sans-serif;
    --pad: clamp(1.25rem, 5vw, 4rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #2c261f;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

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

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

em {
    font-style: normal;
    color: var(--gold);
}

/* ---------- Tipografía display ---------- */
.display {
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    font-size: clamp(3.2rem, 12vw, 10rem);
}

.outline {
    color: transparent;
    -webkit-text-stroke: 2px var(--ink);
}

.gold {
    color: var(--gold);
}

.kicker,
.section-label {
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.75rem;
    color: var(--muted);
}

/* ---------- Header ---------- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem var(--pad);
    transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

#main-header.scrolled {
    background: rgba(13, 11, 9, 0.88);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.95rem;
}

.brand em {
    color: var(--gold);
    margin-left: 0.4em;
}

.brand-logo {
    height: 34px;
    width: auto;
    mix-blend-mode: screen;
}

#main-header nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.72rem;
}

#main-header nav a {
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

#main-header nav a:hover {
    color: var(--gold);
}

.nav-cta {
    border: 1px solid var(--line);
    border-radius: 99px;
    padding: 0.55rem 1.4rem !important;
    transition: all 0.3s ease !important;
}

.nav-cta:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg) !important;
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem var(--pad) 4rem;
}

.hero .kicker {
    margin-bottom: 2rem;
}

.hero-foot {
    margin-top: 3.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-note {
    color: var(--muted);
    font-size: 1rem;
}

.hero-link {
    font-family: var(--font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    color: var(--gold);
    border-bottom: 1px solid var(--gold);
    padding-bottom: 0.4rem;
    transition: letter-spacing 0.3s ease;
}

.hero-link:hover {
    letter-spacing: 0.3em;
}

/* ---------- Marquee ---------- */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.4rem 0;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 38s linear infinite;
}

.marquee-track span {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: clamp(1.1rem, 2.4vw, 1.8rem);
    color: var(--muted);
    padding-right: 0.5em;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ---------- Intro ---------- */
.intro {
    padding: clamp(6rem, 14vw, 11rem) var(--pad);
    max-width: 1100px;
}

.big-statement {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.5rem, 3.4vw, 2.6rem);
    line-height: 1.35;
}

/* ---------- Dolores ---------- */
.pains {
    padding: 0 var(--pad) clamp(5rem, 10vw, 9rem);
}

.pains .section-label {
    margin-bottom: 4rem;
}

.pain-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding: clamp(2.5rem, 5vw, 4.5rem) 0;
    border-top: 1px solid var(--line);
}

.pain-row:nth-child(odd) figure {
    order: 2;
}

.pain-row figure {
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.pain-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(60%) contrast(1.05);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.pain-row:hover img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.pain-row h2 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    line-height: 1.1;
    font-size: clamp(1.6rem, 3.6vw, 2.8rem);
}

/* ---------- Servicios ---------- */
.services {
    padding: clamp(5rem, 10vw, 9rem) var(--pad);
    background: var(--bg-soft);
}

.services .section-label {
    margin-bottom: 3rem;
}

.service-list {
    list-style: none;
}

.service-list li {
    display: grid;
    grid-template-columns: 6rem 1fr 1fr;
    gap: 2rem;
    align-items: baseline;
    padding: 2.2rem 0;
    border-top: 1px solid var(--line);
    transition: padding-left 0.35s ease;
}

.service-list li:last-child {
    border-bottom: 1px solid var(--line);
}

.service-list li:hover {
    padding-left: 1.2rem;
}

.service-list .num {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--muted);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.service-list h3 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(1.15rem, 2.2vw, 1.7rem);
    line-height: 1.15;
}

.service-list li:hover h3 {
    color: var(--gold);
}

.service-list p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 46ch;
}

/* ---------- Proyectos ---------- */
.projects {
    padding: clamp(5rem, 10vw, 9rem) var(--pad);
}

.projects .section-label {
    margin-bottom: 4rem;
}

.project {
    display: block;
    margin-bottom: clamp(4rem, 8vw, 7rem);
}

.project:last-child {
    margin-bottom: 0;
}

.project figure {
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 1.4rem;
    border-top: 1px solid var(--line);
    margin-top: 1.4rem;
}

.project-meta h3 {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(1.2rem, 2.6vw, 2rem);
}

.project:hover .project-meta h3 {
    color: var(--gold);
}

.project-meta span {
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--muted);
}

/* ---------- Contacto ---------- */
.contact {
    padding: clamp(5rem, 10vw, 9rem) var(--pad);
    background: var(--bg-soft);
    border-top: 1px solid var(--line);
}

.contact-title {
    margin-bottom: clamp(3rem, 7vw, 6rem);
    font-size: clamp(2.4rem, 8.5vw, 7.5rem);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: clamp(3rem, 7vw, 7rem);
    align-items: start;
}

.contact-lede {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    padding: 1.1rem 0;
    border-top: 1px solid var(--line);
}

.contact-info li a {
    color: var(--muted);
    transition: color 0.3s ease;
    font-size: 0.98rem;
}

.contact-info li a:hover {
    color: var(--gold);
}

/* Formulario */
#contact-form .field {
    margin-bottom: 2rem;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

#contact-form label {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.68rem;
    color: var(--muted);
    margin-bottom: 0.6rem;
}

#contact-form input[type="text"],
#contact-form input[type="tel"],
#contact-form input[type="email"],
#contact-form select,
#contact-form textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1.05rem;
    padding: 0.6rem 0;
    border-radius: 0;
    transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
    outline: none;
    border-bottom-color: var(--gold);
}

#contact-form select {
    appearance: none;
    cursor: pointer;
}

#contact-form select option {
    background: var(--bg-soft);
    color: var(--ink);
}

#contact-form textarea {
    resize: vertical;
}

.consent {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    margin: 2.5rem 0;
}

.consent input {
    margin-top: 0.3rem;
    accent-color: var(--gold);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.consent label {
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: var(--font-body) !important;
    font-weight: 300 !important;
}

#submit-btn {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    background: var(--ink);
    color: var(--bg);
    border: 1px solid var(--ink);
    border-radius: 99px;
    padding: 1.1rem 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-btn:hover:not(:disabled) {
    background: var(--gold);
    border-color: var(--gold);
}

#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#submit-btn:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

#form-success {
    margin-top: 1.5rem;
    color: var(--gold);
    font-weight: 400;
}

#form-success.hidden {
    display: none;
}

/* ---------- Footer ---------- */
footer {
    padding: 4rem var(--pad) 2.5rem;
    border-top: 1px solid var(--line);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 1.1rem;
}

.footer-brand em {
    color: var(--gold);
}

.footer-tag {
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.68rem;
    color: var(--muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    color: var(--muted);
}

.to-top:hover {
    color: var(--gold);
}

/* ---------- Instagram flotante ---------- */
.instagram-fab {
    position: fixed;
    bottom: 5.6rem;
    right: 1.5rem;
    z-index: 90;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
}

.instagram-fab:hover {
    transform: scale(1.08);
}

.ig-icon {
    width: 1.6rem;
    height: 1.6rem;
}

/* ---------- WhatsApp flotante ---------- */
.whatsapp-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 90;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s ease;
}

.whatsapp-fab:hover {
    transform: scale(1.08);
}

.wa-icon {
    width: 1.7rem;
    height: 1.7rem;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

    .reveal,
    .marquee-track {
        transition: none;
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    #main-header nav a:not(.nav-cta) {
        display: none;
    }

    .brand span {
        font-size: 0.8rem;
    }

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

    .pain-row:nth-child(odd) figure {
        order: 0;
    }

    .service-list li {
        grid-template-columns: 3.2rem 1fr;
    }

    .service-list p {
        grid-column: 2;
    }

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

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
