/**
 * Cameye Arts: the few things theme.json cannot express.
 * Every rule is tied to a class or block style you can switch on or off
 * in the editor, so nothing here locks the design in place.
 */

/* ---------- Motion ---------- */
@keyframes cameye-blink { 50% { opacity: 0.25; } }
@keyframes cameye-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Page structure ----------
   Sections sit flush against each other and against the header and
   footer, so coloured bands never show a sliver of paper between them. */
:where(.wp-site-blocks) > * { margin-block-start: 0; margin-block-end: 0; }

/* ---------- Header ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}
.admin-bar header.wp-block-template-part { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part { top: 0; }
}
.cameye-header {
	background-color: var(--wp--preset--color--base);
	background-color: color-mix(in srgb, var(--wp--preset--color--base) 94%, transparent);
	-webkit-backdrop-filter: saturate(1.2) blur(8px);
	backdrop-filter: saturate(1.2) blur(8px);
}

/* Keep logo, menu button and "Get in touch" on one row on phones */
@media (max-width: 480px) {
	.cameye-header .wp-block-site-tagline { letter-spacing: 0.06em; font-size: 0.5625rem; }
	.cameye-header .wp-block-site-title { font-size: 1.375rem !important; }
	.cameye-header .wp-block-button__link { padding: 0.7em 1.1em; }
	.cameye-header .alignwide { column-gap: 0.75rem !important; }
	.cameye-header .alignwide > .wp-block-group:last-child { gap: 0.75rem !important; }
}

/* Blinking REC dot before the site title, and on "REC label" paragraphs */
.cameye-rec::before,
.is-style-rec::before {
	content: "";
	display: inline-block;
	width: 0.42em;
	height: 0.42em;
	margin-right: 0.4em;
	border-radius: 50%;
	background: var(--wp--preset--color--accent);
	vertical-align: 0.1em;
	animation: cameye-blink 1.6s steps(1) infinite;
}
.is-style-rec::before { width: 0.7em; height: 0.7em; vertical-align: -0.05em; }

/* ---------- Text styles ---------- */
.is-style-eyebrow,
.is-style-rec {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.5;
}
.is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--muted); }

:where(.wp-block-heading).is-style-display {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0;
	line-height: 0.9;
}
:where(.wp-block-heading).is-style-sans {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	text-transform: none;
	letter-spacing: -0.025em;
	line-height: 1.05;
}

/* Scanline: highlight any word with the Highlight tool and it turns into
   red screen lines. Works on headings and paragraphs with this style. */
.is-style-scanline mark {
	background-color: transparent !important;
	background-image: repeating-linear-gradient(180deg, var(--wp--preset--color--accent) 0 0.055em, transparent 0.055em 0.085em) !important;
	-webkit-background-clip: text !important;
	background-clip: text !important;
	color: transparent !important;
	-webkit-text-fill-color: transparent;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Inline colour highlights should never paint a box behind the text */
mark.has-inline-color { padding: 0; }

/* ---------- Viewfinder frame on images, covers and featured images ---------- */
.is-style-viewfinder {
	position: relative;
	--cameye-vf: var(--wp--preset--color--base);
	--cameye-vf-len: clamp(14px, 2.2vw, 24px);
	--cameye-vf-inset: clamp(10px, 1.6vw, 18px);
}
.is-style-viewfinder::after {
	content: "";
	position: absolute;
	inset: var(--cameye-vf-inset);
	pointer-events: none;
	z-index: 2;
	background:
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) top left / var(--cameye-vf-len) 2px no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) top left / 2px var(--cameye-vf-len) no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) top right / var(--cameye-vf-len) 2px no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) top right / 2px var(--cameye-vf-len) no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) bottom left / var(--cameye-vf-len) 2px no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) bottom left / 2px var(--cameye-vf-len) no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) bottom right / var(--cameye-vf-len) 2px no-repeat,
		linear-gradient(var(--cameye-vf), var(--cameye-vf)) bottom right / 2px var(--cameye-vf-len) no-repeat;
	filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.35));
}
.wp-block-image.is-style-viewfinder:has(figcaption)::after { bottom: calc(var(--cameye-vf-inset) + 2.5em); }
.wp-block-image.is-style-viewfinder img,
.wp-block-post-featured-image.is-style-viewfinder img { display: block; }

/* ---------- Scrolling ticker (Group block style) ---------- */
.is-style-marquee {
	overflow: hidden;
	white-space: nowrap;
}
.is-style-marquee > * { white-space: nowrap; }
.cameye-marquee__track {
	display: flex;
	width: max-content;
	animation: cameye-marquee var(--cameye-marquee-speed, 40s) linear infinite;
}
.cameye-marquee__track > * {
	flex: none;
	margin: 0 !important;
	padding-right: 2.5rem;
}
.is-style-marquee:hover .cameye-marquee__track { animation-play-state: paused; }

