/* 
Art Direction 2026: Mustard Cold Light
Palette: Primary oklch(75% 0.15 95), BG oklch(98% 0.01 190), Neutral oklch(92% 0.02 190), Dark oklch(25% 0.04 190)
Typography: Headings - Iowan Old Style, Palatino, Georgia, serif; Body - system-ui, -apple-system, sans-serif
Composition: Service marquee ribbons & full-width typographic bands, editorial density
Form: Soft corners 6-10px, precise linear structure
Animation: Slow rotation of the circular SVG badge, smooth section fade-ins
*/

:root {
    --klhg-primary: oklch(75% 0.15 95);
    --klhg-bg: oklch(98% 0.01 190);
    --klhg-neutral: oklch(92% 0.02 190);
    --klhg-dark: oklch(25% 0.04 190);
    --klhg-text: oklch(30% 0.02 190);
    --klhg-radius: 8px;
    --klhg-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --klhg-container: 1240px;
}

html, body { overflow-x: clip; margin: 0; padding: 0; background: var(--klhg-bg); color: var(--klhg-text); scroll-behavior: smooth; }
[hidden] { display: none !important; }

body { 
    font-family: system-ui, -apple-system, sans-serif; 
    line-height: 1.8; 
    -webkit-font-smoothing: antialiased; 
}

h1, h2, h3, h4 { 
    font-family: "Iowan Old Style", Palatino, Georgia, serif; 
    line-height: 1.2; 
    margin: 0; 
    color: var(--klhg-dark);
    overflow-wrap: anywhere;
}

.klhg-container { 
    max-width: var(--klhg-container); 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%; 
    box-sizing: border-box; 
}

/* Accessibility */
.klhg-skip-link { 
    position: absolute; top: -100px; left: 0; background: var(--klhg-primary); 
    color: var(--klhg-dark); padding: 10px; z-index: 1000; transition: top 0.2s; 
}
.klhg-skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--klhg-primary); outline-offset: 2px; }

/* Topbar */
.klhg-topbar { 
    background: var(--klhg-neutral); 
    font-size: 0.85rem; 
    padding: 8px 0; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}
.klhg-topbar-flex { 
    display: flex; justify-content: space-between; align-items: center; 
    flex-wrap: wrap; gap: 10px; 
}

/* Header & Nav */
.klhg-header { 
    padding: 20px 0; 
    background: var(--klhg-bg); 
    position: sticky; top: 0; z-index: 100; 
}
.klhg-header-flex { 
    display: flex; justify-content: space-between; align-items: center; 
}
.klhg-logo { 
    display: flex; flex-direction: column; text-decoration: none; color: var(--klhg-dark); 
}
.klhg-logo-brand { font-family: serif; font-size: clamp(1.5rem, 5vw, 2rem); font-weight: bold; line-height: 1; }
.klhg-logo-domain { font-size: 0.7rem; opacity: 0.6; text-transform: lowercase; }

.klhg-nav-list { 
    display: flex; gap: 25px; list-style: none; margin: 0; padding: 0; 
}
.klhg-nav-link { 
    text-decoration: none; color: var(--klhg-text); font-size: 0.95rem; 
    position: relative; transition: var(--klhg-transition); 
}
.klhg-nav-link:hover { color: var(--klhg-primary); }
.klhg-nav-link::after { 
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; 
    background: var(--klhg-primary); transition: var(--klhg-transition); 
}
.klhg-nav-link:hover::after { width: 100%; }

.klhg-lang-switch { display: flex; align-items: center; gap: 10px; margin-right: 20px; }
.klhg-lang-link { text-decoration: none; font-weight: bold; color: var(--klhg-dark); font-size: 0.9rem; }

.klhg-btn { 
    display: inline-flex; align-items: center; justify-content: center; 
    padding: 12px 24px; border-radius: var(--klhg-radius); text-decoration: none; 
    font-weight: 600; transition: var(--klhg-transition); cursor: pointer; border: none; 
}
.klhg-btn-primary { background: var(--klhg-primary); color: var(--klhg-dark); }
.klhg-btn-primary:hover { filter: brightness(0.9); transform: translateY(-1px); }

.klhg-menu-toggle { 
    display: none; background: none; border: none; cursor: pointer; padding: 10px; 
}

/* Mobile Menu Logic */
@media (max-width: 959px) {
    .klhg-menu-toggle { display: block; }
    #klhg-menu { 
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh; 
        background: var(--klhg-bg); z-index: 200; transition: right 0.3s ease; 
        padding: 80px 40px; box-shadow: -10px 0 30px rgba(0,0,0,0.1); 
    }
    .klhg-nav-list { flex-direction: column; gap: 30px; }
    #klhg-menu.klhg-open { right: 0; }
}
html:not(.js) #klhg-menu { display: block; position: static; box-shadow: none; padding: 0; }

/* Hero & Typography Bands */
.klhg-hero { padding: 80px 0; text-align: center; }
.klhg-hero-h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); margin-bottom: 20px; }
.klhg-lead { font-size: clamp(1.1rem, 3vw, 1.4rem); max-width: 700px; margin: 0 auto 40px; opacity: 0.8; }

