/* =========================================================
   Grupo JECOR — Tema claro moderno · mobile-first (app nativa)
   ========================================================= */

:root {
    /* Marca JECOR */
    --naranja: #F85808;
    --magenta: #F80878;
    --azul:    #0888F8;
    --verde:   #08A838;
    --morado:  #6808A8;
    --azul-inst: #046BD2;

    /* Neutros (slate) */
    --ink:      #0f172a;
    --ink-soft: #334155;
    --muted:    #64748b;
    --line:     #e6eaf0;
    --bg:       #ffffff;
    --bg-soft:  #f7f9fc;
    --bg-tint:  #f1f5fb;

    --grad-brand: linear-gradient(90deg, var(--magenta), var(--naranja) 30%, var(--verde) 55%, var(--azul) 78%, var(--morado));

    --radius:   18px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 8px rgba(15,23,42,.06);
    --shadow:    0 10px 30px rgba(15,23,42,.09);
    --shadow-lg: 0 24px 60px rgba(15,23,42,.14);

    --header-h: 74px;
    --appnav-h: 64px;
    --maxw: 1180px;

    --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--ink-soft);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: "Poppins", sans-serif; color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1rem; }

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

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 1000;
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ================= HEADER ================= */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s, background .3s;
    padding-top: env(safe-area-inset-top);
}
.site-header.scrolled {
    border-bottom-color: var(--line);
    box-shadow: 0 6px 24px rgba(15,23,42,.06);
}
.header-inner {
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand-logo { height: 40px; width: auto; }
.nav-desktop { display: flex; align-items: center; gap: 6px; }
.nav-link {
    position: relative;
    font-family: "Poppins", sans-serif; font-weight: 600; font-size: .84rem;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--ink-soft);
    padding: 10px 16px; border-radius: 999px;
    transition: color .2s, background .2s;
    display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: var(--azul-inst); background: var(--bg-tint); }
.nav-link.is-active { color: var(--azul-inst); }
.nav-link.is-active::after {
    content: ""; position: absolute; left: 50%; bottom: 2px; translate: -50% 0;
    width: 18px; height: 3px; border-radius: 3px; background: var(--grad-brand);
}
.ext-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 0 3px rgba(248,8,120,.15); }

/* ================= HERO ================= */
.hero {
    position: relative; overflow: hidden;
    min-height: min(88vh, 760px);
    display: grid; place-items: center; text-align: center;
    padding: 60px 0;
}
.hero-inner { position: relative; z-index: 2; pointer-events: none; }
.hero-inner a, .hero-inner .btn { pointer-events: auto; } /* los botones sí reciben clic */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
/* halo suave detrás del titular para mantenerlo legible sobre los círculos */
.hero-inner::before {
    content: ""; position: absolute; z-index: -1; pointer-events: none;
    left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(720px, 128%); height: min(460px, 150%);
    background: radial-gradient(closest-side, rgba(255,255,255,.92), rgba(255,255,255,.62) 46%, rgba(255,255,255,0) 74%);
    filter: blur(22px);
}
.hero .eyebrow {
    font-family: "Poppins", sans-serif; font-weight: 500; letter-spacing: .02em;
    color: var(--muted); font-size: clamp(1.1rem, 3vw, 1.6rem); margin-bottom: .1em;
}
.hero h1 {
    font-size: clamp(2.6rem, 9vw, 5.4rem); font-weight: 800; letter-spacing: -.02em;
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
    margin: 0;
}
.hero .since {
    display: inline-block; margin-top: 22px; font-family: "Poppins", sans-serif; font-weight: 600;
    color: var(--ink); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
    padding: 8px 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.hero-cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ================= BUTTONS ================= */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: "Poppins", sans-serif; font-weight: 600; font-size: .95rem;
    padding: 13px 26px; border-radius: 999px; cursor: pointer; border: 0;
    transition: transform .15s var(--ease), box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--azul-inst); color: #fff; box-shadow: 0 10px 24px rgba(4,107,210,.28); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(4,107,210,.36); }
