/**
 * Mondrian Theme — main.css (globális réteg)
 *
 * A Claude Design handover bundle GLOBÁLIS rétege, verbatim átemelve:
 *   - assets/colors_and_type.css  → :root tokenek, @font-face, tipográfia
 *   - mondrian-site.css           → base, .btn, .mph foto, header, footer, kapcsolat-CTA
 *
 * A szekció-specifikus CSS a blocks/<név>/<név>.css fájlokban van (feltételes enqueue).
 * A token-réteg dokumentációja: docs/DESIGN_GUIDELINES.md. Szabály: HANDOVER_RULES.md.
 *
 * Geist Mono a Google Fonts CDN-ről (enqueue: functions.php). Archivo + Geist self-hosted.
 */

/* ==========================================================================
   1. DESIGN TOKENS  (colors_and_type.css :root — verbatim)
   ========================================================================== */
:root {
	/* Neutral ramp — a monokróm gerinc */
	--paper:      #FFFFFF;
	--gray-50:    #F6F6F6;
	--gray-100:   #ECECEC;
	--gray-200:   #DADADA;
	--gray-300:   #BEBEBE;
	--gray-400:   #9A9A9A;
	--gray-500:   #767676;
	--gray-600:   #565656;
	--gray-700:   #3C3C3C;
	--gray-800:   #242424;
	--gray-900:   #141414;
	--ink:        #111111;
	--true-black: #000000;

	/* De Stijl primaries — a logó emblémából mintázva */
	--red:    #DF2821;
	--blue:   #025C9E;
	--yellow: #FCC042;
	--red-press:    #B81E18;
	--blue-press:   #014E86;
	--yellow-press: #E7A91F;

	/* Szemantikus színek */
	--bg:            var(--paper);
	--bg-sunk:       var(--gray-50);
	--bg-inverse:    var(--ink);
	--fg:            var(--ink);
	--fg-muted:      var(--gray-600);
	--fg-subtle:     var(--gray-500); /* WCAG AA: gray-400 (2.8:1) -> gray-500 (4.5:1) világos háttéren */
	--fg-inverse:    var(--paper);
	--fg-inverse-muted: var(--gray-400);
	--line:          var(--gray-200);
	--line-strong:   var(--ink);
	--border:        var(--gray-300);
	--accent:        var(--red);
	--accent-press:  var(--red-press);
	--on-accent:     var(--paper);

	/* Type families */
	--font-display: Arial, sans-serif;
	--font-body:    Arial, sans-serif;
	--font-mono:    Arial, sans-serif;

	/* Type scale — fluid, mobile-first */
	--text-xs:    0.75rem;
	--text-sm:    0.875rem;
	--text-base:  1rem;
	--text-lg:    1.1875rem;
	--text-xl:    clamp(1.375rem, 1.1rem + 1.2vw, 1.75rem);
	--text-2xl:   clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
	--text-3xl:   clamp(2.25rem, 1.5rem + 3.4vw, 3.5rem);
	--text-4xl:   clamp(3rem, 1.6rem + 6vw, 5.5rem);
	--text-5xl:   clamp(3.75rem, 1.5rem + 10vw, 8rem);

	/* Weights */
	--w-light:  300; --w-reg: 400; --w-medium: 500; --w-semi: 600; --w-bold: 700; --w-black: 900;

	/* Line-height / tracking / measure */
	--lh-tight:   0.98;
	--lh-snug:    1.12;
	--lh-normal:  1.55;
	--lh-relaxed: 1.7;
	--tracking-display: -0.02em;
	--tracking-tight:   -0.01em;
	--tracking-normal:  0;
	--tracking-wide:    0.04em;
	--tracking-caps:    0.14em;
	--measure: 64ch;

	/* Space scale — 8px base */
	--space-1:  0.25rem;
	--space-2:  0.5rem;
	--space-3:  0.75rem;
	--space-4:  1rem;
	--space-5:  1.5rem;
	--space-6:  2rem;
	--space-7:  3rem;
	--space-8:  4rem;
	--space-9:  8rem;
	--space-10: 8rem;
	--space-11: 12rem;

	/* Structure — sarkok élesek */
	--radius-0:  0px;
	--radius-sm: 1px;
	--hairline:  1px;
	--rule:      2px;
	--container: 1320px;
	--gutter:    clamp(1.25rem, 5vw, 5rem);

	/* Motion — nyugodt, bounce nélkül */
	--ease:      cubic-bezier(0.22, 1, 0.36, 1);
	--dur-fast:  140ms;
	--dur:       260ms;
	--dur-slow:  600ms;

	/* Theme-szintű: sticky header magassága (hero calc + scroll offset) */
	--header-h: 93px;
}

