:root {
    --arced-navy: #00162A;
    --arced-navy-light: #0d2944;
    --arced-yellow: #f4e04d;
    --arced-yellow-hover: #d7c53d;
    --bg-main: #020a12;
    --bg-secondary: #071321;
    --text-primary: #F5F5F7;
    --text-secondary: #9aa0a8;
    --line: rgba(255, 255, 255, 0.08);
    --font-display: 'Syne', 'DM Sans', sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --radius: 4px;
}

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

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-wrap: pretty;
}

h2 {
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    margin-bottom: 1rem;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

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

.section-kicker {
    display: inline-block;
    color: var(--arced-yellow);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    background-color: var(--arced-yellow);
    color: var(--arced-navy);
    padding: 0.85rem 1.9rem;
    border-radius: 0;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255,255,255,0.35) 45%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.7s var(--ease);
}

.btn-primary:hover {
    background-color: var(--arced-yellow-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(244, 224, 77, 0.22);
}

.btn-primary:hover::after {
    transform: translateX(130%);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--arced-yellow);
    outline-offset: 3px;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--arced-yellow);
    z-index: 200;
    transform-origin: left;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(2, 10, 18, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    transition: transform 0.4s var(--ease);
}

nav.nav-hidden {
    transform: translateY(-100%);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    transition: transform 0.35s var(--ease);
    filter: drop-shadow(0 0 10px rgba(244, 224, 77, 0.18));
}

.nav-logo:hover {
    transform: scale(1.04);
}

.nav-links {
    display: flex;
    gap: 2.2rem;
    align-items: center;
}

.nav-links a:not(.btn-primary) {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.78;
    position: relative;
    transition: opacity 0.2s ease;
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: var(--arced-yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s var(--ease);
}

.nav-links a:not(.btn-primary):hover {
    opacity: 1;
}

.nav-links a:not(.btn-primary):hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

.hero-section {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding: 0 2rem 7rem;
    overflow: hidden;
}

.hero-photo {
    position: absolute;
    inset: -8%;
    background: url('../assets/ingenieria.jpg') center 45% / cover no-repeat;
    animation: kenburns 26s ease-in-out infinite alternate;
    will-change: transform;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2,10,18,0.88) 0%, rgba(2,10,18,0.55) 48%, rgba(2,10,18,0.28) 100%),
        linear-gradient(180deg, rgba(2,10,18,0.35) 0%, rgba(2,10,18,0.15) 40%, rgba(2,10,18,0.82) 100%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.45), transparent 75%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    margin-top: 90px;
}

.hero-kicker {
    color: var(--arced-yellow);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 0.15s forwards;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 6.1rem);
    margin-bottom: 1.4rem;
    color: #fff;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .line span {
    display: block;
    transform: translateY(110%);
    animation: rise 1.05s var(--ease) forwards;
}

.hero-title .line:nth-child(1) span { animation-delay: 0.28s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.46s; }

.hero-title .line:nth-child(2) span {
    color: var(--arced-yellow);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2.2rem;
    color: rgba(245,245,247,0.78);
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 0.75s forwards;
}

.hero-btn {
    opacity: 0;
    animation: fadeUp 0.9s var(--ease) 0.95s forwards;
}

.scroll-hint {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 1.2s forwards;
}

.scroll-hint i {
    width: 1px;
    height: 42px;
    background: linear-gradient(180deg, var(--arced-yellow), transparent);
    animation: drip 1.8s ease-in-out infinite;
}

.services-section {
    padding: 7.5rem 2rem;
    background: var(--bg-main);
}

.section-container {
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    max-width: 640px;
    margin-bottom: 3.5rem;
}

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

.service-card.featured {
    grid-column: span 2;
}

.service-card {
    background: var(--bg-secondary);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform 0.55s var(--ease), border-color 0.35s ease, box-shadow 0.55s var(--ease);
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(244, 224, 77, 0.35);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.service-img-container {
    height: 210px;
    overflow: hidden;
    position: relative;
}

.service-card.featured .service-img-container {
    height: 320px;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: brightness(0.78) saturate(0.85);
    transition: transform 1.1s var(--ease), filter 0.6s ease;
}

.service-card:hover .service-img {
    transform: scale(1.12);
    filter: brightness(1) saturate(1);
}

.service-info {
    padding: 1.4rem 1.4rem 1.6rem;
    position: relative;
}

.service-info::before {
    content: '';
    position: absolute;
    left: 1.4rem;
    top: 0;
    width: 36px;
    height: 2px;
    background: var(--arced-yellow);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
}

.service-card:hover .service-info::before {
    transform: scaleX(1);
}

.service-info h3 {
    font-size: 1.35rem;
    margin-bottom: 0.45rem;
}

.service-info p {
    font-size: 0.98rem;
    line-height: 1.55;
}

.about-section {
    padding: 7.5rem 2rem;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(244,224,77,0.06), transparent 45%),
        var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 4rem;
    align-items: center;
}

