/*
Theme Name: BuildRelay Portal
Author: Senior Frontend Designer
Description: Концепция "Industrial Blueprint": Строгая сетка, технические шрифты и акценты на регламентах и безопасности.
Version: 1.0.0
Text Domain: buildrelay
*/

:root {
    /* Colors - Industrial & Systematic */
    --bg: #ffffff;
    --surface: #f8f9fa;
    --surface-dark: #1a1a1a; /* Deep Charcoal */
    --primary: #f1c40f; /* Safety Yellow */
    --primary-alt: #d4ac0d;
    --accent: #2980b9; /* Blueprint Blue */
    --text: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #dee2e6;
    
    /* Spacing */
    --gap: 2rem;
    --header-height: 110px;
    --container-width: 1400px;
    
    /* Fonts */
    --font-display: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    background-color: var(--bg); 
    color: var(--text); 
    font-family: var(--font-display); 
    line-height: 1.5; 
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: 0.2s; }
ul { list-style: none; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 var(--gap); }

/* Typography */
h1, h2, h3 { font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: -0.02em; }
.text-code { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }

/* Header - Modular Grid Header */
.site-header {
    height: var(--header-height);
    background: var(--surface-dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    height: 100%;
    align-items: stretch;
}

.logo-box {
    display: flex;
    align-items: center;
    padding-right: 4rem;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 1px;
}
.logo span { color: var(--primary); }

.main-nav { display: flex; align-items: stretch; }
.main-nav ul { display: flex; height: 100%; }
.main-nav li { border-right: 1px solid rgba(255,255,255,0.1); }
.main-nav a { 
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}
.main-nav a:hover, .main-nav .current-menu-item a { 
    color: var(--primary);
    background: rgba(255,255,255,0.05);
}

.menu-toggle { display: none; background: var(--primary); color: var(--surface-dark); border: none; padding: 1rem; cursor: pointer; }
.hamburger { width: 24px; height: 2px; background: currentColor; position: relative; display: block; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 100%; height: 2px; background: currentColor; left: 0; transition: 0.3s; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Hero - Option D: Split-screen */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    background: var(--surface-dark);
}

.hero-content {
    padding: 10rem 10% 10rem var(--gap);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    position: relative;
}
.hero-content::after {
    content: '';
    position: absolute;
    right: -50px; top: 0; height: 100%; width: 100px;
    background: #fff;
    transform: skewX(-5deg);
    z-index: 1;
}

.hero-tag {
    background: var(--surface-dark);
    color: var(--primary);
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    width: fit-content;
    margin-bottom: 2rem;
}

.hero h1 { font-size: clamp(3rem, 6vw, 5rem); margin-bottom: 2rem; color: var(--surface-dark); }
.hero-desc { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 4rem; max-width: 500px; }

.hero-image {
    background: url('banner.png') center/cover no-repeat;
    position: relative;
    filter: grayscale(0.5) contrast(1.1);
}
.hero-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(26,26,26,0.5), transparent);
}

.btn-relay {
    background: var(--surface-dark);
    color: #fff;
    padding: 1.5rem 3rem;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: inline-block;
    border: none;
    position: relative;
    overflow: hidden;
}
.btn-relay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 5px; height: 100%;
    background: var(--primary);
}
.btn-relay:hover { background: var(--primary); color: var(--surface-dark); }

/* Workflow Section */
.workflow { padding: 10rem 0; background: var(--surface); }
.workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.workflow-card {
    background: #fff;
    padding: 4rem;
    border: 1px solid var(--border);
    position: relative;
}
.workflow-card::before {
    content: attr(data-step);
    position: absolute;
    top: 2rem; right: 2rem;
    font-family: var(--font-mono);
    font-size: 3rem;
    color: var(--border);
    font-weight: 900;
    line-height: 1;
}
.workflow-card h3 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.workflow-card p { font-size: 0.95rem; color: var(--text-muted); }

/* Post Grid */
.section-header {
    margin-bottom: 6rem;
    padding: 4rem 0;
    border-bottom: 8px solid var(--surface-dark);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    padding-bottom: 10rem;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--surface-dark);
    margin-bottom: 2rem;
}
.card-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: 0.4s; }
.post-card:hover .card-img { opacity: 1; transform: scale(1.05); }

