/* =============================================
   ZATELITAL OS — STANDALONE HOME PAGE
   ============================================= */

/* =============================================
   DESIGN SYSTEM FONTS
   ============================================= */
@font-face {
    font-family: 'Alliance';
    src: url('../fonts/Alliance-PlattSemiBold.woff2') format('woff2'),
        url('../fonts/Alliance-PlattSemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Sans';
    src: url('../fonts/IBMPlexSans-Regular.woff2') format('woff2'),
        url('../fonts/IBMPlexSans-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inconsolata';
    src: url('../fonts/Inconsolata-SemiExpandedSemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* =============================================
   RESET & VARIABLES
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #161616;
    --color-white: #ffffff;
    --color-muted: #8b8b8b;
    --color-border: #e5e5e5;
    --color-link-bg: #f4f4f4;
    --color-link-text: #212121;
    --font-alliance: 'Alliance', 'SF Pro Display', system-ui, sans-serif;
    --font-ibm: 'IBM Plex Sans', system-ui, sans-serif;
    --font-mono: 'Inconsolata', monospace;
}

html,
body {
    height: 100vh;
    overflow: hidden;
}

body {
    font-family: var(--font-ibm);
    background: var(--color-white);
    color: var(--color-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

.home-layout {
    width: 100%;
    height: 100vh;
}

/* =============================================
   LEFT COLUMN — DARK PANEL (FIXED)
   ============================================= */
.home-left {
    width: 50%;
    background: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 40px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow: hidden;
}



/* Logo */
.home-logo {
    height: 96px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    flex-shrink: 0;
}

.home-logo img {
    width: 87px;
    height: 18px;
    margin-top: 5px;
    opacity: 0;
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.15s;
}

/* Hero — 3D isotipo container */
.home-hero-image {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-hero-image.is-loaded {
    opacity: 1;
}

/* Contact info footer */
.home-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding-top: 20px;
    flex-shrink: 0;
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.7s;
}

.home-contact-line {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--color-muted);
    line-height: 1;
}

.home-contact-line a {
    color: var(--color-muted);
    transition: color 0.3s ease;
}

.home-contact-line a:hover {
    color: #c4c4c4;
}

.home-right {
    width: 50%;
    margin-left: 50%;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
}

/* Intro wrapper — first viewport */
.home-right-intro {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Top section — Headline + CTAs */
.home-headline-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    opacity: 0;
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.55s;
}

.home-headline {
    font-family: var(--font-alliance);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-primary);
}

.home-headline .muted {
    color: #888888;
}

/* CTA buttons */
.home-cta-group {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}

.home-cta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-link-bg);
    border-radius: 4px;
    padding: 5px 16px;
    font-family: var(--font-ibm);
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: var(--color-link-text);
    white-space: nowrap;
    transition: background-color 0.25s ease;
}

.home-cta-link:hover {
    background: #e0e0e0;
}

/* =============================================
   PROJECTS SECTION
   ============================================= */
.home-projects-section {
    width: 100%;
    opacity: 0;
    animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.75s;
}

.home-projects-label {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 8px;
}

/* Project list */
.home-project-list {
    width: 100%;
}

.home-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px 0 17px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.home-project-item::before {
    content: '';
    position: absolute;
    left: -12px;
    right: -12px;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.home-project-item:hover::before {
    opacity: 1;
}

.home-project-name {
    font-family: var(--font-ibm);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.2;
    color: var(--color-primary);
    white-space: nowrap;
}

.home-project-meta {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.home-project-tags {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--color-primary);
    line-height: 1.5;
    white-space: nowrap;
}

.home-project-year {
    font-family: var(--font-mono);
    font-weight: 400;
    font-size: 14.4px;
    color: #1a1a1a;
    text-align: right;
    min-width: 40px;
    line-height: 1.5;
}

.home-project-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: transform 0.25s ease;
}

.home-project-arrow svg {
    width: 20px;
    height: 20px;
}

.home-project-item:hover .home-project-arrow {
    transform: translate(3px, -3px);
}

/* =============================================
   FOOTER
   ============================================= */
.home-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    opacity: 0;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.95s;
}