.btn-brand { background: var(--grad-brand); color: #fff; box-shadow: 0 12px 28px rgba(248,8,120,.28); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--azul-inst); color: var(--azul-inst); }

/* ================= SECTIONS ================= */
.section { padding: clamp(52px, 8vw, 96px) 0; }
.section-tint { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(34px, 5vw, 56px); }
.section-head h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; }
.section-head .kicker {
    display: inline-block; font-family: "Poppins", sans-serif; font-weight: 600; font-size: .78rem;
    letter-spacing: .16em; text-transform: uppercase; color: var(--azul-inst);
    background: var(--bg-tint); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Franja "Desde 1968" */
.since-band {
    position: relative; min-height: 340px; display: grid; place-items: center; text-align: center;
    background: linear-gradient(rgba(15,23,42,.55), rgba(15,23,42,.55)), url('../img/fondo-1968.jpg') center/cover fixed;
    color: #fff;
}
.since-band h2 { color: #fff; font-family: "Poppins", sans-serif; font-weight: 600;
    font-size: clamp(1.8rem, 6vw, 3rem); letter-spacing: .04em; margin: 0; }
.since-band .lead { max-width: 640px; margin: 14px auto 0; color: rgba(255,255,255,.9); padding-inline: 20px; }

/* Misión / Visión */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.mv-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 34px 30px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s;
}
.mv-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mv-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--grad-brand); }
.mv-card h3 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.mv-card .ic { width: 30px; height: 30px; }

/* Valores */
.values-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px;
}
.value {
    text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 12px; box-shadow: var(--shadow-sm);
    transition: transform .25s var(--ease), box-shadow .25s;
}
.value:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.value .badge {
    width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px;
    display: grid; place-items: center; color: #fff;
}
.value .badge svg { width: 30px; height: 30px; }
.value h4 { font-size: .98rem; margin: 0; color: var(--ink); }
.v-pasion { background: var(--naranja); }
.v-integridad { background: var(--verde); }
.v-disciplina { background: var(--azul); }
.v-servicialidad { background: var(--magenta); }
.v-responsabilidad { background: var(--morado); }
.v-diversion { background: var(--azul-inst); }

/* Marcas */
.brands { display: grid; gap: 22px; }
.brand-card {
    position: relative; border-radius: var(--radius-lg); overflow: hidden;
    min-height: 240px; display: grid; place-items: center;
    box-shadow: var(--shadow); isolation: isolate;
}
.brand-card img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
    transition: transform .6s var(--ease); }
.brand-card::after { content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(0deg, rgba(255,255,255,.86), rgba(255,255,255,.72)); }
.brand-card:hover img.bg { transform: scale(1.06); }
.brand-logo-img { max-width: min(72%, 340px); height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.12)); }

/* ================= EN CONSTRUCCIÓN ================= */
.construction {
    max-width: 640px; margin: 0 auto; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: clamp(36px, 6vw, 64px) 30px; box-shadow: var(--shadow);
}
.construction .cone {
    width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 26px;
    display: grid; place-items: center; background: var(--bg-tint);
    animation: bob 2.6s var(--ease) infinite;
}
.construction .cone svg { width: 52px; height: 52px; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-8px);} }
.construction h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.construction p { color: var(--muted); }
.construction .bar {
    height: 10px; border-radius: 999px; background: var(--bg-tint); overflow: hidden; margin: 26px auto 6px; max-width: 340px;
}
.construction .bar span { display: block; height: 100%; width: 62%; border-radius: 999px; background: var(--grad-brand);
    animation: load 2.4s var(--ease) infinite; }
@keyframes load { 0%{ width: 12%;} 50%{ width: 72%;} 100%{ width: 12%;} }

/* ================= CONTACTO ================= */
.contact-lead { max-width: 720px; margin: 0 auto clamp(30px,5vw,48px); text-align: center; }
.phones { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 20px; margin-bottom: 20px; }
.phone-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px;
    box-shadow: var(--shadow-sm);
}
.phone-card .city { font-family: "Poppins", sans-serif; font-weight: 700; color: var(--ink); font-size: 1.1rem; }
.phone-card .sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.phone-card a.tel {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px;
    background: var(--bg-soft); margin-top: 8px; font-weight: 700; color: var(--ink);
    transition: background .2s, transform .15s;
}
.phone-card a.tel:hover { background: var(--bg-tint); }
.phone-card a.tel:active { transform: scale(.98); }
.phone-card a.tel svg { width: 20px; height: 20px; color: var(--verde); flex: none; }

