/*
Theme Name: StroyStandard Portal
Author: Senior Frontend Designer
Description: Концепция "Technical Standard": Бескомпромиссное качество, ГОСТ-подход и инженерная точность.
Version: 1.0.0
Text Domain: stroystandard
*/

:root {
    /* Colors - Authority & Precision */
    --bg: #ffffff;
    --surface: #f8fafc;
    --surface-dark: #0f172a;
    --primary: #2563eb; /* Engineering Blue */
    --primary-dim: rgba(37, 99, 235, 0.05);
    --accent: #f59e0b; /* Safety Amber */
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Spacing */
    --gap: 2rem;
    --header-height: 90px;
    --container-width: 1320px;
    
    /* Fonts */
    --font-display: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex 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-body); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: 0.2s ease; }
ul { list-style: none; }

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

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

/* Header - Floating Island Split */
.site-header {
    height: auto;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    pointer-events: none; /* Let clicks pass through to hero if needed, but we'll enable on children */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
}

.logo-box {
    background: var(--surface-dark);
    padding: 1rem 2rem;
    color: #fff;
    display: flex;
    align-items: center;
    box-shadow: 10px 10px 0 var(--primary);
    transition: 0.3s;
}
.logo-box:hover { box-shadow: 15px 15px 0 var(--accent); }

.logo {
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    flex-shrink: 0;
    margin: 0;
}
.logo span { color: var(--primary); }

.nav-island {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.main-nav ul { 
    display: flex; 
    gap: 0.5rem; 
    align-items: center;
}

.main-nav a { 
    font-weight: 700; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    color: var(--text);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: 0.3s;
}

.main-nav a:hover, 
.main-nav .current-menu-item a { 
    background: var(--surface-dark);
    color: #fff;
}

.menu-toggle { 
    display: none; 
    background: var(--surface-dark); 
    color: #fff; 
    border: none; 
    padding: 1rem; 
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hamburger { width: 20px; height: 2px; background: #fff; display: block; position: relative; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 100%; height: 2px; background: #fff; left: 0; transition: 0.3s; }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Adjust Hero for Floating Header */
.hero {
    padding: 12rem 0 8rem; /* More top padding */
}

/* Mobile Adjustments for Island Header */
@media (max-width: 1024px) {
    .site-header { padding: 1rem 0; }
    .logo-box { padding: 0.8rem 1.5rem; box-shadow: 5px 5px 0 var(--primary); }
    .nav-island { display: none; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
}

@media (max-width: 768px) {
    .main-nav.is-active {
        display: block; 
        position: fixed; 
        top: 5rem; 
        left: var(--gap);
        right: var(--gap);
        background: #fff; 
        padding: 2rem; 
        border: 2px solid var(--surface-dark);
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        pointer-events: auto;
    }
    .main-nav.is-active ul { flex-direction: column; gap: 1rem; }
    .main-nav.is-active a { width: 100%; text-align: center; }
}

/* Hero - Option A: Text Left / Image Right with Technical Framing */
.hero {
    padding: 8rem 0;
    background: var(--surface);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 40%; height: 100%;
    background: var(--primary-dim);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 { font-size: clamp(3rem, 6vw, 4.5rem); margin-bottom: 1.5rem; }
.hero-desc { 
    font-size: 1.2rem; 
    color: var(--text-muted); 
    max-width: 540px; 
    margin-bottom: 3rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--accent);
}

.hero-image-wrap {
    position: relative;
    padding: 20px;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    filter: grayscale(0.2);
    box-shadow: 30px 30px 0px var(--primary);
    transition: 0.5s ease;
}
.hero-image-wrap:hover .hero-banner-img { transform: translate(-10px, -10px); box-shadow: 40px 40px 0px var(--accent); }

/* Standard Roadmap */
.roadmap-section { padding: 10rem 0; }
.roadmap-header { margin-bottom: 6rem; }

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    background: var(--border);
}

.roadmap-card {
    background: #fff;
    padding: 4rem 2rem;
    transition: 0.3s;
}
.roadmap-card:hover { background: var(--surface-dark); color: #fff; }
.roadmap-tag { color: var(--primary); margin-bottom: 1.5rem; display: block; }
.roadmap-card h3 { font-size: 1.25rem; margin-bottom: 1rem; }
.roadmap-card p { font-size: 0.9rem; color: var(--text-muted); }
.roadmap-card:hover p { color: rgba(255,255,255,0.6); }

/* Norms Block */
.norms-section {
    padding: 8rem 0;
    background: var(--surface-dark);
    color: #fff;
}

.norms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.norms-list { display: flex; flex-direction: column; gap: 2.5rem; }
.norm-item { display: flex; gap: 1.5rem; align-items: flex-start; }
.norm-num { 
    width: 40px; height: 40px; 
    background: var(--primary); 
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-weight: 700; flex-shrink: 0;
}
.norm-item h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.norm-item p { font-size: 0.9rem; color: rgba(255,255,255,0.5); }

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

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

.post-card {
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.card-img-wrap {
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    background: var(--surface);
    position: relative;
}
.card-img-wrap::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1));
}

.card-img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.post-card:hover .card-img { transform: scale(1.05); }

.card-body { padding: 2.5rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-category { font-family: var(--font-mono); font-size: 0.65rem; color: var(--primary); font-weight: 700; margin-bottom: 1rem; display: block; }
.card-title { font-size: 1.4rem; margin-bottom: 1.25rem; line-height: 1.2; }
.card-excerpt { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 2rem; flex-grow: 1; }

.btn-standard {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--surface-dark);
}
.btn-standard::after { content: ''; width: 30px; height: 2px; background: var(--accent); transition: 0.3s; }
.btn-standard:hover::after { width: 50px; background: var(--primary); }

/* Pagination */
.pagination-container { padding-bottom: 8rem; }
.pagination-list { display: flex; justify-content: center; gap: 0.5rem; }
.pagination-item a, .pagination-item span {
    width: 50px; height: 50px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    font-family: var(--font-mono); font-weight: 700;
}
.pagination-item.is-active span { background: var(--surface-dark); color: #fff; border-color: var(--surface-dark); }

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

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

.footer-col h4 { font-family: var(--font-mono); font-size: 0.75rem; color: var(--primary); margin-bottom: 2.5rem; }
.footer-contact-item { margin-bottom: 2rem; }
.footer-contact-item label { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.4); text-transform: uppercase; margin-bottom: 0.5rem; }
.footer-contact-item span { font-size: 1.1rem; font-weight: 600; }

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* Mobile */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; gap: 4rem; }
    .hero-image-wrap { max-width: 600px; margin: 0 auto; }
    .roadmap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .norms-grid { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .main-nav.is-active {
        display: block; position: absolute; top: 100%; left: 0; width: 100%;
        background: #fff; padding: 2rem; border-bottom: 2px solid var(--surface-dark);
    }
    .main-nav ul { flex-direction: column; gap: 1.5rem; }
    .menu-toggle { display: block; }
}

@media (max-width: 640px) {
    .roadmap-grid { grid-template-columns: 1fr; }
    .post-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.5rem; }
}
