/* 
Art Direction 2026: Editorial Asymmetry
Palette: Sea Wave OKLCH (Primary: oklch(60% 0.12 190)), high contrast light/dark sections.
Typography: Serif for headings (Iowan, Georgia), System Sans for body.
Composition: Editorial grid with narrow left captions and wide content.
Form: Sharp edges, 1px hair-lines, no border-radius.
Animation: Slow continuous rotation of the circular SVG badge.
Rhythm: Bold saturated hero/footer, stark white/off-white body.
*/
:root {
    --btwm-brand: oklch(60% 0.12 190);
    --btwm-brand-dark: oklch(45% 0.12 190);
    --btwm-brand-light: oklch(92% 0.03 190);
    --btwm-bg-light: oklch(98% 0.01 190);
    --btwm-bg-dark: oklch(25% 0.05 190);
    --btwm-text-main: oklch(30% 0.02 0);
    --btwm-text-light: oklch(98% 0.01 0);
    --btwm-accent: oklch(70% 0.15 190);
    --btwm-border: oklch(70% 0.02 0);
    --btwm-font-serif: "Iowan Old Style", "Palatino", "Georgia", serif;
    --btwm-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body { overflow-x: clip; scroll-behavior: smooth; }
[hidden] { display: none !important; }

body { 
    margin: 0; padding: 0; 
    font-family: var(--btwm-font-sans); 
    color: var(--btwm-text-main); 
    background-color: var(--btwm-bg-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* Typography & Base */
h1, h2, h3, h4 { 
    font-family: var(--btwm-font-serif); 
    line-height: 1.15; 
    margin: 0 0 1rem 0; 
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: normal;
    hyphens: auto;
}
h1 { font-size: clamp(2.2rem, 8vw, 4rem); }
h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
p { margin-bottom: 1.5rem; overflow-wrap: anywhere; }

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

/* Accessibility */
.btwm-skip-link {
    position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.btwm-skip-link:focus {
    position: fixed; left: 0; top: 0; width: auto; height: auto; 
    padding: 1rem; background: var(--btwm-brand); color: white; z-index: 1000;
}
:focus-visible { outline: 2px solid var(--btwm-brand); outline-offset: 4px; }

/* Topbar & Header */
.btwm-topbar {
    background: var(--btwm-bg-light);
    border-bottom: 1px solid var(--btwm-border);
    font-size: 0.85rem;
    padding: 8px 0;
}
.btwm-topbar-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.btwm-topbar-left, .btwm-topbar-right {
    display: flex; gap: 15px; align-items: center;
}

.btwm-header {
    padding: 20px 0;
    background: var(--btwm-bg-light);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid var(--btwm-border);
}
.btwm-header-inner {
    display: flex; justify-content: space-between; align-items: center;
}
.btwm-logo {
    display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.btwm-logo-brand { 
    font-family: var(--btwm-font-serif); 
    font-size: 1.5rem; 
    font-weight: 600; 
    text-decoration: none;
}
.btwm-logo-domain { 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    opacity: 0.6;
}

.btwm-nav {
    display: flex; align-items: center; gap: 30px;
}
.btwm-nav-list {
    display: flex; list-style: none; margin: 0; padding: 0; gap: 20px;
}
.btwm-nav-link {
    text-decoration: none; color: inherit; font-size: 0.9rem; 
    transition: color 0.2s; border-bottom: 1px solid transparent;
}
.btwm-nav-link:hover { color: var(--btwm-brand); border-bottom-color: var(--btwm-brand); }

.btwm-lang-switch {
    display: flex; gap: 10px; font-size: 0.8rem;
}
.btwm-lang-link {
    text-decoration: none; color: inherit; font-weight: 600;
}

.btwm-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border: 1px solid var(--btwm-brand);
    text-decoration: none; font-weight: 600; font-size: 0.9rem;
    transition: all 0.3s; background: transparent; color: var(--btwm-brand);
    cursor: pointer;
}
.btwm-btn-primary { background: var(--btwm-brand); color: white; }
.btwm-btn-primary:hover { background: var(--btwm-brand-dark); border-color: var(--btwm-brand-dark); }
.btwm-btn:not(.btwm-btn-primary):hover { background: var(--btwm-brand-light); }

.btwm-menu-toggle {
    display: none; background: none; border: 1px solid var(--btwm-border);
    padding: 8px 12px; cursor: pointer; font-family: inherit;
}

/* Hero Section */
.btwm-hero {
    background: var(--btwm-brand);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.btwm-hero-inner {
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.btwm-hero-content h1 { color: white; margin-bottom: 20px; }
.btwm-hero-lead { 
    font-size: clamp(1.1rem, 3vw, 1.4rem); 
    opacity: 0.9; 
    margin-bottom: 30px; 
}

/* Editorial Layout */
.btwm-editorial-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 60px;
    margin: 80px 0;
}
.btwm-editorial-caption {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--btwm-brand);
    border-left: 1px solid var(--btwm-brand);
    padding-left: 15px;
    position: sticky; top: 120px;
}
.btwm-editorial-content {
    font-size: 1.1rem;
}

/* Facts Block */
.btwm-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 60px 0;
}
.btwm-fact-card {
    border: 1px solid var(--btwm-border);
    padding: 30px;
    position: relative;
}
.btwm-fact-value {
    font-family: var(--btwm-font-serif);
    font-size: 2.5rem;
    display: block;
    color: var(--btwm-brand);
}
.btwm-fact-label { font-size: 0.9rem; opacity: 0.7; }

/* Services List */
.btwm-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background: var(--btwm-border);
    border: 1px solid var(--btwm-border);
}
.btwm-service-item {
    background: var(--btwm-bg-light);
    padding: 40px;
    transition: background 0.3s;
    display: flex; flex-direction: column;
}
.btwm-service-item:hover { background: var(--btwm-brand-light); }
.btwm-service-num {
    font-family: var(--btwm-font-serif);
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

/* Tables */
.btwm-table-wrap { overflow-x: auto; margin: 30px 0; border: 1px solid var(--btwm-border); }
.btwm-table {
    width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem;
}
.btwm-table th, .btwm-table td {
    padding: 15px; border-bottom: 1px solid var(--btwm-border);
}
.btwm-table th { background: var(--btwm-brand-light); font-weight: 600; }

/* FAQ */
.btwm-faq-group { margin-bottom: 40px; }
.btwm-faq-group h3 { margin-bottom: 20px; }
.btwm-faq-item { border-bottom: 1px solid var(--btwm-border); }
.btwm-faq-item summary {
    padding: 20px 0; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600;
}
.btwm-faq-item summary::-webkit-details-marker { display: none; }
.btwm-faq-item p { padding: 0 0 20px 0; opacity: 0.8; }

/* Legal Pages */
.btwm-prose { max-width: 800px; margin: 0 auto; }
.btwm-toc { 
    border: 1px solid var(--btwm-border); padding: 20px; 
    margin-bottom: 40px; font-size: 0.9rem;
}
.btwm-toc ul { list-style: none; padding: 0; }
.btwm-toc a { color: var(--btwm-brand); text-decoration: none; }
.btwm-legal-note { 
    font-size: 0.8rem; padding: 15px; 
    background: var(--btwm-brand-light); margin-bottom: 30px; 
}

/* Form */
.btwm-form {
    display: grid; gap: 20px; max-width: 600px; margin: 0 auto;
}
.btwm-form-group { display: flex; flex-direction: column; gap: 8px; }
.btwm-form-label { font-size: 0.9rem; font-weight: 600; }
.btwm-form-input {
    padding: 12px; border: 1px solid var(--btwm-border);
    font-family: inherit; font-size: 1rem;
}
.btwm-honey { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

/* Footer */
.btwm-footer {
    background: var(--btwm-brand);
    color: white;
    padding: 80px 0 40px 0;
}
.btwm-footer-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px; margin-bottom: 60px;
}
.btwm-footer-col h4 { color: white; font-size: 1rem; margin-bottom: 20px; }
.btwm-footer-links { list-style: none; padding: 0; margin: 0; }
.btwm-footer-links a {
    color: white; text-decoration: none; font-size: 0.85rem;
    display: block; margin-bottom: 10px; opacity: 0.8; transition: opacity 0.2s;
}
.btwm-footer-links a:hover { opacity: 1; }
.btwm-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 40px; font-size: 0.75rem; opacity: 0.7; line-height: 1.8;
}

/* Cookie Banner */
.btwm-cookie {
    position: fixed; bottom: 20px; left: 20px; right: 20px;
    background: white; border: 1px solid var(--btwm-border);
    padding: 30px; z-index: 1000; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.btwm-cookie-inner { max-width: 800px; margin: 0 auto; }
.btwm-cookie-btns {
    display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap;
}
.btwm-cookie-panel {
    margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--btwm-border);
}
.btwm-cookie-cat {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
    font-size: 0.9rem; cursor: pointer;
}

/* Elements */
.btwm-badge {
    width: 120px; height: 120px;
    position: relative; animation: btwm-rotate 20s linear infinite;
}
@keyframes btwm-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.btwm-light-accent {
    position: absolute; width: 40vw; height: 40vw;
    background: radial-gradient(circle, var(--btwm-brand-light) 0%, transparent 70%);
    z-index: -1; pointer-events: none; opacity: 0.5;
}

/* Mobile Adaptivity */
@media (max-width: 959px) {
    .btwm-menu-toggle { display: block; }
    .btwm-nav {
        position: fixed; top: 0; right: 0; bottom: 0; left: 0;
        background: white; padding: 80px 40px; flex-direction: column;
        transform: translateX(100%); transition: transform 0.3s ease;
        z-index: 99;
    }
    .btwm-nav.btwm-open { transform: translateX(0); }
    .btwm-nav-list { flex-direction: column; align-items: center; text-align: center; }
    .btwm-header-inner { position: relative; }
    .btwm-editorial-grid { grid-template-columns: 1fr; gap: 20px; }
    .btwm-editorial-caption { position: static; border-left: none; border-bottom: 1px solid var(--btwm-brand); padding-bottom: 10px; }
    .btwm-hero-inner { grid-template-columns: 1fr; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* сборка: защита от переполнения и служебные правила (промпт, разделы 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}
.btwm-table-wrap{overflow-x:auto;max-width:100%}
.btwm-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:959px){html.js :where(#btwm-menu):not(.btwm-open){display:none!important}:where(header):has(#btwm-menu){position:relative}:where(#btwm-menu).btwm-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(--btwm-bg,Canvas);color:var(--btwm-text,CanvasText);box-shadow:0 12px 24px rgb(0 0 0 / .25)}:where(#btwm-menu).btwm-open a{min-height:44px;display:flex;align-items:center}}
html:not(.js) #btwm-menu{display:flex!important;flex-wrap:wrap;position:static!important;transform:none!important;visibility:visible!important;opacity:1!important}
.btwm-breadcrumbs{font-size:.875rem;padding-block:1rem}.btwm-breadcrumbs ol{display:flex;flex-wrap:wrap;gap:.25rem .5rem;list-style:none;margin:0;padding:0}.btwm-breadcrumbs li+li::before{content:"/";margin-right:.5rem;opacity:.5}
.btwm-figure{margin:2rem 0}.btwm-figure img{display:block;width:100%;height:auto}
.btwm-sitemap ul{columns:2 16rem;padding-left:1.1rem}

