﻿/* ===========================
   KAI+ / Kukulcán - CSS BASE (FIX v4)
   - No recorte a la izquierda
   - Guacamaya visible
   - Barra rosada detrás de guacamaya y antes del logo
   - Sin burbujas
   - Título en una sola línea
   =========================== */

:root {
    --kuk-rose: #CB1D73;
    --kuk-soft-blue: #B5EFE7;
    --kuk-matte-blue: #7393C6;
    --kuk-muted: #6b7280;
    --kuk-radius: 12px;
    --kuk-elevation: 0 10px 30px rgba(115,147,198,0.10);
    --kuk-card-border: rgba(2,6,23,0.06);
    /* single page background color (used for whole body) */
    --kuk-page-bg: #e9f9f6;
    --kuk-hero-top: #eaf9f7;
    --kuk-hero-mid: #f7feff;
    --hero-max: 1200px;
    --hero-pad: 24px;
    --parrot-col: 360px;
    --logo-col: 300px;
    /* === POSICIÓN (desktop) === */
    --title-top: 100px;
    --subtitle-top: 150px;
    --title-shift-x: -200px;
    --subtitle-shift-x: -200px;
    --bar-top: 230px;
    /* Barra: que se auto-adapte al contenedor (sin recortes) */
    --bar-inset-left: -180px; /* margen interno izquierda del contenedor */
    --bar-inset-right: 24px; /* margen interno derecha del contenedor */
    --bar-max-width: 1000px; /* límite para que no se vea exagerada en pantallas grandes */
}

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* SINGLE BACKGROUND FOR THE ENTIRE PAGE */
body {
    margin: 0;
    color: #111827;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* <-- single, consistent background for whole page (no per-section backgrounds) */
    background: var(--kuk-page-bg);
}

/* ---- Navbar CTA ---- */
.navbar-cta {
    background: var(--kuk-rose);
    color: #fff;
    padding: 10px 18px;
    border-radius: 28px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 26px rgba(203,29,115,0.18);
    transition: transform .12s ease, box-shadow .12s ease;
}

    .navbar-cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 32px rgba(203,29,115,0.22);
    }

/* ===========================
   HERO
   =========================== */

.kuk-hero {
    position: relative;
    background: transparent;
    padding: 18px 0 60px 0; /* reducido bottom padding ahora que body tiene el color */
    overflow: visible;
}

/* Fade inferior: ahora corto y que funda en el mismo color de página */
.kuk-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 48px; /* corto, no empuja contenido */
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(180deg,
      rgba(255,255,255,0) 0%,
      rgba(233,249,246,0.8) 50%,
      var(--kuk-page-bg) 100%);
}

/* Grid 3 columnas */
.kuk-hero-inner {
    max-width: var(--hero-max);
    margin: 0 auto;
    padding: 0 var(--hero-pad);
    display: grid;
    grid-template-columns: var(--parrot-col) 1fr var(--logo-col);
    gap: 16px;
    position: relative;
    z-index: 2;
    min-height: 460px; /* más compacto */
}

/* Quitar burbujas/halos previos */
.kuk-hero-inner::before,
.kuk-hero-inner::after,
.kuk-hero-text::before,
.kuk-hero-text::after {
    content: none !important;
}

/* ---- Guacamaya ---- */
.kuk-parrot-col {
    position: relative;
    height: 360px;
    display: flex;
    align-items: center;
    overflow: visible;
    z-index: 10;
}

/* Ajuste guacamaya */
.kuk-parrot {
    position: relative;
    z-index: 10;
    height: 420px;
    width: auto;
    object-fit: contain;
    transform: translateX(-28px) translateY(6px);
    pointer-events: none;
    filter: drop-shadow(0 14px 34px rgba(2,6,23,0.14)) contrast(1.08);
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,1) 22%);
    mask-image: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,1) 22%);
}

/* ---- Logo KAI ---- */
.kuk-hero-logo {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    position: relative;
    z-index: 9;
}

    .kuk-hero-logo img {
        width: clamp(170px,18vw,320px);
        height: auto;
        max-width: 100%;
        object-fit: contain;
        filter: drop-shadow(0 14px 40px rgba(2,6,23,0.08));
    }