/* ---------- Lists ---------- */
.wp-block-list.is-style-ruled {
	list-style: none;
	padding-left: 0;
	border-top: 1.5px solid currentColor;
}
.wp-block-list.is-style-ruled > li {
	padding: 1.1rem 0;
	margin: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.has-dark-background-color .wp-block-list.is-style-ruled > li { border-bottom-color: rgba(255, 255, 255, 0.18); }

/* ---------- Category filter chips ---------- */
.wp-block-categories.is-style-chips {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
}
.wp-block-categories.is-style-chips li { margin: 0; }
.cameye-chip { margin: 0; }
.cameye-chip a,
.wp-block-categories.is-style-chips a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.25rem;
	border: 1.5px solid var(--wp--preset--color--line);
	border-radius: 999px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}
.cameye-chip a:hover,
.blog .cameye-chip a,
.wp-block-categories.is-style-chips a:hover,
.wp-block-categories.is-style-chips .current-cat a {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* ---------- Separators ---------- */
.wp-block-separator.is-style-heavy {
	border: 0;
	height: 2px !important;
	background-color: currentColor;
	opacity: 1;
}

/* ---------- Dark sections ----------
   Links and borders adapt automatically inside any block with a dark,
   accent or highlight background. */
:where(.has-dark-background-color) a:where(:not(.wp-element-button)) { color: inherit; }
:where(.has-dark-background-color) a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--highlight); }
:where(.has-accent-background-color, .has-highlight-background-color) a:where(:not(.wp-element-button)):hover { color: inherit; opacity: 0.75; }
.has-dark-background-color .is-style-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--on-dark-muted); }
.has-dark-background-color .wp-block-separator:not(.has-background) { background-color: rgba(255, 255, 255, 0.18); color: rgba(255, 255, 255, 0.18); }
.has-dark-background-color .wp-block-site-tagline { color: var(--wp--preset--color--on-dark-muted); }
.has-dark-background-color .is-style-viewfinder,
.is-style-viewfinder.has-dark-background-color { --cameye-vf: var(--wp--preset--color--base); }

/* Buttons on red or yellow backgrounds keep strong contrast on hover */
:where(.has-accent-background-color) .wp-element-button:hover,
:where(.has-accent-background-color) .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Outline buttons follow the text colour of their section */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) { color: currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1.5px solid currentColor;
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}
.has-dark-background-color .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Big footer wordmark ---------- */
.cameye-wordmark {
	font-size: clamp(3.5rem, 15.5vw, 14rem) !important;
	line-height: 0.82 !important;
	white-space: nowrap;
	overflow: hidden;
}
.cameye-wordmark::after {
	content: ".";
	color: var(--wp--preset--color--accent);
}
.cameye-wordmark a { color: inherit; }

/* ---------- Quotes ---------- */
.wp-block-quote { margin-left: 0; margin-right: 0; }
.wp-block-quote > p::before { content: "\201C"; color: var(--wp--preset--color--accent); }
.wp-block-quote > p:last-of-type::after { content: "\201D"; color: var(--wp--preset--color--accent); }
.wp-block-quote cite {
	display: block;
	margin-top: 1.5rem;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
}
.has-dark-background-color .wp-block-quote cite { color: var(--wp--preset--color--on-dark-muted); }
.cameye-quote-card > p { font-size: var(--wp--preset--font-size--large); font-weight: 500; letter-spacing: 0; line-height: 1.45; }

/* ---------- FAQ (Details block) ---------- */
.wp-block-details summary {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large);
	cursor: pointer;
	list-style-position: inside;
}
.wp-block-details[open] summary { margin-bottom: 0.75rem; }

/* ---------- Post grid ---------- */
.wp-block-post-template.is-layout-grid { row-gap: var(--wp--preset--spacing--60); }
@media (max-width: 600px) {
	.wp-block-post-template.is-layout-grid { grid-template-columns: 1fr !important; }
}
.wp-block-post-excerpt__more-link {
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Navigation overlay on phones ---------- */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(2.5rem, 12vw, 4rem);
	text-transform: uppercase;
	line-height: 1;
}

/* ---------- Accessibility ---------- */
:where(a, button, input, textarea, select, summary, .wp-element-button):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-deep);
	outline-offset: 3px;
}
:where(.has-dark-background-color, .has-accent-background-color) :where(a, button, summary, .wp-element-button):focus-visible {
	outline-color: var(--wp--preset--color--base);
}

@media (prefers-reduced-motion: reduce) {
	.cameye-rec::before,
	.is-style-rec::before,
	.cameye-marquee__track { animation: none !important; }
}

/* Long words (German titles, URLs) never break the layout */
h1, h2, .wp-block-post-title { overflow-wrap: break-word; hyphens: manual; }
