/* ===============================
RESET Y BASE
=============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #ffffff;
    color: #000000;
}

/* ===============================
INTRO / LOADING
=============================== */
#intro {
    position: fixed;
    inset: 0;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.intro-content {
    position: relative;
    text-align: center;
}

.intro-content img {
    width: 260px;
    opacity: 0.9;
}

.intro-content p {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%);
    color: #ffffff;
    font-size: 16px;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.45);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ===============================
NAVBAR FLOTANTE PREMIUM
=============================== */
.navbar {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1200px;

    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 30px;
    border-radius: 40px;
    z-index: 1000;

    border: 1px solid rgba(255,255,255,0.15);
}

.navbar .logo {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.navbar nav a {
    color: rgba(255,255,255,0.85);
    margin-left: 24px;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s ease;
}

.navbar nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s ease;
}

.navbar nav a:hover {
    color: #ffffff;
}

.navbar nav a:hover::after {
    width: 100%;
}

@media (max-width: 900px) {
    .navbar {
        padding: 12px 22px;
    }

    .navbar nav a {
        margin-left: 14px;
        font-size: 0.9rem;
    }
}

.logo {
    font-weight: bold;
}

/* ===============================
SECCIONES
=============================== */
.section {
    min-height: 100vh;
    padding: 120px 40px;
}

.hidden {
    display: none;
}

/* ===============================
TRANSICIÓN CINEMÁTICA
=============================== */
@keyframes wipe-cinematic-in {
    0% {
        clip-path: inset(100% 0 100% 0);
    }
    30%, 70% {
        clip-path: inset(10% 0 10% 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

[transition-style="in:wipe:cinematic"] {
    animation: wipe-cinematic-in 1.6s ease forwards;
}

/* ===============================
HERO CON AJEDREZ + CUADRO MÁS PEQUEÑO
=============================== */
#inicio {
    position: relative;
    min-height: 100vh;
    background-image: url("../assets/img/ajedrez.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: breathing-bg 18s ease-in-out infinite;
    filter: saturate(0.9) contrast(1.05);
    will-change: background-size, background-position;
    padding: 120px 40px;
}

@keyframes breathing-bg {
    0% {
        background-size: 100%;
        background-position: center;
    }
    50% {
        background-size: 105%;
        background-position: center 48%;
    }
    100% {
        background-size: 100%;
        background-position: center;
    }
}

#inicio::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 700px;       /* 👈 más angosto */
    padding: 60px 80px;     /* 👈 menos padding */
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    animation: pulse-border 3s ease-in-out infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(198, 167, 255, 0.4);
        border-color: rgba(255, 255, 255, 0.8);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(198, 167, 255, 0.6);
        border-color: #c6a7ff;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(198, 167, 255, 0.4);
        border-color: rgba(255, 255, 255, 0.8);
    }
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero p {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 20px; /* 👈 menos espacio sin botón */
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
}

.hero p::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #ffffff;
}

/* ===============================
SERVICIOS
=============================== */
.servicios-wrapper {
    background: #ffffff;
    color: #000;
}

.servicio-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.servicio-texto {
    padding: 120px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.servicio-texto h2 {
    font-size: 2.3rem;
    margin-bottom: 25px;
}

.servicio-texto p {
    max-width: 700px;
    line-height: 1.7;
    opacity: 0.85;
}

.servicio-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.servicio-split.reverse {
    direction: rtl;
}

.servicio-split.reverse > * {
    direction: ltr;
}

/* ===============================
NOSOTROS
=============================== */
.nosotros {
    background: #ffffff;
}

.nosotros-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.nosotros h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.nosotros-texto {
    max-width: 850px;
    margin: 0 auto 25px;
    line-height: 1.8;
    opacity: 0.85;
}

.nosotros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.nosotros-card {
    background: #f2f2f2;
    padding: 40px 30px;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.nosotros-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* ===============================
EFECTO TYPING
=============================== */
.typing::after {
    content: "|";
    margin-left: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

/* ===============================
RESPONSIVE
=============================== */
@media (max-width: 900px) {
    .servicio-split {
        grid-template-columns: 1fr;
    }

    .servicio-texto {
        padding: 80px 30px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-content {
        padding: 40px 20px;
        max-width: 100%;
    }
}