/* 
Art Direction 2026: Terracotta Dark Editorial
Palette: Primary oklch(55% 0.15 40), BG oklch(20% 0.02 40), Neutral oklch(35% 0.03 40), Light oklch(90% 0.01 40)
Typography: Headings/Body - system-ui, -apple-system, sans-serif; Numbers/Labels - ui-monospace, SF Mono, Menlo, monospace
Composition: Sticky-media split (photo left, text right), high-density editorial rhythm, large radius (20px+)
Form: Pill-shaped buttons, heavy rounded corners, deep graphite surfaces with radial glow
Animation: Soft shifting background light spots via CSS keyframes, smooth section fade-ins
*/
:root {
    --ktrz-primary: oklch(55% 0.15 40);
    --ktrz-bg: oklch(20% 0.02 40);
    --ktrz-surface: oklch(25% 0.03 40);
    --ktrz-neutral: oklch(35% 0.03 40);
    --ktrz-text: oklch(90% 0.01 40);
    --ktrz-text-dim: oklch(75% 0.02 40);
    --ktrz-radius: 24px;
    --ktrz-transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

html, body { 
    overflow-x: clip; 
    background-color: var(--ktrz-bg); 
    color: var(--ktrz-text); 
    margin: 0; 
    font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif; 
    line-height: 1.8; 
    -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.ktrz-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
    min-width: 0;
}

h1, h2, h3, h4 { 
    line-height: 1.2; 
    margin: 0 0 1.5rem; 
    font-weight: 700; 
    overflow-wrap: anywhere; 
    word-break: normal; 
    hyphens: auto; 
}
h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 5vw, 2.25rem); }

.ktrz-prose { 
    font-size: clamp(1rem, 2vw, 1.125rem); 
    color: var(--ktrz-text-dim); 
    overflow-wrap: anywhere;
}

.ktrz-mono { 
    font-family: ui-monospace, SF Mono, Menlo, monospace; 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
}

.ktrz-skip {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--ktrz-primary);
    color: white;
    padding: 1rem;
    z-index: 1000;
    transition: top 0.3s;
}
.ktrz-skip:focus { top: 0; }

.ktrz-topbar {
    background: var(--ktrz-surface);
    border-bottom: 1px solid var(--ktrz-neutral);
    padding: 8px 0;
    font-size: 0.85rem;
}
.ktrz-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ktrz-header {
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(12px);
}
.ktrz-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ktrz-text);
    min-width: 0;
}
.ktrz-logo-brand { font-weight: 800; font-size: 1.5rem; line-height: 1; overflow-wrap: anywhere; }
.ktrz-logo-domain { font-size: 0.7rem; opacity: 0.6; font-family: ui-monospace, monospace; }

#ktrz-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}
.ktrz-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 24px;
}
.ktrz-nav-link {
    text-decoration: none;
    color: var(--ktrz-text-dim);
    font-weight: 500;
    transition: color var(--ktrz-transition);
    white-space: nowrap;
}
.ktrz-nav-link:hover { color: var(--ktrz-primary); }

.ktrz-lang-switch {
    display: flex;
    gap: 10px;
    border-left: 1px solid var(--ktrz-neutral);
    padding-left: 24px;
}
.ktrz-lang-link {
    text-decoration: none;
    color: var(--ktrz-text);
    font-weight: bold;
    font-size: 0.9rem;
}

.ktrz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--ktrz-transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.ktrz-btn-primary {
    background: var(--ktrz-primary);
    color: white;
}
.ktrz-btn-primary:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

.ktrz-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--ktrz-neutral);
    color: var(--ktrz-text);
    padding: 8px 16px;
    border-radius: 100px;
    cursor: pointer;
}

@media (max-width: 959px) {
    .ktrz-menu-toggle { display: block; }
    #ktrz-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--ktrz-surface);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 40px;
        transition: right var(--ktrz-transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        z-index: 110;
    }
    #ktrz-menu.ktrz-open { right: 0; }
    .ktrz-nav-list { flex-direction: column; width: 100%; }
    .ktrz-lang-switch { border-left: none; padding-left: 0; margin-top: 20px; }
}

