/*
============================================================

 Xylena Relay
 Synthetic Vocal Android
 Project Ψ-01

============================================================
*/

:root{
    --paper:#efebe4;
    --paper-dark:#e2ddd5;
    --line:#c7b8a5;
    --text:#272727;
    --text-light:#666;
    --accent:#8e7358;
    --accent-light:#b89f84;
    --online:#4d8660;
    --warning:#b77b3d;
    --danger:#a44d4d;
    --shadow:0 8px 40px rgba(0,0,0,.05);
    --radius:10px;
    --content:1280px;
    --transition:.25s ease;
}

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

html{ scroll-behavior:smooth; }

body{
    background:var(--paper);
    color:var(--text);
    font-family:"IBM Plex Sans",sans-serif;
    line-height:1.7;
    overflow-x:hidden;
}

/*----------------------------------------------------------
Background
----------------------------------------------------------*/

body::before{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:.18;
    background-image:
        linear-gradient(var(--line) 1px,transparent 1px),
        linear-gradient(90deg,var(--line) 1px,transparent 1px);
    background-size:40px 40px;
}

/*----------------------------------------------------------
Container
----------------------------------------------------------*/

.container{ width:min(var(--content),92%); margin:auto; }

/*----------------------------------------------------------
Topbar Navigation
----------------------------------------------------------*/

.topbar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 40px;
    height:70px;
    background:rgba(239,235,228,.85);
    backdrop-filter:blur(12px);
    border-bottom:1px solid var(--line);
    transition:transform .3s ease;
}

.topbar.hidden{ transform:translateY(-100%); }

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

.logo img{ height:40px; width:auto; }

.logo span{
    font-family:"IBM Plex Mono",monospace;
    font-weight:400;
    letter-spacing:.2em;
    font-size:.95rem;
    color:var(--text);
}

.topbar ul{
    display:flex;
    list-style:none;
    gap:8px;
}

.topbar ul li a{
    display:block;
    padding:10px 18px;
    text-decoration:none;
    color:var(--text);
    font-family:"IBM Plex Mono",monospace;
    font-size:.8rem;
    letter-spacing:.12em;
    transition:var(--transition);
    border:1px solid transparent;
}

.topbar ul li a:hover{
    border-color:var(--accent);
    color:var(--accent);
}

/* Burger */
.burger{
    display:none;
    flex-direction:column;
    gap:5px;
    cursor:pointer;
    background:none;
    border:none;
}

.burger span{
    display:block;
    width:26px;
    height:2px;
    background:var(--text);
    transition:var(--transition);
}

/*----------------------------------------------------------
Section
----------------------------------------------------------*/

.section{ padding:120px 0; position:relative; }

.section-header{
    display:flex;
    align-items:center;
    gap:20px;
    margin-bottom:50px;
}

.section-id{
    font-family:"IBM Plex Mono",monospace;
    color:var(--accent);
    border:1px solid var(--line);
    padding:6px 12px;
    letter-spacing:.2em;
    font-size:.8rem;
}

.section h2{
    font-size:2.2rem;
    font-weight:300;
    letter-spacing:.08em;
    text-transform:uppercase;
}

.section-description{
    max-width:700px;
    margin-bottom:50px;
    font-size:1.1rem;
    color:var(--text-light);
}

/*----------------------------------------------------------
Buttons
----------------------------------------------------------*/

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:15px 34px;
    border:1px solid var(--accent);
    color:white;
    background:var(--accent);
    text-decoration:none;
    letter-spacing:.08em;
    transition:var(--transition);
}

.btn:hover{
    transform:translateY(-3px);
    background:#755d47;
}

.btn-outline{ background:none; color:var(--accent); }
.btn-outline:hover{ color:white; }

/*----------------------------------------------------------
Cards
----------------------------------------------------------*/

.project-card,
.diag-card,
.archive-card,
.spec-card,
.timeline-card{
    background:rgba(255,255,255,.45);
    border:1px solid var(--line);
    backdrop-filter:blur(3px);
    padding:32px;
    transition:.3s;
    position:relative;
}

