/* ==========================================================================
   Zarnegar Lens - main stylesheet
   All sizes in rem. Colors checked for WCAG AA contrast.
   ========================================================================== */

:root {
	/* Colors */
	--ink: #0e0e0e;
	--ink-2: #1a1a1a;
	--ink-3: #080808;
	--paper: #f5f2ec;
	--paper-2: #ebe6dc;
	--white: #ffffff;
	--gold: #c2a36b;          /* on dark backgrounds only: 8.6:1 on --ink */
	--gold-hover: #d4b77f;
	--gold-dark: #6b5020;     /* gold for text on light backgrounds: 6.5:1 on --paper */
	--text: #1c1a17;
	--text-muted: #5c564d;    /* 6.4:1 on --paper */
	--on-dark-muted: #b9b3a8; /* 9.4:1 on --ink */
	--on-dark-soft: rgba(255, 255, 255, 0.78);
	--line-light: rgba(255, 255, 255, 0.16);
	--line-dark: rgba(14, 14, 14, 0.14);
	--focus: #c2a36b;
	--focus-dark: #6b5020;

	/* Type */
	--serif: 'Frank Ruhl Libre', 'Times New Roman', serif;
	--sans: 'Heebo', Arial, sans-serif;

	/* Layout */
	--wrap: 77.5rem;
	--wrap-narrow: 47.5rem;
	--gutter: 2rem;
	--header-h: 5.5rem;
	--radius: 0.125rem;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 500; }

/* ---------- Accessibility helpers ---------- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute;
	top: -10rem;
	right: 1rem;
	z-index: 1000;
	padding: 0.75rem 1.25rem;
	background: var(--gold);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
	outline: 0.1875rem solid var(--focus-dark);
	outline-offset: 0.1875rem;
}
.site-header :focus-visible,
.site-footer :focus-visible,
.on-dark :focus-visible,
.zl-cc :focus-visible {
	outline-color: var(--focus);
}
.site-main:focus { outline: none; }

/* ---------- Layout ---------- */
.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding-block: 5rem; }
@media (max-width: 47.5rem) {
	:root { --gutter: 1.25rem; --header-h: 4.5rem; }
	.section { padding-block: 3.5rem; }
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	min-height: 3rem;
	padding: 0.875rem 1.75rem;
	border: 0.0625rem solid transparent;
	border-radius: var(--radius);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: var(--gold-hover); }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.btn--outline-light:hover { border-color: var(--white); }
.btn--outline-dark { border-color: var(--ink); color: var(--ink); }
.btn--outline-dark:hover { background: var(--ink); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--ink);
	color: var(--white);
	border-bottom: 0.0625rem solid var(--line-light);
}
.admin-bar .site-header { top: 2rem; }
@media (max-width: 48.875rem) { .admin-bar .site-header { top: 2.875rem; } }
@media (max-width: 37.5rem) { .admin-bar .site-header { top: 0; } }

.site-header__in {
	display: flex;
	align-items: center;
	gap: 2rem;
	min-height: var(--header-h);
}
.site-logo { flex: none; display: block; }
.site-logo img {
	width: auto;
	height: 2.875rem;
	filter: invert(1);
}

.site-nav { flex: 1; }
.site-nav .menu {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}
.site-nav .menu > li { position: relative; }
.site-nav a,
.site-nav .submenu-btn {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	background: none;
	border: 0;
	color: var(--on-dark-soft);
	font-size: 0.9375rem;
	text-decoration: none;
	cursor: pointer;
	transition: color 0.2s;
}
.site-nav a:hover,
.site-nav .submenu-btn:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > .submenu-btn { color: var(--white); }
.site-nav .current-menu-item > a { box-shadow: inset 0 -0.0625rem 0 var(--gold); }
.submenu-btn svg { width: 1rem; height: 1rem; transition: transform 0.2s; }
.submenu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 15rem;
	padding: 0.5rem 0;
	background: var(--ink-2);
	border: 0.0625rem solid var(--line-light);
	box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
	display: none;
}
.site-nav .sub-menu.is-open { display: block; }
.site-nav .sub-menu a { padding: 0.625rem 1.25rem; }

.header-tel {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	color: var(--white);
	font-weight: 500;
	font-size: 0.9375rem;
	text-decoration: none;
	white-space: nowrap;
}
.header-tel__ico {
	display: grid;
	place-items: center;
	width: 2.375rem;
	height: 2.375rem;
	border: 0.0625rem solid var(--line-light);
	border-radius: 50%;
	color: var(--gold);
}
.header-tel__ico svg { width: 1rem; height: 1rem; }

.nav-toggle {
	display: none;
	width: 2.75rem;
	height: 2.75rem;
	margin-inline-start: auto;
	background: none;
	border: 0.0625rem solid var(--line-light);
	border-radius: var(--radius);
	color: var(--white);
	cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 0.3125rem; width: 1.375rem; margin: auto; }
