:root {
    --red: #ef1838;
    --red-dark: #d90d2b;
    --green: #007a5a;
    --green-dark: #005843;
    --ink: #102c3b;
    --muted: #657780;
    --line: #dfe6e8;
    --soft: #f4f7f6;
    --white: #ffffff;
    --container: 1240px;
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    font-family: "Inter", Arial, sans-serif;
    background: #fff;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(16,44,59,.08);
}
.nav-wrap { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { font-size: 1.55rem; font-weight: 800; letter-spacing: -1.3px; white-space: nowrap; }
.brand-red { color: var(--red); }
.brand-green { color: var(--green); }
.main-nav { display: flex; gap: 28px; margin-left: auto; }
.main-nav a { color: #36515e; font-size: .92rem; font-weight: 600; }
.main-nav a:hover { color: var(--green); }
.nav-toggle { display: none; margin-left: auto; border: 0; background: transparent; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ink); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: #fff; background: var(--red); }
.btn-primary:hover { background: var(--red-dark); }
.btn-light { background: rgba(255,255,255,.9); border: 1px solid rgba(16,44,59,.22); }
.btn-outline { border: 1px solid var(--ink); }
.btn-commercial { color: #fff; background: var(--green); border-radius: 8px; }
.btn-commercial:hover { background: var(--green-dark); }
/* Por ahora no se muestra el botón del header */
.header-commercial-hidden { display: none !important; }
.btn-commercial.big { min-height: 54px; border-radius: 999px; }

.hero {
    position: relative;
    min-height: min(78vh, 680px);
    overflow: hidden;
    display: flex;
    align-items: center;
}
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 70% 55%;
    display: block;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(12, 22, 26, .72) 0%, rgba(12, 22, 26, .42) 38%, rgba(12, 22, 26, .12) 62%, transparent 82%);
}
/* Mismo ancho que el logo y el resto de secciones, para que el texto no se pegue al borde */
.hero-content {
    position: relative;
    width: min(var(--container), calc(100% - 48px));
    margin-inline: auto;
}
.hero-copy { max-width: 560px; padding: 56px 0; }
.hero .eyebrow { color: rgba(255, 255, 255, .92); }
.hero h1 { color: #fff; font-size: clamp(2.15rem, 3.6vw, 3.45rem); max-width: 14ch; }
.hero-text { max-width: 44ch; margin: 16px 0 26px; color: rgba(255, 255, 255, .88); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-primary { border-radius: 6px; }
.hero .btn-light {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 6px;
}
.hero .btn-light:hover { background: rgba(255, 255, 255, .12); }
.hero-countries {
    margin-top: 22px;
    font-weight: 700;
    color: rgba(255, 255, 255, .82);
}
.hero-countries span { margin: 0 8px; color: #ff6b7d; }
.eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .72rem;
    font-weight: 800;
    color: var(--green);
}
.eyebrow.dark { color: var(--green); }
.light-eyebrow { color: rgba(255,255,255,.85); }
.hero h1,
.section h2,
.presence h2 {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -.035em;
}

.trust-strip { background: #fff; border-bottom: 1px solid var(--line); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { min-height: 112px; padding: 24px 34px; border-right: 1px solid var(--line); }
.trust-item:last-child { border-right: 0; }
.trust-item strong, .trust-item small { display: block; }
.trust-item strong { margin-bottom: 6px; font-size: 1rem; }
.trust-item small { color: var(--muted); }

.section { padding: 84px 0; }
.section-soft { background: var(--soft); }
.section h2 { font-size: clamp(2rem, 3.2vw, 3.65rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 60px; margin-bottom: 36px; }
.compact-heading > p { max-width: 520px; color: var(--muted); }

.solutions-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
}
.solutions-intro h2 { margin-bottom: 12px; }
.solutions-intro p { margin: 0; color: var(--muted); font-size: 1.05rem; }

.solution-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.solution-card {
    position: relative;
    display: block;
    min-height: 320px;
    overflow: hidden;
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
}
.solution-media {
    position: absolute;
    inset: 0;
    background: #3d474a;
}
.solution-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.solution-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(10, 18, 22, .78) 100%);
}
.solution-copy {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 1;
}
.solution-copy h3 {
    margin: 0 0 6px;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.solution-copy p {
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: .92rem;
}

/* Mismo layout abierto que Contacto: sin recuadro */
.presence {
    padding: 84px 0;
    background: #fff;
}
.presence-band {
    display: grid;
    grid-template-columns: 1.35fr .9fr;
    gap: 64px;
    align-items: center;
}
.presence-map {
    display: grid;
    grid-template-columns: minmax(200px, 260px) 1fr;
    gap: 28px;
    align-items: center;
}
.presence-svg {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
}
.map-shape { fill: #c5d0d3; }
.map-line {
    stroke: #8a9a9f;
    stroke-width: 1.6;
    stroke-dasharray: 4 5;
}
.map-pin { fill: var(--red); }
.map-pin-dot { fill: #fff; }
.map-label {
    fill: #4d5f66;
    font-size: 13px;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 600;
}
.presence-copy { max-width: 360px; }
.presence-copy h2 {
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    max-width: 16ch;
    line-height: 1.2;
}
.presence-copy p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: .98rem;
}
.presence-cta { display: grid; gap: 10px; }
.presence-cta h2 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
.presence-cta p { margin: 0; max-width: 34ch; color: var(--muted); }
.presence-cta .btn { margin-top: 8px; justify-self: start; }

.contact-section { background: var(--soft); }
.contact-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 72px; align-items: start; }
.contact-copy p { max-width: 520px; color: var(--muted); }
.contact-note { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.contact-note strong, .contact-note span { display: block; }
.contact-note span { margin-top: 5px; color: var(--muted); }
.contact-form { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.contact-form label { display: grid; gap: 8px; margin-bottom: 18px; font-size: .88rem; font-weight: 700; }
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    border: 1px solid #ccd8dc;
    border-radius: 10px;
    background: #fff;
    padding: 13px 14px;
    color: var(--ink);
    outline: none;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,122,90,.09); }
.contact-form textarea { resize: vertical; }
.privacy-check {
    display: flex !important;
    align-items: flex-start;
    gap: 10px !important;
    font-weight: 500 !important;
    color: var(--muted);
}
.privacy-check input { width: 17px; height: 17px; margin-top: 3px; }
.privacy-check a { color: var(--green); text-decoration: underline; font-weight: 700; }

.legal-page h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 3.4vw, 3.2rem);
    letter-spacing: -.035em;
    line-height: 1.12;
}
.legal-wrap { max-width: 820px; }
.legal-lead { color: var(--muted); font-size: 1.05rem; margin: 0 0 36px; }
.legal-block { margin-bottom: 28px; }
.legal-block h2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}
.legal-block p,
.legal-block li { color: var(--muted); }
.legal-block ul { padding-left: 1.2rem; }
.legal-note {
    margin: 36px 0 28px;
    padding: 16px 18px;
    border-left: 3px solid var(--green);
    background: #fff;
    color: var(--muted);
    font-size: .95rem;
}