/* ==========================================================================
   3. RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-h);   /* anchor-linkek a sticky header alá */
	-webkit-text-size-adjust: 100%;
}
body {
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--lh-normal);
	color: var(--fg);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font: inherit; }

::selection    { background: var(--yellow); color: var(--ink); }
::-moz-selection { background: var(--yellow); color: var(--ink); }

/* Layout wrapper.
   FIGYELEM: a bundle `.page` / `.section` helpereit NEM használjuk — a `.page` ütközne a
   WordPress `body.page` osztályával (a statikus oldalak <body>-ja megkapja a `page` classt),
   ami a teljes oldalt 1320px-re vágná és gutter-paddinget tenne a body-ra. A szekciók a saját
   max-width + gutter beállításukat hozzák (blocks/<név>/<név>.css). */
.site-main { min-height: 60vh; }

/* Accessible focus — 2px szögletes akcent ring (DS: "visible and square") */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, [tabindex]:focus-visible {
	outline: var(--rule) solid var(--accent);
	outline-offset: 2px;
}

/* Skip-to-content (a11y) — rejtett, fókuszra megjelenik */
.skip-link {
	position: absolute; left: 8px; top: -80px; z-index: 100;
	background: var(--ink); color: var(--paper);
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
	padding: 12px 18px; transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 8px; outline: var(--rule) solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   4. TIPOGRÁFIA  (colors_and_type.css szemantikus elemstílusok)
   ========================================================================== */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

.display {
	font-family: var(--font-display); font-weight: var(--w-black);
	font-size: var(--text-5xl); line-height: var(--lh-tight);
	letter-spacing: var(--tracking-display); color: var(--fg); text-wrap: balance;
}
h1, .h1 {
	font-family: var(--font-display); font-weight: var(--w-bold);
	font-size: var(--text-4xl); line-height: var(--lh-tight);
	letter-spacing: var(--tracking-display); color: var(--fg); text-wrap: balance;
}
h2, .h2 {
	font-family: var(--font-display); font-weight: var(--w-semi);
	font-size: var(--text-3xl); line-height: var(--lh-snug);
	letter-spacing: var(--tracking-tight); color: var(--fg); text-wrap: balance;
}
h3, .h3 {
	font-family: var(--font-display); font-weight: var(--w-semi);
	font-size: var(--text-2xl); line-height: var(--lh-snug);
	letter-spacing: var(--tracking-tight); color: var(--fg);
}
h4, .h4 {
	font-family: var(--font-display); font-weight: var(--w-medium);
	font-size: var(--text-xl); line-height: var(--lh-snug); color: var(--fg);
}
p, .body {
	font-family: var(--font-body); font-weight: var(--w-reg);
	font-size: var(--text-base); line-height: var(--lh-normal); color: var(--fg);
}
.lead {
	font-family: var(--font-body); font-weight: var(--w-light);
	font-size: var(--text-lg); line-height: var(--lh-relaxed); color: var(--fg-muted);
	max-width: var(--measure);
}
.small, small { font-size: var(--text-sm); line-height: var(--lh-normal); color: var(--fg-muted); }

.eyebrow, .kicker {
	font-family: var(--font-mono); font-weight: var(--w-medium); font-size: var(--text-xs);
	text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--fg-muted);
}
.spec, .meta {
	font-family: var(--font-mono); font-size: var(--text-sm); letter-spacing: var(--tracking-wide);
	color: var(--fg-muted); font-feature-settings: 'tnum' 1;
}
.link {
	color: var(--fg); border-bottom: var(--hairline) solid var(--ink); padding-bottom: 1px;
	transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.link:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   5. PHOTO FIELD  (.mph — valódi <img> a tonális fallback fölött)
   ========================================================================== */
.mph { position: relative; overflow: hidden; display: block; background: var(--gray-100); }
.mph-label {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em;
	text-transform: uppercase; color: rgba(0,0,0,0.22);
}
.mph-img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
	transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.mph-img.is-loaded { opacity: 1; }

/* ==========================================================================
   6. GOMBOK  (.btn — a bundle gomb-rendszere, verbatim)
   A core Gutenberg gomb (.wp-block-button__link) is erre a megjelenésre mappelve.
   ========================================================================== */
.btn,
.wp-block-button__link.wp-element-button {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
	font-weight: var(--w-medium); padding: 15px 28px; border: 0; cursor: pointer;
	border-radius: 0; display: inline-block; text-align: center; text-decoration: none;
	white-space: nowrap;
	transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-primary,
.wp-block-button:not(.is-style-outline):not(.is-style-yellow) .wp-block-button__link {
	background: var(--accent); color: var(--on-accent);
}
.btn-primary:hover,
.wp-block-button:not(.is-style-outline):not(.is-style-yellow) .wp-block-button__link:hover {
	background: var(--accent-press);
}
.btn-ghost,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 14px 27px;
}
.btn-ghost:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--ink); color: var(--paper); }
.btn-yellow,
.wp-block-button.is-style-yellow .wp-block-button__link {
	background: var(--yellow); color: var(--ink);
}
.btn-yellow:hover, .btn-yellow:active,
.wp-block-button.is-style-yellow .wp-block-button__link:hover { background: var(--yellow-press); color: var(--ink); }
.btn:active, .wp-block-button__link:active { transform: translateY(1px); }

