/* ─── BRAND PALETTE (extraída del logo CASTRON) ───────────────────────────
   Logo: fondo azul-marino oscuro | borde cyan eléctrico | texto lavanda
   Paleta web: versiones matte/pastel agradables a la vista
──────────────────────────────────────────────────────────────────────────── */
:root {
    /* Oscuros — deep purple-dark base */
    --ink:        #100E20;   /* deep purple-dark, matches brand mood */
    --ink-mid:    #1E1A30;   /* hover/cards oscuros */

    /* Lavender brand — primary from logo text */
    --cyan:       #9B8EC4;   /* lavender brand primary */
    --cyan-deep:  #7E70AF;   /* lavender deeper for hover */
    --cyan-light: #ECE8F5;   /* fondo secciones con tinte lavender */
    --cyan-pale:  #F5F3FA;   /* fondo muy suave */

    /* Dark navy accent — from pill shape */
    --lav:        #2A2A3E;   /* dark navy accent from pill */
    --lav-deep:   #1E1A30;   /* deeper navy */
    --lav-light:  #F3F0FA;   /* light lavender tint */
    --lav-pale:   #F5F3FA;   /* lavender pale background */

    /* Grises neutros con tinte lavanda */
    --g700: #3D3548;
    --g600: #5A5068;
    --g500: #7A7088;
    --g400: #9A90A8;
    --g300: #C0B8CC;
    --g200: #E2DCF0;
    --g100: #F0ECF6;
    --g50:  #F5F3FA;
    --white: #ffffff;

    /* Alias semánticos */
    --primary:    var(--ink);
    --accent:     var(--cyan);
    --accent2:    var(--lav);
    --bg-alt:     var(--lav-pale);
    --bg-cyan:    var(--cyan-pale);
}

/* ─── RESET & BASE ─────────────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Albert Sans', system-ui, sans-serif;
    color: var(--g700);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
    font-family: 'Albert Sans', sans-serif;
    color: var(--ink);
    font-weight: 700;
    line-height: 1.2;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

/* ─── UTILITIES ────────────────────────────────────────────────────────── */
.mag-w { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

.mag-ey {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--cyan-deep);
    margin-bottom: 1rem;
}

.mag-sec-hd { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.mag-sec-hd h2 { font-size: 2.5rem; margin-bottom: 1rem; letter-spacing: -0.5px; }
.mag-sec-hd p { color: var(--g600); font-size: 1.1rem; }

/* ─── HEADER ───────────────────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: #F5F3FA;
    backdrop-filter: none;
    z-index: 1000;
    border-bottom: 1px solid rgba(155,142,196,0.15);
}
.mag-hdr {
    height: 80px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo imagen */
.mag-logo-img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
}
.mag-logo-footer {
    height: 32px;
    filter: brightness(1.15) saturate(0.9);
}

#nav-menu { display: flex; gap: 2rem; align-items: center; }
#nav-menu a { font-weight: 500; font-size: 0.9rem; color: #7A7088; }
#nav-menu a:hover { color: #100E20; }

.mag-btn-hdr {
    background: #2A2A3E;
    color: var(--white) !important;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid #2A2A3E;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.mag-btn-hdr:hover {
    background: #1E1A30;
    border-color: #1E1A30;
    transform: translateY(-1px);
}

