/* ==========================================================
   KREIS S.A. de C.V. — Hoja de estilos compartida
   Aplicable a todas las páginas del sitio
   ========================================================== */

/* --- RESET BASE --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    background-color: #EAE8E3;
    color: #1A1929;
    overflow-x: hidden;
    scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }

/* =========================================================
   BARRA SUPERIOR FIJA — logo | pill | contacto
   ========================================================= */
#topbar {
    position: fixed;
    top: 2.2rem;
    left: 1.5rem;
    right: 1.5rem;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}
#topbar-logo {
    height: 32px;
    width: 110px;
    flex-shrink: 0;
    visibility: hidden;
}
#pill-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 2.2rem;
    border-radius: 999px;
    pointer-events: auto;
    transition: background-color 0.4s ease, color 0.4s ease;
}
#pill-menu.dark-theme  { background-color: rgba(255,255,255,0.92); color: #1A1929; }
#pill-menu.light-theme { background-color: rgba(26,25,41,0.92);   color: white;   }
#pill-menu a {
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: inherit;
    text-decoration: none;
    opacity: 0.65;
    transition: opacity 0.2s;
    white-space: nowrap;
}
#pill-menu a:hover,
#pill-menu a.active { opacity: 1; }

#topbar-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: auto;
    flex-shrink: 0;
    transition: color 0.4s ease;
    color: white;
}
#topbar-contact.light-theme { color: #1A1929; }

.topbar-contact-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: inherit;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.4s;
    white-space: nowrap;
}
.topbar-contact-link:hover { opacity: 1; }
.topbar-contact-link svg {
    width: 12px; height: 12px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    flex-shrink: 0;
}
.topbar-sep { width: 1px; height: 14px; background: currentColor; opacity: 0.2; }

/* =========================================================
   LOGO FIJO EN ESQUINA (páginas sin efecto centro→esquina)
   ========================================================= */
#page-logo {
    position: fixed;
    top: 1.4rem;
    left: 1.5rem;
    width: 110px;
    z-index: 200;
    pointer-events: none;
    filter: brightness(0) invert(1);
    mix-blend-mode: difference;
}

/* =========================================================
   TOPBAR MOBILE
   ========================================================= */
#topbar-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    padding: 0 1.4rem;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}
#mob-menu-btn {
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    pointer-events: auto;
    background: none;
    border: none;
    padding: 0;
    flex-shrink: 0;
}
#mob-menu-btn span {
    display: block;
    height: 1.5px;
    background: white;
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1),
                opacity 0.35s ease;
}
#mob-menu-btn.light-theme span { background: #1A1929; }

/* =========================================================
   OVERLAY MENÚ HAMBURGUESA
   ========================================================= */
#mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: #1A1929;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 2rem 3rem;
    pointer-events: none;
    opacity: 0;
}
#mob-overlay.is-open { pointer-events: auto; }

#mob-close-btn {
    align-self: flex-end;
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    margin-bottom: 0.5rem;
}
#mob-close-btn span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: white;
    position: absolute;
}
#mob-close-btn span:nth-child(1) { transform: rotate(45deg); }
#mob-close-btn span:nth-child(2) { transform: rotate(-45deg); }

#mob-overlay nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    justify-content: center;
}
.mob-nav-link {
    font-family: 'Anton', sans-serif;
    font-size: clamp(2.2rem, 11vw, 3.6rem);
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(30px);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 0.55rem 0;
    transition: color 0.2s;
}
.mob-nav-link:first-child { border-top: 1px solid rgba(255,255,255,0.08); }
.mob-nav-link:hover { color: rgba(255,255,255,0.4); }
.mob-nav-link .mob-link-num {
    font-family: 'Inter', sans-serif;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.3);
    align-self: flex-start;
    margin-top: 0.4rem;
}
#mob-overlay-footer {
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.4rem;
}
#mob-overlay-footer a {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}
#mob-overlay-footer a:hover { color: white; }

/* =========================================================
   CLASES GENÉRICAS
   ========================================================= */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
}
.grid-img-wrapper {
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
}
.grid-img-wrapper img {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}
.grid-item:hover .grid-img-wrapper img { transform: scale(1.05); }

/* =========================================================
   BOTÓN SUBIR
   ========================================================= */
#btn-subir {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 400;
    width: 48px;
    height: 48px;
    background: #1A1929;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#btn-subir.visible {
    opacity: 1;
    pointer-events: auto;
}
#btn-subir svg {
    width: 18px; height: 18px;
    stroke: #fff; fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* =========================================================
   TRANSICIÓN CIRCULAR ENTRE PÁGINAS
   ========================================================= */
#page-transition {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#page-transition-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1A1929;
    transform: scale(0);
}

/* =========================================================
   FOOTER — responsive
   ========================================================= */
@media (max-width: 1023px) {
    #footer-grid { grid-template-columns: 1fr 1fr !important; gap: 2.5rem !important; }
}
@media (max-width: 599px) {
    #footer-grid { grid-template-columns: 1fr !important; gap: 2rem !important; }
}

/* =========================================================
   RESPONSIVE MOBILE — breakpoint 768px
   ========================================================= */
@media (max-width: 768px) {
    #topbar        { display: none; }
    #topbar-mobile { display: flex; }
    #mob-overlay   { display: flex; }
}
