/* =====================================================================
   CREARTON® — Sitio público (rediseño 2026)
   Sistema visual basado en el Manual de Identidad Gráfica.
   Verde 1 #619F43 · Verde 2 #A4CF5F · Grises #6A6867 / #C0BDBD
   Tipografía web: Plus Jakarta Sans (títulos) + Inter (cuerpo).
   Señal de marca: acento "kraft/papel" en secciones alternas.
   ===================================================================== */

/* ------------------------------- Tokens ---------------------------- */
:root {
    /* Marca */
    --green:        #619F43;   /* Verde 1 — decorativo, íconos, acentos */
    --green-2:      #A4CF5F;   /* Verde 2 — realces claros */
    --green-deep:   #3B7A28;   /* Interactivo (botones, enlaces) — AA sobre blanco */
    --green-deep-h: #2f6420;   /* Hover */
    --green-soft:   #eef5e6;   /* Fondos suaves verdes */

    /* Neutros */
    --ink:    #23291f;         /* Títulos */
    --body:   #4b524a;         /* Texto */
    --muted:  #676c63;         /* Secundario (AA sobre blanco) */
    --line:   #e6e8e2;         /* Bordes */
    --white:  #ffffff;

    /* Kraft / papel — la señal del material de CREARTON */
    --paper:      #f6f3ea;
    --paper-line: #e9e2d2;

    /* Radios y sombras — el wireframe usa esquinas cuadradas (0) */
    --r-sm: 0;
    --r:    0;
    --r-lg: 0;
    --shadow-sm: 0 1px 2px rgba(35,41,31,.06), 0 2px 8px rgba(35,41,31,.05);
    --shadow:    0 8px 30px rgba(35,41,31,.09);
    --shadow-lg: 0 20px 50px rgba(35,41,31,.14);

    /* Tipografía */
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

    /* Layout */
    --content: 1320px;
    --header-h: 80px;
}

/* ------------------------------- Base ------------------------------ */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    font-family: var(--font-body);
    color: var(--body);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    margin: 0;
    /* Compensa el header fijo al saltar a anclas */
    scroll-padding-top: calc(var(--header-h) + 16px);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--ink);
    line-height: 1.15;
    letter-spacing: -.02em;
    margin: 0;
    font-weight: 700;
}

p  { margin: 0; }
a  { color: var(--green-deep); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green-deep-h); }
img { max-width: 100%; display: block; }