/* ---- Centro: ancla absoluta para título y barra ---- */
.kuk-hero-text {
    position: relative;
    z-index: 8;
    min-height: 420px;
}

    .kuk-hero-text h1 {
        position: absolute;
        top: var(--title-top);
        left: 0;
        transform: translateX(var(--title-shift-x));
        margin: 0;
        font-weight: 900;
        line-height: 1.02;
        color: #0f1724;
        white-space: nowrap;
        font-size: clamp(2.0rem, 3.1vw, 3.0rem);
        text-shadow: 0 2px 0 rgba(255,255,255,0.55), 0 18px 50px rgba(181,239,231,0.18);
    }
    .kuk-hero-text h3 {
        position: absolute;
        top: var(--subtitle-top);
        left: 0;
        transform: translateX(var(--subtitle-shift-x));
        margin: 0;
        font-weight: 500;
        line-height: 1;
        color: #0f1724;       
        font-size: clamp(1.0rem, 1.1vw, 2.0rem);
        text-shadow: 0 2px 0 rgba(255,255,255,0.55), 0 18px 50px rgba(181,239,231,0.18);
    }

/* ---- Barra rosada tipo flecha (punta derecha) - versión limpia ---- */
.kuk-hero-pink {
    position: absolute;
    top: var(--bar-top);
    left: var(--bar-inset-left);
    right: var(--bar-inset-right);
    max-width: var(--bar-max-width);
    margin: 0 auto;
    z-index: 2;
    min-height: 64px;
    padding: 14px 64px 14px 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    background: linear-gradient(180deg, var(--kuk-rose), #d1347f);
    box-shadow: 0 18px 40px rgba(203,29,115,0.18);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(2px);
    clip-path: polygon( 0% 0%, 94% 0%, 100% 50%, 94% 100%, 0% 100%);
}

    .kuk-hero-pink span {
        display: inline-block;
        max-width: 62ch;
        font-weight: 700;
        line-height: 1.25;
        font-size: 1.50rem;
        text-shadow: 0 1px 0 rgba(0,0,0,0.12);
    }



/* Fallback: si el navegador no soporta clip-path, vuelve a pastilla */
@supports not (clip-path: polygon(0 0)) {
    .kuk-hero-pink {
        border-radius: 999px;
        clip-path: none;
    }

        .kuk-hero-pink::before {
            display: none;
        }
}


/* ===========================
   KPI CARDS (sin cambios funcionales importantes)
   =========================== */

.kpi {
    padding: 12px 0 8px 0; /* más compacto: body ya ofrece el fondo */
}

.kpi__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px;
}

.kpi__header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.kpi__title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.kpi__subtitle {
    margin: 0;
    color: var(--kuk-muted);
    font-size: 14px;
    line-height: 1.4;
}

.kpi__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.kpi__card {
    display: block;
    background: #fff;
    border: 1px solid var(--kuk-card-border);
    border-radius: 14px;
    padding: 18px 16px;
    text-decoration: none;
    color: #111827;
    box-shadow: 0 10px 30px rgba(115,147,198,0.10);
    position: relative;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

    .kpi__card:focus-visible {
        outline: 3px solid rgba(181,239,231,0.9);
        outline-offset: 3px;
    }

    .kpi__card:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 34px rgba(115,147,198,0.14);
        border-color: rgba(115,147,198,0.22);
    }

.kpi__label {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
}

.kpi__value {
    font-weight: 950;
    font-size: 34px;
    line-height: 1;
    margin-bottom: 8px;
}

.kpi__meta {
    font-size: 12px;
    color: var(--kuk-muted);
}

/* Acento sutil: una línea superior (no grita) */
.kpi__card::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 12px;
    height: 3px;
    border-radius: 99px;
    background: rgba(115,147,198,0.25);
}

.kpi__card--rose .kpi__value {
    color: var(--kuk-rose);
}

.kpi__card--rose::before {
    background: rgba(203,29,115,0.45);
}

.kpi__card--soft .kpi__value {
    color: #0f1724;
}

.kpi__card--soft::before {
    background: rgba(181,239,231,0.95);
}

.kpi__card--matte .kpi__value {
    color: var(--kuk-matte-blue);
}

.kpi__card--matte::before {
    background: rgba(115,147,198,0.55);
}

.kpi__card--ink .kpi__value {
    color: #0f1724;
}

.kpi__card--ink::before {
    background: rgba(15,23,36,0.22);
}

.kpi__hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 2px 0 2px;
    color: var(--kuk-muted);
    font-size: 12px;
}

.kpi__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(203,29,115,0.55);
}

/* ===========================
   SERVICES GRID
   =========================== */
.services {
    padding: 22px 0 44px 0;
}

.services__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 18px;
}

.services__header {
    text-align: center;
    margin-bottom: 16px;
}

