:root {
    --primary: #f3c266;
    --primary-strong: #d5ae64;
    --ink: #181818;
    --ink-soft: #3a424f;
    --olive: #5b5c4b;
    --stone: #ebebe9;
    --stone-soft: #f7f5ef;
    --paper: #ffffff;
    --muted: #73756d;
    --line: rgba(24, 24, 24, 0.12);
    --shadow: 0 24px 80px rgba(24, 24, 24, 0.12);
    --font-heading: 'Michroma', sans-serif;
    --font-body: 'Sora', sans-serif;
    --transition: all 0.45s cubic-bezier(0.19, 1, 0.22, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
}

.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

h1,
h2,
h3,
h4 {
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.12;
    overflow-wrap: break-word;
    text-transform: uppercase;
}

p {
    color: var(--muted);
}

.overline {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--olive);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.overline::before {
    content: '';
    width: 32px;
    height: 1px;
    background: var(--primary-strong);
}

.btn-primary,
.btn-outline {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-primary {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: var(--ink);
    box-shadow: 0 14px 30px rgba(213, 174, 100, 0.28);
}

.btn-primary:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    transform: translateY(-3px);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: var(--paper);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: var(--paper);
    color: var(--ink);
    transform: translateY(-3px);
}

.btn-primary.full-width {
    width: 100%;
}

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    padding: 0.9rem 0;
    background: rgba(247, 245, 239, 0.88);
    border-bottom: 1px solid rgba(24, 24, 24, 0.08);
    backdrop-filter: blur(18px);
    transition: var(--transition);
}

#navbar.scrolled {
    padding: 0.6rem 0;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 50px rgba(24, 24, 24, 0.08);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

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

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

nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

nav a {
    color: var(--ink-soft);
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition);
}

nav a:not(.btn-primary):hover {
    color: var(--ink);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    font-size: 1.1rem;
}

.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero::after {
    content: '';
    position: absolute;
    right: -10vw;
    bottom: -18vw;
    width: 42vw;
    height: 42vw;
    border-radius: 50%;
    background: rgba(243, 194, 102, 0.4);
    filter: blur(12px);
    z-index: -1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(90deg, rgba(24, 24, 24, 0.82) 0%, rgba(24, 24, 24, 0.58) 45%, rgba(24, 24, 24, 0.18) 100%),
        url('IMG/trabajos/trabajo-01.webp') center / cover;
    transform: scale(1.04);
    animation: zoomOut 18s ease-in-out infinite alternate;
}

@keyframes zoomOut {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.hero-content {
    padding-top: 7rem;
}

.hero-content .overline,
.hero-content h1,
.hero-content p {
    color: var(--paper);
}

.hero-content .overline::before {
    background: var(--primary);
}

.hero-content h1 {
    max-width: 880px;
    font-size: clamp(3rem, 8vw, 7.5rem);
    letter-spacing: -0.06em;
    margin-bottom: 1.8rem;
}

.hero-content p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2.4rem;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 24px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    border-radius: 2px;
    background: var(--primary);
    transform: translateX(-50%);
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% { opacity: 0; top: 8px; }
    50% { opacity: 1; }
    100% { opacity: 0; top: 24px; }
}

.intro,
.services,
.portfolio,
.why-nodos,
.contact {
    padding: clamp(5rem, 9vw, 9rem) 0;
}

.intro {
    background:
        radial-gradient(circle at 10% 0%, rgba(243, 194, 102, 0.22), transparent 32%),
        var(--stone);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
}

.intro-grid > *,
.why-grid > *,
.contact-card > *,
.services-grid > *,
.portfolio-grid > * {
    min-width: 0;
}

.intro-text h2,
.section-header h2,
.why-content h2,
.contact-info h2 {
    font-size: clamp(2rem, 4.8vw, 4rem);
    letter-spacing: -0.04em;
}

.intro-text p {
    max-width: 720px;
    margin-top: 1.2rem;
    font-size: 1.04rem;
}

.intro-stats {
    display: grid;
    gap: 1rem;
}

.stat-item {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow);
}

.stat-num {
    display: block;
    color: var(--olive);
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
}

.stat-label {
    display: block;
    margin-top: 0.6rem;
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.services {
    background: var(--stone-soft);
}

.section-header {
    max-width: 760px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.section-header .overline::before {
    display: none;
}

.section-header p {
    margin-top: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.service-card {
    min-height: 320px;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--paper);
    box-shadow: 0 18px 50px rgba(24, 24, 24, 0.06);
    transition: var(--transition);
}

.service-card::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(243, 194, 102, 0.32);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(213, 174, 100, 0.6);
}

.service-card:hover::after {
    transform: scale(1.4);
}

.service-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 1.8rem;
    border-radius: 18px;
    background: var(--stone);
    color: var(--olive);
    font-size: 1.35rem;
}