/* arrowlink (megosztott — works "összes munka", stb.) */
.arrowlink {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
	color: var(--ink); display: inline-flex; align-items: center; gap: 8px;
	transition: color var(--dur-fast) var(--ease);
}
.arrowlink .ar { transition: transform var(--dur) var(--ease); }
.arrowlink:hover { color: var(--yellow-press); }
.arrowlink:hover .ar { transform: translateX(5px); }

/* ==========================================================================
   7. HEADER + lockup  (globális — minden oldalon)
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 50; background: transparent;
	border-bottom: 1px solid transparent; will-change: transform;
	transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.site-header.is-scrolled {
	background: rgba(255,255,255,0.9);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
/* Auto-hide: lefelé görgetve elrejt, felfelé megjelenít (a JS váltja a .is-hidden-t). */
.site-header.is-hidden { transform: translateY(-100%); }
.site-header__inner {
	max-width: var(--container); margin: 0 auto; padding: var(--space-5) var(--gutter);
	display: flex; align-items: center; justify-content: space-between;
}
.lockup { display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.lockup__emblem {
	width: 44px; height: 44px; flex: none; display: block; object-fit: cover; border-radius: 0;
	transition: transform var(--dur) var(--ease);
}
.lockup:hover .lockup__emblem { transform: scale(1.04); }
.lockup__wm { line-height: 0.92; display: flex; flex-direction: column; }
.lockup__main {
	font-family: var(--font-display); font-weight: 900; font-size: 24px;
	letter-spacing: -0.03em; text-transform: lowercase; color: var(--ink);
}
.lockup__sub {
	font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.22em;
	text-transform: uppercase; color: var(--fg-muted); margin-top: 5px;
}
.site-nav { display: flex; gap: var(--space-6); }
.site-nav__link {
	font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.1em; text-transform: lowercase;
	color: var(--fg-muted); position: relative; padding-bottom: 4px;
	transition: color var(--dur-fast) var(--ease);
}
.site-nav__link:hover, .site-nav__link.is-active { color: var(--ink); }
.site-nav__link::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent);
	transform: scaleX(0); transform-origin: left; transition: transform var(--dur-fast) var(--ease);
}
.site-nav__link:hover::after, .site-nav__link.is-active::after { transform: scaleX(1); }
.site-header__toggle { display: none; }
.site-header__mobile { display: none; }