.nav-toggle__bars span { display: block; height: 0.125rem; background: currentColor; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(0.4375rem) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-0.4375rem) rotate(-45deg); }

@media (max-width: 64rem) {
	.nav-toggle { display: block; }
	.header-tel { display: none; }
	.site-nav {
		position: fixed;
		inset: var(--header-h) 0 0 0;
		background: var(--ink);
		overflow-y: auto;
		padding: 1rem var(--gutter) 6rem;
		display: none;
	}
	.admin-bar .site-nav { top: calc(var(--header-h) + 2.875rem); }
	.site-nav.is-open { display: block; }
	.site-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.site-nav .menu > li { border-bottom: 0.0625rem solid var(--line-light); }
	.site-nav a, .site-nav .submenu-btn { width: 100%; font-size: 1.125rem; min-height: 3.25rem; justify-content: space-between; }
	.site-nav .sub-menu { position: static; box-shadow: none; border: 0; background: transparent; padding: 0 1rem 0.5rem 0; }
	body.nav-open { overflow: hidden; }
}

/* ---------- Generic page head & prose ---------- */
.page-head {
	background: var(--ink);
	color: var(--white);
	padding: 4.5rem 0 3.5rem;
}
.page-head__title {
	font-family: var(--serif);
	font-size: clamp(2.25rem, 4vw, 3.5rem);
	font-weight: 500;
}
.page-head__lead { margin-top: 1rem; color: var(--on-dark-muted); font-size: 1.125rem; }
.page-head__meta { color: var(--on-dark-muted); font-size: 0.9375rem; margin-bottom: 0.75rem; }

.prose { padding-block: 3.5rem 5rem; }
.prose > * + * { margin-top: 1.125rem; }
.prose h2 { font-family: var(--serif); font-size: 2rem; margin-top: 2.5rem; }
.prose h3 { font-size: 1.375rem; margin-top: 2rem; }
.prose a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 0.1875rem; }
.prose ul, .prose ol { padding-inline-start: 1.5rem; }
.prose img { margin-block: 1.5rem; }

/* ---------- Blog ---------- */
.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: 1.75rem;
}
.post-card article { background: var(--white); height: 100%; display: flex; flex-direction: column; }
.post-card__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { padding: 1.5rem; }
.post-card__title { font-family: var(--serif); font-size: 1.5rem; }
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { text-decoration: underline; }
.post-card__meta { margin-top: 0.375rem; color: var(--text-muted); font-size: 0.875rem; }
.post-card__excerpt { margin-top: 0.75rem; color: var(--text-muted); }
.empty-state { color: var(--text-muted); font-size: 1.125rem; }
.nav-links { display: flex; gap: 0.5rem; margin-top: 3rem; flex-wrap: wrap; }
.nav-links .page-numbers { padding: 0.5rem 0.875rem; border: 0.0625rem solid var(--line-dark); text-decoration: none; }
.nav-links .current { background: var(--ink); color: var(--white); }
.single-post__img { margin-top: 2.5rem; }
.single-post__back { padding-bottom: 5rem; }

