/*
Theme Name: Atelier Hai
Description: Custom theme for atelier-hai.de, modelled on the former SOHO design (2015). No page builder, no jQuery.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: atelier-hai
*/

/* ---------- Fonts (self-hosted Roboto, no Google requests) ---------- */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300; font-display: swap; src: url(assets/fonts/roboto-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300; font-display: swap; src: url(assets/fonts/roboto-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/roboto-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/roboto-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url(assets/fonts/roboto-latin-900-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 900; font-display: swap; src: url(assets/fonts/roboto-latin-ext-900-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Colours and sizes from the former SOHO settings ---------- */
:root {
	--ah-body-bg: #ffffff;
	--ah-text: #7e7f81;
	--ah-heading: #3f4041;
	--ah-header-bg: #1d1e1f;
	--ah-logo-bg: #2e3032;
	--ah-menu: #c7cacc;
	--ah-menu-hover: #ef969a;
	--ah-menu-active: #616364;
	--ah-sub-bg: #2e3032;
	--ah-sub-text: #c8c9cc;
	--ah-sub-border: #45484a;
	--ah-footer-bg: #1d1e1f;
	--ah-footer-text: #c7cacc;
	--ah-accent: #ffc34a;
	--ah-header-h: 60px;
	--ah-content-w: 1170px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--ah-body-bg);
	color: var(--ah-text);
	font: 400 16px/22px "Roboto", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--ah-heading); text-decoration: none; }
a:hover, a:focus { color: var(--ah-menu-hover); }
p { margin: 0 0 22px; }
h1, h2, h3, h4, h5, h6 { color: var(--ah-heading); font-weight: 900; margin: 0 0 18px; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 20px; } h3 { font-size: 18px; }
h4 { font-size: 16px; } h5 { font-size: 14px; } h6 { font-size: 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---------- Header ---------- */
.site-header {
	position: fixed; top: 0; left: 0; right: 0; z-index: 100;
	height: var(--ah-header-h);
	display: flex; align-items: stretch;
	background: var(--ah-header-bg);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .logo {
	display: flex; align-items: center; justify-content: center;
	min-width: 130px; padding: 0 15px;
	background: var(--ah-logo-bg);
}
.site-header .logo img { display: block; max-height: var(--ah-header-h); width: auto; }
.site-header .logo .site-title { color: #fff; font-weight: 900; font-size: 16px; text-transform: uppercase; }
.site-body { padding-top: var(--ah-header-h); }

.main-nav { margin-left: auto; display: flex; align-items: stretch; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: stretch; }
.main-nav li { position: relative; }
.main-nav > ul > li > a {
	display: flex; align-items: center; height: 100%;
	padding: 0 18px;
	color: var(--ah-menu); font-size: 13px; line-height: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li:focus-within > a { color: var(--ah-menu-hover); }
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a,
.main-nav > ul > li.current-menu-parent > a { color: var(--ah-menu-hover); }

.main-nav .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 200px;
	background: var(--ah-sub-bg);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a {
	display: block; padding: 11px 20px;
	border-top: 1px solid var(--ah-sub-border);
	color: var(--ah-sub-text); font-size: 12px; font-weight: 300; text-transform: uppercase;
}
.main-nav .sub-menu a:hover,
.main-nav .sub-menu .current-menu-item > a { color: var(--ah-menu-hover); }

.nav-toggle {
	display: none; margin-left: auto; padding: 0 20px;
	background: none; border: 0; color: var(--ah-menu); cursor: pointer;
	font: 900 13px "Roboto", Arial, sans-serif; text-transform: uppercase;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: inline-block; width: 20px; height: 2px; background: currentColor; position: relative; vertical-align: middle;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }

@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.main-nav {
		display: none; position: absolute; top: var(--ah-header-h); left: 0; right: 0;
		max-height: calc(100vh - var(--ah-header-h)); overflow-y: auto;
		background: var(--ah-header-bg);
	}
	.main-nav.is-open { display: block; }
	.main-nav > ul { display: block; }
	.main-nav > ul > li > a { padding: 14px 20px; border-top: 1px solid var(--ah-sub-border); }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; background: var(--ah-sub-bg); }
	.main-nav .sub-menu a { padding-left: 35px; }
}

/* ---------- Content ---------- */
.content { max-width: var(--ah-content-w); margin: 0 auto; padding: 50px 20px; }
.content-wide { padding: 0; }
.entry-title { font-size: 22px; text-transform: uppercase; margin-bottom: 30px; }
.entry-content > * + * { margin-top: 0; }
.entry-content h5 { text-transform: uppercase; letter-spacing: .5px; }
.entry-content ul, .entry-content ol { margin: 0 0 22px; }
.entry-content figure { margin: 0 0 30px; }
.entry-content figcaption { font-size: 13px; color: var(--ah-text); }
.entry-content table { border-collapse: collapse; width: 100%; margin-bottom: 22px; }
.entry-content td, .entry-content th { border-bottom: 1px solid #e4e7e9; padding: 8px 6px; text-align: left; vertical-align: top; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--ah-footer-bg); color: var(--ah-footer-text);
	padding: 22px 20px; font-size: 13px;
}
.site-footer a { color: var(--ah-footer-text); }
.site-footer a:hover { color: var(--ah-menu-hover); }
.site-footer .inner { max-width: var(--ah-content-w); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px 30px; justify-content: space-between; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }

/* ---------- Landing page (front page) ---------- */
.landing { position: fixed; inset: 0; display: flex; background: #111; }
.admin-bar .landing { top: 32px; }
.landing .strip {
	position: relative; flex: 1 1 0; display: block;
	background-size: cover; background-position: center;
	transition: flex-grow .5s ease;
}
.landing .strip::after { content: ""; position: absolute; inset: 0; background: rgba(191, 191, 191, .2); transition: background .3s; }
.landing .strip:hover { flex-grow: 1.25; }
.landing .strip:hover::after { background: rgba(191, 191, 191, 0); }
.landing-logo {
	position: absolute; top: 50%; left: 50%; z-index: 2;
	width: 244px; height: 244px; margin: -122px 0 0 -122px;
	border-radius: 50%; background: var(--ah-accent);
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); transition: transform .3s;
}
.landing-logo:hover { transform: scale(1.04); }
.landing-logo img { width: 140px; height: auto; }
@media (max-width: 600px) {
	.landing { flex-direction: column; }
	.landing-logo { width: 180px; height: 180px; margin: -90px 0 0 -90px; }
	.landing-logo img { width: 110px; }
}

/* ---------- Gallery: masonry (default on gallery pages) ---------- */
.wp-block-gallery.is-style-masonry.has-nested-images {
	display: block; columns: 4 260px; column-gap: 4px;
}
.wp-block-gallery.is-style-masonry.has-nested-images figure.wp-block-image {
	display: block; width: 100% !important; margin: 0 0 4px !important; break-inside: avoid;
}
.wp-block-gallery.is-style-masonry.has-nested-images figure.wp-block-image img {
	width: 100%; height: auto !important; object-fit: contain !important; display: block;
}
.wp-block-gallery.is-style-masonry figure.wp-block-image figcaption { display: none; }
.wp-block-gallery.is-style-masonry figure.wp-block-image { cursor: zoom-in; }
.wp-block-gallery.is-style-masonry figure.wp-block-image img { transition: opacity .3s; }
.wp-block-gallery.is-style-masonry figure.wp-block-image:hover img { opacity: .8; }

/* ---------- Gallery: slider ---------- */
.wp-block-gallery.is-style-slider.has-nested-images {
	position: relative; display: block; max-width: 700px; margin: 0 auto 50px;
	aspect-ratio: 2 / 1; overflow: hidden; background: #f2f2f2;
}
.wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image {
	position: absolute !important; inset: 0; width: 100% !important; margin: 0 !important;
	opacity: 0; transition: opacity .8s ease; pointer-events: none;
}
.wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image.is-active { opacity: 1; pointer-events: auto; }
.wp-block-gallery.is-style-slider.has-nested-images figure.wp-block-image img {
	width: 100%; height: 100% !important; object-fit: cover !important;
}
.wp-block-gallery.is-style-slider figure.wp-block-image figcaption {
	position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 14px !important;
	background: rgba(0, 0, 0, .55) !important; color: #fff; font-size: 13px; text-align: left;
}
.ah-slider-dots { display: flex; justify-content: center; gap: 8px; margin: -38px 0 50px; position: relative; z-index: 2; }
.ah-slider-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(0, 0, 0, .25); cursor: pointer; }
.ah-slider-dots button.is-active { background: var(--ah-heading); }

/* ---------- Lightbox ---------- */
.ah-lightbox {
	position: fixed; inset: 0; z-index: 1000; display: none;
	align-items: center; justify-content: center; background: rgba(0, 0, 0, .92);
}
.ah-lightbox.is-open { display: flex; }
.ah-lightbox img { max-width: 92vw; max-height: 84vh; box-shadow: 0 0 30px rgba(0, 0, 0, .6); }
.ah-lightbox .caption { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #c7cacc; font-size: 14px; padding: 0 60px; }
.ah-lightbox button {
	position: absolute; background: none; border: 0; color: #c7cacc; cursor: pointer;
	font: 300 42px/1 "Roboto", Arial, sans-serif; padding: 20px;
}
.ah-lightbox button:hover { color: var(--ah-menu-hover); }
.ah-lightbox .close { top: 10px; right: 10px; font-size: 36px; }
.ah-lightbox .prev { left: 10px; top: 50%; transform: translateY(-50%); }
.ah-lightbox .next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact Form 7 ---------- */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
	width: 100%; max-width: 600px; padding: 10px 12px; border: 1px solid #e4e7e9;
	font: inherit; color: var(--ah-heading); background: #fff;
}
.wpcf7 textarea { min-height: 160px; }
.wpcf7 input[type="submit"] {
	padding: 12px 28px; border: 0; background: var(--ah-header-bg); color: #fff; cursor: pointer;
	font: 900 13px "Roboto", Arial, sans-serif; text-transform: uppercase; letter-spacing: .5px;
}
.wpcf7 input[type="submit"]:hover { background: var(--ah-menu-hover); }