.ktrz-hero {
    padding: 80px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
@media (max-width: 768px) { .ktrz-hero { grid-template-columns: 1fr; text-align: center; } }

.ktrz-sticky-media {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.ktrz-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr));
    gap: 24px;
    margin: 40px 0;
}
.ktrz-fact-card {
    background: var(--ktrz-surface);
    padding: 32px;
    border-radius: var(--ktrz-radius);
    text-align: center;
    border: 1px solid var(--ktrz-neutral);
}
.ktrz-fact-val {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ktrz-primary);
    font-family: ui-monospace, monospace;
}

.ktrz-service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 80px;
    min-width: 0;
}
@media (max-width: 1024px) { .ktrz-service-item { grid-template-columns: 1fr; } }
.ktrz-service-num {
    font-family: ui-monospace, monospace;
    color: var(--ktrz-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: block;
}

.ktrz-table-wrap {
    overflow-x: auto;
    border-radius: var(--ktrz-radius);
    border: 1px solid var(--ktrz-neutral);
    margin: 24px 0;
    -webkit-overflow-scrolling: touch;
}
.ktrz-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ktrz-surface);
    min-width:min(500px,100%);
}
.ktrz-table th, .ktrz-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--ktrz-neutral);
}
.ktrz-table th { background: rgba(0,0,0,0.2); color: var(--ktrz-primary); }

.ktrz-faq-group { margin-bottom: 40px; }
details.ktrz-faq-item {
    background: var(--ktrz-surface);
    margin-bottom: 12px;
    border-radius: var(--ktrz-radius);
    border: 1px solid var(--ktrz-neutral);
}
summary.ktrz-faq-summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ktrz-faq-content { padding: 0 20px 20px; color: var(--ktrz-text-dim); }

.ktrz-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr));
    gap: 24px;
}
.ktrz-guide-card {
    background: var(--ktrz-surface);
    border-radius: var(--ktrz-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--ktrz-neutral);
    transition: transform var(--ktrz-transition);
}
.ktrz-guide-card:hover { transform: translateY(-5px); }
.ktrz-guide-img { width: 100%; height: 200px; object-fit: cover; }
.ktrz-guide-body { padding: 24px; }

.ktrz-article-kicker {
    font-family: ui-monospace, monospace;
    color: var(--ktrz-primary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: block;
}
.ktrz-read-time {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 24px;
    display: block;
}

.ktrz-legal-toc {
    background: var(--ktrz-surface);
    padding: 24px;
    border-radius: var(--ktrz-radius);
    margin-bottom: 40px;
    border: 1px solid var(--ktrz-neutral);
}
.ktrz-legal-toc ul { list-style: none; padding: 0; }
.ktrz-legal-toc a { color: var(--ktrz-text-dim); text-decoration: none; }
.ktrz-legal-toc a:hover { color: var(--ktrz-primary); }

.ktrz-legal-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ktrz-neutral);
}
.ktrz-legal-note {
    font-size: 0.9rem;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-left: 4px solid var(--ktrz-primary);
    margin: 24px 0;
}

.ktrz-form {
    display: grid;
    gap: 20px;
    max-width: 600px;
}
.ktrz-field { display: flex; flex-direction: column; gap: 8px; }
.ktrz-field label { font-weight: 500; font-size: 0.9rem; }
.ktrz-field input, .ktrz-field textarea {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--ktrz-neutral);
    background: var(--ktrz-bg);
    color: white;
    font-family: inherit;
    min-width: 0;
}
.ktrz-honey { display: none; }

.ktrz-footer {
    background: var(--ktrz-surface);
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid var(--ktrz-neutral);
}
.ktrz-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.ktrz-footer-col h4 { font-size: 1.1rem; color: var(--ktrz-primary); margin-bottom: 20px; }
.ktrz-footer-links { list-style: none; padding: 0; margin: 0; }
.ktrz-footer-links li { margin-bottom: 10px; }
.ktrz-footer-links a { color: var(--ktrz-text-dim); text-decoration: none; font-size: 0.9rem; transition: color var(--ktrz-transition); }
.ktrz-footer-links a:hover { color: var(--ktrz-text); }
.ktrz-footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--ktrz-neutral);
    font-size: 0.8rem;
    color: var(--ktrz-text-dim);
    text-align: center;
    line-height: 2;
}

