/*
Theme Name: Ironmusic Editorial
Description: Музыкальный журнал Ironmusic.
Version: 1.7.0
Requires PHP: 8.0
Text Domain: ironmusic-editorial
*/

@font-face {
    font-family: Oswald;
    src: url(assets/oswald.ttf) format("truetype");
    font-weight: 200 700;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --background: #101211;
    --surface: #191b19;
    --rule: #3e4039;
    --ink: #f7f3ef;
    --muted: #b7b0ae;
    --red: #ff7058;
    --copper: #d59d70;
    --heading: Oswald, "Arial Narrow", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    position: relative;
    isolation: isolate;
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font: 400 1rem/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
body::before {
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: clamp(34rem, 60vw, 61rem);
    content: "";
    pointer-events: none;
    background:
        linear-gradient(180deg, #0b0e0cb3, #10121133 22%, #10121166 62%, var(--background) 100%),
        url("assets/forest-roots.webp") center 35% / cover no-repeat;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .24em; }
button, input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--heading); font-weight: 650; line-height: 1.12; }
.wrap { width: min(100% - 6rem, 78rem); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 99999; padding: .75rem; background: var(--background); }
.skip-link:focus { top: 1rem; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); }
.site-header {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid #735d446b;
    background: linear-gradient(180deg, #111311f5, #0c0f0de8);
}
.header-inner { min-height: 4.65rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand {
    display: inline-flex;
    flex: none;
    align-items: center;
    width: clamp(11.5rem, 17.8vw, 14.125rem);
    text-decoration: none;
}
.brand img { width: 100%; height: auto; filter: drop-shadow(0 2px 2px #000b) brightness(1.12); }
.brand-text { display: none; }
.site-footer .brand { width: 11.5rem; }
@media (forced-colors: active) {
    .brand img { display: none; }
    .brand-text { display: block; color: LinkText; font: 700 1.3rem/1 var(--heading); }
}
.site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem clamp(.85rem, 1.7vw, 1.75rem); }
.site-nav a { color: #d6d2d0; text-decoration: none; font-size: .92rem; font-weight: 550; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--red); }
.site-language { position: relative; flex: none; z-index: 4; font-size: .875rem; }
.site-language summary { display: flex; align-items: center; gap: .45rem; cursor: pointer; list-style: none; }
.site-language summary::-webkit-details-marker { display: none; }
.site-language summary::after { content: ""; width: .4rem; height: .4rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: translateY(-.1rem) rotate(45deg); }
.site-language img { width: 20px; height: 14px; display: inline-block; }
.site-language ul { position: absolute; right: 0; top: 100%; padding: .3rem; margin: .55rem 0 0; list-style: none; min-width: 9rem; background: var(--surface); border: 1px solid var(--rule); }
.site-language a { display: flex; align-items: center; gap: .5rem; padding: .45rem .55rem; text-decoration: none; }
.site-language a:hover, .site-language a[aria-current] { color: var(--red); }
.site-search { position: relative; flex: 0 1 10rem; min-width: 7.5rem; }
.site-search input { width: 100%; height: 2.45rem; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); padding: .3rem 2.3rem .3rem .7rem; }
.site-search button { position: absolute; inset: 1px 1px 1px auto; width: 2.2rem; border: none; background: none; color: var(--ink); cursor: pointer; }
.search-icon { display: block; position: relative; margin: auto; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; }
.search-icon::after { position: absolute; content: ""; width: 7px; height: 1.5px; background: currentColor; right: -5px; bottom: -2px; transform: rotate(47deg); }

.eyebrow { display: inline-flex; align-items: center; gap: .65rem; margin: 0; color: var(--copper); font-size: .875rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; text-decoration: none; }
.eyebrow::before { content: ""; width: 1.8rem; height: 3px; background: linear-gradient(90deg, var(--copper), transparent); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.95rem; padding: .5rem 1.05rem; border: 1px solid transparent; font-weight: 700; font-size: .92rem; text-decoration: none; }
.button-primary { color: #1b0b08; background: var(--red); }
.button-primary:hover { background: #ff806f; }

.editorial-section { padding-block: clamp(2.75rem, 5.5vw, 5.25rem); }
#materials { scroll-margin-top: 1rem; }
.section-heading { display: flex; align-items: center; gap: 1.35rem; margin-bottom: 1.75rem; }
.section-heading h1, .section-heading h2 { flex-shrink: 0; font-size: clamp(2.2rem, 4.7vw, 3.75rem); letter-spacing: -.025em; text-transform: uppercase; }
.section-heading > div {
    flex: 1;
    height: 6px;
    background:
        linear-gradient(90deg, var(--copper), #75604c 22%, #484d41 55%, #484d4100) center / 100% 1px no-repeat,
        linear-gradient(90deg, #6a4933, #33372d 65%, #33372d00) bottom / 100% 1px no-repeat;
}
.section-heading > div::before {
    content: "";
    display: block;
    width: min(4.1rem, 66%);
    height: 6px;
    background: linear-gradient(90deg, #664b37, var(--copper), #955e45);
    clip-path: polygon(0 48%, 12% 0, 86% 0, 100% 48%, 88% 100%, 12% 100%);
}
.story-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.story-card {
    min-width: 0;
    border: 1px solid #464239;
    background: linear-gradient(150deg, #232523, var(--surface) 48%, #151715);
}
.story-card:hover, .story-card:focus-within { border-color: #a47e5d; }
.story-link { display: flex; height: 100%; flex-direction: column; text-decoration: none; }
.story-link:hover h2 { color: var(--red); }
.story-media { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 9; background: #231d20; }
.story-media img { width: 100%; height: 100%; object-fit: cover; }
.story-media--empty {
    background:
        radial-gradient(circle at 77% 80%, #fd503f 0 4%, #1f191a 4.35% 6%, transparent 6.3%),
        repeating-radial-gradient(circle at 77% 80%, #3e2e34 0 2px, #241b20 3px 6px, #261b21 7px 10px);
}
.story-media::after { position: absolute; content: ""; inset: 0; pointer-events: none; background: linear-gradient(0deg, #150f12a6 0%, transparent 46%); }
.story-topic { position: absolute; bottom: .8rem; left: .9rem; z-index: 1; background: #161710; border-left: 2px solid var(--copper); color: var(--ink); padding: .26rem .55rem; font-size: .79rem; font-weight: 700; }
.story-body { padding: 1.05rem 1.1rem 1.25rem; }
.story-body time, .article-heading time { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .875rem; }
.story-body h2 { font-size: clamp(1.35rem, 2.5vw, 1.82rem); overflow-wrap: anywhere; }
.story-body p { margin: .55rem 0 0; color: var(--muted); font-size: .95rem; overflow-wrap: anywhere; }

.news-feed { padding-top: clamp(1.8rem, 4vw, 3.25rem); }
[data-story-feed][data-infinite] .pagination { display: none; }
.news-load { text-align: center; margin-top: 2.1rem; }
.news-load [role="status"] { margin: 0 0 .75rem; color: var(--muted); }
.news-load [role="status"]:empty { margin: 0; }
.news-load a[aria-disabled="true"] { opacity: .6; cursor: progress; }
.news-feature { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 1.2rem; }
.news-feature-side { display: grid; grid-auto-rows: 1fr; gap: 1.2rem; min-width: 0; }
.story-card--lead { border-top: 2px solid var(--red); }
.story-card--lead:only-child { grid-column: 1 / -1; }
.story-card--lead .story-link { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); min-height: 19rem; }
.story-card--lead .story-media { grid-area: 1 / 2; aspect-ratio: auto; }
.story-card--lead .story-body { grid-area: 1 / 1; align-self: center; padding: clamp(1.2rem, 3.15vw, 2.55rem); }
.story-card--lead .story-body h2 { font-size: clamp(2rem, 4.6vw, 4.4rem); }
.story-card--lead .story-body p { margin-top: .85rem; }
.story-card--brief .story-link { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); min-height: 8.8rem; }
.story-card--brief .story-media { aspect-ratio: auto; }
.story-card--brief .story-topic { display: none; }
.story-card--brief .story-body { align-self: center; padding: .85rem 1rem; }
.story-card--brief .story-body h2 { font-size: clamp(1.1rem, 2.2vw, 1.5rem); }
.story-card--grid.story-card--no-image .story-media { aspect-ratio: auto; background: transparent; }
.story-card--grid.story-card--no-image .story-media::after { content: none; }
.story-card--grid.story-card--no-image .story-topic { display: inline-block; position: static; margin: .9rem 1.1rem 0; }
.story-card--grid.story-card--no-image .story-body { padding-top: .55rem; }

.listing { min-height: 55vh; }
.search-query { margin: -1rem 0 1.65rem; color: var(--muted); }
.archive-filters { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.5rem; }
.archive-filters a, .page-numbers { padding: .34rem .68rem; border: 1px solid var(--rule); text-decoration: none; }
.archive-filters [aria-current], .page-numbers.current, .archive-filters a:hover { color: var(--red); border-color: var(--red); }
.nav-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.article-wrap { padding-block: 3.75rem 5rem; }
.article { max-width: 51rem; margin: 0 auto; }
.article-heading h1 { margin: .5rem 0 1rem; font-size: clamp(2.55rem, 7vw, 5rem); overflow-wrap: anywhere; }
.article-heading {
    padding-bottom: 1.6rem;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, var(--copper), #615745 35%, #454b3b00) bottom / 100% 1px no-repeat;
}
.band-art, .article-cover { margin: 0 0 1.75rem; }
.band-art img, .article-cover img { display: block; max-width: 100%; max-height: 36rem; width: auto; height: auto; border: 1px solid var(--rule); }
.band-art figcaption, .article-cover figcaption { padding-top: .5rem; color: var(--muted); font-size: .85rem; }
.band-art figcaption a, .article-cover figcaption a, .video-source a { color: var(--red); }
.video-source { margin: -.9rem 0 1.55rem; font-size: .88rem; }
.band-art--empty { aspect-ratio: 4 / 1; min-height: 5rem; border: 1px solid var(--rule); }
.prose { overflow-wrap: anywhere; font-size: 1.07rem; line-height: 1.75; }
.prose a, .source-note a, .article-comments a { color: var(--red); }
.prose img { height: auto; }
.prose figure { margin: 0 0 1rem; }
.prose iframe { max-width: 100%; }
.archive-player { margin: 0 0 1.5rem; background: #060607; border: 1px solid var(--rule); }
.archive-player iframe { display: block; width: 100%; height: auto; min-height: 200px; aspect-ratio: 16 / 9; border: 0; }
.archive-related { margin-top: 2rem; padding: 1.05rem 1.2rem; background: var(--surface); border-left: 2px solid var(--red); }
.archive-related a { color: var(--red); }
.archive-related h2 { font-size: 1.8rem; }
.archive-related ul { margin-bottom: 0; padding-left: 1.35rem; }
.archive-related li + li { margin-top: .45rem; }
.prose figcaption, .source-note { color: var(--muted); font-size: .88rem; }
.prose h2, .prose h3 { margin: 1.55rem 0 .65rem; }
.article-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.article-comments input, .article-comments textarea { max-width: 100%; color: var(--ink); background: var(--surface); border: 1px solid var(--rule); padding: .45rem .55rem; }
.article-comments textarea { width: 100%; }
.site-footer { border-top: 1px solid #674a376e; background: linear-gradient(150deg, #1a1d17, #101211 74%); }
.footer-inner { min-height: 6rem; display: flex; align-items: center; gap: 1rem 2rem; justify-content: space-between; }
.footer-caption { color: var(--muted); font-size: .88rem; }

@media (max-width: 980px) {
    .wrap { width: calc(100% - 3rem); }
    .header-inner { gap: .9rem; }
    .story-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .news-feature { grid-template-columns: 1fr; }
    .news-feature-side { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 720px) {
    body::before {
        height: 36rem;
        background-position: center, left 36%;
        background-image: linear-gradient(180deg, #0b0e0cb3, #10121173 27%, var(--background) 100%), url("assets/forest-roots.webp");
    }
    .wrap { width: calc(100% - 2rem); }
    .header-inner { flex-wrap: wrap; min-height: 0; padding-block: .85rem .65rem; }
    .site-nav { order: 4; width: 100%; gap: .38rem .8rem; }
    .site-nav a { font-size: .875rem; }
    .site-search { margin-left: auto; }
    .story-card--lead .story-link { min-height: 13rem; }
    .footer-inner { flex-wrap: wrap; padding-block: 1.4rem; }
}
@media (max-width: 460px) {
    .header-inner { gap: .55rem; }
    .header-inner .brand { width: clamp(8.35rem, 39vw, 10.5rem); }
    .site-search { min-width: 4.75rem; }
    .story-grid, .news-feature-side { grid-template-columns: 1fr; }
    .story-card--lead .story-link { grid-template-columns: 1fr; min-height: 0; }
    .story-card--lead .story-body { grid-area: 1 / 1; }
    .story-card--lead .story-body p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    .story-card--lead .story-media { grid-area: 2 / 1; aspect-ratio: 3 / 1; }
    .story-card--lead.story-card--no-image .story-media { display: none; }
    .story-card--brief .story-link { min-height: 6.5rem; }
    .section-heading { gap: .7rem; }
    .section-heading h1, .section-heading h2 { flex-shrink: 1; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