.home-footer-text {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--color-primary);
    line-height: 1;
}

/* =============================================
   NEW SECTIONS (inside home-right)
   ============================================= */
.ns-divider {
    border: none;
    border-top: 1px solid var(--color-border);
}

.ns {
    padding: 64px 0;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
}

.ns.visible {
    opacity: 1;
    transform: translateY(0);
}

.ns-label {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

/* Servicios */
.svc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.svc-card { background: var(--color-white); padding: 32px 28px; transition: background .3s; }
.svc-card:hover { background: var(--color-link-bg); }
.svc-icon { font-size: 22px; margin-bottom: 14px; opacity: .6; }
.svc-name { font-weight: 500; font-size: 16px; margin-bottom: 6px; }
.svc-desc { font-size: 13px; color: var(--color-muted); line-height: 1.7; }

/* Proceso */
.proc-step { display: flex; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--color-border); }
.proc-num { font-family: var(--font-mono); font-weight: 600; font-size: 11px; color: var(--color-muted); min-width: 32px; padding-top: 2px; }
.proc-title { font-weight: 500; font-size: 16px; margin-bottom: 6px; }
.proc-text { font-size: 13px; color: var(--color-muted); line-height: 1.7; max-width: 520px; }

/* Stats */
.stats-row { display: flex; justify-content: space-between; gap: 40px; }
.stat-num { font-family: var(--font-mono); font-size: 40px; font-weight: 600; line-height: 1; margin-bottom: 8px; }
.stat-lbl { font-size: 13px; color: var(--color-muted); }

/* Testimonios */
.test-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.test-card { border: 1px solid var(--color-border); border-radius: 8px; padding: 28px; }
.test-quote { font-size: 14px; color: rgba(22,22,22,.7); line-height: 1.8; margin-bottom: 20px; font-style: italic; }
.test-author { font-weight: 500; font-size: 14px; }
.test-role { font-family: var(--font-mono); font-size: 11px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }

/* Soluciones */
.sol-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); border-radius: 8px; overflow: hidden; }
.sol-card { background: var(--color-white); padding: 28px 24px; transition: background .3s; }
.sol-card:hover { background: var(--color-link-bg); }
.sol-tag { font-family: var(--font-mono); font-weight: 600; font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: var(--color-muted); margin-bottom: 8px; }
.sol-icon { font-size: 22px; margin-bottom: 14px; opacity: .6; }
.sol-name { font-weight: 500; font-size: 16px; margin-bottom: 6px; }
.sol-desc { font-size: 13px; color: var(--color-muted); line-height: 1.7; }