.sucursales { margin-top: 46px; }
.suc-region { margin-bottom: 34px; }
.suc-region > h3 {
    font-family: "Poppins", sans-serif; font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--azul-inst); display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.suc-region > h3::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.suc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 16px; }
.suc-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow-sm); border-left: 5px solid var(--brand-accent, var(--azul-inst));
}
.suc-card .name { font-family: "Poppins", sans-serif; font-weight: 700; color: var(--ink); }
.suc-card .addr { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.b-esmeralda { --brand-accent: var(--magenta); }
.b-cereales  { --brand-accent: var(--verde); }
.b-konfecture{ --brand-accent: var(--morado); }

/* ================= VACANTES intro ================= */
.vac-hero { text-align: center; }
.vac-hero .badge-jobs {
    display: inline-flex; gap: 8px; align-items: center; background: var(--bg-tint); color: var(--azul-inst);
    font-family: "Poppins", sans-serif; font-weight: 600; padding: 8px 16px; border-radius: 999px;
    font-size: .82rem; letter-spacing: .04em; margin-bottom: 18px;
}
.vac-points { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 18px; margin-top: 12px; }
.vac-point { background:#fff; border:1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); text-align:center; }
.vac-point .badge { width:52px; height:52px; border-radius:16px; display:grid; place-items:center; margin:0 auto 12px; color:#fff; }
.vac-point .badge svg { width:26px; height:26px; }

/* ================= FOOTER ================= */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 40px; }
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
    padding: clamp(44px, 6vw, 72px) 20px clamp(30px,4vw,44px);
}
.footer-logo { height: 46px; width: auto; margin-bottom: 16px; filter: brightness(0) invert(1); opacity: .95; }
.footer-tagline { color: #94a3b8; max-width: 320px; }
.footer-title {
    font-family: "Poppins", sans-serif; color: #fff; font-size: .82rem; letter-spacing: .14em;
    text-transform: uppercase; margin-bottom: 16px;
}
.footer-col a { display: block; padding: 7px 0; color: #cbd5e1; transition: color .2s, padding-left .2s; }
.footer-col a:hover { color: #fff; padding-left: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); }
.footer-bottom p { text-align: center; color: #64748b; font-size: .85rem; padding: 20px 0; margin: 0; }

/* ================= BOTTOM APP-NAV (móvil) ================= */
.app-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
    display: none; grid-template-columns: repeat(5, 1fr);
    background: rgba(255,255,255,.9);
    backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -6px 24px rgba(15,23,42,.08);
}
.app-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--appnav-h); color: var(--muted); font-size: .66rem; font-weight: 700;
    font-family: "Poppins", sans-serif; letter-spacing: .01em;
    transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.app-nav-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9;
    stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.app-nav-item.is-active { color: var(--azul-inst); }
.app-nav-item.is-active svg { transform: translateY(-2px); }
.app-nav-item:active svg { transform: scale(.88); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* inline svg default (for stroke icons in sections) */
.ic { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1000px) {
    .values-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .header-inner { justify-content: center; }
    .app-nav { display: grid; }
    body { padding-bottom: calc(var(--appnav-h) + env(safe-area-inset-bottom)); }
    .site-footer { margin-bottom: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-brand { grid-column: 1 / -1; }
    /* fixed bg attachment jankea en iOS */
    .since-band { background-attachment: scroll; }
}
@media (max-width: 640px) {
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .header-inner { height: 64px; }
    .brand-logo { height: 34px; }
    :root { --header-h: 64px; }
    .footer-grid { grid-template-columns: 1fr; }

    /* Hero compacto en móvil */
    .hero { min-height: 78vh; }
}
@media (max-width: 380px) {
    .app-nav-item span { font-size: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
