:root {
    --bg-dark: #011D44;
    --bg-card: #E7ECF3;
    --accent-blue: #4F7CFF;
    --text-main: #FFFFFF;
    --text-muted: #E7ECF3;
    --text-dark: #4B5563;
    --text-on-light: #011D44;
    --font-code: 'IBM Plex Mono', monospace;
    --font-sans: 'IBM Plex Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

body.floating-buttons-hidden .enable-sound-btn,
body.floating-buttons-hidden .repeat-video-btn,
body.floating-buttons-hidden .whatsapp-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.88);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(21, 37, 68, 0.88);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.monogram-placeholder {
    background: var(--text-main);
    color: var(--bg-dark);
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-code);
}

.logo-text {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Botones */
.btn-primary {
    background: var(--text-main);
    color: var(--bg-dark) !important;
    border: 1px solid var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px rgba(231, 236, 243, 0.35);
}

.btn-secondary {
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
}

/* Hero Section */
.hero {
    min-height: 100svh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 3rem 5%;
    text-align: center;
}

.hero-content {
    width: 100%;
    max-width: 800px;
    z-index: 1;
    transform: translateY(0);
    transition: none;
    will-change: transform;
}

.hero-content.motion-ready {
    transition: transform 1600ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-content.video-shifted-top {
    transform: translateY(-3vh);
}

.after-video-title {
    display: block;
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 2.8rem;
    font-size: clamp(1.4rem, 5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: 0.01em;
    text-transform: uppercase;
    text-align: center;
    text-wrap: balance;
    min-height: 1.3em;
    opacity: 0;
    visibility: hidden;
    transition: opacity 900ms ease;
}

.after-video-title.hidden {
    display: none;
}
.after-video-title.reveal-active {
    opacity: 1;
    visibility: visible;
}

.after-title-image {
    display: block;
    width: min(720px, 92vw);
    margin: 2.2rem auto 0;
    height: auto;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 900ms ease;
}

.after-title-image.reveal-active {
    opacity: 1;
    visibility: visible;
}

.after-title-image.hidden,
.after-image-copy.hidden {
    display: none;
}

.after-image-copy {
    width: min(720px, 92vw);
    margin: 2.2rem auto 0;
    color: var(--text-main);
    text-align: justify;
    text-transform: uppercase;
    line-height: 1.55;
    opacity: 0;
    visibility: hidden;
    transition: opacity 900ms ease;
}

.after-image-copy.reveal-active {
    opacity: 1;
    visibility: visible;
}

.after-image-copy h3 {
    font-size: clamp(1.15rem, 3.8vw, 1.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.after-image-copy p {
    font-size: clamp(0.9rem, 2.7vw, 1.05rem);
    color: var(--text-muted);
    margin: 0;
    text-align: justify;
}

.service-buttons {
    margin-top: 1.7rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.service-pill {
    width: 100%;
    border: 1px solid var(--text-main);
    background: transparent;
    color: var(--text-main);
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    font-family: var(--font-sans);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
}

.hero-video-wrap {
    width: min(860px, 92vw);
    margin: 0 auto 1.25rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    position: relative;
}

.hero-video {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.hero-logo {
    width: min(180px, 40vw);
    height: auto;
}

.enable-sound-btn {
    position: fixed;
    right: 20px;
    bottom: 98px;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    background: var(--text-main);
    color: var(--bg-dark);
    border: 1px solid var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    z-index: 121;
    transition: opacity 450ms ease, visibility 450ms ease, transform 450ms cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.2s ease;
}

.enable-sound-btn::after {
    content: "";
    position: absolute;
    width: 32px;
    height: 2px;
    background: var(--bg-dark);
    border-radius: 2px;
    transform: rotate(-42deg);
}

.enable-sound-btn.hidden {
    display: none;
}

.enable-sound-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.enable-sound-btn:active {
    transform: scale(0.98);
}

.monogram-large {
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px solid var(--text-main);
    display: inline-block;
    padding: 20px 40px;
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.2);
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.15;
    color: var(--text-main);
}

.hero p {
    color: var(--text-muted);
    font-size: clamp(1rem, 3.5vw, 1.2rem);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Stack Section */
.stack-section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.stack-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--text-main);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.stack-card {
    background: var(--bg-card);
    border: 1px solid rgba(21, 37, 68, 0.12);
    padding: 2rem;
    border-radius: 8px;
    transition: border-color 0.3s;
    color: var(--text-on-light);
}

.stack-card:hover {
    border-color: var(--bg-dark);
}

.stack-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.stack-card p {
    color: var(--text-dark);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.tech-tags span {
    display: inline-block;
    background: #FFFFFF;
    color: var(--text-on-light);
    border: 1px solid rgba(21, 37, 68, 0.15);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: var(--font-code);
    margin-right: 5px;
    margin-bottom: 6px;
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.repeat-video-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 999px;
    background: var(--text-main);
    color: var(--bg-dark);
    border: 1px solid var(--bg-dark);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    z-index: 120;
    transition: opacity 450ms ease 90ms, visibility 450ms ease 90ms, transform 450ms cubic-bezier(0.23, 1, 0.32, 1) 90ms, box-shadow 0.2s ease;
}

.repeat-video-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.repeat-video-btn:active {
    transform: scale(0.98);
}

.whatsapp-btn {
    position: fixed;
    right: 20px;
    bottom: 176px;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: var(--text-main);
    color: var(--bg-dark);
    border: 1px solid var(--bg-dark);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
    z-index: 122;
    transition: opacity 450ms ease 180ms, visibility 450ms ease 180ms, transform 450ms cubic-bezier(0.23, 1, 0.32, 1) 180ms, box-shadow 0.2s ease;
}

body.sound-btn-hidden .whatsapp-btn {
    bottom: 98px;
}

.whatsapp-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42);
}

.whatsapp-btn:active {
    transform: scale(0.98);
}

.whatsapp-icon {
    width: 32px;
    height: 27px;
    display: block;
}

@media (max-width: 900px) {
    .hero {
        padding: 2.5rem 6% 3rem;
    }

    .stack-section {
        padding: 4rem 6%;
    }

}

@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        padding: 1.8rem 1rem 2.5rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content.video-shifted-top {
        transform: translateY(-2vh);
    }

    .hero-video-wrap {
        width: 100%;
        margin-bottom: 1rem;
        border-radius: 10px;
    }

    .after-video-title {
        margin-top: 2rem;
    }

    .after-title-image {
        width: 100%;
        margin-top: 1.6rem;
    }

    .after-image-copy {
        margin-top: 1.6rem;
    }

    .service-buttons {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .service-pill {
        font-size: 0.83rem;
    }

    .hero h1 {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
    }

    .hero p {
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-buttons a {
        width: 100%;
        text-align: center;
    }

    .stack-section {
        padding: 3rem 1rem;
    }

    .stack-section h2 {
        font-size: 1.55rem;
        margin-bottom: 1.8rem;
    }

    .stack-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stack-card {
        padding: 1.25rem;
    }

    footer {
        padding: 1.4rem 1rem;
    }
}

@media (max-width: 420px) {
    .hero {
        padding: 1.4rem 0.85rem 2.2rem;
    }

    .hero-logo {
        width: min(140px, 45vw);
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.95rem;
        padding: 0.65rem 1rem;
    }

    .repeat-video-btn {
        width: 46px;
        height: 46px;
        right: 12px;
        bottom: 12px;
        font-size: 1.25rem;
    }

    .enable-sound-btn {
        width: 46px;
        height: 46px;
        right: 12px;
        bottom: 68px;
        font-size: 1.15rem;
    }

    .whatsapp-btn {
        width: 46px;
        height: 46px;
        right: 12px;
        bottom: 124px;
    }

    body.sound-btn-hidden .whatsapp-btn {
        bottom: 68px;
    }

    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }
}