.ktrz-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background: var(--ktrz-surface);
    border: 1px solid var(--ktrz-primary);
    border-radius: var(--ktrz-radius);
    padding: 32px;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    max-width: 600px;
    margin: 0 auto;
}
.ktrz-cookie-btns {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.ktrz-cookie-panel {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--ktrz-neutral);
    display: grid;
    gap: 12px;
}
.ktrz-cookie-cat {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.ktrz-badge {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 100px;
    height: 100px;
    z-index: 90;
    pointer-events: none;
}
.ktrz-badge svg {
    width: 100%;
    height: 100%;
    animation: ktrz-rotate 10s linear infinite;
}
@keyframes ktrz-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.ktrz-glow {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--ktrz-primary) 0%, transparent 70%);
    opacity: 0.15;
    filter: blur(60px);
    z-index: -1;
    animation: ktrz-glow-move 15s ease-in-out infinite alternate;
}
@keyframes ktrz-glow-move {
    0% { transform: translate(-10%, -10%); }
    100% { transform: translate(20%, 20%); }
}

.ktrz-figure { margin: 24px 0; text-align: center; }
.ktrz-figure img { max-width: 100%; height: auto; border-radius: var(--ktrz-radius); }

.ktrz-breadcrumbs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    font-size: 0.9rem;
    gap: 12px;
    color: var(--ktrz-text-dim);
}
.ktrz-breadcrumbs a { color: inherit; text-decoration: none; }
.ktrz-breadcrumbs a:hover { color: var(--ktrz-primary); }

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

:focus-visible { outline: 3px solid var(--ktrz-primary); outline-offset: 4px; }

/* сборка: защита от переполнения и служебные правила (промпт, разделы 6-7) */
[hidden]{display:none!important}
html,body{overflow-x:clip}
img,video{max-width:100%;height:auto}
:where(main,header,footer) :where(div,section,article,aside,ul,ol,li,figure,details,form,fieldset,nav){min-width:0}
:where(main,footer) :where(h1,h2,h3,h4,p,li,td,th,dd,dt,summary,figcaption,a){overflow-wrap:anywhere;word-break:normal;hyphens:auto}
.ktrz-table-wrap{overflow-x:auto;max-width:100%}
.ktrz-honey{position:absolute!important;left:auto!important;right:auto!important;top:auto!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;border:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;opacity:0!important}
:where(a){color:inherit;text-underline-offset:.2em}
:where(main) :where(section,article,div,li,figure){position:relative}
@media (max-width:479px){.ktrz-btn,:where(button,[type=submit],[type=button]){white-space:normal!important;max-width:100%;box-sizing:border-box}:where(input,select,textarea){max-width:100%!important;box-sizing:border-box}:where(header) :where(div,nav,ul,ol){column-gap:min(1rem,3vw)!important}:where(header) a.ktrz-btn:not([aria-controls]){display:none!important}}
@media (max-width:959px){html.js :where(#ktrz-menu):not(.ktrz-open){display:none!important}:where(header):has(#ktrz-menu){position:relative}:where(#ktrz-menu).ktrz-open{display:flex!important;flex-direction:column;align-items:stretch;gap:.25rem;position:absolute;left:0;right:0;top:100%;z-index:90;max-height:calc(100vh - 4rem);overflow-y:auto;padding:1rem clamp(16px,4vw,32px) 1.5rem;box-sizing:border-box;visibility:visible!important;opacity:1!important;transform:none!important;background:var(--ktrz-bg,Canvas);color:var(--ktrz-text,CanvasText);box-shadow:0 12px 24px rgb(0 0 0 / .25)}:where(#ktrz-menu).ktrz-open a{min-height:44px;display:flex;align-items:center}}
html:not(.js) #ktrz-menu{display:flex!important;flex-wrap:wrap;position:static!important;transform:none!important;visibility:visible!important;opacity:1!important}
.ktrz-sitemap ul{columns:2 16rem;padding-left:1.1rem}


/* сборка: прижать к краю - проверка ловила за краем экрана */
@media (max-width:1439px){.ktrz-service-num,.ktrz-btn{position:static!important;left:auto!important;right:auto!important;transform:none!important;margin-left:0!important;margin-right:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere}.ktrz-service-item{flex-wrap:wrap!important}}

/* сборка: контраст - текст был цвета фона */
.ktrz-btn.ktrz-btn-primary:not(:hover):not(:focus-visible){color:rgb(255 255 255)!important;-webkit-text-fill-color:rgb(255 255 255)!important}
.ktrz-glow:not(:hover):not(:focus-visible){color:rgb(186 170 165)!important;-webkit-text-fill-color:rgb(186 170 165)!important;opacity:1!important}
