/*
Theme Name: Optimax Katalog
Description: Lightweight, cookie-free catalogue theme for Optimax GmbH. System fonts, no external requests, no JavaScript framework.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: optimax
*/

:root {
	--r: #a32a3a;
	--r-hover: #8b2131;
	--b: #2f8fd8;
	--b-soft: #42a0e8;
	--t: #14181f;
	--m: #5d6673;
	--l: #e4e8ee;
	--g: #f3f5f8;
	--bg: #ffffff;
	--card: #f3f5f8;
	--card-hover: #ffffff;
	--dark: #14181f;
	--wrap: 1200px;
	color-scheme: light;
}
:root[data-theme="dark"] {
	--r: #d9566a;
	--r-hover: #e86b7e;
	--b: #5ab0f0;
	--t: #e8ecf1;
	--m: #9ba5b2;
	--l: #2a313b;
	--g: #171b21;
	--bg: #0f1216;
	--card: #171b21;
	--card-hover: #1d222a;
	--dark: #1d232b;
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
body * { min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { color: var(--t); background: var(--bg); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--b); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.1; overflow-wrap: break-word; }
.card h3, .prose h2, .prose h3 { hyphens: auto; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--r); color: #fff; padding: 10px 16px; font-weight: 700; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--l); background: var(--bg); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 20px; }
.site-header .logo img { height: 38px; width: auto; }
/* two logo files in the same spot: only the visible one changes, nothing shifts */
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; padding: 0; display: flex; gap: 26px; }
.main-nav a { font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav .current_page_item > a { color: var(--r); border-color: var(--r); }
.tools { display: flex; align-items: center; gap: 8px; }
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-weight: 700; font-size: 13px; border: 1px solid var(--l); border-radius: 4px; }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { border-color: var(--r); color: var(--r); }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 6px); list-style: none; padding: 6px; margin: 0; background: var(--bg); border: 1px solid var(--l); border-top: 3px solid var(--r); min-width: 190px; z-index: 30; box-shadow: 0 14px 34px #0b234022; }
.lang-switch li a { display: flex; gap: 10px; padding: 8px 10px; font-size: 14px; }
.lang-switch li a b { color: var(--r); width: 24px; font-size: 12px; padding-top: 2px; }
.lang-switch li a:hover, .lang-switch li a[aria-current] { background: var(--g); }
.theme-toggle { background: none; border: 1px solid var(--l); border-radius: 4px; color: var(--t); padding: 8px; cursor: pointer; display: flex; line-height: 0; }
.theme-toggle:hover { border-color: var(--r); color: var(--r); }
.theme-toggle .icon-sun, :root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: 14px 8px; }
.nav-toggle-label span:first-child, .nav-toggle-label span:first-child::before, .nav-toggle-label span:first-child::after { display: block; width: 24px; height: 2px; background: var(--t); position: relative; content: ""; }
.nav-toggle-label span:first-child::before { position: absolute; top: -7px; }
.nav-toggle-label span:first-child::after { position: absolute; top: 7px; }