/* Banner inferior de cookies */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    padding: 18px 0;
    background: rgba(13, 40, 48, .96);
    color: #e8eef0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
}
.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cookie-inner p {
    margin: 0;
    max-width: 760px;
    font-size: .95rem;
    line-height: 1.5;
    color: #d5e0e3;
}
.cookie-inner a { color: #fff; text-decoration: underline; font-weight: 700; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-reject {
    color: #fff;
    border-color: rgba(255,255,255,.45);
    background: transparent;
}
.cookie-reject:hover { background: rgba(255,255,255,.1); }

@media (max-width: 700px) {
    .cookie-inner { flex-direction: column; align-items: stretch; }
    .cookie-actions { width: 100%; }
    .cookie-actions .btn { flex: 1; }
}
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: .9rem; color: var(--muted); }
.form-status.success { color: var(--green); font-weight: 700; }
.form-status.error { color: var(--red-dark); font-weight: 700; }

.footer { padding: 44px 0; color: #d5e0e3; background: #0d2830; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 35px; align-items: end; }
.footer-brand { font-size: 1.5rem; }
.footer p { margin-bottom: 0; color: #9fb1b8; }
.footer-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; font-size: .88rem; }
.footer-legal { text-align: right; color: #91a5ad; font-size: .82rem; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .08s; }
.delay-2 { transition-delay: .16s; }

@media (max-width: 980px) {
    .main-nav { position: fixed; top: 76px; left: 0; right: 0; display: none; flex-direction: column; gap: 0; padding: 12px 24px 22px; background: #fff; box-shadow: 0 18px 30px rgba(16,44,59,.1); }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
    .nav-toggle { display: block; }
    .solution-grid { grid-template-columns: repeat(2, 1fr); }
    .presence-band, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
    .presence-map { grid-template-columns: 1fr; gap: 18px; }
    .presence-svg { max-width: 240px; }
}

@media (max-width: 700px) {
    .container { width: min(100% - 30px, var(--container)); }
    .hero-content { width: min(var(--container), calc(100% - 30px)); }
    .site-header .btn-commercial { padding-inline: 13px; font-size: .82rem; }
    .hero { min-height: 100svh; align-items: end; }
    .hero-photo { object-position: 68% 48%; }
    .hero-overlay { background: linear-gradient(180deg, rgba(12, 22, 26, .2) 12%, rgba(12, 22, 26, .78) 100%); }
    .hero-copy { padding: 0 0 36px; }
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.45rem); max-width: none; }
    .trust-grid { grid-template-columns: 1fr; }
    .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
    .section { padding: 66px 0; }
    .section-heading { flex-direction: column; align-items: flex-start; gap: 22px; }
    .solution-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; align-items: start; }
    .footer-links { justify-content: flex-start; }
    .footer-legal { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