.about-copy p {
    font-size: clamp(1.1rem, 1.6vw, 1.35rem);
    color: rgba(245,245,247,0.82);
    max-width: 34ch;
}

.about-visual {
    position: relative;
}

.about-visual img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    filter: saturate(0.9);
}

.about-frame {
    position: absolute;
    inset: 18px -18px -18px 18px;
    border: 1px solid rgba(244, 224, 77, 0.45);
    pointer-events: none;
    animation: framePulse 5s ease-in-out infinite;
}

.coverage-section {
    padding: 7.5rem 2rem;
    background: var(--bg-main);
}

.coverage-header {
    max-width: 640px;
    margin-bottom: 2.5rem;
}

.map-wrap {
    position: relative;
}

.map-container {
    width: 100%;
    height: 520px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--line);
}

.leaflet-container {
    background: #020a12 !important;
}

.contact-section {
    padding: 7.5rem 2rem;
}

.contact-wrapper {
    background:
        linear-gradient(180deg, rgba(244,224,77,0.08), transparent 18%),
        linear-gradient(135deg, var(--arced-navy-light) 0%, var(--arced-navy) 100%);
    padding: 4rem 3.2rem;
    border: 1px solid var(--line);
}

.contact-info-panel h2 {
    margin-bottom: 0.7rem;
}

.contact-subtitle {
    margin-bottom: 2.4rem;
    max-width: 42ch;
}

.contact-details-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    margin-bottom: 2.4rem;
    padding-bottom: 2.4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    font-size: 1.05rem;
}

.contact-item svg {
    color: var(--arced-yellow);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.contact-item a {
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: var(--arced-yellow);
}

.social-section h3 {
    font-size: 1rem;
    margin-bottom: 1.1rem;
    color: var(--arced-yellow);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.social-links-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.35s var(--ease), border-color 0.3s ease, background 0.3s ease;
}

.social-link:hover {
    background: rgba(255,255,255,0.07);
    transform: translateY(-4px);
    border-color: rgba(244, 224, 77, 0.35);
}

.social-link:hover svg {
    color: var(--arced-yellow);
}

footer {
    padding: 2.4rem 2rem;
    border-top: 1px solid var(--line);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo-img {
    height: 68px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.footer-text {
    font-size: 0.82rem;
}

.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.19s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.26s; }

@keyframes rise {
    to { transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes kenburns {
    from { transform: scale(1.05) translate3d(0, 0, 0); }
    to { transform: scale(1.16) translate3d(-2.2%, -1.4%, 0); }
}

@keyframes drip {
    0%, 100% { transform: scaleY(0.45); opacity: 0.4; transform-origin: top; }
    50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

@keyframes framePulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@media (max-width: 980px) {
    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .service-card.featured {
        grid-column: span 1;
    }

    .service-card.featured .service-img-container,
    .service-img-container {
        height: 220px;
    }

    .about-grid,
    .contact-details-list,
    .social-links-list {
        grid-template-columns: 1fr;
    }

    .about-visual img {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(2, 10, 18, 0.96);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 99;
        gap: 1.5rem;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a:not(.btn-primary) {
        font-size: 1.4rem;
    }

    .menu-toggle {
        display: block;
        z-index: 100;
        position: relative;
    }

    .hero-section {
        align-items: flex-end;
        padding: 0 1.2rem 5.5rem;
    }

    .hero-title {
        font-size: 2.55rem;
    }

    .scroll-hint {
        display: none;
    }

    .services-section,
    .about-section,
    .contact-section,
    .coverage-section {
        padding: 4.5rem 1rem;
    }

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

    .contact-wrapper {
        padding: 2rem 1.3rem;
    }

    .map-container {
        height: 340px;
    }

    .footer-container {
        flex-direction: column;
        gap: 1.2rem;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .hero-kicker,
    .hero-subtitle,
    .hero-btn,
    .scroll-hint,
    .hero-title .line span {
        opacity: 1;
        transform: none;
    }
}
