/* =========================================================================
 * Z DIZAJN - global base layer
 *
 * Maps the tokens onto the elements and onto the parent theme's primitives.
 * Loaded after prague-theme-css and prague-dynamic-css (see functions.php),
 * so plain selectors win ties and !important stays rare - it is used only
 * where Prague sets the same property from a deeper selector, and each use
 * is flagged with a short reason.
 *
 * Scope of this file is global: type, colour, spacing, links, buttons,
 * fields, rules. Header/footer chrome is step 3, page sections are step 4.
 * ====================================================================== */

/* -------------------------------------------------------------------------
 * Inheritance, handed back
 *
 * Prague's compiled CSS carries a bare `* { font-family: Roboto, sans-serif }`.
 * A universal selector beats inheritance on every element, so any text that
 * should take its face from a parent - a title split into <span> lines, a list
 * inside a serif block, a button - silently came out in the UI face instead,
 * and no amount of setting the parent helped. Handing the universal rule back
 * to `inherit` restores the normal cascade: everything takes body's face
 * unless a component says otherwise.
 *
 * Same story for the font-size and line-height that rule also carried; those
 * are dealt with where they matter, in the section stylesheets.
 * ---------------------------------------------------------------------- */

*,
::before,
::after {
	font-family: inherit;
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}


/* -------------------------------------------------------------------------
 * Document
 * ---------------------------------------------------------------------- */

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	background-color: var(--zd-bg);
	color: var(--zd-fg);
	font-family: var(--zd-font-body);
	font-size: var(--zd-size-body);
	font-weight: var(--zd-weight-body);
	line-height: var(--zd-lh-body);
	letter-spacing: var(--zd-track-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background-color: var(--zd-accent);
	color: var(--zd-bone);
}

/* -------------------------------------------------------------------------
 * Display type
 *
 * !important: Prague sets font-family/weight on headings from component
 * selectors (.prague-blog .item h3 and friends) that outrank a bare h3.
 * ---------------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--zd-font-display) !important;
	font-weight: var(--zd-weight-display) !important;
	line-height: var(--zd-lh-heading);
	letter-spacing: var(--zd-track-display);
	color: var(--zd-fg);
	margin-top: 0;
}

h1, .h1 { font-size: var(--zd-size-h1); line-height: var(--zd-lh-display); }
h2, .h2 { font-size: var(--zd-size-h2); }
h3, .h3 { font-size: var(--zd-size-h3); }
h4, .h4 { font-size: var(--zd-size-h4); }
h5, .h5 { font-size: var(--zd-size-h5); }
h6, .h6 { font-size: var(--zd-size-h6); }

/* Hero and other statement lines: uppercase serif, wide tracking, thin. */
.zd-display {
	font-family: var(--zd-font-display);
	font-size: var(--zd-size-hero);
	font-weight: var(--zd-weight-display);
	line-height: var(--zd-lh-display);
	letter-spacing: var(--zd-track-display);
	text-transform: uppercase;
	margin: 0;
}

.zd-lead {
	font-size: var(--zd-size-lead);
	line-height: var(--zd-lh-tight);
	max-width: var(--zd-measure-lead);
	color: var(--zd-fg);
}

/* Small caps label: nav items, eyebrows, button text, meta. */
.zd-label {
	font-family: var(--zd-font-body);
	font-size: var(--zd-size-label);
	font-weight: var(--zd-weight-label);
	line-height: 1;
	letter-spacing: var(--zd-track-label);
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
 * Body copy
 * ---------------------------------------------------------------------- */

p, li, dd, blockquote {
	color: var(--zd-fg);
}

p {
	margin: 0 0 var(--zd-space-md);
	max-width: var(--zd-measure);
}

p:last-child {
	margin-bottom: 0;
}

small, .zd-small {
	font-size: var(--zd-size-small);
	color: var(--zd-fg-muted);
}

blockquote {
	font-family: var(--zd-font-display);
	font-size: var(--zd-size-h4);
	font-style: italic;
	line-height: var(--zd-lh-tight);
	border-left: 1px solid var(--zd-accent);
	margin: var(--zd-space-xl) 0;
	padding-left: var(--zd-space-lg);
}

hr,
.zd-rule {
	border: 0;
	border-top: 1px solid var(--zd-rule);
	margin: var(--zd-space-xl) 0;
}

/* Short bronze rule under section eyebrows, as in the mockup. */
.zd-rule--short {
	width: 48px;
	border-top-color: var(--zd-accent);
	margin: var(--zd-space-md) 0;
}

/* -------------------------------------------------------------------------
 * Links
 * ---------------------------------------------------------------------- */

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--zd-dur-fast) var(--zd-ease),
		border-color var(--zd-dur-fast) var(--zd-ease),
		opacity var(--zd-dur-fast) var(--zd-ease);
}