.menu-toggle { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; }
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ─── HERO ─────────────────────────────────────────────────────────────── */
.mag-hero {
    padding: 140px 2rem 6rem;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.mag-hero-top { max-width: 550px; }
.mag-hero-top .mag-ey { font-size: 0.8rem; }
.mag-hero-top h1 {
    font-size: clamp(2.75rem, 5vw, 4.25rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
    color: var(--ink);
}
.mag-hero-img {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(155,142,196,0.18), 0 4px 12px rgba(16,14,32,0.08);
    border: 2px solid #ECE8F5;
}
.mag-hero-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.mag-hero-img:hover img { transform: scale(1.03); }

/* ─── ABOUT ────────────────────────────────────────────────────────────── */
.mag-about { padding: 6rem 0; background: var(--lav-pale); border-top: 1px solid var(--g200); }
.mag-about-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}
.mag-about-lead h2 { font-size: 2.5rem; margin-top: 0.5rem; color: var(--ink); }
.mag-about-body p { font-size: 1.1rem; color: var(--g600); margin-bottom: 3rem; max-width: 780px; }
.mag-about-nums {
    display: flex;
    gap: 4rem;
    border-top: 2px solid var(--cyan-light);
    padding-top: 2rem;
}
.mag-about-nums div strong {
    display: block;
    font-size: 2.5rem;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.mag-about-nums div span {
    font-size: 0.8rem;
    color: var(--cyan-deep);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* ─── MISSION, VISION & VALUES ─────────────────────────────────────────── */
.mag-mvv { padding: 8rem 0; background: var(--white); }
.mag-mvv-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.mag-mvv-item {
    background: var(--white);
    padding: 2.5rem;
    border: 1.5px solid var(--g200);
    border-radius: 14px;
    transition: all 0.3s ease;
}
.mag-mvv-item:hover {
    border-color: #9B8EC4;
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(155,142,196,0.18);
}
.mag-mvv-stripe {
    width: 40px;
    height: 4px;
    background: linear-gradient(to right, var(--cyan), var(--lav));
    border-radius: 4px;
    margin-bottom: 1.5rem;
}
.mag-mvv-item h3 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--ink); }
.mag-mvv-item p { color: var(--g600); font-size: 0.95rem; }

/* ─── BENEFITS ─────────────────────────────────────────────────────────── */
.mag-benef {
    padding: 6rem 0;
    background: #100E20;
    color: var(--white);
}
.mag-benef .mag-sec-hd h2 { color: var(--white); }
.mag-benef .mag-sec-hd .mag-ey { color: var(--cyan); }
.mag-benef .mag-sec-hd p { color: var(--g400); }
.mag-benef-ribbon {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3.5rem;
}
.mag-rib { text-align: center; }
.mag-rib-ic {
    width: 68px;
    height: 68px;
    background: rgba(155,142,196,0.15);
    border: 1.5px solid rgba(155,142,196,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s;
}
.mag-rib:hover .mag-rib-ic {
    background: var(--cyan);
    border-color: var(--cyan);
}
.mag-rib-ic svg { width: 28px; height: 28px; color: var(--cyan); transition: color 0.3s; }
.mag-rib:hover .mag-rib-ic svg { color: var(--ink); }
.mag-rib h3 { font-size: 1.05rem; margin-bottom: 0.75rem; color: var(--white); }
.mag-rib p { font-size: 0.88rem; color: var(--g400); line-height: 1.55; }

/* ─── SERVICES ─────────────────────────────────────────────────────────── */
.mag-serv { padding: 8rem 0; background: #F5F3FA; }
.mag-serv-feature {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2rem;
}
.mag-serv-big {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    min-height: 500px;
    border: 2px solid #ECE8F5;
}
.mag-serv-big img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.mag-serv-big:hover img { transform: scale(1.05); }
.mag-serv-big-txt {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(16,14,32,0.92), transparent);
}
.mag-serv-big-txt h3 { color: var(--white); font-size: 1.75rem; margin-bottom: 0.75rem; }
.mag-serv-big-txt p { color: rgba(255,255,255,0.78); font-size: 0.95rem; }

.mag-serv-side { display: flex; flex-direction: column; gap: 2rem; }
.mag-serv-sm {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    border: 1.5px solid var(--g200);
    transition: all 0.3s;
}
.mag-serv-sm:hover {
    border-color: #9B8EC4;
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(155,142,196,0.15);
}
.mag-serv-sm img { width: 100%; height: 200px; object-fit: cover; }
.mag-serv-sm h3 { padding: 1.5rem 1.5rem 0.5rem; font-size: 1.2rem; color: var(--ink); }
.mag-serv-sm p { padding: 0 1.5rem 1.5rem; color: var(--g600); font-size: 0.92rem; }

/* ─── SECTORS ──────────────────────────────────────────────────────────── */
.mag-sect { padding: 8rem 0; background: var(--lav-pale); }
.mag-sect-marquee {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.mag-mq-item {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--white);
    border: 1.5px solid var(--g200);
    border-radius: 16px;
    transition: all 0.3s;
}
.mag-mq-item:hover {
    border-color: #9B8EC4;
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(155,142,196,0.18);
}
.mag-mq-ic {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lav-light);
    border-radius: 14px;
    transition: background 0.3s;
}
.mag-mq-item:hover .mag-mq-ic { background: var(--lav); }
.mag-mq-ic svg { width: 26px; height: 26px; color: var(--lav-deep); transition: color 0.3s; }
.mag-mq-item:hover .mag-mq-ic svg { color: var(--white); }
.mag-mq-item h3 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--ink); }
.mag-mq-item p { color: var(--g600); font-size: 0.92rem; }

