/*
Theme Name: Herling
Theme URI: https://aherling.gr
Author: Alexandros G. Herling
Description: A quiet editorial block theme for a private psychotherapy practice. Warm paper, a literary serif, generous whitespace. Bilingual-ready (Greek / English) and built for the WordPress Site Editor.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: herling
Tags: blog, one-column, custom-colors, custom-menu, editor-style, block-patterns, full-site-editing, translation-ready, accessibility-ready
*/

/* Design tokens come from theme.json. Only what the block system cannot express lives here. */

/* --- Rendering ------------------------------------------------------- */
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Greek text sits slightly wider than Latin; ease the negative tracking. */
:lang(el) {
	letter-spacing: 0;
}

:lang(el) h1,
:lang(el) h2,
:lang(el) h3 {
	letter-spacing: -0.005em;
}

/* --- Accessibility --------------------------------------------------- */
:where(a, button, input, select, textarea, .wp-block-navigation-item__content):focus-visible {
	outline: 2px solid var(--wp--preset--color--clay);
	outline-offset: 3px;
	border-radius: 2px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	font-size: var(--wp--preset--font-size--small);
	text-decoration: none;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* --- Header ---------------------------------------------------------- */
.herling-header {
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.herling-header .wp-block-navigation__responsive-container-open,
.herling-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--ink);
}

.wp-block-navigation .wp-block-navigation-item__content {
	transition: color 0.18s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--clay);
}

/* Current page marker — a hairline, not a heavy state. */
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	box-shadow: inset 0 -1px 0 0 var(--wp--preset--color--clay);
}

/* --- Buttons --------------------------------------------------------- */
.wp-block-button__link {
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--line);
	background: transparent;
	color: var(--wp--preset--color--ink);
}

.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--ink);
	background: transparent;
	color: var(--wp--preset--color--ink);
}

/* --- Custom block styles (registered in functions.php) --------------- */

/* Group: a card on sand, no shadow. */
.wp-block-group.is-style-herling-card {
	background: var(--wp--preset--color--sand);
	padding: var(--wp--preset--spacing--40);
	border-radius: 3px;
}

/* Group: hairline-ruled block, used for list-like sections. */
.wp-block-group.is-style-herling-ruled {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: var(--wp--preset--spacing--30);
}

/* Heading: a small eyebrow above a section. */
.wp-block-heading.is-style-herling-eyebrow {
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--clay);
	line-height: 1.4;
}

/* Paragraph: a standfirst / lede under a heading. */
.wp-block-paragraph.is-style-herling-lede,
p.is-style-herling-lede {
	font-family: var(--wp--preset--font-family--serif);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--wp--preset--color--ink-soft);
}

/* Separator: a short rule rather than a full-width one. */
.wp-block-separator.is-style-herling-short {
	width: 3rem;
	margin-left: 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--clay);
	opacity: 1;
}

/* --- Editorial details ----------------------------------------------- */

/* Optional drop-cap-free first-paragraph emphasis in long prose. */
.herling-prose > p:first-of-type {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.55;
	color: var(--wp--preset--color--ink-soft);
}

/* Quote attribution. */
.wp-block-quote cite {
	display: block;
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--ink-soft);
}

/* Dark sections: keep headings and text legible on Deep. */
.has-deep-background-color :where(h1, h2, h3, h4, p, li),
.has-ink-background-color :where(h1, h2, h3, h4, p, li) {
	color: var(--wp--preset--color--paper);
}

.has-deep-background-color a:not(.wp-block-button__link),
.has-ink-background-color a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--clay-soft);
}

/* --- Images ---------------------------------------------------------- */
.wp-block-image img {
	border-radius: 3px;
}

.wp-block-image.is-style-herling-portrait img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	width: 100%;
	border-radius: 3px;
}

/* --- Footer ---------------------------------------------------------- */
.herling-footer {
	font-size: var(--wp--preset--font-size--small);
}

.herling-footer a {
	color: inherit;
	text-decoration: none;
}

.herling-footer a:hover {
	text-decoration: underline;
}

/* --- Print ----------------------------------------------------------- */
@media print {
	.herling-header,
	.herling-footer,
	.wp-block-buttons {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}
}
