/* =========================================================
   Grupo HCMC — styles.css
   Estilo "app" (móvil primero, escala a desktop)
   ========================================================= */

:root {
    --navy-deep: #071429;
    --navy: #0B1E3D;
    --navy-soft: #132A52;
    --teal: #00B8A9;
    --teal-dark: #00897E;
    --amber: #FFB020;
    --cloud: #F5F8FB;
    --white: #FFFFFF;
    --ink: #16213A;
    --ink-soft: #5B6478;
    --border: #E3E8F0;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --maxw: 1200px;
    --radius: 20px;
    --radius-sm: 12px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 8px rgba(11, 30, 61, .06);
    --shadow: 0 10px 30px rgba(11, 30, 61, .08);
    --shadow-lg: 0 20px 50px rgba(7, 20, 41, .18);

    --header-h: 76px;
    --header-h-compact: 68px;
    --gap: 16px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    color: var(--navy);
    line-height: 1.15;
    margin: 0 0 .6em;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 1em;
    color: var(--ink-soft);
}

ul {
    margin: 0;
    padding: 0;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}

@media(min-width:768px) {
    .container {
        padding: 0 24px;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 14px;
}

.eyebrow::before {
    content: "";
    width: 20px;
    height: 2px;
    background: var(--teal);
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: var(--teal);
    color: var(--navy-deep);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 184, 169, .35);
}

.btn-outline {
    border-color: rgba(255, 255, 255, .35);
    color: var(--white);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, .1);
    transform: translateY(-2px);
}

.btn-outline-navy {
    border-color: var(--navy);
    color: var(--navy);
    background: transparent;
}

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

.btn-amber {
    background: var(--amber);
    color: var(--navy-deep);
}

.btn-amber:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 176, 32, .35);
}

.btn-block {
    width: 100%;
}

@media(min-width:640px) {
    .btn-block {
        width: auto;
    }
}

/* ===== Barra de progreso ===== */
.scroll-progress {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    z-index: 99;
    pointer-events: none;
    transition: top .25s ease;
}

body.scrolled .scroll-progress {
    top: var(--header-h-compact);
}

.scroll-progress span {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--teal), var(--amber));
    transition: width .1s linear;
}

@media(max-width:720px) {
    .scroll-progress {
        display: none;
    }
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 20, 41, .85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    transition: height .25s ease, box-shadow .25s ease;
}

body.scrolled .site-header {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    transition: height .25s ease;
}

body.scrolled .nav-wrap {
    height: var(--header-h-compact);
}

/* ===== Logo (header y footer) ===== */
.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
    transition: width .25s ease, height .25s ease;
}

.logo-text {
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

body.scrolled .logo-img {
    width: 40px;
    height: 40px;
}

body.scrolled .logo {
    font-size: 1.15rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .8);
    transition: background .2s ease, color .2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background: rgba(255, 255, 255, .08);
    color: var(--white);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--white);
    display: block;
    transition: .25s;
}

section[id] {
    scroll-margin-top: calc(var(--header-h) + 12px);
}

body.scrolled section[id] {
    scroll-margin-top: calc(var(--header-h-compact) + 12px);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    background: radial-gradient(120% 120% at 15% 0%, var(--navy-soft) 0%, var(--navy) 45%, var(--navy-deep) 100%);
    color: var(--white);
    overflow: hidden;
    padding: 100px 0 80px;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
    margin-bottom: -20px;
}

.hero canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .55;
}

.hero-inner-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2rem, 5vw, 3.4rem);
}