/* Equipo */
.team-layout { display: flex; gap: 48px; align-items: flex-start; }
.team-photo { width: 100px; height: 100px; border-radius: 50%; background: var(--color-link-bg); flex-shrink: 0; overflow: hidden; border: 1px solid var(--color-border); }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--color-muted); opacity: .4; }
.team-info { flex: 1; }
.team-name { font-weight: 500; font-size: 20px; margin-bottom: 2px; }
.team-role { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .3px; text-transform: uppercase; color: var(--color-muted); margin-bottom: 16px; }
.team-bio { font-size: 14px; color: rgba(22,22,22,.7); line-height: 1.8; max-width: 480px; }
.team-links { display: flex; gap: 16px; margin-top: 16px; }
.team-link { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .3px; text-transform: uppercase; color: var(--color-primary); padding: 6px 14px; background: var(--color-link-bg); border-radius: 4px; transition: background .25s; }
.team-link:hover { background: #e0e0e0; }

/* Contact Panel */
.ct-wrap { position: fixed; bottom: 28px; right: 28px; z-index: 999; transition: opacity .3s, transform .3s; }
.ct-wrap.ct-hidden { opacity: 0; pointer-events: none; transform: translateY(16px); }
.ct-toggle { display: flex; align-items: center; gap: 8px; background: var(--color-primary); color: var(--color-white); border: none; padding: 8px 18px; border-radius: 4px; font-family: var(--font-ibm); font-weight: 400; font-size: 14px; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: all .25s ease; }
.ct-toggle:hover { background: #2d2d2d; }
.ct-toggle svg { width: 14px; height: 14px; }
.ct-toggle .ct-x { display: none; }
.ct-wrap.open .ct-toggle .ct-dot { display: none; }
.ct-wrap.open .ct-toggle .ct-x { display: block; }
.ct-panel { position: absolute; bottom: calc(100% + 12px); right: 0; width: 330px; background: var(--color-white); border: 1px solid var(--color-border); border-radius: .5rem; box-shadow: 0 12px 40px rgba(0,0,0,.12); opacity: 0; transform: translateY(8px) scale(.97); pointer-events: none; transition: all .25s cubic-bezier(.16,1,.3,1); overflow: hidden; }
.ct-wrap.open .ct-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.ct-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--color-border); transition: background .2s; }
.ct-row:hover { background: var(--color-link-bg); }
.ct-row:last-child { border-bottom: none; }
.ct-row-info { flex: 1; margin-left: 14px; }
.ct-row-title { font-weight: 500; font-size: 14px; line-height: 1.3; }
.ct-row-sub { font-family: var(--font-mono); font-size: 11px; color: var(--color-muted); letter-spacing: .2px; }
.ct-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-bottom: 1px solid var(--color-border); }
.ct-info-cell { padding: 14px 20px; font-size: 12px; line-height: 1.5; }
.ct-info-cell:first-child { border-right: 1px solid var(--color-border); }
.ct-info-cell a { color: var(--color-primary); }
.ct-info-label { font-family: var(--font-mono); font-size: 10px; color: var(--color-muted); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.ct-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--color-link-bg); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--color-muted); flex-shrink: 0; }
.ct-dot-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ccc; margin-right: 4px; vertical-align: middle; }
.ct-dot-status.online { background: #34c759; box-shadow: 0 0 0 2px rgba(52,199,89,.25); }
.ct-btns { display: flex; gap: 8px; padding: 16px 20px; }
.ct-btn { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--color-link-bg); border-radius: 4px; padding: 8px 12px; font-family: var(--font-ibm); font-size: 13px; color: var(--color-primary); transition: background .25s; }
.ct-btn:hover { background: #e0e0e0; }

/* Scroll indicator */
.home-scroll-hint {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    opacity: .4;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOnly {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    html, body { height: auto; overflow: auto; }
    .home-layout { height: auto; }
    .home-left { position: relative; width: 100%; height: 100svh; }
    .home-right { width: 100%; margin-left: 0; height: auto; overflow: visible; }
    .home-right-intro { min-height: auto; }
    .home-headline { font-size: 26px; }
    .home-project-meta { gap: 24px; }
    .home-cta-group { margin-bottom: 32px; }
    .home-projects-section { margin-top: 0; }
    .ct-wrap { bottom: 20px; right: 20px; }
    .ns { content-visibility: auto; contain-intrinsic-size: auto 500px; }
}

@media (max-width: 640px) {
    .home-left { padding: 24px; }
    .home-right { padding: 24px; padding-bottom: 80px; }
    .home-logo { height: auto; margin-bottom: 24px; }
    .home-headline { font-size: 22px; }
    .home-headline-section { margin-bottom: 0; }
    .home-cta-group { flex-wrap: wrap; gap: 10px; margin-top: 16px; }
    .home-projects-section { margin-top: 48px; margin-bottom: 48px; }
    .ns { padding: 48px 0; }
    .svc-grid { grid-template-columns: 1fr; }
    .sol-grid { grid-template-columns: 1fr; }
    .stats-row { flex-direction: column; gap: 32px; }
    .test-grid { grid-template-columns: 1fr; }
    .team-layout { flex-direction: column; gap: 24px; align-items: flex-start; text-align: left; }
    .team-photo { width: 70px; height: 70px; }
    .team-bio { max-width: 100%; }
    .team-links { justify-content: center; }
    .home-project-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .home-project-meta { gap: 8px; width: 100%; justify-content: flex-start; }
    .home-project-year { margin-left: auto; }
    .ct-wrap { bottom: 16px; right: 16px; }
    .ct-panel { width: calc(100vw - 32px); right: 0; }
}