.project-card:hover,
.diag-card:hover,
.archive-card:hover,
.spec-card:hover,
.timeline-card:hover{
    transform:translateY(-6px);
    box-shadow:var(--shadow);
}

.project-card::after,
.diag-card::after,
.archive-card::after,
.spec-card::after,
.timeline-card::after{
    content:"";
    position:absolute;
    top:-1px;
    right:-1px;
    width:26px;
    height:26px;
    border-top:1px solid var(--accent);
    border-right:1px solid var(--accent);
}

/*----------------------------------------------------------
Grids
----------------------------------------------------------*/

.project-grid{
    display:grid;
    grid-template-columns:1.2fr 1fr 1fr;
    gap:30px;
}

.project-card.large{ grid-row:span 2; }

.diagnostic-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:24px;
}

.archive-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
}

.spec-grid{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
}

.timeline{
    display:flex;
    flex-direction:column;
    gap:16px;
}

/*----------------------------------------------------------
Labels
----------------------------------------------------------*/

.card-label,
.archive-type,
.project-label{
    font-family:"IBM Plex Mono",monospace;
    text-transform:uppercase;
    letter-spacing:.18em;
    font-size:.75rem;
    color:var(--accent);
    margin-bottom:18px;
}

/*----------------------------------------------------------
Status
----------------------------------------------------------*/

.online{ color:var(--online); }
.warning{ color:var(--warning); }
.danger{ color:var(--danger); }

/*----------------------------------------------------------
Meters
----------------------------------------------------------*/

.meter{ height:6px; margin-top:15px; background:#ddd; }
.meter-fill{ height:100%; background:var(--accent); width:0; transition:width 1s ease; }

/*----------------------------------------------------------
Lists
----------------------------------------------------------*/

.spec-list,
.check-list,
.archive-list{ list-style:none; }

.spec-list li,
.archive-list li{
    display:flex;
    justify-content:space-between;
    padding:12px 0;
    border-bottom:1px solid rgba(0,0,0,.08);
}

.check-list li{ padding:8px 0; }

/*----------------------------------------------------------
Timeline
----------------------------------------------------------*/

.timeline-card{ padding:24px 32px; }

.timeline-top{
    display:flex;
    justify-content:space-between;
    margin-bottom:12px;
}

.timeline-date{ font-family:"IBM Plex Mono",monospace; color:var(--text-light); }
.timeline-status{ font-family:"IBM Plex Mono",monospace; font-weight:500; }

/*----------------------------------------------------------
Hero
----------------------------------------------------------*/

.hero{
    position:relative;
    min-height:100vh;
    display:flex;
    align-items:center;
    overflow:hidden;
}

.hero-background{
    position:absolute;
    inset:0;
    z-index:0;
}

.hero-background img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .2s ease-out;
}

.hero-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(135deg, var(--paper) 20%, transparent 70%);
}

.hero-grid{
    position:absolute;
    inset:0;
    background-image:linear-gradient(var(--line) 1px,transparent 1px),
                     linear-gradient(90deg,var(--line) 1px,transparent 1px);
    background-size:60px 60px;
    opacity:.1;
}

.hero-content{
    position:relative;
    z-index:2;
    display:grid;
    grid-template-columns:1.2fr 1fr;
    gap:80px;
}

.hero h1{
    font-size:3.8rem;
    font-weight:200;
    letter-spacing:.2em;
    text-transform:uppercase;
    margin-bottom:10px;
}

.hero h2{
    font-size:1.8rem;
    font-weight:300;
    color:var(--accent);
    margin-bottom:30px;
}

.hero-description{ font-size:1.2rem; color:var(--text-light); margin-bottom:40px; max-width:600px; }

.hero-buttons{ display:flex; gap:18px; }

.hero-panel{
    background:rgba(255,255,255,.4);
    backdrop-filter:blur(6px);
    border:1px solid var(--line);
    padding:30px;
}

.panel-title{
    font-family:"IBM Plex Mono",monospace;
    font-size:.8rem;
    letter-spacing:.2em;
    margin-bottom:24px;
    color:var(--accent);
}