.hero p.lead {
    color: rgba(255, 255, 255, .78);
    font-size: 1.08rem;
    max-width: 640px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.hero-tag-thumb {
    position: relative;
    z-index: 2;
    margin-top: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 520px;
    border: 1px solid rgba(255, 255, 255, .15);
    box-shadow: var(--shadow-lg);
}

/* ===== Secciones ===== */
section {
    padding: 80px 0;
}

@media(min-width:768px) {
    section {
        padding: 96px 0;
    }
}

.section-head {
    max-width: 640px;
    margin: 0 auto 48px;
    text-align: center;
}

.section-head.left {
    margin: 0 0 40px;
    text-align: left;
}

.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.bg-cloud {
    background: var(--cloud);
}

/* ===== Servicios ===== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media(min-width:640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(min-width:1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    min-height: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal);
}

.service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--white);
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.service-card p {
    flex: 1;
    font-size: .95rem;
    margin-bottom: 14px;
}

.service-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--teal-dark);
    font-weight: 600;
    font-size: .9rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: var(--font-body);
    text-align: left;
    transition: color .2s ease, gap .2s ease;
    align-self: flex-start;
}

.service-card .read-more:hover {
    color: var(--navy);
    gap: 10px;
}

/* ===== Carrusel ===== */
.carousel {
    position: relative;
}

.carousel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.carousel-head .section-head {
    margin: 0;
    text-align: left;
    flex: 1;
    min-width: 220px;
}

.carousel-nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.carousel-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 1.5px solid var(--border);
    color: var(--navy);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.carousel-btn:active:not(:disabled) {
    transform: scale(.94);
}

.carousel-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.carousel-track {
    display: flex;
    align-items: stretch;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 4px 20px;
    margin: 0 -4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-track>* {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    flex: 0 0 88%;
    height: auto;
}

@media(min-width:640px) {
    .carousel-track>* {
        flex-basis: calc(50% - 8px);
    }
}

@media(min-width:1024px) {
    .carousel-track>* {
        flex-basis: calc(33.333% - 11px);
    }
}

.carousel.wide .carousel-track>* {
    flex-basis: 92%;
}

@media(min-width:640px) {
    .carousel.wide .carousel-track>* {
        flex-basis: 75%;
    }
}

@media(min-width:1024px) {
    .carousel.wide .carousel-track>* {
        flex-basis: 58%;
    }
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.carousel-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(11, 30, 61, .18);
    cursor: pointer;
    padding: 0;
    transition: .25s;
}

.carousel-dots button.active {
    background: var(--teal);
    width: 24px;
    border-radius: 4px;
}

/* ===== Tarjeta Sobre HCMC ===== */
.about-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    height: 100%;
    min-height: 260px;
}

.about-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--teal-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s ease;
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

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

.about-card .num {
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.2rem;
    color: rgba(0, 184, 169, .12);
    line-height: 1;
    pointer-events: none;
}

.about-card .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.about-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-right: 48px;
}

.about-card p {
    margin: 0;
    font-size: .93rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* ===== Tarjeta de sector ===== */
.sector-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 26px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 14px;
    border-left: 4px solid var(--accent, var(--teal));
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
    min-height: 250px;
}

.sector-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.sector-card .icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--accent) 12%, white);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sector-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.sector-card p {
    margin: 0;
    font-size: .93rem;
    line-height: 1.55;
    color: var(--ink-soft);
    flex: 1;
}

/* ===== Proyectos ===== */
.project-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 28px;
    transition: box-shadow .3s ease, transform .3s ease;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
}

.project-card .project-inner {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
}

@media(min-width:900px) {
    .project-card .project-inner {
        grid-template-columns: 1.05fr 1fr;
    }

    .project-card.reverse .project-inner {
        grid-template-columns: 1fr 1.05fr;
    }

    .project-card.reverse .project-media {
        order: 2;
    }

    .project-card.reverse .project-body {
        order: 1;
    }
}

.project-media {
    background: linear-gradient(135deg, #EAF6F5, #F5F8FB);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.project-media img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    width: 100%;
    max-height: 360px;
    object-fit: cover;
}

.project-media.two-imgs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: center;
}

.project-body {
    padding: 28px 24px;
}

@media(min-width:900px) {
    .project-body {
        padding: 40px 36px;
    }
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    font-family: var(--font-display);
}

.badge-own {
    background: rgba(0, 184, 169, .14);
    color: var(--teal-dark);
}

.badge-live {
    background: rgba(255, 176, 32, .18);
    color: #A36A00;
}

.badge-service {
    background: rgba(19, 42, 82, .1);
    color: var(--navy);
}

.project-body h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.project-body h2 a {
    color: var(--navy);
}

.project-body h2 a:hover {
    color: var(--teal-dark);
}

.project-body .subtitle {
    font-size: 1rem;
    color: var(--ink-soft);
    margin-bottom: 16px;
}

.project-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 18px;
}

.project-body ul li {
    padding-left: 26px;
    position: relative;
    font-size: .95rem;
    color: var(--ink-soft);
}

.project-body ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 184, 169, .15);
    color: var(--teal-dark);
    font-size: .7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.chip {
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--cloud);
    border: 1px solid var(--border);
    font-size: .78rem;
    font-weight: 500;
    color: var(--navy);
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-featured {
    background: linear-gradient(120deg, var(--navy-deep), var(--navy));
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}

@media(min-width:768px) {
    .project-featured {
        padding: 56px 48px;
    }
}

.project-featured::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 184, 169, .35), transparent 70%);
    pointer-events: none;
}

.project-featured h2 {
    color: var(--white);
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.project-featured p {
    color: rgba(255, 255, 255, .78);
    max-width: 720px;
}

.project-featured .badges .badge {
    background: rgba(255, 255, 255, .12);
    color: var(--white);
}

.feature-benefits {
    display: grid;
    gap: 14px;
    margin: 26px 0 22px;
    grid-template-columns: 1fr;
}

@media(min-width:640px) {
    .feature-benefits {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-benefits .benefit {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius);
    padding: 18px;
}

.feature-benefits .benefit .b-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 184, 169, .2);
    color: var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.feature-benefits .benefit h4 {
    color: var(--white);
    font-size: .98rem;
    margin: 0 0 4px;
}

.feature-benefits .benefit p {
    color: rgba(255, 255, 255, .65);
    font-size: .85rem;
    margin: 0;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(7, 20, 41, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0;
}

.modal.open {
    display: flex;
    animation: fadein .25s ease;
}

@media(min-width:640px) {
    .modal {
        align-items: center;
        padding: 24px;
    }
}

@keyframes fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-panel {
    background: var(--white);
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow-y: auto;
    padding: 28px 24px 32px;
    position: relative;
    animation: slideup .3s ease;
}

@media(min-width:640px) {
    .modal-panel {
        border-radius: var(--radius-lg);
        padding: 36px 36px 40px;
        max-height: 85vh;
    }
}

@keyframes slideup {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cloud);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 1.1rem;
    transition: background .2s ease;
}

.modal-close:hover {
    background: var(--border);
}

.modal-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    padding-right: 40px;
}

