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

:root {
    --color-bg: #f5f6fa;
    --color-bg-alt: #ffffff;
    --color-primary: #0a2a43;
    --color-primary-soft: #145da0;
    --color-accent: #29b6f6;
    --color-text: #0f172a;
    --color-text-soft: #4b5563;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.15);
    --radius-card: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
}

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

/* Layout */
.container {
    width: min(1120px, 100% - 3rem);
    margin: 0 auto;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-header {
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
}

.section-header p {
    margin: 0;
    color: var(--color-text-soft);
    max-width: 40rem;
}

.grid.two-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    align-items: center;
}

.grid.three-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

@media (max-width: 900px) {
    .grid.two-cols,
    .grid.three-cols {
        grid-template-columns: 1fr;
    }
}

/* Header + navbar with scroll effect */
.site-header {
    position: relative;
}

.navbar {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 30;
    transition: background 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
    padding-block: 0.4rem;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar.scrolled {
    background: rgba(10, 42, 67, 0.96);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.48);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 2px solid #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.logo-sub {
    font-size: 0.72rem;
    opacity: 0.78;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #e5e7eb;
    font-size: 0.9rem;
    position: relative;
    padding-bottom: 0.2rem;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.2s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}

@media (max-width: 780px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset-inline: 0;
        top: 56px;
        background: rgba(10, 42, 67, 0.98);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem 1.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .nav-links.open {
        max-height: 260px;
    }
}

/* Hero */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding-top: 64px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(41, 182, 246, 0.35), transparent 55%), #0a2a43;
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
    filter: saturate(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 42, 67, 0.9), rgba(10, 42, 67, 0.25));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 4.3rem 0 4.7rem;
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    color: #bfdbfe;
}

.hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    margin: 0 0 1.1rem;
    max-width: 24ch;
}

.hero-subtitle {
    max-width: 44ch;
    color: #e5e7eb;
    margin-bottom: 1.6rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #bfdbfe;
}

.hero-meta span::before {
    content: "●";
    font-size: 0.55rem;
    margin-right: 0.45rem;
}

@media (max-width: 780px) {
    .hero-content {
        padding-top: 3.7rem;
        padding-bottom: 3.7rem;
    }
}

/* Buttons */
.btn {
    border-radius: 999px;
    padding: 0.7rem 1.4rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-weight: 500;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--color-primary-soft), var(--color-accent));
    color: #ffffff;
    box-shadow: var(--shadow-soft);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.28);
}

.btn.ghost {
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.25);
}

.btn.ghost:hover {
    background: rgba(15, 23, 42, 0.5);
}

/* Quiénes somos */
.section-text h2 {
    font-size: 1.9rem;
    margin-top: 0;
}

.section-text p {
    color: var(--color-text-soft);
    line-height: 1.6;
}

.cards-inline {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 1.8rem;
}

.mini-card {
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 1.25rem 1.3rem;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.mini-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.mini-card p {
    margin: 0;
    font-size: 0.9rem;
}

.section-media img {
    border-radius: 20px;
}

.image-stack {
    position: relative;
    max-width: 480px;
    margin-inline: auto;
}

.image-stack .img-main {
    width: 100%;
    box-shadow: var(--shadow-soft);
}

.image-stack .img-floating {
    position: absolute;
    width: 55%;
    bottom: -10%;
    right: -5%;
    box-shadow: var(--shadow-soft);
    border: 4px solid #ffffff;
}

@media (max-width: 900px) {
    .cards-inline {
        grid-template-columns: 1fr;
    }

    .image-stack .img-floating {
        bottom: -14%;
        right: 4%;
    }
}

/* Servicios */
.service-grid .card {
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 1.7rem 1.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    border-top: 4px solid rgba(20, 93, 160, 0.7);
}

.service-grid h3 {
    margin-top: 0;
    margin-bottom: 0.85rem;
    font-size: 1.1rem;
}

.service-grid ul {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--color-text-soft);
    font-size: 0.95rem;
}

.service-grid li + li {
    margin-top: 0.3rem;
}

/* Proyectos */
.project-highlight {
    margin-bottom: 2.5rem;
}

.bullets {
    padding-left: 1.1rem;
    color: var(--color-text-soft);
}

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

.project-card {
    background: #ffffff;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.project-card-body {
    padding: 1.3rem 1.4rem 1.4rem;
}

.project-card-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.project-card-body p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-soft);
}

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

/* Clientes */
.clients-section {
    margin-top: 3rem;
    text-align: left;
}

.clients-section h3 {
    margin-bottom: 0.4rem;
}

.clients-section p {
    margin-top: 0;
    color: var(--color-text-soft);
    max-width: 40rem;
}

.clients-logos-wrapper {
    margin-top: 1.5rem;
    background: #ffffff;
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
}

.clients-logos-image {
    width: 100%;
    height: auto;
}

/* CTA */
.cta-section {
    background: linear-gradient(135deg, #0a2a43, #145da0);
    color: #ffffff;
}

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

.cta-text h2 {
    margin: 0 0 0.5rem;
}

.cta-text p {
    margin: 0;
    max-width: 34rem;
}

@media (max-width: 780px) {
    .cta-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Contacto */
.contact-grid {
    align-items: flex-start;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
    color: var(--color-text-soft);
}

.contact-list li + li {
    margin-top: 0.35rem;
}

.contact-list a {
    color: var(--color-primary-soft);
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.contact-form {
    background: #ffffff;
    padding: 1.8rem 1.7rem;
    border-radius: var(--radius-card);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.9rem;
}

.form-row label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.form-row input,
.form-row textarea {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 0.55rem 0.7rem;
    font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--color-primary-soft);
    box-shadow: 0 0 0 1px rgba(20, 93, 160, 0.45);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-text-soft);
    margin: 0 0 0.7rem;
}

/* Footer */
.footer {
    background: #020617;
    color: #9ca3af;
    padding: 1.75rem 0;
    font-size: 0.85rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-small {
    color: #6b7280;
}

/* Simple fade-in on scroll */
[data-animate] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

.clients-slider {
  background:#fff;
  border-radius:18px;
  box-shadow:0 18px 45px rgba(15,23,42,0.15);
  overflow:hidden;
  padding:1.5rem 0;
}
.clients-slider .slide-track {
  display:flex;
  width:calc(250px * 14);
  animation:scroll 28s linear infinite;
}
.clients-slider img {
  width:180px;
  height:auto;
  margin:0 25px;
  object-fit:contain;
}
@keyframes scroll {
  0% { transform:translateX(0); }
  100% { transform:translateX(calc(-250px * 7)); }
}
