/*
Theme Name: РосКард
Description: Адаптивная тема типографии РосКард
Version: 1.0.0
Requires PHP: 8.1
Text Domain: roskard
*/
:root {
    --ink: #292724;
    --muted: #57534d;
    --green: #006844;
    --yellow: #ffd416;
    --orange: #faa425;
    --line: #e7e2da;
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: #9f261f; }
a:focus-visible { outline: 3px solid #087072; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); margin: 0 0 .65em; letter-spacing: -.035em; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); margin: 1.45em 0 .6em; }
h3 { font-size: 1.17rem; margin: 1.2em 0 .55em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
.wide { width: min(1280px, calc(100% - 56px)); margin-inline: auto; }
.skip { position: absolute; top: -90px; left: 10px; z-index: 2; background: white; padding: .7rem 1rem; }
.skip:focus { top: 6px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 77px; align-items: center; justify-content: space-between; gap: 18px; }
.logo { width: 226px; flex: 0 1 226px; }
.logo img { width: 100%; }
.site-nav ul, .site-footer nav { display: flex; flex-wrap: wrap; gap: .45rem clamp(1rem, 3vw, 2.6rem); margin: 0; list-style: none; padding: 0; }
.site-nav a { display: block; text-decoration: none; text-transform: uppercase; font-size: .9rem; letter-spacing: .045em; padding: .35rem 0; color: var(--muted); }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a { color: var(--green); text-decoration: underline; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 1.15rem; gap: .3rem .6rem; font-size: .87rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--muted); }
.section-head { padding-block: 25px 10px; }
.section-head h2 { margin-top: .4em; }
.reading, .page-wide { padding-block: clamp(1.45rem, 4vw, 3.5rem) clamp(3rem, 7vw, 5.5rem); overflow-wrap: anywhere; }
.reading { max-width: 860px; font-size: 1.07rem; }
.reading > p:first-of-type { color: var(--muted); font-size: 1.17rem; }
.hero-wrap { position: relative; display: grid; align-items: center; min-height: clamp(410px, 51vw, 650px); isolation: isolate; background: #292724; }
.hero-wrap > img { z-index: -1; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-panel { background: #fffaf0; width: min(560px, calc(100% - 56px)); margin: clamp(28px, 5.5vw, 92px); padding: clamp(22px, 4vw, 52px); }
.hero-panel p { font-size: 1.1rem; }
.actions { display: flex; gap: .7rem 1rem; align-items: center; flex-wrap: wrap; }
.button { background: var(--green); color: #fff; border-radius: .25rem; text-decoration: none; padding: .56rem .95rem; display: inline-block; font-weight: 650; }
.button:hover { background: #005036; color: #fff; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 auto; max-width: 2200px; }
.service-tile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(320px, 30vw, 590px); background: var(--orange); }
.service-tile:nth-child(4n+2), .service-tile:nth-child(4n+3) { background: var(--yellow); }
.tile-copy { align-self: center; padding: clamp(20px, 2.4vw, 44px); }
.tile-copy h2 { margin: 0 0 .55em; font-size: clamp(1.35rem, 2.05vw, 2.65rem); }
.tile-copy h2 a { color: inherit; text-decoration-thickness: .06em; }
.tile-copy ul { margin: 0 0 .65rem; padding: 0; list-style: none; line-height: 1.4; }
.tile-copy li + li { margin-top: .28rem; }
.tile-copy li a { color: #30251b; }
.tile-copy p { margin: 0; line-height: 1.36; font-size: .91rem; }
.tile-visual { position: relative; margin: 0; min-width: 0; overflow: hidden; }
.tile-image { display: block; position: absolute; inset: 0; }
.tile-image:focus-visible { outline-offset: -5px; z-index: 1; }
.tile-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.work-photo, .project-photo { margin: 1.5rem 0; background: #f6f4ef; }
.work-photo img { width: 100%; max-height: 485px; object-fit: contain; }
.work-photo figcaption { padding: .5rem 1rem .7rem; color: var(--muted); font-size: .9rem; }
.project-photo img { width: 100%; max-height: 680px; object-fit: contain; }
.service-examples { max-width: 580px; }
.related-services, .order { border-top: 1px solid var(--line); margin-top: 2rem; }
.related-services ul { display: flex; flex-wrap: wrap; gap: .55rem; padding: 0; list-style: none; }
.related-services a, .portfolio-nav a { display: inline-block; padding: .35rem .68rem; background: #f7f3ec; border-radius: .3rem; }
.order { background: #fff5d1; padding: 1.35rem 1.5rem 1.5rem; }
.order h2 { margin-top: 0; }
.portfolio-nav { display: flex; flex-wrap: wrap; list-style: none; gap: .55rem; padding: 0; }
.work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; gap: 14px; }
.work-grid li { background: #f5f3ef; }
.work-grid a { display: block; text-decoration: none; min-height: 100%; }
.work-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.work-grid span { display: block; padding: .65rem .8rem; }
.office-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.office { padding: 1.4rem; border: 1px solid var(--line); }
.office h2 { margin-top: 0; }
.office img { width: 100%; max-height: 300px; object-fit: cover; }
.site-footer { background: #292724; color: #fff; padding-block: 1.6rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-footer a { color: #fff4c5; }
@media (max-width: 980px) {
    .tile-copy { padding: 1rem; }
    .service-tile { grid-template-columns: 1.35fr 1fr; }
    .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .wide { width: calc(100% - 32px); }
    .header-inner { align-items: flex-start; flex-direction: column; justify-content: center; min-height: 0; padding-block: 11px; gap: 7px; }
    .logo { width: 158px; flex: auto; }
    .site-nav ul { gap: 0 .85rem; }
    .site-nav a { font-size: .77rem; white-space: nowrap; }
    .hero-wrap { min-height: 370px; }
    .hero-panel { margin: 16px; width: min(480px, calc(100% - 32px)); }
    .service-grid, .office-grid { grid-template-columns: minmax(0, 1fr); }
    .service-tile { min-height: 255px; }
    .service-tile:nth-child(n) { background: var(--orange); }
    .service-tile:nth-child(even) { background: var(--yellow); }
    .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