a:hover,
a:focus {
	color: var(--zd-accent);
}

/* Inline links inside running copy stay underlined - they are content, not UI. */
.zd-prose a,
.entry-content a,
.post-content p a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
	text-decoration-color: var(--zd-rule-strong);
}

.zd-prose a:hover,
.entry-content a:hover,
.post-content p a:hover {
	text-decoration-color: var(--zd-accent);
}

:focus-visible {
	outline: 2px solid var(--zd-accent);
	outline-offset: 3px;
}

/* -------------------------------------------------------------------------
 * Buttons
 *
 * .a-btn is Prague's button, used by every theme widget; .button is
 * WooCommerce. Both become the same bordered, letterspaced block from the
 * mockup ("EXPLORE", "VISIT GALLERY & SHOP", "POSALJI UPIT").
 * ---------------------------------------------------------------------- */

.a-btn,
.button,
button,
input[type="submit"],
input[type="button"],
.zd-btn {
	font-family: var(--zd-font-body) !important; /* .a-btn hard-codes Roboto */
	font-size: var(--zd-size-label);
	font-weight: var(--zd-weight-label);
	line-height: 1;
	letter-spacing: var(--zd-track-label);
	text-transform: uppercase;
	color: var(--zd-fg);
	background-color: transparent;
	border: 1px solid var(--zd-rule-strong);
	border-radius: 0;
	padding: var(--zd-space-sm) var(--zd-space-lg);
	cursor: pointer;
	transition: color var(--zd-dur-fast) var(--zd-ease),
		background-color var(--zd-dur-fast) var(--zd-ease),
		border-color var(--zd-dur-fast) var(--zd-ease);
}

.a-btn:hover,
.button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.zd-btn:hover {
	color: var(--zd-bg);
	background-color: var(--zd-fg);
	border-color: var(--zd-fg);
}

/* Solid variant for the one primary action per section (JOIN, SEND). */
.zd-btn--solid {
	color: var(--zd-bg);
	background-color: var(--zd-fg);
	border-color: var(--zd-fg);
}

.zd-btn--solid:hover {
	background-color: var(--zd-accent);
	border-color: var(--zd-accent);
	color: var(--zd-bone);
}

/* Text link with a rule under it - Prague's "EXPLORE" pattern. */
.zd-btn--text {
	border: 0;
	padding: 0 0 var(--zd-space-3xs);
	border-bottom: 1px solid var(--zd-rule-strong);
	background-color: transparent;
}

.zd-btn--text:hover {
	color: var(--zd-accent);
	background-color: transparent;
	border-bottom-color: var(--zd-accent);
}

/* -------------------------------------------------------------------------
 * Fields
 *
 * Generic controls plus a light pass over Formidable, which Prague styles
 * with grey boxes and a 3px bottom border. We keep the field flat with a
 * hairline rule, coloured from the tokens so it works on both grounds.
 * ---------------------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea,
.frm_forms.with_frm_style input[type="text"],
.frm_forms.with_frm_style input[type="email"],
.frm_forms.with_frm_style input[type="tel"],
.frm_forms.with_frm_style select,
.frm_forms.with_frm_style textarea {
	font-family: var(--zd-font-body);
	font-size: var(--zd-size-small);
	line-height: var(--zd-lh-tight);
	color: var(--zd-fg);
	background-color: var(--zd-field-bg);
	border: 0;
	border-bottom: 1px solid var(--zd-rule);
	border-radius: 0;
	box-shadow: none;
	padding: var(--zd-space-sm) var(--zd-space-md);
	transition: border-color var(--zd-dur-fast) var(--zd-ease);
}

input:focus,
select:focus,
textarea:focus,
.frm_forms.with_frm_style input:focus,
.frm_forms.with_frm_style textarea:focus {
	border-bottom-color: var(--zd-accent);
	color: var(--zd-fg);
	outline: none;
}

::placeholder {
	color: var(--zd-fg-muted);
	opacity: 1;
}

label,
.frm_primary_label {
	font-family: var(--zd-font-body);
	font-size: var(--zd-size-label);
	font-weight: var(--zd-weight-label);
	letter-spacing: var(--zd-track-label);
	text-transform: uppercase;
	color: var(--zd-fg-muted);
}

/* Formidable ships its own blue submit button and a red asterisk, both from
   its style set - which outranks the plain `button` rule above, hence the
   full selector here. */