.service-card h3 {
    min-height: 54px;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.service-card p {
    position: relative;
    z-index: 1;
    font-size: 0.94rem;
}

.portfolio {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(243, 194, 102, 0.24), transparent 28%),
        var(--stone);
}

.portfolio::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.32;
    background-image:
        radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(91, 92, 75, 0.34) 59%, rgba(91, 92, 75, 0.34) 60%, transparent 61%),
        radial-gradient(ellipse at 50% 50%, transparent 68%, rgba(91, 92, 75, 0.24) 69%, rgba(91, 92, 75, 0.24) 70%, transparent 71%);
    background-size: 180px 110px, 260px 160px;
    background-position: 0 0, 46px 32px;
}

.portfolio .container {
    position: relative;
    z-index: 1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 250px;
    gap: 1rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--ink);
    box-shadow: 0 18px 48px rgba(24, 24, 24, 0.1);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.portfolio-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(24, 24, 24, 0.74));
    opacity: 0.9;
}

.portfolio-item span {
    position: absolute;
    left: 1.2rem;
    right: 1.2rem;
    bottom: 1.1rem;
    z-index: 1;
    color: var(--paper);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portfolio-item:hover img {
    transform: scale(1.06);
}

.why-nodos {
    background: var(--stone-soft);
}

.why-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}

.why-items {
    display: grid;
    gap: 1.4rem;
    margin-top: 2.5rem;
}

.why-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.3rem;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
}

.why-item i {
    color: var(--primary-strong);
    font-size: 1.25rem;
    margin-top: 0.15rem;
}

.why-item h3 {
    margin-bottom: 0.4rem;
    font-size: 0.92rem;
}

.why-image {
    overflow: hidden;
    min-height: 560px;
    border-radius: 38px;
    box-shadow: var(--shadow);
}

.why-image img {
    width: 100%;
    height: 100%;
    min-height: 560px;
    display: block;
    object-fit: cover;
}

.contact {
    background:
        linear-gradient(135deg, rgba(91, 92, 75, 0.08), transparent 36%),
        var(--stone);
}

.contact-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 36px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.contact-info {
    padding: clamp(2rem, 5vw, 4rem);
    background: var(--olive);
}

.contact-info .overline,
.contact-info h2,
.contact-info p,
.contact-info span {
    color: var(--paper);
}

.contact-info .overline::before {
    background: var(--primary);
}

.contact-info > p {
    margin: 1.2rem 0 2.5rem;
    color: rgba(255, 255, 255, 0.78);
}

.contact-details {
    display: grid;
    gap: 1.1rem;
}

.contact-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.contact-item i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--primary);
    font-size: 1.2rem;
}

.contact-item span {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.contact-item p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.contact-form {
    padding: clamp(2rem, 5vw, 4rem);
}

.form-group {
    margin-bottom: 1rem;
}

input,
textarea {
    width: 100%;
    padding: 1.1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--stone-soft);
    color: var(--ink);
    font: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-strong);
    background: var(--paper);
    box-shadow: 0 0 0 4px rgba(243, 194, 102, 0.18);
}

footer {
    padding: 4rem 0 2rem;
    background: #eef0f0;
    border-top: 1px solid var(--line);
}

.footer-content {
    display: grid;
    gap: 2.5rem;
    text-align: center;
}

.footer-logo img {
    width: 160px;
    height: auto;
}

.footer-logo p {
    margin-top: 0.8rem;
    color: var(--ink-soft);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line);
}

.footer-bottom p {
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 0.8rem;
}

.footer-socials a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    text-decoration: none;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-text {
    opacity: 0;
    transform: translateY(20px);
}

.reveal-text.active {
    animation: slideUp 0.8s forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: grid;
        place-items: center;
        position: relative;
        z-index: 1002;
    }

    nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(82vw, 360px);
        transform: translateX(110%);
        height: 100vh;
        padding: 6rem 2rem 2rem;
        background: var(--paper);
        box-shadow: -24px 0 70px rgba(24, 24, 24, 0.16);
        transition: var(--transition);
        z-index: 1001;
    }

    nav.active {
        transform: translateX(0);
    }

    nav ul {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
    }

    nav a:not(.btn-primary) {
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid var(--line);
    }

    .intro-grid,
    .why-grid,
    .contact-card {
        grid-template-columns: 1fr;
    }

    .why-image,
    .why-image img {
        min-height: 360px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 1.2rem, 1180px);
    }

    .logo-img {
        width: 138px;
    }

    .hero {
        min-height: 92vh;
    }

    .hero-content {
        padding-top: 6rem;
    }

    .hero-btns,
    .hero-btns a {
        width: 100%;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 320px;
    }
    .intro-text h2,
    .section-header h2,
    .why-content h2,
    .contact-info h2 {
        font-size: clamp(1.55rem, 8.8vw, 2.4rem);
    }

    .contact-info,
    .contact-form,
    .stat-item {
        padding: 1.35rem;
    }

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

    .scroll-indicator {
        display: none;
    }
}
