/*
Theme Name: Новости технологий
Version: 1.0.1
Text Domain: novosti-tehnologiy
*/
:root {
    --paper: #fcf7ef;
    --ink: #171e29;
    --amber: #ffae27;
    --gutter: clamp(16px, 3.5vw, 72px);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 17px/1.5 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #b36100; outline-offset: 4px; }
img { max-width: 100%; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 36px; padding: 14px var(--gutter); min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 13px; font-size: clamp(1.1rem, 2vw, 1.7rem); font-weight: 850; letter-spacing: -.04em; }
.orbit { width: 39px; height: 21px; position: relative; border: 2px solid #db7c0b; border-radius: 50%; transform: rotate(-24deg); }
.orbit::after { position: absolute; right: -2px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #db7c0b; content: ''; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 8px clamp(16px, 3vw, 48px); font-weight: 650; }
.site-header nav a:hover, .entry-row h2 a:hover { text-decoration: underline; }
.hero { position: relative; min-height: clamp(430px, 43vw, 690px); display: grid; align-items: center; background: #051a2b; color: #fff; overflow: hidden; isolation: isolate; }
.hero-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.hero::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #031221d9 0%, #03122162 38%, transparent 66%); content: ''; }
.hero-copy { padding: 35px var(--gutter) 88px; }
.hero h1 { margin: 0; font-size: clamp(2.8rem, 6.8vw, 8rem); line-height: .97; letter-spacing: -.065em; font-weight: 850; }
.hero p { margin: .8em 0 0; font-size: clamp(1.1rem, 2.1vw, 2rem); }
.hero-edge { display: block; position: absolute; bottom: -1px; width: 100%; height: clamp(33px, 6vw, 98px); }
.hero-edge path { fill: var(--paper); stroke: var(--amber); stroke-width: 4px; vector-effect: non-scaling-stroke; }
.page-band { padding: 0 var(--gutter) 48px; }
.section-title { display: flex; align-items: center; gap: 18px; margin: 0 0 24px; font-size: clamp(1.7rem, 3.5vw, 3.2rem); line-height: 1.15; letter-spacing: -.045em; }
.section-title::before { content: ''; width: 4px; height: .85em; background: var(--amber); flex: none; }
.section-title::after { content: ''; height: 1px; background: #d9ccbf; flex: 1; }
.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 24px); }
.cover { display: grid; align-items: end; isolation: isolate; position: relative; overflow: hidden; aspect-ratio: 1.4; background: #0d1b26; color: white; border-radius: 16px; }
.cover img, .cover::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover img { object-fit: cover; z-index: -2; transition: transform .28s ease; }
.cover::before { z-index: -1; background: linear-gradient(transparent 35%, #08111ce8); content: ''; }
.cover:hover img { transform: scale(1.045); }
.cover span { padding: clamp(12px, 2vw, 32px); font-weight: 800; line-height: 1.1; font-size: clamp(1.05rem, 2.3vw, 2.3rem); letter-spacing: -.035em; }
.cover span::after { display: block; width: 36px; height: 3px; margin-top: 10px; background: var(--amber); content: ''; }
.fresh { padding-top: 12px; }
.entry-row { display: grid; grid-template-columns: minmax(110px, 20%) 1fr auto; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid #d9ccbf; }
.entry-row h2 { margin: 0; font-size: clamp(1.06rem, 2vw, 1.55rem); line-height: 1.25; }
.entry-meta { color: #935000; font-size: .9rem; font-weight: 700; }
.entry-photo img { display: block; width: 72px; height: 52px; object-fit: cover; border-radius: 6px; }
.empty { color: #554c42; }
.archive { padding-top: 36px; }
.article { max-width: 820px; margin-inline: auto; }
.article h1 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.1; }
.article img { height: auto; }
.article-content a { text-decoration: underline; }
.screen-reader-text:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link:focus { display: inline-block; padding: 10px var(--gutter); }
@media (max-width: 690px) {
    .site-header { gap: 8px 20px; }
    .site-header nav { font-size: .9rem; }
    .hero { min-height: 490px; align-items: start; }
    .hero-photo { object-position: 69% center; }
    .hero::before { background: linear-gradient(#051421e0, #0514210a 63%); }
    .hero-copy { padding-top: 28px; }
    .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cover { aspect-ratio: 1.05; border-radius: 10px; }
    .cover span { overflow-wrap: anywhere; }
    .entry-row { grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 4px; }
    .entry-meta { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .cover img { transition: none; } }

/* Компактные обложки рубрик */
#rubriki .section-grid { max-width: 1320px; margin-inline: auto; }
#rubriki .cover { aspect-ratio: 1.85; }
#rubriki .cover span { padding: clamp(12px, 1.5vw, 24px); font-size: clamp(1rem, 1.8vw, 1.6rem); }
@media (max-width: 690px) { #rubriki .cover { aspect-ratio: 1.3; } }

.fresh .entry-row { grid-template-columns: minmax(110px, 20%) minmax(0, 1fr) auto; }
.fresh .entry-row h2 { font-size: clamp(1rem, 1.65vw, 1.3rem); overflow-wrap: anywhere; }
.fresh .entry-photo img { width: clamp(112px, 10vw, 160px); height: auto; aspect-ratio: 16 / 10; }
.fresh-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.fresh-pagination .page-numbers { padding: 8px 12px; background: #fff8ed; border-radius: 5px; }
.fresh-pagination .current { background: #182432; color: white; }
@media (max-width: 690px) {
    .fresh .entry-row { grid-template-columns: minmax(0, 1fr) auto; }
    .fresh .entry-photo img { width: 92px; }
}
