/* =========================================================================
 * Z DIZAJN - design tokens
 *
 * Single source of truth for colour, type, spacing and motion. Nothing here
 * paints anything; base.css and the section styles consume these variables.
 * If a value needs to change site-wide, it changes here and nowhere else.
 *
 * Direction: warm editorial. Bone paper, deep warm black, bronze accent,
 * a high-contrast serif for display and a geometric sans for everything
 * functional (per todo/WhatsApp Image 2026-08-06 at 16.37.51.jpeg).
 * ====================================================================== */

:root {
	/* ---------------------------------------------------------------
	 * Palette - raw values. Use the semantic tokens below in components.
	 * ------------------------------------------------------------ */
	--zd-bone: #f3f0ea;          /* page ground, light bands            */
	--zd-bone-deep: #e8e2d7;     /* second light band (newsletter etc.) */
	--zd-ink: #16130f;           /* dark bands, footer                  */
	--zd-ink-soft: #221e19;      /* dark band variant, overlays         */
	--zd-graphite: #211e1a;      /* body text on light                  */
	--zd-stone: #6b635a;         /* secondary text on light             */
	--zd-chalk: #f5f2ec;         /* text on dark                        */
	--zd-bronze: #a08256;        /* accent - links, rules, small marks  */
	--zd-bronze-light: #c8ae85;  /* accent on dark ground               */

	/* ---------------------------------------------------------------
	 * Semantic - light surface is the default. Anything inside .zd-dark
	 * gets the inverted set, so a component is written once and works on
	 * both grounds as long as it uses these and never the raw palette.
	 * ------------------------------------------------------------ */
	--zd-bg: var(--zd-bone);
	--zd-bg-alt: var(--zd-bone-deep);
	--zd-fg: var(--zd-graphite);
	--zd-fg-muted: var(--zd-stone);
	--zd-accent: var(--zd-bronze);
	--zd-rule: rgba(33, 30, 26, 0.14);
	--zd-rule-strong: rgba(33, 30, 26, 0.28);
	--zd-overlay: rgba(22, 19, 15, 0.45);
	--zd-field-bg: rgba(33, 30, 26, 0.04);

	/* ---------------------------------------------------------------
	 * Type
	 * ------------------------------------------------------------ */
	/* Was Cormorant Garamond until 17.08.2026 - it draws the lowercase caron and
	   acute at capital height, so š/ž/č/ć came out with the accent floating off
	   the letter in every heading. See _install/build-fonts.sh. */
	--zd-font-display: "EB Garamond", "Times New Roman", Times, serif;
	--zd-font-body: "Jost", "Helvetica Neue", Helvetica, Arial, sans-serif;

	/* Fluid scale, desktop-first: the clamp maximum is the design size and
	   the minimum is the phone size, so step 5 mostly tunes layout, not type. */
	--zd-size-hero: clamp(2.5rem, 5.2vw, 4.75rem);
	--zd-size-h1: clamp(2.125rem, 4vw, 3.5rem);
	--zd-size-h2: clamp(1.75rem, 3vw, 2.75rem);
	--zd-size-h3: clamp(1.375rem, 2.2vw, 2rem);
	--zd-size-h4: clamp(1.25rem, 1.6vw, 1.5rem);
	--zd-size-h5: 1.125rem;
	--zd-size-h6: 1rem;
	--zd-size-lead: clamp(1.0625rem, 1.3vw, 1.25rem);
	--zd-size-body: 1rem;
	--zd-size-small: 0.875rem;
	--zd-size-label: 0.6875rem;   /* eyebrows, nav, buttons, meta */

	--zd-lh-display: 1.12;
	--zd-lh-heading: 1.25;
	--zd-lh-body: 1.75;
	--zd-lh-tight: 1.4;

	/* EB Garamond's axis starts at 400; 300 would only clamp back up to it. */
	--zd-weight-display: 400;
	--zd-weight-body: 400;
	--zd-weight-label: 500;

	--zd-track-display: 0.045em;  /* serif caps need air */
	--zd-track-label: 0.18em;     /* nav, buttons, eyebrows */
	--zd-track-body: 0.005em;

	--zd-measure: 62ch;           /* readable line length for body copy */
	--zd-measure-lead: 46ch;

	/* ---------------------------------------------------------------
	 * Space - 8px base. Section rhythm is fluid so the vertical feel
	 * survives the jump from 1920 to 375.
	 * ------------------------------------------------------------ */
	--zd-space-3xs: 4px;
	--zd-space-2xs: 8px;
	--zd-space-xs: 12px;
	--zd-space-sm: 16px;
	--zd-space-md: 24px;
	--zd-space-lg: 32px;
	--zd-space-xl: 48px;
	--zd-space-2xl: 64px;
	--zd-space-3xl: 96px;
	--zd-space-4xl: 128px;
	--zd-space-5xl: 160px;

	--zd-section-y: clamp(4.5rem, 8vw, 9rem);
	--zd-section-y-tight: clamp(3rem, 5vw, 5rem);
	--zd-stack: clamp(1.5rem, 2.5vw, 2.5rem);   /* gap between blocks in a section */

	--zd-container: 1360px;
	--zd-container-narrow: 820px;
	--zd-gutter: clamp(1.25rem, 4vw, 3.5rem);

	/* ---------------------------------------------------------------
	 * Motion - consumed properly in step 6, defined here so nothing
	 * invents its own easing in the meantime.
	 * ------------------------------------------------------------ */
	--zd-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--zd-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
	--zd-dur-fast: 0.25s;
	--zd-dur: 0.45s;
	--zd-dur-slow: 0.8s;
}

/* Dark ground. Put it on any section wrapper (hero, ABOUT band, CTA, footer)
   and every token-driven component inverts with it. */
.zd-dark {
	--zd-bg: var(--zd-ink);
	--zd-bg-alt: var(--zd-ink-soft);
	--zd-fg: var(--zd-chalk);
	--zd-fg-muted: rgba(245, 242, 236, 0.66);
	--zd-accent: var(--zd-bronze-light);
	--zd-rule: rgba(245, 242, 236, 0.2);
	--zd-rule-strong: rgba(245, 242, 236, 0.4);
	--zd-overlay: rgba(22, 19, 15, 0.6);
	--zd-field-bg: rgba(245, 242, 236, 0.08);

	background-color: var(--zd-bg);
	color: var(--zd-fg);
}