/* ==========================================================================
   8. KAPCSOLAT CTA  (globális — minden oldal alján, a footer fölött)
   ========================================================================== */
.cta { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) var(--space-9); }
.cta__inner { border-top: 2px solid var(--ink); padding-top: var(--space-6); }
.cta__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-9); align-items: stretch; }
.cta__left { display: flex; flex-direction: column; justify-content: center; gap: var(--space-2); }
.cta__kick {
	font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--fg-muted); margin: 0; display: inline-flex; align-items: center; gap: 9px;
}
.cta__kick-dot { width: 11px; height: 11px; flex: none; display: inline-block; background: var(--red); }
.cta__title {
	font-family: var(--font-display); font-weight: var(--w-bold);
	font-size: clamp(3rem, 1rem + 5vw, 72px); line-height: 0.95; letter-spacing: -0.03em;
	margin: 0; text-wrap: balance;
}
.cta__right {
	display: flex; flex-direction: column; justify-content: center; gap: var(--space-6);
	border-left: 1px solid var(--line); padding-left: var(--space-9);
}
.cta__rows { display: flex; flex-direction: column; }
.cta__row {
	display: flex; flex-direction: column; gap: 7px; padding: var(--space-4) 0;
	border-bottom: 1px solid var(--line); text-decoration: none;
}
.cta__row:first-child { border-top: 1px solid var(--line); }
.cta__row-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-subtle); }
.cta__row-value { font-family: var(--font-mono); font-size: 19px; letter-spacing: 0.04em; color: var(--ink); transition: color var(--dur-fast) var(--ease); }
.cta__row:hover .cta__row-value { color: var(--accent); }
.cta__btns { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.cta__btns .btn { display: flex; align-items: center; justify-content: center; }
/* kapcsolat-szekció gomb-színek (a bundle override-jai) */
.cta .btn-primary { background: var(--yellow); color: var(--ink); } /* WCAG AA: sárgán sötét szöveg (1.65:1 -> 11.5:1), mint a többi sárga gomb */
.cta .btn-primary:hover, .cta .btn-primary:active { background: var(--yellow-press); color: var(--ink); }
.cta .btn-yellow { background: var(--blue); color: var(--paper); }
.cta .btn-yellow:hover, .cta .btn-yellow:active { background: var(--blue-press); color: var(--paper); }

/* ==========================================================================
   9. FOOTER  (globális, sötét)
   ========================================================================== */
.site-footer { background: var(--bg-inverse); color: var(--fg-inverse); margin-top: var(--space-8); }
.site-footer__inner {
	max-width: var(--container); margin: 0 auto; padding: var(--space-9) var(--gutter) var(--space-7);
	display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-8);
}
.site-footer__mark .lockup { cursor: pointer; }
.site-footer__mark .lockup__main { color: var(--paper); }
.site-footer__mark .lockup__sub { color: var(--fg-inverse-muted); }
.site-footer__mark .lockup__emblem { box-shadow: 0 0 0 1px var(--gray-700); }
.site-footer__tag {
	font-family: var(--font-body); font-weight: var(--w-light); font-size: var(--text-lg);
	line-height: 1.5; color: var(--gray-300); max-width: 32ch; margin: var(--space-6) 0 0;
}
.site-footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-5); align-content: start; }
.site-footer__block { display: flex; flex-direction: column; gap: 8px; }
.site-footer__k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--fg-inverse-muted); }
.site-footer__v { font-family: var(--font-body); font-size: 16px; line-height: 1.5; color: var(--paper); text-decoration: none; }
a.site-footer__v { transition: color var(--dur-fast) var(--ease); }
a.site-footer__v:hover { color: var(--gray-300); }
.site-footer__base {
	max-width: var(--container); margin: 0 auto; padding: var(--space-5) var(--gutter);
	border-top: 1px solid var(--gray-800); display: flex; justify-content: space-between;
	font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--fg-inverse-muted);
}
.site-footer__social { display: flex; gap: var(--space-4); margin-top: var(--space-5); }
.site-footer__social a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-300); transition: color var(--dur-fast) var(--ease); }
.site-footer__social a:hover { color: var(--paper); }