.frm_forms.with_frm_style .frm_submit button,
.frm_forms.with_frm_style .frm_submit input[type="submit"],
.frm_forms.with_frm_style .frm_submit input[type="button"] {
	font-family: var(--zd-font-body);
	font-size: var(--zd-size-label);
	font-weight: var(--zd-weight-label);
	line-height: 1;
	letter-spacing: var(--zd-track-label);
	text-transform: uppercase;
	color: var(--zd-bg);
	background: var(--zd-fg);
	border: 1px solid var(--zd-fg);
	border-radius: 0;
	padding: var(--zd-space-sm) var(--zd-space-lg);
}

.frm_forms.with_frm_style .frm_submit button:hover,
.frm_forms.with_frm_style .frm_submit input[type="submit"]:hover,
.frm_forms.with_frm_style .frm_submit input[type="button"]:hover {
	color: var(--zd-bone);
	background: var(--zd-accent);
	border-color: var(--zd-accent);
}

.frm_forms.with_frm_style .frm_required {
	color: var(--zd-accent);
}

/* -------------------------------------------------------------------------
 * Layout primitives
 *
 * Sections are full-bleed bands; the container holds the text inside them.
 * Prague's own .container (bootstrap) is left alone - these are additive and
 * are what the step 4 sections will be built on.
 * ---------------------------------------------------------------------- */

.zd-section {
	background-color: var(--zd-bg);
	color: var(--zd-fg);
	padding-top: var(--zd-section-y);
	padding-bottom: var(--zd-section-y);
}

.zd-section--tight {
	padding-top: var(--zd-section-y-tight);
	padding-bottom: var(--zd-section-y-tight);
}

.zd-section--flush {
	padding-top: 0;
	padding-bottom: 0;
}

.zd-container {
	width: 100%;
	max-width: var(--zd-container);
	margin-inline: auto;
	padding-inline: var(--zd-gutter);
}

.zd-container--narrow {
	max-width: var(--zd-container-narrow);
}

.zd-stack > * + * {
	margin-top: var(--zd-stack);
}

/* Bands. Put these on an Elementor container to give a section its ground:
   .zd-dark (tokens.css) flips to the inverted palette, .zd-band-alt is the
   second light tone, .zd-band the default one. Used instead of picking a
   background colour per section in the editor, so a palette change in
   tokens.css still reaches every page. */
.zd-band {
	background-color: var(--zd-bg);
	color: var(--zd-fg);
}

.zd-band-alt {
	background-color: var(--zd-bg-alt);
	color: var(--zd-fg);
}

/* Vertical rhythm for sections built in Elementor. */
.zd-band,
.zd-band-alt,
.zd-dark {
	padding-top: var(--zd-section-y);
	padding-bottom: var(--zd-section-y);
}

.zd-band--flush {
	padding-top: 0;
	padding-bottom: 0;
}

/* -------------------------------------------------------------------------
 * Media
 * ---------------------------------------------------------------------- */

img,
video {
	max-width: 100%;
	height: auto;
}

figcaption {
	font-size: var(--zd-size-small);
	color: var(--zd-fg-muted);
	margin-top: var(--zd-space-2xs);
}

/* -------------------------------------------------------------------------
 * Motion preference - the animation step will add movement on top of this,
 * so the opt-out is in place from the start.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
