/*
 * NORTIA design tokens.
 *
 * Every color, font, size, space and timing used by the theme comes from here.
 * Change a value once and it updates everywhere.
 *
 * Status of each value:
 *   APPROVED    = owner decision, do not change without the owner.
 *   PROVISIONAL = owner's current choice, to be reviewed (fonts: on the real hero in Phase 3).
 *   PROPOSAL    = placeholder until the owner approves (DESIGN-DNA section 11).
 */

/* ---- Fonts (PROVISIONAL: pairing D) --------------------------------------
 * Self-hosted, SIL OFL (see assets/fonts/LICENSE-fonts.txt).
 * Subset: Basic Latin + Latin-1 + Turkish (Ğğ İı Şş) + punctuation, € ₺ ™.
 * Fraunces: optical size pinned at 144 (display), SOFT 100, WONK 1, weight 300–400.
 * Instrument Sans: weight 400–700, normal width. Has no ₺ glyph: the browser
 * draws ₺ from the next font in the stack.
 * Only instrument-sans.woff2 is preloaded (inc/enqueue.php).
 * The "Fallback" faces resize a local system font to the webfont's metrics,
 * so the swap causes no layout shift. */

@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 300 400;
	font-display: swap;
	src: url("../fonts/fraunces-soft-roman.woff2?v=1") format("woff2");
}

@font-face {
	font-family: "Fraunces";
	font-style: italic;
	font-weight: 300 400;
	font-display: swap;
	src: url("../fonts/fraunces-soft-italic.woff2?v=1") format("woff2");
}

@font-face {
	font-family: "Instrument Sans";
	font-style: normal;
	font-weight: 400 700;
	font-display: swap;
	src: url("../fonts/instrument-sans.woff2?v=1") format("woff2");
}

/* Georgia sized to Fraunces (sample: Turkish running text). */
@font-face {
	font-family: "Fraunces Fallback";
	src: local("Georgia");
	size-adjust: 83.11%;
	ascent-override: 117.67%;
	descent-override: 30.68%;
	line-gap-override: 0%;
}

/* Arial sized to Instrument Sans. */
@font-face {
	font-family: "Instrument Sans Fallback";
	src: local("Arial"), local("ArialMT");
	size-adjust: 101.44%;
	ascent-override: 95.63%;
	descent-override: 24.65%;
	line-gap-override: 0%;
}

:root {
	/* ---- Color ---------------------------------------------------------- */
	--color-bg: #F7F5F0;            /* APPROVED: primary background */
	--color-surface: #EFECE6;       /* APPROVED: secondary surface */

	--color-text: #1E1B17;          /* PROPOSAL: warm near-black, never pure black */
	--color-text-muted: #5E5850;    /* PROPOSAL: secondary text, 6.5:1 on --color-bg */
	--color-line: #D9D4CB;          /* PROPOSAL: hairlines and dividers */
	--color-accent: #7A4B34;        /* PROPOSAL: single accent, "oxidised iron" of the nail */
	--color-on-accent: #F7F5F0;     /* text on the accent */
	--color-focus: var(--color-accent); /* PROPOSAL: focus ring, follows the accent */

	/* Hero (PROPOSAL): dark, warm ground of the "Nail of Years" film.
	   Placeholder values until the real poster/video exists; then they are
	   matched to its first frame. Same warm temperature as the approved colors. */
	--color-hero-bg: #1E1B17;          /* PROPOSAL: stone wall in darkness (= --color-text) */
	--color-hero-glow: #3A332B;        /* PROPOSAL: the single light on the wall (placeholder only) */
	--color-hero-ink: var(--color-bg); /* text, header and buttons over the hero: approved #F7F5F0 */
	--color-hero-ink-muted: #B8AFA3;   /* PROPOSAL: secondary text over the hero, 8:1 on --color-hero-bg */
	--color-hero-ink-dim: #8C857C;     /* PROPOSAL: not-yet-filled part of the hero line, 4.5:1 on --color-hero-bg */

	/* ---- Typography ----------------------------------------------------- */
	/* PROVISIONAL: pairing D (Fraunces soft + Instrument Sans), see @font-face above. */
	--font-display: "Fraunces", "Fraunces Fallback", Georgia, serif;
	--font-body: "Instrument Sans", "Instrument Sans Fallback", Arial, sans-serif;

	/* Fluid type scale (min at 360px, max at 1440px). */
	--text-xs: clamp(0.75rem, 0.73rem + 0.1vw, 0.8125rem);
	--text-sm: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
	--text-base: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
	--text-lg: clamp(1.125rem, 1.06rem + 0.3vw, 1.3125rem);
	--text-xl: clamp(1.375rem, 1.2rem + 0.75vw, 1.875rem);
	--text-2xl: clamp(1.75rem, 1.4rem + 1.6vw, 2.875rem);
	--text-3xl: clamp(2.25rem, 1.6rem + 3vw, 4.5rem);
	--text-display: clamp(2.75rem, 1.5rem + 5.5vw, 7.5rem);

	--leading-tight: 1.05;
	--leading-snug: 1.25;
	--leading-body: 1.6;
	--tracking-display: -0.01em;
	--tracking-label: 0.06em;

	/* ---- Space ---------------------------------------------------------- */
	--space-3xs: 0.25rem;
	--space-2xs: 0.5rem;
	--space-xs: 0.75rem;
	--space-s: 1rem;
	--space-m: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
	--space-l: clamp(2rem, 1.6rem + 1.8vw, 3rem);
	--space-xl: clamp(3rem, 2.2rem + 3.6vw, 5.5rem);
	--space-2xl: clamp(4.5rem, 3rem + 6.5vw, 9rem);

	/* ---- Layout --------------------------------------------------------- */
	--container-max: 90rem;                         /* 1440px */
	--container-text: 40rem;                        /* comfortable line length */
	--gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
	--header-height: 4rem;
	--tap-target: 2.75rem;                          /* 44px minimum touch target */

	/* ---- Shape ---------------------------------------------------------- */
	--radius-s: 2px;
	--border-hairline: 1px solid var(--color-line);

	/* ---- Motion --------------------------------------------------------- */
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);      /* calm, cinematic settle */
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	--duration-fast: 160ms;                          /* UI feedback (cart, checkout) */
	--duration-base: 320ms;
	--duration-slow: 720ms;                          /* editorial reveals */
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--duration-fast: 0ms;
		--duration-base: 0ms;
		--duration-slow: 0ms;
	}
}