/* ==========================================================================
   10. GLOBÁLIS MOBIL  (a szekció-mobil szabályok a blocks/ CSS-ekben vannak)
   ========================================================================== */
@media (max-width: 760px) {
	.site-nav { display: none; }
	.site-header__toggle {
		display: flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px 0;
	}
	.site-header__toggle i { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
	.site-header__toggle.is-open i:first-child { transform: translateY(3.5px) rotate(45deg); }
	.site-header__toggle.is-open i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
	.site-header__mobile:not([hidden]) {
		display: flex; flex-direction: column; background: var(--paper);
		border-top: 1px solid var(--line); padding: var(--space-4) var(--gutter) var(--space-6);
	}
	.site-header__mobile a {
		font-family: var(--font-display); font-weight: var(--w-semi); font-size: var(--text-2xl);
		color: var(--ink); padding: var(--space-3) 0; border-bottom: 1px solid var(--gray-100);
	}
	.site-header__mobile a.is-active { color: var(--accent); }

	.cta { padding-bottom: var(--space-8); }
	.cta__title { font-size: var(--text-3xl); }
	.cta__grid { grid-template-columns: 1fr; gap: var(--space-7); }
	.cta__left { justify-content: flex-start; }
	.cta__right { border-left: 0; padding-left: 0; justify-content: flex-start; }
	.cta__btns { grid-template-columns: 1fr; }

	.site-footer__inner { grid-template-columns: 1fr; gap: var(--space-7); }
}

/* ==========================================================================
   11. ÁLTALÁNOS OLDALAK  (page.php / index.php — pl. jogi szövegek)
   ========================================================================== */
.page-default, .index-page {
	max-width: 820px; margin: 0 auto; padding: var(--space-8) var(--gutter) var(--space-9);
}
.page-default > * + *, .index-page > * + * { margin-top: var(--space-5); }
.page-default h1, .page-default h2, .page-default h3 { margin-top: var(--space-7); }
.page-default a:not(.btn), .index-page a:not(.btn) {
	color: var(--ink); border-bottom: 1px solid var(--ink); transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.page-default a:not(.btn):hover, .index-page a:not(.btn):hover { color: var(--accent); border-color: var(--accent); }

/* 404 */
.error404 {
	max-width: var(--container); margin: 0 auto; padding: var(--space-9) var(--gutter);
	min-height: 50vh; display: flex; flex-direction: column; justify-content: center;
}
.error404__code {
	font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
	color: var(--accent); margin: 0 0 var(--space-4);
	display: inline-flex; align-items: center; gap: 12px;
}
.error404__code::before { content: ""; width: 14px; height: 14px; background: var(--accent); flex: none; }
.error404__title {
	font-family: var(--font-display); font-weight: var(--w-bold);
	font-size: clamp(2.25rem, 0.4rem + 4.7vw, 4.5rem); letter-spacing: -0.03em; line-height: 0.98;
	margin: 0 0 var(--space-5); max-width: 16ch;
}
.error404__lead { font-family: var(--font-body); font-weight: var(--w-light); font-size: var(--text-lg); line-height: 1.6; color: var(--fg-muted); max-width: 48ch; margin: 0 0 var(--space-7); }
.error404__actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

/* ==========================================================================
   12. REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.mph-img { opacity: 1 !important; }
}