.card-body { flex-grow: 1; }
.card-tag { 
    display: inline-block;
    background: var(--primary);
    color: var(--surface-dark);
    padding: 0.3rem 0.8rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}
.card-title { font-size: 1.8rem; margin-bottom: 1.5rem; line-height: 1.1; }
.card-excerpt { font-size: 1rem; color: var(--text-muted); margin-bottom: 2.5rem; }

/* Single Post Styles - BuildRelay Industrial */
.single-post-header {
    background: var(--surface-dark);
    padding: 6rem 0;
    color: #fff;
    margin-bottom: 5rem;
    border-bottom: 10px solid var(--primary);
}

.breadcrumbs {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-bottom: 2.5rem;
    display: flex;
    gap: 0.8rem;
    text-transform: uppercase;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { color: var(--primary); }

.post-meta-top {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    font-weight: 700;
}

.post-header-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1;
    margin: 0;
    letter-spacing: -0.04em;
}

.single-post-layout {
    max-width: 900px;
    margin: 0 auto 10rem;
}

.post-featured-image {
    margin-bottom: 5rem;
    border: 1px solid var(--border);
    background: var(--surface-dark);
}
.post-featured-image img { width: 100%; height: auto; display: block; opacity: 0.9; }

.post-content-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text);
}

.post-content-body h2 { 
    font-size: 2.2rem; 
    margin: 5rem 0 2rem; 
    padding-bottom: 1.5rem;
    border-bottom: 4px solid var(--surface-dark);
}
.post-content-body h3 { font-size: 1.8rem; margin: 4rem 0 1.5rem; color: var(--accent); }
.post-content-body p { margin-bottom: 2rem; }

.post-content-body ul, .post-content-body ol {
    margin: 3rem 0;
    padding-left: 0;
}
.post-content-body li { 
    list-style: none;
    margin-bottom: 1.5rem; 
    padding: 1.5rem;
    background: var(--surface);
    border-left: 5px solid var(--primary);
}
.post-content-body li strong { color: var(--surface-dark); display: block; margin-bottom: 0.5rem; text-transform: uppercase; font-family: var(--font-mono); font-size: 0.9rem; }

.post-content-body blockquote {
    margin: 5rem 0;
    padding: 4rem;
    background: var(--surface-dark);
    color: #fff;
    border-left: 10px solid var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
}
.post-content-body blockquote::before {
    content: 'EXPERT_REPORT';
    position: absolute;
    top: 1rem; right: 1rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--primary);
    opacity: 0.5;
}

.post-footer {
    margin-top: 8rem;
    padding: 4rem;
    background: var(--surface);
    border: 1px solid var(--border);
}
.post-tags { font-family: var(--font-mono); font-size: 0.8rem; }
.post-tags a {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--surface-dark);
    color: #fff;
    margin-right: 0.5rem;
}
.post-tags a:hover { background: var(--primary); color: var(--surface-dark); }

/* Footer */
.site-footer {
    padding: 8rem 0 4rem;
    background: var(--surface-dark);
    color: #fff;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 6rem;
    margin-bottom: 6rem;
}

.footer-col h4 { font-family: var(--font-mono); font-size: 0.8rem; color: var(--primary); margin-bottom: 3rem; }
.footer-links li { margin-bottom: 1.2rem; }
.footer-links a { color: rgba(255,255,255,0.5); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }

.footer-info { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.info-item label { display: block; font-family: var(--font-mono); font-size: 0.65rem; color: rgba(255,255,255,0.3); margin-bottom: 0.5rem; }
.info-item span { font-weight: 700; font-size: 1rem; }

.footer-bottom {
    padding-top: 4rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    font-family: var(--font-mono);
}

/* Mobile */
@media (max-width: 1024px) {
    .logo-box { padding-right: 2rem; }
    .hero { grid-template-columns: 1fr; }
    .hero-content { padding: 8rem var(--gap); }
    .hero-content::after { display: none; }
    .hero-image { height: 400px; order: -1; }
    .workflow-grid { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr; gap: 4rem; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: fixed; top: var(--header-height); left: 0; width: 100%;
        background: var(--surface-dark); border-top: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav ul { flex-direction: column; }
    .main-nav li { border: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .main-nav a { padding: 2rem; }
    .menu-toggle { display: block; }
    .post-grid { grid-template-columns: 1fr; }
}
