/* ════════════════════════════════════════════════════════════════
   Wirkraft Gruppe — sitio institucional
   Identidad según manual de marca (Wrikraft logo & colours.jpeg):
   - Paleta: navy #1F3A5F · teal #29BBA8 · claro #F4F6F8
   - Tipografía: Inter (única familia, pesos 400-800)
   - Tagline: "Institutions that work."
   ════════════════════════════════════════════════════════════════ */

:root {
    /* Paleta de marca */
    --navy:       #1F3A5F;
    --navy-deep:  #0F2233;   /* paneles oscuros del manual */
    --navy-mid:   #16314E;
    --teal:       #29BBA8;
    --teal-dark:  #1E9886;
    --teal-soft:  #D9F4F0;
    --light:      #F4F6F8;

    /* Texto */
    --text:       #1F3A5F;
    --text-muted: #5A718D;

    --font-display: 'Inter', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;

    --radius: 14px;
    --container: 1120px;

    --shadow-soft: 0 18px 50px -18px rgba(15, 34, 51, 0.28);

    /* Offset del header sticky para el scroll por anclas */
    --header-h: 76px;
}

/* ── Reset mínimo ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--light);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 {
    font-family: var(--font-display);
    line-height: 1.1;
    margin: 0 0 0.5em;
    font-weight: 800;
    letter-spacing: -0.01em;
}
p { margin: 0 0 1em; }
a { color: inherit; }
html { scroll-behavior: smooth; }

/* Compensa el header sticky al navegar por anclas */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: 24px;
}

/* Accesibilidad: enlace para saltar al contenido */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 10px 18px;
    border-radius: 0 0 var(--radius) 0;
    z-index: 100;
}
.skip-link:focus { left: 0; }

/* ── Marca (logo + wordmark) ───────────────────────────────────── */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-logo { width: 34px; height: 25px; flex-shrink: 0; }
.logo-stroke {
    stroke: var(--navy);
    stroke-width: 7;
    stroke-linecap: butt;
    fill: none;
}
.logo-accent { stroke: var(--teal); }
.brand-logo-light .logo-stroke { stroke: #fff; }
.brand-logo-light .logo-accent { stroke: var(--teal); }

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.08rem;
    letter-spacing: 0.14em;
    color: var(--navy);
}
.brand-sub {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.62rem;
    letter-spacing: 0.42em;
    color: var(--text-muted);
}

/* ── Botones ───────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease,
                background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }

.btn-teal {
    background: var(--teal);
    color: var(--navy-deep);
    box-shadow: 0 14px 36px -14px rgba(41, 187, 168, 0.55);
}
.btn-teal:hover { background: #33CCB8; }

.btn-navy {
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow-soft);
}
.btn-navy:hover { background: var(--navy-mid); }

.btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}
.btn-outline-light:hover { border-color: var(--teal); color: var(--teal); }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(244, 246, 248, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(31, 58, 95, 0.08);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}
.site-nav a {
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--navy);
    position: relative;
}
.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
}
.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: transform 0.2s ease;
}

/* ── Hero (panel navy del manual de marca) ─────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    padding: 130px 0 120px;
    background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 70%, var(--navy-mid) 100%);
    color: #fff;
}
/* Trama de cuadrícula sutil: alusión a la red urbana / territorio */
.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
}
/* Resplandor teal, como el panel lateral del manual */
.hero-glow {
    position: absolute;
    right: -180px;
    top: -120px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(41, 187, 168, 0.28), transparent 65%);
    filter: blur(10px);
}
.hero-inner { position: relative; text-align: center; }

.kicker {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 18px;
}
.kicker-teal { color: var(--teal-dark); }

.hero-title {
    font-size: clamp(2.6rem, 6.2vw, 4.4rem);
    margin-bottom: 24px;
    color: #fff;
}
.hero-title em {
    font-style: normal;
    color: var(--teal);
}
.hero-lead {
    max-width: 640px;
    margin: 0 auto 40px;
    font-size: 1.12rem;
    color: rgba(244, 246, 248, 0.78);
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* ── Secciones ─────────────────────────────────────────────────── */
.section { padding: 96px 0; }

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 56px;
    align-items: start;
}
.section-head h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    color: var(--navy);
}
.section-head-center {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}
.lead {
    font-size: 1.1rem;
    color: var(--navy);
}
.lead-light { color: rgba(244, 246, 248, 0.75); }
.section-body p:not(.lead) { color: var(--text-muted); }

/* ── Sección oscura: TerritoryOS ───────────────────────────────── */
.section-dark {
    background:
        radial-gradient(900px 420px at 88% -10%, rgba(41, 187, 168, 0.22), transparent 60%),
        linear-gradient(170deg, var(--navy-deep), var(--navy));
    color: #fff;
}
.section-dark h2 { color: #fff; }

.features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 56px;
}
.feature {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    border-radius: var(--radius);
    padding: 30px 26px;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.feature:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(41, 187, 168, 0.55);
}
.feature h3 {
    font-size: 1.18rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--teal);
}
.feature p {
    margin: 0;
    font-size: 0.94rem;
    color: rgba(244, 246, 248, 0.72);
}

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border: 1px solid rgba(41, 187, 168, 0.35);
    border-radius: var(--radius);
    padding: 26px 30px;
    background: rgba(41, 187, 168, 0.07);
}
.cta-band p {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

/* ── Contacto ──────────────────────────────────────────────────── */
.section-contact { padding-top: 0; }
.contact-card {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 40px;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(31, 58, 95, 0.08);
    border-top: 4px solid var(--teal);
    border-radius: 20px;
    padding: 56px;
    box-shadow: var(--shadow-soft);
}
.contact-card h2 {
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    color: var(--navy);
}
.contact-card .lead { color: var(--text-muted); }
.contact-actions { text-align: center; }
.contact-note {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Footer (panel navy profundo) ──────────────────────────────── */
.site-footer {
    padding: 48px 0;
    background: var(--navy-deep);
    color: #fff;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-brand .brand-text { margin: 0; flex-direction: row; gap: 8px; align-items: baseline; }
.footer-brand .brand-name { color: #fff; font-size: 1rem; }
.footer-brand .brand-sub { color: rgba(244, 246, 248, 0.55); }
.footer-tag {
    margin: 2px 0 0;
    font-size: 0.85rem;
    color: var(--teal);
}
.footer-nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.footer-nav a {
    text-decoration: none;
    font-size: 0.9rem;
    color: rgba(244, 246, 248, 0.75);
}
.footer-nav a:hover { color: var(--teal); }
.footer-legal {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(244, 246, 248, 0.45);
}

/* ── Reveal on scroll (activado por website.js) ────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}
/* Si no hay JS o el usuario prefiere menos movimiento, todo visible */
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn, .feature { transition: none; }
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .section-grid { grid-template-columns: 1fr; gap: 24px; }
    .features { grid-template-columns: 1fr; }
    .contact-card { grid-template-columns: 1fr; padding: 36px 28px; }
    .contact-actions { text-align: left; }
}

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid rgba(31, 58, 95, 0.08);
        padding: 12px 24px 20px;
        box-shadow: var(--shadow-soft);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a {
        padding: 13px 4px;
        border-bottom: 1px solid rgba(31, 58, 95, 0.08);
    }
    .site-nav a::after { display: none; }
    .hero { padding: 80px 0 70px; }
}
