:root {
    --black: #000;
    --paper: #f3f3f3;
    --panel: #3a3a3a;
    --bar: #003349;
    --yellow: #ffcc00;
    --gold: #d7b25e;
    --line: rgba(255, 255, 255, 0.14);
    --max: 1300px;
    --header-h: 108px;
    --header-h-sticky: 60px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: "Open Sans", "Segoe UI", sans-serif;
    color: #222;
    background-color: var(--paper);
    background-image: url("../images/paper.png");
    background-attachment: fixed;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
}
body.tone-dark { background: var(--panel); color: #f2f2f2; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.skip-link {
    position: absolute;
    left: 12px;
    top: -40px;
    background: #fff;
    color: #000;
    padding: 8px 12px;
    z-index: 100;
}
.skip-link:focus { top: 8px; }
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.site-header {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 110;
    transition: background-color .33s cubic-bezier(0.694, 0.0482, 0.335, 1);
}
.site-header.is-solid { background: #000; }
.header-bar {
    position: relative;
    max-width: 1300px;
    margin: 0 auto;
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 8px 22px;
    transition: min-height .33s cubic-bezier(0.694, 0.0482, 0.335, 1), padding .33s cubic-bezier(0.694, 0.0482, 0.335, 1);
}
.site-header.is-compact .header-bar {
    min-height: var(--header-h-sticky);
    padding-top: 5px;
    padding-bottom: 5px;
}
.logo { display: flex; align-items: center; margin-right: auto; position: relative; z-index: 2; }
.logo img, .custom-logo {
    height: 92px;
    width: auto;
    transition: height .33s cubic-bezier(0.694, 0.0482, 0.335, 1);
}
.site-header.is-compact .logo img,
.site-header.is-compact .custom-logo { height: 50px; }
.custom-logo-link { display: flex; }
.site-nav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-family: Montserrat, "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 12px;
}
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 #fff; }
.has-sub { position: relative; }
.site-nav .sub {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #111;
    padding: 8px 0;
    z-index: 30;
    flex-direction: column;
}
.site-nav .has-sub .has-sub > .sub { top: 0; left: 100%; }
.site-nav .has-sub:hover > .sub,
.site-nav .has-sub:focus-within > .sub { display: flex; }
.sub a { letter-spacing: 0.04em; text-transform: none; font-size: 14px; }
.sub a:hover { background: #222; }
.nav-toggle, .search-toggle {
    display: none;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
    padding: 6px 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}
.search-toggle { display: inline-block; position: relative; z-index: 2; }
.header-search {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 0 22px 14px;
    background: rgba(0, 0, 0, 0.5);
}
.header-search[hidden] { display: none; }
.header-search input[type="search"] { width: min(420px, 100%); padding: 8px 10px; }
.header-search button, .contact-form button, .sort-form select {
    background: #fff;
    color: #111;
    border: 0;
    padding: 8px 14px;
    cursor: pointer;
}

.hero { position: relative; background: #111; overflow: hidden; }
.hero-slides { position: relative; min-height: 320px; height: 56vw; max-height: 680px; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; overflow: hidden; }
.hero-slide.is-active { opacity: 1; }
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.2);
    transform-origin: center center;
}
.hero-slide.is-active img { animation: hero-zoom 3s linear forwards; }
.hero:hover .hero-slide.is-active img { animation-play-state: paused; }
@keyframes hero-zoom {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slide img { transform: none; }
    .hero-slide.is-active img { animation: none; }
}
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 64px;
    border: 0;
    background: rgba(0,0,0,.35);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}
.hero-prev { left: 8px; }
.hero-next { right: 8px; }

.home-downloads, .catalogue-page { padding: 36px 16px 64px; }
.catalogue-grid {
    max-width: var(--max);
    margin: 60px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.catalogue-grid a { display: block; position: relative; overflow: hidden; }
.catalogue-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .81);
    color: #fff;
    opacity: 0;
    transition: opacity .4s;
    pointer-events: none;
}
.catalogue-grid a:hover .catalogue-hover,
.catalogue-grid a:focus-visible .catalogue-hover { opacity: 1; }
.catalogue-grid img { width: 100%; height: auto; display: block; }
.home-downloads { padding-bottom: 128px; }
.download-bar {
    max-width: var(--max);
    margin: 0 auto 12px;
    background: var(--bar);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 14px 20px;
    flex-wrap: wrap;
}
.download-bar h2 { margin: 0; font-family: Montserrat, sans-serif; font-weight: 500; font-size: 32px; }
.download-bar.accent-yellow h2 { color: var(--yellow); }
.home-categories {
    max-width: var(--max);
    margin: 56px auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.home-categories a { display: block; overflow: hidden; }
.home-categories img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .35s ease;
}
.home-categories a:hover img { transform: scale(1.06); }