.container { max-width: calc(var(--content) + 48px); padding-inline: 24px; margin-inline: auto; width: 100%; }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 2000;
    background: var(--green-deep); color: #fff; padding: 10px 16px;
    border-radius: var(--r-sm); transition: top .2s ease;
}
.skip-link:focus { top: 16px; color: #fff; }

:where(a, button, input, select, textarea):focus-visible {
    outline: 3px solid var(--green-2);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --------------------------- Rótulos / heads ----------------------- */
/* Línea corta (—) que el wireframe usa sobre el H1 del hero y del contacto */
.rule { display: block; width: 48px; height: 3px; border-radius: 3px; margin-bottom: 22px;
    background: linear-gradient(90deg, var(--green), var(--green-2)); }

/* Rótulo superior en versalitas (sección Clientes del wireframe) */
.overline {
    font-family: var(--font-display); font-size: .8rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase; color: var(--green-deep); margin-bottom: 12px;
}

.section-head { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-sub { margin-top: 14px; font-size: 1.06rem; color: var(--muted); }

/* ------------------------------ Botones ---------------------------- */
.btn {
    --btn-fs: 1rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font-display); font-weight: 600; font-size: var(--btn-fs);
    line-height: 1; padding: 15px 26px; border-radius: 0;
    border: 1.5px solid transparent; cursor: pointer;
    transition: transform .15s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { --btn-fs: 1.05rem; padding: 16px 30px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--green-deep); color: #fff; box-shadow: 0 6px 18px rgba(59,122,40,.28); }
.btn-primary:hover { background: var(--green-deep-h); color: #fff; box-shadow: 0 10px 24px rgba(59,122,40,.34); transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--green); color: var(--green-deep); background: var(--green-soft); }

/* =====================================================================
   Header / navegación
   ===================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s ease, border-color .25s ease;
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); border-bottom-color: var(--line); }

.site-header .navbar { padding: 0; min-height: var(--header-h); }
.site-header .container { display: flex; align-items: center; }

.navbar-brand { padding: 0; margin: 0; display: flex; align-items: center; }
.navbar-brand img { height: 46px; width: auto; }

.navbar-nav { gap: 4px; align-items: center; }
.nav-link {
    font-family: var(--font-display); font-weight: 600; font-size: .98rem;
    color: var(--ink) !important; padding: 10px 16px !important; border-radius: 0;
    transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--green-deep) !important; }
.nav-link.dropdown-toggle::after { margin-left: 6px; vertical-align: middle; border-top-color: currentColor; }

.dropdown-menu {
    border: 1px solid var(--line); border-radius: var(--r); padding: 8px;
    box-shadow: var(--shadow); margin-top: 10px; min-width: 268px;
}
.dropdown-item {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--font-display); font-weight: 500; font-size: .95rem;
    color: var(--ink); padding: 11px 14px; border-radius: var(--r-sm);
}
.dropdown-item i { color: var(--green); width: 20px; text-align: center; font-size: 1rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--green-soft); color: var(--green-deep); }

.nav-cta { margin-left: 8px; }

.navbar-toggler { border: 1px solid var(--line); border-radius: 0; padding: 8px 10px; background: #fff; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon { width: 22px; height: 16px; background: none; position: relative; display: block; }
.navbar-toggler-icon, .navbar-toggler-icon span, .navbar-toggler-icon::before, .navbar-toggler-icon::after {}
.navbar-toggler-icon span, .navbar-toggler-icon::before, .navbar-toggler-icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); border-radius: 2px;
}
.navbar-toggler-icon::before { top: 0; }
.navbar-toggler-icon span { top: 7px; }
.navbar-toggler-icon::after { bottom: 0; }

/* =====================================================================
   01 · Hero
   ===================================================================== */
.hero { padding: clamp(48px, 7vw, 96px) 0; position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(60% 70% at 88% 12%, rgba(164,207,95,.20), transparent 60%),
        radial-gradient(50% 60% at 8% 90%, rgba(97,159,67,.10), transparent 60%);
}
.hero-grid {
    display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px);
    align-items: center;
}
.hero-title { font-size: clamp(2.1rem, 4.6vw, 3.35rem); font-weight: 800; letter-spacing: -.03em; }
.hero-lead { margin-top: 20px; font-size: clamp(1.05rem, 1.7vw, 1.2rem); color: var(--muted); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.hero-benefits {
    list-style: none; padding: 0; margin: 40px 0 0;
    display: flex; flex-wrap: wrap; gap: 14px 28px;
}
.hero-benefits li {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--ink);
}
.hero-benefits i { color: var(--green-deep); font-size: 1.05rem; }

.hero-media { position: relative; }
.hero-media img {
    width: 100%; aspect-ratio: 5/6; object-fit: cover;
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}

/* =====================================================================
   Secciones — ritmo vertical
   ===================================================================== */
.section { padding: clamp(56px, 8vw, 96px) 0; }
/* Fondo blanco en todas las secciones (wireframe); separador fino entre ellas */
.section-line { border-top: 1px solid var(--line); }

/* =====================================================================
   02 · Nuestras soluciones
   ===================================================================== */
.solutions-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
}
.solution-card {
    position: relative; display: flex; flex-direction: column; background: #fff;
    border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
    color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.solution-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; color: inherit; }
.solution-media { height: 200px; background: #f1f1ec; overflow: hidden; }
.solution-media img { width: 100%; height: 100%; object-fit: cover; }
/* Ícono circular centrado sobre el borde imagen/texto (wireframe) */
.solution-icon {
    position: absolute; top: 200px; left: 50%; transform: translate(-50%, -50%); z-index: 2;
    width: 56px; height: 56px; border-radius: 50%;
    background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--green-deep); font-size: 1.25rem;
}
.solution-body { padding: 42px 22px 28px; display: flex; flex-direction: column; flex: 1; text-align: center; }
.solution-body h3 { font-size: 1.2rem; }
.solution-body p { margin-top: 10px; font-size: .96rem; color: var(--muted); flex: 1; }
.solution-arrow { margin-top: 18px; color: var(--green-deep); font-size: 1.05rem; }
.solution-arrow i { transition: transform .2s ease; }
.solution-card:hover .solution-arrow i { transform: translateX(4px); }

/* =====================================================================
   03 · ¿Por qué CREARTON?
   ===================================================================== */
/* 4 columnas con separadores verticales; la 1ª es el número 20+ (wireframe) */
.why-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.why-col { text-align: center; padding: 6px 28px; }
.why-col + .why-col { border-left: 1px solid var(--line); }
.why-stat, .why-icon {
    display: flex; align-items: center; justify-content: center;
    height: 60px; margin-bottom: 16px; color: var(--green-deep);
}
.why-stat { font-family: var(--font-display); font-weight: 800; font-size: 3.4rem; line-height: 1; letter-spacing: -.02em; }
.why-icon { font-size: 1.9rem; }
.why-col h3 { font-size: 1.1rem; }
.why-col p { margin-top: 12px; font-size: .94rem; color: var(--muted); }

/* =====================================================================
   04 · Proyectos desarrollados
   ===================================================================== */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
    margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--paper);
    aspect-ratio: 4/3; border: 1px solid var(--line);
}
.project-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.project-card:hover img { transform: scale(1.05); }
.section-cta { text-align: center; margin-top: 44px; }