/* ---------- Footer ---------- */
.site-footer {
	background: var(--ink-3);
	color: var(--on-dark-muted);
	padding: 4.5rem 0 9rem;
	font-size: 0.9375rem;
}
.site-footer a { color: var(--on-dark-soft); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 3rem;
	padding-bottom: 3rem;
	border-bottom: 0.0625rem solid var(--line-light);
}
.site-footer__logo img { width: auto; height: 2.625rem; filter: invert(1); }
.site-footer__about p { margin-top: 1rem; max-width: 20rem; }
.site-footer__title { color: var(--white); font-size: 1rem; font-weight: 500; margin-bottom: 1rem; font-family: var(--sans); }
.footer-menu li + li { margin-top: 0.5rem; }
.contact-list li { display: flex; align-items: center; gap: 0.75rem; }
.contact-list li + li { margin-top: 0.75rem; }
.contact-list svg { width: 1.125rem; height: 1.125rem; color: var(--gold); flex: none; }
.social-list { display: flex; gap: 0.625rem; margin-top: 1.5rem; }
.social-list a {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 0.0625rem solid var(--line-light);
	border-radius: 50%;
}
.social-list a:hover { border-color: var(--gold); }
.social-list svg { width: 1.125rem; height: 1.125rem; }
.site-footer__bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	padding-top: 1.5rem;
	font-size: 0.875rem;
}
.legal-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
@media (max-width: 56rem) {
	.site-footer__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ---------- Floating contact buttons ---------- */
.zl-float {
	--fab: 3.5rem;
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 60;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.625rem;
	direction: rtl;
	animation: zl-fab-in 0.5s ease 0.6s both;
	transition: bottom 0.35s ease;
}
.zl-float svg { max-width: none; }
.zl-float__wa,
.zl-float__call {
	box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.zl-float__wa:hover,
.zl-float__call:hover {
	transform: translateY(-0.125rem);
	box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.34);
}
.zl-float__wa {
	position: relative;
	display: block;
	width: var(--fab);
	height: var(--fab);
	border-radius: 50%;
	background: #1a9e4b;
	color: #ffffff;
}
.zl-float__wa svg {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 2rem;
	height: 2rem;
}
.zl-float__dot {
	position: absolute;
	top: 0.0625rem;
	right: 0.0625rem;
	z-index: 1;
	width: 1rem;
	height: 1rem;
	border: 0.1875rem solid #ffffff;
	border-radius: 50%;
	background: #31d16b;
	box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.25);
	animation: zl-online-blink 1.8s ease-in-out infinite;
}
.zl-float__dot::after {
	content: "";
	position: absolute;
	inset: -0.1875rem;
	border-radius: 50%;
	background: #31d16b;
	animation: zl-online-ring 1.8s ease-out infinite;
}
.zl-float__call {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	height: var(--fab);
	padding: 0.3125rem;
	padding-inline-end: 1.375rem;
	border: 0.0625rem solid var(--gold);
	border-radius: 62.4375rem;
	background: var(--ink);
	color: #ffffff;
	text-decoration: none;
}
.zl-float__ico {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: calc(var(--fab) - 0.75rem);
	height: calc(var(--fab) - 0.75rem);
	border-radius: 50%;
	background: var(--gold);
	color: var(--ink);
}
.zl-float__ico svg { width: 1.25rem; height: 1.25rem; }
.zl-float__txt {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	line-height: 1.1;
	font-size: 0.8125rem;
	color: var(--on-dark-muted);
}
.zl-float__txt strong { font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.02em; color: #ffffff; }
.zl-float__wa:focus-visible,
.zl-float__call:focus-visible { outline: 0.1875rem solid var(--gold); outline-offset: 0.1875rem; }

@media (max-width: 47.5rem) {
	.zl-float { --fab: 3.25rem; right: 0.875rem; bottom: 0.875rem; }
	.zl-float__wa svg { width: 1.875rem; height: 1.875rem; }
	html.zl-cc-open .zl-float { bottom: calc(var(--zl-cc-h, 9rem) + 0.75rem); }
}
@keyframes zl-fab-in { from { opacity: 0; transform: translateY(0.75rem); } to { opacity: 1; transform: none; } }
@keyframes zl-online-ring { 0% { opacity: 0.75; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.6); } }
@keyframes zl-online-blink { 0%, 100% { background: #31d16b; } 50% { background: #1faf54; } }

/* ---------- Cookie banner ---------- */
.zl-cc {
	position: fixed;
	z-index: 100;
	left: 1.5rem;
	bottom: 1.5rem;
	width: 21.25rem;
	max-width: calc(100vw - 1.25rem);
	direction: rtl;
	text-align: right;
	background: var(--paper);
	color: var(--text);
	border: 0.0625rem solid rgba(107, 80, 32, 0.35);
	border-radius: 0.875rem;
	box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.22);
	padding: 1rem 1.125rem 0.875rem;
	opacity: 0;
	transform: translateY(1rem);
	transition: opacity 0.35s ease, transform 0.35s ease;
	pointer-events: none;
}
.zl-cc.is-in { opacity: 1; transform: none; pointer-events: auto; }
.zl-cc :focus-visible { outline-color: var(--focus-dark); }
.zl-cc__head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.375rem; font-size: 1rem; font-weight: 700; line-height: 1.3; }
.zl-cc__ico { width: 1.125rem; height: 1.125rem; color: var(--gold-dark); flex: none; }
.zl-cc__txt { margin-bottom: 0.75rem; font-size: 0.875rem; line-height: 1.55; color: var(--text-muted); }
.zl-cc__txt a { color: var(--gold-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 0.125rem; }
.zl-cc__btns { display: flex; gap: 0.5rem; }
.zl-cc__btn {
	flex: 1 1 0;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5625rem;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.zl-cc__ok { background: var(--ink); color: #ffffff; border: 0.0625rem solid var(--ink); }
.zl-cc__ok:hover { background: #2a2a2a; }
.zl-cc__no { background: transparent; color: var(--text); border: 0.0625rem solid rgba(14, 14, 14, 0.3); }
.zl-cc__no:hover { border-color: var(--ink); background: rgba(14, 14, 14, 0.05); }
@media (max-width: 47.5rem) {
	.zl-cc { left: 0.625rem; right: 0.625rem; width: auto; max-width: none; bottom: calc(0.625rem + env(safe-area-inset-bottom, 0rem)); padding: 0.75rem 0.875rem; }
}

/* ---------- Reduced motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
	.zl-float__dot, .zl-float__dot::after { animation: none !important; }
}
@media print {
	.site-header, .zl-float, .zl-cc, .skip-link { display: none !important; }
}