/* ─── CIFRAS / STATS ───────────────────────────────────────────────────── */
.mag-cifras {
    background: #1E1A30;
    color: var(--white);
    padding: 5rem 0;
    border-top: 3px solid #9B8EC4;
}
.mag-cifras-band {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}
.mag-cb { text-align: center; }
.mag-cb strong {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--cyan);
    line-height: 1;
}
.mag-cb span {
    color: var(--g400);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

/* ─── CTA ──────────────────────────────────────────────────────────────── */
.mag-cta { padding: 8rem 0; text-align: center; background: linear-gradient(135deg, #2A2A3E 0%, #1E1A30 100%); }
.mag-cta-inner { max-width: 800px; }
.mag-cta h2 { font-size: 2.75rem; margin-bottom: 1.5rem; letter-spacing: -1px; color: var(--white); }
.mag-cta p { font-size: 1.2rem; color: rgba(255,255,255,.7); margin-bottom: 3rem; }
.mag-cta-btns { display: flex; justify-content: center; gap: 1.5rem; }

.mag-btn-solid {
    display: inline-block;
    background: #9B8EC4;
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    border: 2px solid #9B8EC4;
    transition: all 0.3s;
}
.mag-btn-solid:hover {
    background: #7E70AF;
    border-color: #7E70AF;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(155,142,196,0.25);
}
.mag-btn-line {
    display: inline-block;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,.4);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s;
}
.mag-btn-line:hover {
    background: rgba(255,255,255,.1);
    color: var(--white);
    border-color: #9B8EC4;
}

/* ─── CONTACT ──────────────────────────────────────────────────────────── */
.mag-contact { padding: 8rem 0; background: var(--white); }
.mag-cnt-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.mag-cnt-card {
    padding: 3rem 2rem;
    text-align: center;
    background: var(--lav-pale);
    border: 1.5px solid var(--g200);
    border-radius: 14px;
    transition: all 0.3s;
}
.mag-cnt-card:hover {
    border-color: #9B8EC4;
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(155,142,196,0.18);
}
.mag-cnt-ic {
    width: 52px;
    height: 52px;
    background: var(--lav-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: background 0.3s;
}
.mag-cnt-card:hover .mag-cnt-ic { background: var(--lav); }
.mag-cnt-ic svg { width: 24px; height: 24px; color: var(--lav-deep); transition: color 0.3s; }
.mag-cnt-card:hover .mag-cnt-ic svg { color: var(--white); }
.mag-cnt-card strong { display: block; font-size: 1.05rem; margin-bottom: 0.75rem; color: var(--ink); }
.mag-cnt-card p, .mag-cnt-card a { color: var(--g600); font-size: 0.92rem; line-height: 1.6; }
.mag-cnt-card a:hover { color: var(--cyan-deep); }

/* ─── FOOTER ───────────────────────────────────────────────────────────── */
.mag-footer {
    background: #100E20;
    color: var(--white);
    padding: 5rem 0 2rem;
    border-top: 3px solid #9B8EC4;
}
.mag-ftr-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(155,142,196,0.15);
    padding-bottom: 3rem;
}
.mag-ftr-inner p { color: var(--g400); max-width: 300px; font-size: 0.9rem; margin-top: 0.75rem; }
.mag-ftr-nav { display: flex; gap: 2.5rem; }
.mag-ftr-nav a { color: var(--g400); font-weight: 500; font-size: 0.9rem; }
.mag-ftr-nav a:hover { color: var(--cyan); }
.mag-ftr-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--g500);
}
.mag-ftr-bot a { color: var(--g500); }
.mag-ftr-bot a:hover { color: var(--cyan); }

/* ─── RESPONSIVE ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .mag-hero {
        padding-top: 120px;
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .mag-hero-top { margin: 0 auto; }
    .mag-hero-img img { aspect-ratio: 16/9; }

    .mag-about-layout { grid-template-columns: 1fr; gap: 3rem; }
    .mag-about-nums { justify-content: center; }

    .mag-mvv-cols,
    .mag-benef-ribbon,
    .mag-serv-feature,
    .mag-sect-marquee,
    .mag-cnt-cols { grid-template-columns: 1fr; }

    .mag-serv-big { min-height: 400px; }
    .mag-cifras-band { flex-direction: column; gap: 3rem; align-items: center; }
    .mag-ftr-inner { flex-direction: column; gap: 2.5rem; text-align: center; align-items: center; }
    .mag-ftr-nav { flex-direction: column; gap: 1rem; align-items: center; }
    .mag-ftr-bot { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 768px) {
    .mag-hdr { padding: 0 1.5rem; }
    .menu-toggle { display: flex; }
    #nav-menu {
        display: none;
        position: absolute;
        top: 80px; left: 0; right: 0;
        background: #F5F3FA;
        flex-direction: column;
        padding: 1.5rem 2rem;
        box-shadow: 0 8px 24px rgba(16,14,32,0.1);
        border-top: 1px solid rgba(155,142,196,0.15);
    }
    #nav-menu.active { display: flex; }
    #nav-menu a { padding: 0.75rem 0; border-bottom: 1px solid var(--g100); }

    .mag-hero h1 { font-size: 2.5rem; }
    .mag-sec-hd h2 { font-size: 2rem; }
    .mag-cta h2 { font-size: 2.25rem; }
    .mag-cta-btns { flex-direction: column; align-items: center; }
    .mag-btn-solid, .mag-btn-line { width: 100%; text-align: center; max-width: 320px; }
    .mag-benef-ribbon { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