.download-bar a {
    color: #fff;
    text-decoration: none;
    background-color: transparent;
    border: 2px solid #fff;
    border-radius: 4px;
    padding: 6px 16px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 13px;
    font-family: Montserrat, sans-serif;
    transition: color 0.1s linear, background-color 0.1s linear, border-color 0.1s linear;
}
.download-bar a:hover,
.download-bar a:focus-visible {
    background-color: #de4039;
    border-color: #de4039;
    color: #fff;
}

.page-banner {
    min-height: calc(210px + var(--header-h));
    padding-top: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111 center/cover no-repeat;
    position: relative;
    text-align: center;
    color: #fff;
}
.page-banner::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.page-banner-inner { position: relative; z-index: 1; padding: 36px 16px; }
.page-banner h1 {
    margin: 0;
    font-family: Roboto, sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.1;
    text-transform: uppercase;
}
.breadcrumbs { margin-top: 10px; font-size: 16px; }
.breadcrumbs a { color: #fff; transition: color .2s ease; }

.catalog { max-width: 1300px; margin: 0 auto; padding: 28px 16px 60px; display: grid; grid-template-columns: 230px 1fr; gap: 28px; }
.catalog-sidebar-label { color: #e07a4a; letter-spacing: 0.08em; font-size: 20px; line-height: 1.25; font-weight: 700; white-space: nowrap; }
.catalog-sidebar ul { list-style: none; margin: 0; padding: 0; }
.catalog-sidebar a { color: #f3f3f3; text-decoration: none; display: inline-block; padding: 4px 0; transition: color .2s ease; }
.catalog-sidebar a.is-current { color: var(--yellow); }
.catalog-sidebar li li { padding-left: 16px; }
.catalog-sidebar span { color: #bbb; font-size: 13px; }
.catalog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.result-count { margin: 0; color: #ddd; }
.sort-form select { min-width: 180px; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.product-card a { text-decoration: none; color: #fff; display: block; text-align: center; }
.product-card-image { display: block; aspect-ratio: 1; overflow: hidden; }
.product-card-image img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; transition: opacity .3s ease-out; }
.product-card-title { display: block; padding: 10px 6px 16px; font-family: Montserrat, sans-serif; letter-spacing: 0.04em; transition: color .3s ease-out; }
.product-card a:hover .product-card-image img,
.product-card a:focus-visible .product-card-image img { opacity: .2; }
.product-card a:hover .product-card-title,
.product-card a:focus-visible .product-card-title { color: #de4039; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.pagination a, .pagination span { color: #fff; text-decoration: none; padding: 6px 10px; border: 1px solid rgba(255,255,255,.3); }
.pagination .current { background: #fff; color: #111; }

.product-single, .related {
    max-width: 1100px;
    margin: 0 auto;
    padding: 34px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}
.related { display: block; }
.related h2, .product-title, .spec-heading { font-family: Montserrat, sans-serif; font-weight: 600; }
.product-main-image { width: 100%; background: #fff; aspect-ratio: 1; object-fit: contain; }
.product-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.product-thumbs button { width: 72px; height: 72px; padding: 0; border: 1px solid #777; background: #fff; cursor: pointer; }
.product-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.manual-button {
    display: inline-block;
    background: linear-gradient(#f3d78a, #c6a04b);
    color: #3d2c04;
    text-decoration: none;
    border-radius: 20px;
    padding: 8px 18px;
    font-weight: 700;
}
.product-meta-line a { color: #fff; transition: color .2s ease; }
.product-meta-line a:hover,
.product-meta-line a:focus-visible,
.catalog-sidebar a:hover,
.catalog-sidebar a:focus-visible,
.breadcrumbs a:hover,
.breadcrumbs a:focus-visible { color: #de4039; }
.spec-heading {
    margin: 22px 0 0;
    background: #6d6d6d;
    text-align: center;
    letter-spacing: 0.12em;
    font-size: 14px;
    padding: 10px;
}
.spec-table { margin: 0; }
.spec-table div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.spec-table dt { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 13px; }
.spec-table dd { margin: 0; }
.product-video a { color: var(--yellow); }

.history { max-width: 860px; margin: 0 auto; padding: 40px 18px 70px; }
.history-photo { display: block; width: 100%; height: auto; margin: 0 0 32px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--gold); }
.timeline li { padding: 0 0 28px 22px; position: relative; }
.timeline li::before {
    content: "";
    width: 12px; height: 12px;
    background: var(--gold);
    border-radius: 50%;
    position: absolute;
    left: -25px; top: 6px;
}
.timeline h2 { margin: 0 0 8px; color: var(--yellow); font-family: Montserrat, sans-serif; }

.album-index, .album { max-width: 1300px; margin: 0 auto; padding: 32px 16px 70px; }
.album-grid-index, .photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.album-card { text-decoration: none; color: #fff; background: #2c2c2c; display: block; }
.album-card-image { display: block; aspect-ratio: 16/10; overflow: hidden; background: #111; }
.album-card-image img, .photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.album-card-title, .album-card-label { display: block; text-align: center; padding: 8px 10px 0; font-family: Montserrat, sans-serif; letter-spacing: 0.06em; }
.album-card-label { padding-bottom: 14px; color: #bbb; font-size: 13px; }
.photo-thumb { padding: 0; border: 0; background: #111; cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1100px, 86vw); max-height: 86vh; object-fit: contain; }
.lightbox button {
    position: absolute;
    background: transparent;
    color: #fff;
    border: 0;
    font-size: 42px;
    cursor: pointer;
    line-height: 1;
}
.lightbox-close { top: 12px; right: 18px; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

.contact-page { max-width: 1200px; margin: 0 auto; padding: 36px 16px 70px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-form fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.contact-form label, .contact-form legend { display: block; margin-bottom: 6px; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; padding: 8px; border: 0; }
.contact-form button { background: #111; color: #fff; border: 0; padding: 10px 22px; cursor: pointer; }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-field { position: absolute; left: -9999px; }
.form-note { background: #e8f6ea; color: #135c24; padding: 10px 12px; }
.form-note-error { background: #fde8e8; color: #8a1f1f; }
.plain-page { max-width: 860px; margin: 0 auto; padding: 40px 16px 70px; }
.empty-note { padding: 20px 0; }

.site-footer {
    background: #0d0d0d;
    color: #818181;
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 20px;
}
.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 28px 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}
.footer-contact { grid-column: 1; justify-self: start; text-align: left; }
.footer-contact p { margin: 0; }
.footer-contact a { color: inherit; text-decoration: none; transition: color .2s ease-in-out; }
.footer-contact a:hover, .footer-contact a:focus-visible { color: #fff; }
.footer-brand { grid-column: 2; text-align: center; }
.footer-brand img, .footer-brand .custom-logo { height: 72px; width: auto; }
.footer-brand p { margin: 12px 0 0; }

.kwc-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }

@media (max-width: 900px) {
    .nav-toggle { display: inline-block; }
    .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; transform: none; background: #111; padding: 8px 0 16px; }
    .site-header.is-compact .site-nav { top: var(--header-h-sticky); }
    .site-nav.is-open { display: block; }
    .site-nav.is-open ul { display: flex; flex-direction: column; }
    .site-nav.is-open .sub,
    .site-nav.is-open .has-sub .has-sub > .sub { display: flex; position: static; min-width: 0; background: transparent; }
    .site-nav .sub a { padding-left: 28px; }
    .catalog, .product-single, .contact-page, .footer-inner { grid-template-columns: 1fr; }
    .footer-contact, .footer-brand { grid-column: auto; }
    .product-grid, .album-grid-index, .photo-grid, .catalogue-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .product-grid, .album-grid-index, .photo-grid, .name-row, .kwc-spec-grid, .home-categories, .catalogue-grid { grid-template-columns: 1fr; }
    .download-bar h2 { font-size: 22px; }
    :root { --header-h: 88px; }
    .logo img, .custom-logo { height: 72px; }
    .site-header.is-compact .logo img,
    .site-header.is-compact .custom-logo { height: 50px; }
}