/* =====================================================================
   05 · Clientes
   ===================================================================== */
.clients-row {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 20px 44px;
}
.client-logo {
    font-family: var(--font-display); font-weight: 700; letter-spacing: .02em;
    font-size: 1.15rem; color: #676c63; padding: 14px 8px;
    filter: grayscale(1); transition: color .2s ease;
    /* Placeholder — reemplazar por <img> de logotipos reales */
}
.client-logo:hover { color: var(--green-deep); }
/* Indicadores de posición del carrusel (wireframe) */
.clients-dots { display: flex; justify-content: center; gap: 8px; margin-top: 32px; }
.clients-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.clients-dots .dot.is-active { width: 22px; border-radius: 4px; background: var(--green); }

/* =====================================================================
   06 · Contacto / CTA
   ===================================================================== */
/* Imagen 40% izquierda + contenido 60% derecha (wireframe: 40% imagen / 60% form) */
.contacto-grid { display: grid; grid-template-columns: 40% 1fr; gap: clamp(28px, 4vw, 52px); align-items: stretch; }
.contacto-media { border-radius: var(--r-lg); overflow: hidden; min-height: 340px; }
.contacto-media img { width: 100%; height: 100%; object-fit: cover; }
.contacto-content .section-title { text-align: left; }
.contacto-content .section-sub { text-align: left; }

.contacto-directos { list-style: none; padding: 0; margin: 26px 0 24px; display: flex; flex-wrap: wrap; gap: 16px 32px; }
.contacto-directos a { display: flex; align-items: center; gap: 14px; color: var(--ink); }
.contacto-directos a:hover { color: var(--green-deep); }
.cd-ic {
    width: 52px; height: 52px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 1.25rem;
    background: #fff; border: 1px solid var(--line); color: var(--green-deep);
}
.cd-ic.is-wa { background: #25d366; color: #fff; border-color: #25d366; }
.contacto-directos strong { display: block; font-family: var(--font-display); font-size: 1rem; }
.contacto-directos em { font-style: normal; color: var(--muted); font-size: .92rem; }

.contacto-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; }
.form-field--full { grid-column: 1 / -1; }
/* El wireframe usa placeholders dentro del campo; el label queda accesible pero oculto */
.form-field label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.form-field input, .form-field select, .form-field textarea {
    font-family: var(--font-body); font-size: 1rem; color: var(--ink);
    padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
    background: #fff; transition: border-color .2s ease, box-shadow .2s ease; width: 100%;
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(97,159,67,.14);
}
.contacto-form .btn-block { margin-top: 22px; }