.status-row{
    display:flex;
    justify-content:space-between;
    padding:10px 0;
    border-bottom:1px solid rgba(0,0,0,.1);
    font-family:"IBM Plex Mono",monospace;
    font-size:.9rem;
}

.hero-scroll{
    position:absolute;
    bottom:40px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    z-index:2;
}

.hero-scroll span{
    font-family:"IBM Plex Mono",monospace;
    font-size:.7rem;
    letter-spacing:.3em;
}

.mouse{
    width:24px;
    height:38px;
    border:2px solid var(--text);
    border-radius:12px;
    display:flex;
    justify-content:center;
    padding-top:8px;
}

.wheel{
    width:2px;
    height:8px;
    background:var(--text);
    border-radius:1px;
    animation:scroll-wheel 1.6s infinite;
}

@keyframes scroll-wheel{
    0%{ transform:translateY(0); opacity:1; }
    100%{ transform:translateY(14px); opacity:0; }
}

/*----------------------------------------------------------
Boot Loader
----------------------------------------------------------*/

#boot-loader{
    position:fixed;
    inset:0;
    z-index:9999;
    background:var(--paper);
    display:flex;
    align-items:center;
    justify-content:center;
    transition:opacity .6s;
}

#boot-loader.loaded{ opacity:0; pointer-events:none; }

.boot-window{ text-align:center; max-width:400px; }

.boot-logo svg{ width:90px; }

.boot-window h1{ font-size:2rem; font-weight:300; margin:20px 0; }

.designation{ font-family:"IBM Plex Mono",monospace; margin-bottom:30px; }

.boot-log{ text-align:left; margin-bottom:30px; min-width:400px;}

.boot-log .line{
    display:flex;
    justify-content:space-between;
    padding:6px 0;
    font-family:"IBM Plex Mono",monospace;
    font-size:.8rem;
}

.progress{ height:3px; background:var(--line); margin-bottom:20px; }
.progress-bar{ height:100%; width:0; background:var(--accent); animation:boot-progress 2.2s forwards; }

@keyframes boot-progress{ to{ width:100%; } }

.boot-status{ font-family:"IBM Plex Mono",monospace; font-size:.9rem; }

/*----------------------------------------------------------
Footer
----------------------------------------------------------*/

footer{ margin-top:120px; border-top:1px solid var(--line); padding:60px 0; }

.footer-grid{ display:grid; gap:50px; grid-template-columns:2fr 1fr 1fr; }

.footer-logo{ font-size:2rem; letter-spacing:.18em; font-weight:200; }

footer h4{ font-family:"IBM Plex Mono",monospace; font-size:.8rem; letter-spacing:.15em; margin-bottom:15px; }

footer ul{ list-style:none; }
footer ul li{ padding:4px 0; }

.copyright{ text-align:center; margin-top:60px; color:var(--text-light); font-size:.9rem; }

/*----------------------------------------------------------
Responsive
----------------------------------------------------------*/

@media(max-width:960px){
    .section{ padding:80px 0; }
    .hero-content,
    .project-grid,
    .archive-grid,
    .footer-grid,
    .spec-grid,
    .diagnostic-grid{ grid-template-columns:1fr !important; }
    .hero{ min-height:auto; padding:120px 0 80px; }
    .hero h1{ font-size:2.6rem; }
}

@media(max-width:768px){
    .topbar{ padding:0 20px; }
    .topbar ul{
        position:fixed;
        top:70px;
        left:0;
        right:0;
        background:rgba(239,235,228,.95);
        flex-direction:column;
        padding:20px;
        gap:4px;
        display:none;
        border-bottom:1px solid var(--line);
    }
    .topbar ul.active{ display:flex; }
    .burger{ display:flex; }
    .logo span{ display:none; }
}

/*----------------------------------------------------------
Spec Card Fix (предотвращение слипания)
----------------------------------------------------------*/

.spec-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-card span {
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--text-light);
}

.spec-card strong {
    font-size: 1.1rem;
    font-weight: 500;
}