.modal-panel .modal-sub {
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.modal-panel p {
    font-size: .98rem;
}

.modal-panel ul {
    margin: 0 0 18px;
    padding-left: 20px;
    color: var(--ink-soft);
}

.modal-panel ul li {
    margin-bottom: 6px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===== Contacto ===== */
#contacto {
    background: var(--cloud);
}

.contact-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: 1fr;
}

@media(min-width:960px) {
    .contact-grid {
        grid-template-columns: 1.1fr .9fr;
        gap: 48px;
        align-items: start;
    }
}

.contact-form {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    box-shadow: var(--shadow);
}

@media(min-width:640px) {
    .contact-form {
        padding: 36px 32px;
    }
}

.form-section-label {
    font-family: var(--font-display);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--teal-dark);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-section-label+.field,
.form-section-label+.form-row {
    margin-top: 0;
}

.form-divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0 18px;
}

.form-row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media(min-width:640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    background: var(--white);
    transition: border-color .2s ease, box-shadow .2s ease;
    -webkit-appearance: none;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(0, 184, 169, .12);
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.service-chip {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(0, 184, 169, .1);
    border: 1px solid rgba(0, 184, 169, .35);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: .9rem;
    color: var(--teal-dark);
    font-weight: 500;
}

.service-chip.show {
    display: flex;
    animation: fadein .3s ease;
}

.service-chip .chip-label {
    color: var(--ink-soft);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: block;
    margin-bottom: 2px;
}

.service-chip strong {
    color: var(--navy);
    font-size: .95rem;
}

.service-chip button {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--teal-dark);
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .2s ease, color .2s ease;
}

.service-chip button:hover {
    background: rgba(0, 184, 169, .2);
    color: var(--navy);
}

.form-msg {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(0, 184, 169, .12);
    color: var(--teal-dark);
    font-weight: 600;
    display: none;
    font-size: .92rem;
}

.form-msg.show {
    display: block;
    animation: fadein .3s ease;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: spin .7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
}

.info-card h3 {
    color: var(--white);
    font-size: 1.1rem;
}

.info-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--teal);
}

.info-row .label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 2px;
}

.info-row .value {
    font-weight: 600;
    color: var(--white);
    font-size: .95rem;
}

.info-row .value a {
    color: var(--white);
}

.info-row .value a:hover {
    color: var(--teal);
}

/* ===== Footer ===== */
footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, .65);
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    gap: 32px;
    margin-bottom: 32px;
    grid-template-columns: 1fr;
    align-items: start;
}

@media(min-width:768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1.2fr;
        gap: 48px;
    }
}

/* Logo dentro del footer */
.footer-brand .logo {
    height: auto;
    margin-bottom: 16px;
    display: inline-flex;
}

.footer-brand .logo-img {
    width: 56px;
    height: 56px;
}

.footer-brand .logo-text {
    font-size: 1.3rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, .55);
    max-width: 340px;
    font-size: .92rem;
    line-height: 1.6;
    margin: 0;
}

footer h4 {
    color: var(--white);
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 14px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
    list-style: none;
}

.footer-links a,
.footer-links li {
    color: rgba(255, 255, 255, .6);
    font-size: .9rem;
    transition: color .2s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: .82rem;
    text-align: center;
}

@media(min-width:768px) {
    .footer-bottom {
        justify-content: space-between;
        text-align: left;
    }
}

/* ===== Volver arriba ===== */
.to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 90;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px) scale(.9);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, background .2s ease;
}

.to-top.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.to-top:hover {
    background: var(--teal);
    color: var(--navy-deep);
}

@media(min-width:768px) {
    .to-top {
        right: 24px;
        bottom: 24px;
        width: 52px;
        height: 52px;
    }
}

/* ===== Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}

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

/* ===== Nav móvil ===== */
@media (max-width:720px) {
    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--navy-deep);
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        gap: 2px;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
        display: none;
        box-shadow: 0 20px 40px rgba(0, 0, 0, .3);
    }

    body.scrolled .nav-links {
        top: var(--header-h-compact);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        padding: 14px 16px;
        border-radius: 10px;
    }

    .nav-toggle {
        display: flex;
    }
}

@media (prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }

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