.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.invalid-feedback { display: none; font-size: .85rem; color: #c02640; }
.was-validated input:invalid, .was-validated select:invalid, .was-validated textarea:invalid { border-color: #e0899a; }
.was-validated :invalid ~ .invalid-feedback { display: block; }

.alert-soft {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
    padding: 14px 18px; border-radius: var(--r-sm); font-size: .95rem; font-weight: 500;
}
.alert-soft.is-ok  { background: #e7f5e0; color: #2f6420; border: 1px solid #bfe3ac; }
.alert-soft.is-err { background: #fdeaee; color: #b3213c; border: 1px solid #f2c2ce; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer { background: #1c2118; color: #b9c1b0; padding: clamp(52px, 6vw, 80px) 0 32px; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1.2fr 1.2fr 1.2fr 1.4fr; gap: 40px;
    padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand img { height: 44px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: .94rem; color: #97a08d; max-width: 34ch; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,.07); color: #d3dac9; transition: background-color .2s ease, color .2s ease;
}
.footer-social a:hover { background: var(--green); color: #fff; }

.footer-col h3 {
    font-family: var(--font-display); font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #fff; margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.footer-col a { color: #b9c1b0; font-size: .94rem; }
.footer-col a:hover { color: var(--green-2); }
.footer-muted { color: #8a927e; font-size: .94rem; }
.footer-contact li { display: flex; gap: 10px; font-size: .94rem; color: #b9c1b0; align-items: flex-start; }
.footer-contact i { color: var(--green-2); margin-top: 4px; }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
    padding-top: 26px; font-size: .86rem; color: #8a927e;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.footer-legal a { color: #8a927e; }
.footer-legal a:hover { color: var(--green-2); }
.footer-attribution { display: inline-flex; align-items: center; gap: 8px; color: #8a927e; }
.footer-attribution img { height: 18px; width: auto; opacity: .85; }
.footer-attribution:hover img { opacity: 1; }

/* =====================================================================
   Reveal on scroll
   ===================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1100px) {
    .solutions-grid { grid-template-columns: repeat(2, 1fr); }
    /* ¿Por qué? en 2×2: separador vertical solo en la 2ª columna, horizontal en la 2ª fila */
    .why-row { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
    .why-col + .why-col { border-left: none; }
    .why-col:nth-child(even) { border-left: 1px solid var(--line); }
    .why-col:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 44px; }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (max-width: 991.98px) {
    :root { --header-h: 72px; }
    .navbar-brand img { height: 40px; }
    .navbar-collapse {
        background: #fff; margin-top: 12px; padding: 14px; border: 1px solid var(--line);
        border-radius: var(--r); box-shadow: var(--shadow);
    }
    .navbar-nav { gap: 2px; align-items: stretch; }
    .nav-link { padding: 12px 14px !important; }
    /* En móvil el submenú fluye dentro del menú (empuja el contenido), no flota */
    .navbar-nav .dropdown-menu { position: static; float: none; width: 100%; box-shadow: none; border: none; padding-left: 12px; margin-top: 2px; }
    .nav-cta { margin: 10px 0 4px; }

    .hero-grid { grid-template-columns: 1fr; }
    .hero-media { order: -1; }
    .hero-media img { aspect-ratio: 16/10; }
    .hero-lead { max-width: none; }

    .contacto-grid { grid-template-columns: 1fr; }
    .contacto-media { order: -1; min-height: 240px; }
}

@media (max-width: 680px) {
    .container { padding-inline: 18px; }
    .solutions-grid { grid-template-columns: 1fr; }
    .why-row { grid-template-columns: 1fr; row-gap: 0; }
    .why-col, .why-col:nth-child(even) { border-left: none; }
    .why-col + .why-col { border-top: 1px solid var(--line); padding-top: 32px; margin-top: 4px; }
    .projects-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .contacto-form .form-row { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
    .btn-lg { width: 100%; }
    .hero-actions { gap: 12px; }
}

@media (max-width: 400px) {
    .projects-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