.klhg-band { 
    background: var(--klhg-dark); color: var(--klhg-bg); 
    padding: 60px 0; overflow: hidden; white-space: nowrap; 
}
.klhg-band-text { 
    font-family: serif; font-size: clamp(3rem, 10vw, 7rem); 
    font-weight: bold; text-transform: uppercase; opacity: 0.2; line-height: 1; 
}

/* Marquee */
.klhg-marquee { 
    background: var(--klhg-primary); color: var(--klhg-dark); 
    padding: 15px 0; overflow: hidden; position: relative; 
}
.klhg-marquee-track { 
    display: flex; gap: 50px; animation: klhg-scroll 30s linear infinite; 
    width: max-content; font-weight: 600; font-size: 1.1rem; 
}
@keyframes klhg-scroll { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(-50%); } 
}

/* Facts & Services */
.klhg-facts-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr)); 
    gap: 20px; margin: 40px 0; 
}
.klhg-fact-card { 
    background: var(--klhg-neutral); padding: 30px; border-radius: var(--klhg-radius); 
    text-align: center; transition: var(--klhg-transition); 
}
.klhg-fact-card:hover { transform: translateY(-5px); background: #fff; }
.klhg-fact-val { display: block; font-family: serif; font-size: 2.5rem; color: var(--klhg-dark); font-weight: bold; }
.klhg-fact-lbl { font-size: 0.9rem; opacity: 0.7; }

.klhg-services-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr)); 
    gap: 30px; margin: 60px 0; 
}
.klhg-service-item { 
    padding: 30px; border: 1px solid var(--klhg-neutral); border-radius: var(--klhg-radius); 
    transition: var(--klhg-transition); cursor: pointer; 
}
.klhg-service-item:hover { border-color: var(--klhg-primary); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.klhg-service-num { 
    font-family: serif; font-size: 1.5rem; color: var(--klhg-primary); 
    display: block; margin-bottom: 10px; 
}

/* Process & Content */
.klhg-process { display: grid; gap: 20px; margin: 60px 0; }
.klhg-step { 
    display: flex; gap: 20px; padding: 20px; border-radius: var(--klhg-radius); 
    background: var(--klhg-bg); border-left: 4px solid var(--klhg-primary); 
}
.klhg-step-num { font-weight: bold; min-width: 30px; }

.klhg-prose { max-width: 800px; margin: 0 auto; }
.klhg-prose p { margin-bottom: 1.5rem; }
.klhg-prose h2 { margin: 2rem 0 1rem; }

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

/* FAQ */
.klhg-faq-group { margin-bottom: 40px; }
.klhg-faq-group h3 { margin-bottom: 20px; }
details.klhg-faq-item { 
    background: var(--klhg-neutral); margin-bottom: 10px; border-radius: var(--klhg-radius); 
}
summary.klhg-faq-summary { 
    padding: 15px; cursor: pointer; font-weight: 600; list-style: none; 
    display: flex; justify-content: space-between; align-items: center; 
}
summary.klhg-faq-summary::after { content: '+'; font-size: 1.2rem; }
details[open] summary.klhg-faq-summary::after { content: '−'; }
.klhg-faq-content { padding: 0 15px 15px; opacity: 0.8; }

/* Guides */
.klhg-guides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px,100%), 1fr)); gap: 20px; }
.klhg-guide-card { 
    text-decoration: none; color: inherit; padding: 20px; border-radius: var(--klhg-radius); 
    background: var(--klhg-neutral); transition: var(--klhg-transition); 
}
.klhg-guide-card:hover { background: #fff; transform: scale(1.02); }
.klhg-guide-kicker { font-size: 0.75rem; text-transform: uppercase; color: var(--klhg-primary); font-weight: bold; }
.klhg-guide-meta { font-size: 0.8rem; opacity: 0.6; display: block; margin-bottom: 10px; }

/* Legal */
.klhg-legal-toc { background: var(--klhg-neutral); padding: 20px; border-radius: var(--klhg-radius); margin-bottom: 30px; }
.klhg-legal-toc ul { list-style: none; padding: 0; }
.klhg-legal-toc a { color: var(--klhg-dark); text-decoration: none; font-size: 0.9rem; }
.klhg-legal-art { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--klhg-neutral); }
.klhg-legal-note { font-size: 0.85rem; opacity: 0.7; margin-top: 20px; border-left: 3px solid var(--klhg-primary); padding-left: 15px; }

/* Form */
.klhg-form { max-width: 600px; margin: 0 auto; display: grid; gap: 20px; }
.klhg-form-group { display: flex; flex-direction: column; gap: 8px; }
.klhg-form-label { font-weight: 600; font-size: 0.9rem; }
.klhg-form-input { 
    padding: 12px; border-radius: var(--klhg-radius); border: 1px solid var(--klhg-neutral); 
    font-family: inherit; width: 100%; box-sizing: border-box; 
}
.klhg-form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; }
.klhg-honey { position: absolute; left: -9999px; }