.services__title {
    margin: 0;
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.services__subtitle {
    margin: 6px auto 0 auto;
    max-width: 72ch;
    color: var(--kuk-muted);
    font-size: 14px;
    line-height: 1.45;
}

.services__grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.svc {
    background: #fff;
    border: 1px solid var(--kuk-card-border);
    border-radius: 16px;
    padding: 16px;
    text-decoration: none;
    color: #0f1724;
    box-shadow: 0 10px 30px rgba(115,147,198,0.10);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
}

    .svc:focus-visible {
        outline: 3px solid rgba(181,239,231,0.9);
        outline-offset: 3px;
    }

    .svc:hover {
        transform: translateY(-1px);
        box-shadow: 0 14px 34px rgba(115,147,198,0.14);
        border-color: rgba(115,147,198,0.22);
    }

.svc__top {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.svc__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f1724;
    background: rgba(181,239,231,0.55);
    border: 1px solid rgba(115,147,198,0.18);
}

.svc__title {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 950;
}

.svc__desc {
    margin: 0;
    font-size: 13px;
    color: var(--kuk-muted);
    line-height: 1.35;
}

.svc__link {
    margin-top: 14px;
    display: inline-flex;
    width: fit-content;
    font-weight: 900;
    font-size: 13px;
    color: var(--kuk-rose);
}

/* Variantes por servicio (solo acentos, no gradientes) */
.svc--info .svc__icon {
    background: rgba(181,239,231,0.65);
}

.svc--soft .svc__icon {
    background: rgba(181,239,231,0.40);
}

.svc--matte .svc__icon {
    background: rgba(115,147,198,0.18);
    color: #0f1724;
}

.svc--rose .svc__icon {
    background: rgba(203,29,115,0.12);
    color: var(--kuk-rose);
    border-color: rgba(203,29,115,0.18);
}

/* Responsive */
@media (max-width: 1100px) {
    .kpi__grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .services__grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 600px) {
    .kpi__grid {
        grid-template-columns: 1fr;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .services__header {
        text-align: left;
    }
}



/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width:1100px) {
    .k-card-row {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .k-service-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    :root {
        --title-top: 78px;
        --title-shift-x: -200px;
        --bar-inset-left: 16px;
        --bar-inset-right: 16px;
        --bar-max-width: 860px;
    }
}

@media (max-width:900px) {
    :root {
        --parrot-col: 300px;
        --logo-col: 240px;
        --hero-pad: 16px;
        --title-top: 74px;
        --title-shift-x: -160px;
        --bar-top: 184px;
        --bar-inset-left: 12px;
        --bar-inset-right: 12px;
        --bar-max-width: 760px;
    }

    .kuk-hero-inner {
        min-height: 460px;
    }

    .kuk-parrot {
        height: 430px;
        transform: translateX(-16px) translateY(4px);
    }

    .kuk-parrot-col {
        height: 380px;
    }

    .kuk-hero-logo {
        padding-top: 72px;
    }

    .kuk-hero-text h1 {
        font-size: clamp(1.8rem, 4.0vw, 2.5rem);
    }
}

@media (max-width:600px) {
    .kuk-hero {
        padding: 12px 0 70px 0;
    }

    .kuk-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 12px;
        align-items: center;
    }

    .kuk-parrot-col {
        height: auto;
        justify-content: center;
    }

    .kuk-parrot {
        height: 220px;
        transform: none;
        margin: 0 auto;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .kuk-hero-logo {
        justify-content: center;
        padding-top: 0;
    }

        .kuk-hero-logo img {
            width: 220px;
        }

    .kuk-hero-text {
        min-height: auto;
    }

        .kuk-hero-text h1 {
            position: static;
            transform: none;
            white-space: normal;
            text-align: center;
            margin: 8px auto 10px auto;
            font-size: 1.6rem;
        }

    .kuk-hero-pink {
        position: static;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
        border-radius: 14px;
    }

    .k-card-row {
        grid-template-columns: 1fr;
    }

    .k-service-grid {
        grid-template-columns: 1fr;
    }
}

/* ==== Overrides mínimos para permitir que Tailwind negative-margins funcionen ====
   Reduce el "colchón" del hero sin romper diseño existente. */

.kuk-hero {
  padding-bottom: 36px !important; /* menos espacio bajo la barra rosa */
}

.kuk-hero::after {
  height: 90px !important; /* reduce el fade que empuja el contenido */
  bottom: -1px !important;
  z-index: 1 !important;
}

.kuk-hero-inner {
  min-height: 420px !important; /* más compacto, deja espacio para KPI */
}

.kuk-parrot-col {
  height: 360px !important;
}

.kuk-parrot {
  height: 420px !important;
}

.kuk-hero-text {
  min-height: 420px !important;
}

/* Asegura que KPI con negative margins quede por encima si hiciera falta */
.kpi {
  position: relative;
  z-index: 40;
  padding-top: 0; /* evitar padding extra que empuje hacia abajo */
}

/* ===== Secciones: bandas limpias y motivos mayas como acento ===== */
:root{
  --section-bleed: rgba(233,249,246,0.85); /* color base entre secciones */
  --section-bleed-2: rgba(246,251,251,1);
  --section-accent: rgba(203,29,115,0.04); /* muy sutil rosa de marca */
  --mayan-accent-size: 160px;
  --mayan-accent-opa: 0.06;
}

/* Consistencia: padding vertical igual para todas las secciones */
.section {
  position: relative;
  padding-top: 2.25rem; /* 36px */
  padding-bottom: 2.25rem;
  overflow: visible;
}

/* Banda full-bleed muy sutil (uso principal para separar contenido) */
.section--bleed {
  background: linear-gradient(180deg, var(--section-bleed) 0%, var(--section-bleed-2) 100%);
  border-top: 1px solid rgba(2,6,23,0.03);
  border-bottom: 1px solid rgba(2,6,23,0.03);
}

/* Variante con tintes de marca (usar con moderación) */
.section--brand-accent {
  background-image: linear-gradient(180deg, rgba(203,29,115,0.03), rgba(203,29,115,0.01));
}

/* Patrón mayense sutil como pseudo-elemento (no repetido) */
.section--mayan::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 12px;
  width: var(--mayan-accent-size);
  height: var(--mayan-accent-size);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g fill='none' stroke='%23CB1D73' stroke-width='2' stroke-opacity='0.10'><path d='M10 50 Q25 10 50 50 T90 50'/></g></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: var(--mayan-accent-opa);
  pointer-events: none;
  z-index: 0;
}

/* Si quieres el motivo en la izquierda */
.section--mayan-left::before {
  right: auto;
  left: 12px;
}

/* Permitir solapamiento elegante de tarjetas sobre la banda */
.section--card-overlap .kpi__grid,
.section--card-overlap .kpi__card-row {
  margin-top: -28px; /* ajusta para que las tarjetas “floten” */
  position: relative;
  z-index: 3;
}

/* Mejora visual: separador suave entre KPI y services (reemplaza SVG pesado) */
.section-separator {
  height: 36px;
  display:block;
  width:100%;
  background: linear-gradient(180deg, rgba(233,249,246,0.0), rgba(233,249,246,0.6));
  pointer-events: none;
}

/* Asegura contraste y legibilidad sobre bandas claras */
.section--bleed h2,
.section--brand-accent h2 {
  color: #0f1724;
}

/* Móviles: reducir tamaño del acento mayense */
@media (max-width: 768px) {
  :root { --mayan-accent-size: 100px; --mayan-accent-opa: 0.04; }
  .section { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .section--card-overlap .kpi__grid { margin-top: -18px; }
}

/* ==== Fix: fondo entre secciones (full-bleed, elimina franjas blancas) ==== */

/* Asegura que las secciones ocupen todo el ancho y no agreguen padding lateral que genere "ventanas" blancas */
.section {
  width: 100%;
  margin: 0;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
  box-sizing: border-box;
  overflow: visible;
  background: transparent;
}

/* Banda full-bleed sutil (usar en secciones de separación) */
.section--bleed {
  background: linear-gradient(180deg, rgba(233,249,246,0.95) 0%, rgba(246,251,251,1) 100%);
  border-top: 1px solid rgba(2,6,23,0.03);
  border-bottom: 1px solid rgba(2,6,23,0.03);
  padding-left: 0;
  padding-right: 0;
  position: relative;
  z-index: 1; /* sobre el fade del hero, por debajo de las tarjetas si es necesario */
}

/* Contenedor interno centrado y responsable: aquí va el contenido con max-width */
.section > .kpi__inner,
.section > .services__inner,
.section > .section__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px; /* mantiene espacio interior solo para el contenido */
  position: relative;
  z-index: 2;
}

/* Evita que el pseudo-fade del hero empuje o cree zonas blancas */
.kuk-hero::after {
  z-index: 0;
  height: 60px !important; /* corto y no empuja el flujo */
  pointer-events: none;
}

/* Si las tarjetas KPI necesitan superponerse, elevamos su z-index sin romper la banda */
.kpi {
  position: relative;
  z-index: 3;
  padding-top: 0; /* evita padding extra que empuje hacia abajo */
}

/* Reduce espacio del separador SVG (evita bandas extra visibles) */
.section-separator {
  display: block;
  height: 24px;
  margin: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(233,249,246,0), rgba(233,249,246,0.6));
}

/* Ajustes en móvil */
@media (max-width: 768px) {
  .section { padding-top: 1.25rem; padding-bottom: 1.25rem; }
  .section--bleed { background: linear-gradient(180deg, rgba(233,249,246,0.9), rgba(246,251,251,1)); }
  .kuk-hero::after { height: 36px !important; }
}