/* ---------- shared ---------- */
.tag { display: inline-block; color: var(--r); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; }
.tag-b { color: var(--b-soft); }
.lead { color: var(--m); font-size: 18px; max-width: 640px; }
.section { padding: 90px 0; }
.section.tight { padding-top: 0; }
.section h2, .cat-block h2 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.02em; margin: 10px 0 12px; }
.section .lead, .cat-block .lead { margin-bottom: 36px; }
.btns { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn { display: inline-flex; gap: 8px; align-items: center; padding: 12px 20px; font-weight: 700; border-radius: 4px; border: 2px solid transparent; }
.btn-r { background: var(--r); color: #fff; }
.btn-r:hover { background: var(--r-hover); }
.btn-b { background: var(--b); color: #fff; }
.btn-ghost { border-color: var(--t); }
.btn-ghost:hover { border-color: var(--r); color: var(--r); }
.more-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 24px; color: var(--r); font-weight: 700; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, var(--g), var(--bg)); padding: 64px 0 40px; overflow: hidden; }
.hero > .wrap:first-child { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.04; letter-spacing: -.025em; margin: 16px 0 18px; font-weight: 850; }
.hero h1 em { font-style: normal; color: var(--b); }
.stage { position: relative; aspect-ratio: 1 / 1; }
.stage::before { content: ""; position: absolute; inset: 6% 4% 4% 10%; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6fb8ef, #42a0e8 60%, #1f6fb0); }
.stage img { position: absolute; filter: drop-shadow(0 24px 30px #0b234055); }
.stage .i1 { width: 62%; left: 2%; top: 18%; }
.stage .i2 { width: 44%; right: 0; top: 4%; }
.stage .i3 { width: 46%; right: 4%; bottom: 2%; }
.stats { border-top: 1px solid var(--l); border-bottom: 1px solid var(--l); margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr); }
.stats > div { padding: 24px 0; }
.stats b { display: block; font-size: 30px; color: var(--r); line-height: 1.1; }
.stats span { color: var(--m); font-size: 14px; }

/* ---------- product cards ---------- */
.cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cards.four { grid-template-columns: repeat(4, 1fr); }
.cards.grid-full { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; border: 1px solid transparent; transition: background .2s, border-color .2s, box-shadow .2s; scroll-margin-top: 100px; }
.card:hover, .card:target { background: var(--card-hover); border-color: var(--l); box-shadow: 0 14px 34px #0b234014; }
.card .ph { height: 170px; display: flex; align-items: center; justify-content: center; }
.card .ph img { max-height: 160px; width: auto; object-fit: contain; }
.card .ph img.photo { width: 100%; height: 160px; max-height: none; object-fit: cover; border-radius: 6px; }
.card .ph .icon-ring { width: 96px; height: 96px; color: var(--b-soft); stroke-width: 1.2; }
.card h3 { font-size: 18px; margin: 12px 0 8px; }
.chip { display: inline-block; font-size: 12px; background: var(--bg); border: 1px solid var(--l); border-radius: 99px; padding: 3px 9px; margin: 0 4px 6px 0; color: var(--m); }
.card.full .ph { height: 220px; }
.card.full .ph img { max-height: 210px; }
.card.full .ph img.photo { height: 210px; }
.specs { list-style: none; padding: 0; margin-top: 4px; }
.specs li { padding: 8px 0; border-top: 1px solid var(--l); color: var(--m); font-size: 15px; }
.specs li b { color: var(--t); }
.cat-block + .cat-block { margin-top: 72px; }

/* ---------- rental ---------- */
.rent { background: var(--dark); color: #fff; border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 1fr 1.1fr; }
.rent .txt { padding: 56px; }
.rent h2 { color: #fff; }
.rent p, .rent .prose p { color: #c3cad4; }
.rent > img { height: 100%; width: 100%; object-fit: cover; min-height: 420px; }
.facts { list-style: none; padding: 0; margin: 22px 0; }
.facts li { padding: 8px 0; border-bottom: 1px solid #ffffff1a; display: flex; justify-content: space-between; gap: 16px; }
.facts b { color: var(--b-soft); text-align: right; }
.rent-page .txt { padding: 40px; }
.rent-page .prose p { font-size: 16px; }
h2.sub { font-size: clamp(24px, 2.6vw, 34px); margin: 64px 0 20px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about > img { border-radius: 12px; height: 440px; width: 100%; object-fit: cover; }
.about .lead { margin: 0; }
.usp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.usp > div, .prose .usp li { background: var(--g); padding: 14px 16px; border-left: 4px solid var(--r); font-weight: 600; }
.prose .usp { list-style: none; padding: 0; }

/* ---------- contact ---------- */
.contact-band { background: var(--g); }
.cgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cgrid > div { background: var(--bg); border-radius: 10px; padding: 20px; border-top: 4px solid var(--b-soft); }
.cgrid span { color: var(--m); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: 4px; }
.cgrid a:hover { color: var(--r); }

/* ---------- inner pages ---------- */
.page-head { background: linear-gradient(180deg, var(--g), var(--bg)); padding: 64px 0 32px; border-bottom: 1px solid var(--l); }
.page-head h1 { font-size: clamp(34px, 4.6vw, 56px); letter-spacing: -.025em; margin: 12px 0 12px; font-weight: 850; }
.content { padding: 56px 0 90px; }
.prose { max-width: 820px; overflow-wrap: break-word; hyphens: auto; }
.prose > * + * { margin-top: 16px; }
.prose p, .prose li { color: var(--m); font-size: 17px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 32px); margin-top: 44px; color: var(--t); }
.prose h3 { font-size: 20px; margin-top: 30px; }
.prose a { color: var(--r); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--t); }
.prose ul, .prose ol { padding-left: 1.3em; }
.cta-box { margin-top: 64px; background: var(--g); border-left: 4px solid var(--r); border-radius: 10px; padding: 28px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-box p { color: var(--m); max-width: 680px; }
.cta-box a:not(.btn) { color: var(--r); text-decoration: underline; }
.kontakt-cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--l); padding: 48px 0 28px; color: var(--m); font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 14px; }
.site-footer h4 { color: var(--t); text-transform: uppercase; letter-spacing: .1em; font-size: 12px; margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin: 5px 0; }
.site-footer a:hover { color: var(--r); }
.site-footer .legal { border-top: 1px solid var(--l); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.legal-note { display: block; margin-top: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.cards { grid-template-columns: repeat(3, 1fr); }
	.cards.grid-full { grid-template-columns: repeat(2, 1fr); }
	.head-cta { display: none; }
}
@media (max-width: 900px) {
	.nav-toggle-label { display: block; }
	.main-nav { position: absolute; top: 78px; left: 0; right: 0; background: var(--bg); border-bottom: 2px solid var(--r); display: none; }
	.nav-toggle:checked ~ .main-nav { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 16px; }
	.main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--l); }
	.site-header .wrap { gap: 10px; }
	.site-header .logo img { height: 30px; }
	.hero > .wrap:first-child, .rent, .about, .kontakt-cols { grid-template-columns: 1fr; }
	.stage { max-width: 420px; margin: 0 auto; width: 100%; }
	.stats, .cards, .cards.four, .cgrid, .gallery, .usp { grid-template-columns: 1fr 1fr; }
	.cards.grid-full { grid-template-columns: 1fr; }
	.rent .txt, .rent-page .txt { padding: 28px; }
	.rent > img { min-height: 260px; }
	.about > img { height: 300px; }
	.section { padding: 64px 0; }
	.site-footer .cols { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.cards, .cards.four, .cgrid, .usp { grid-template-columns: 1fr; }
	.lang-switch summary span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .stage { display: none; } body { background: #fff; color: #000; } }