/* Footer */
.klhg-footer { 
    background: var(--klhg-dark); color: var(--klhg-bg); padding: 60px 0 30px; 
    font-size: 0.9rem; 
}
.klhg-footer-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px,100%), 1fr)); 
    gap: 40px; margin-bottom: 40px; 
}
.klhg-footer-col h4 { color: var(--klhg-bg); margin-bottom: 20px; font-size: 1.1rem; }
.klhg-footer-col ul { list-style: none; padding: 0; margin: 0; }
.klhg-footer-col li { margin-bottom: 10px; }
.klhg-footer-col a { color: var(--klhg-bg); text-decoration: none; opacity: 0.7; transition: var(--klhg-transition); }
.klhg-footer-col a:hover { opacity: 1; }
.klhg-footer-bottom { 
    border-top: 1px solid rgba(255,255,255,0.1); padding-top: 30px; 
    display: flex; flex-direction: column; gap: 15px; align-items: center; text-align: center; 
    font-size: 0.8rem; opacity: 0.6; 
}

/* Cookie Banner */
.klhg-cookie-banner { 
    position: fixed; bottom: 20px; left: 20px; right: 20px; z-index: 1000; 
    background: var(--klhg-bg); border: 1px solid var(--klhg-neutral); 
    border-radius: var(--klhg-radius); padding: 25px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); 
    max-width: 600px; margin: 0 auto; 
}
.klhg-cookie-flex { display: flex; flex-direction: column; gap: 20px; }
.klhg-cookie-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px,100%), 1fr)); gap: 10px; }
.klhg-cookie-panel { 
    display: grid; gap: 15px; margin-top: 20px; padding-top: 20px; 
    border-top: 1px solid var(--klhg-neutral); 
}
.klhg-cookie-cat { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; }

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

/* Utilities */
.klhg-figure { margin: 2rem 0; text-align: center; }
.klhg-figure img { max-width: 100%; height: auto; border-radius: var(--klhg-radius); }
.klhg-breadcrumbs { display: flex; gap: 10px; font-size: 0.85rem; margin-bottom: 20px; opacity: 0.7; }
.klhg-breadcrumbs a { color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    *, ::before, ::after { animation-delay: -1ms !important; animation-duration: 1ms !important; transition-duration: 0s !important; }
    .klhg-marquee-track { animation: none; overflow-x: auto; }
}

/* 320px Safety */
img, video, canvas, svg { max-width: 100%; height: auto; }
.klhg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
h1, h2, h3, h4, p, li { overflow-wrap: anywhere; word-break: normal; hyphens: auto; }
.klhg-container { min-width: 0; }
.klhg-topbar-flex, .klhg-header-flex { min-width: 0; }

/* сборка: защита от переполнения и служебные правила (промпт, разделы 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}
.klhg-table-wrap{overflow-x:auto;max-width:100%}
.klhg-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){.klhg-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.klhg-btn:not([aria-controls]){display:none!important}}
@media (max-width:959px){html.js :where(#klhg-menu):not(.klhg-open){display:none!important}:where(header):has(#klhg-menu){position:relative}:where(#klhg-menu).klhg-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(--klhg-bg,Canvas);color:var(--klhg-text,CanvasText);box-shadow:0 12px 24px rgb(0 0 0 / .25)}:where(#klhg-menu).klhg-open a{min-height:44px;display:flex;align-items:center}}
html:not(.js) #klhg-menu{display:flex!important;flex-wrap:wrap;position:static!important;transform:none!important;visibility:visible!important;opacity:1!important}
.klhg-sitemap ul{columns:2 16rem;padding-left:1.1rem}


/* сборка: контраст - текст был цвета фона */
.klhg-band > .klhg-container > .klhg-band-text:not(:hover):not(:focus-visible){color:rgb(241 251 250)!important;-webkit-text-fill-color:rgb(241 251 250)!important;opacity:1!important}
.klhg-guide-card > .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
.klhg-band > .klhg-band-text:not(:hover):not(:focus-visible){color:rgb(241 251 250)!important;-webkit-text-fill-color:rgb(241 251 250)!important;opacity:1!important}
.klhg-band > .klhg-container > .klhg-band-text > p:not(:hover):not(:focus-visible){color:rgb(255 255 255)!important;-webkit-text-fill-color:rgb(255 255 255)!important}
.klhg-band-text > p:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
.klhg-btn.klhg-btn-primary:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
html[data-klhg-page="seihon-erabikata"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
html[data-klhg-page="en-choosing-binding"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(17 17 17)!important;-webkit-text-fill-color:rgb(17 17 17)!important}
html[data-klhg-page="koshu-hozon"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
html[data-klhg-page="seihon-ryokin"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
html[data-klhg-page="kazoku-arubamu"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
html[data-klhg-page="en-book-storage-guide"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
html[data-klhg-page="en-binding-pricing"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
html[data-klhg-page="en-family-album-guide"] .klhg-guide-kicker:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important}
.klhg-band-text:not(:hover):not(:focus-visible){color:rgb(34 49 48)!important;-webkit-text-fill-color:rgb(34 49 48)!important;opacity:1!important}
