/*
 * Skobex — design tokens (OBL wp-kit v1.2.0; glass v2 + draw tokens U5 / kit 1.3.0).
 * Variables + the self-hosted @font-face rules ONLY. Rules live in style.css
 * (G1 W-G1-09 greps style.css for prefers-reduced-motion / :focus-visible /
 * scroll-margin-top — keep them there).
 * Every value here is set by the approved DESIGN-BRIEF.md (G0, DEC-20260921-045):
 * palette "Spalvos", type "Tipografika" (Archivo wdth 125 display, IBM Plex Sans body).
 */

/* ---- fonts: 2 families, latin + latin-ext, woff2 only, swap (assets/fonts/README) ---- */
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 600 800;
	font-stretch: 125%;
	font-display: swap;
	src: url("fonts/archivo-latin-wdth125-600-800.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Archivo";
	font-style: normal;
	font-weight: 600 800;
	font-stretch: 125%;
	font-display: swap;
	src: url("fonts/archivo-latin-ext-wdth125-600-800.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 100 700;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-latin-100-700.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "IBM Plex Sans";
	font-style: normal;
	font-weight: 100 700;
	font-display: swap;
	src: url("fonts/ibm-plex-sans-latin-ext-100-700.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- metric-matched fallbacks (U5): while the woff2 loads, Arial is drawn at the web font's
 * width/vertical metrics, so the swap moves nothing measurable. Ratios computed from the font
 * files (fontTools) against Arial's advance table: Plex vs Arial 100.3 %, Archivo wdth125 vs
 * Arial Bold 125.8 %; ascent/descent = the fonts' own hhea values. Devices without Arial fall
 * through to the rest of the stack unchanged. ---- */
@font-face {
	font-family: "Archivo Fallback";
	src: local("Arial Bold"), local("Arial");
	font-weight: 600 800;
	size-adjust: 125.8%;
	ascent-override: 87.8%;
	descent-override: 21%;
	line-gap-override: 0%;
}
@font-face {
	font-family: "IBM Plex Sans Fallback";
	src: local("Arial");
	font-weight: 100 700;
	size-adjust: 100.3%;
	ascent-override: 102.5%;
	descent-override: 27.5%;
	line-gap-override: 0%;
}

:root {
	/* ---- colour: DESIGN-BRIEF "Spalvos" — dark industrial; contrast in the brief + U1 notes ---- */
	--c-bg: #0f1012;          /* Plieno juoda — page background */
	--c-bg-2: #1c1e22;        /* Grafitas — alternate band */
	--c-surface: #1c1e22;     /* Grafitas — cards, inputs, header, footer */
	--c-ink: #f2f0ec;         /* Nebalta — body text on --c-bg 16.7:1 (measured; brief says 17.6) */
	--c-muted: #9aa0a8;       /* Cinkas — secondary text on --c-bg 7.2:1, on --c-surface 6.3:1; dimension labels */
	--c-line: #4a4f57;        /* Plienas — decorative hairlines only (2.3:1 on --c-bg); input borders use --c-muted (≥ 3:1) */
	--c-accent: #e12221;      /* Skobex raudona — buttons, drawing, active link; ≤ 5 % of area */
	--c-accent-deep: #b81a19; /* hover / pressed */
	--c-accent-ink: #ffffff;  /* text on accent 4.72:1 (nebalta on red is 4.14 — U1 note); red text on --c-bg 4.04:1 = large/UI only, never body links */
	--c-light: #f2f0ec;       /* Nebalta as a light section background */
	--c-light-ink: #0f1012;   /* text on a light section */
	--c-light-muted: #4a4f57; /* Plienas — secondary text on light 7.2:1 */
	--c-ok: #2e7d4f;
	--c-warn: #c48a1b;
	--c-err: #e12221;         /* error = red + text, never colour alone */
	--c-glass: rgba(225, 34, 33, .08);       /* glass v2 tint (design-v2/SPEC.md § 1): only over a photo or drawing lines, never over flat --c-bg */
	--c-glass-line: rgba(255, 255, 255, .18);

	/* ---- type: Archivo wdth 125 (display, numbers) + IBM Plex Sans (text, tables, forms) ---- */
	--ff-body: "IBM Plex Sans", "IBM Plex Sans Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--ff-display: "Archivo", "Archivo Fallback", "Arial Black", Impact, -apple-system, "Segoe UI", sans-serif;
	--fs-base: 1.0625rem;                          /* 17 px body (SOP § 5: 16–17 / 17 / max 18) */
	--lh-body: 1.55;
	--fs-sm: 0.8125rem;                            /* 13 px — table units, captions */
	--fs-lg: 1.125rem;                             /* 18 px — lead */
	--fs-h3: clamp(1.125rem, 1.05rem + .3vw, 1.3rem);   /* 18 → 20.8 px: card titles, SOP band 18–22 */
	--fs-h2: clamp(1.4rem, 1.05rem + 1.4vw, 1.9rem);    /* 22.4 → 30.4 px: SOP band 22–24 / 28–32 */
	--fs-h1: clamp(1.85rem, 1.2rem + 2.6vw, 2.5rem);    /* 29.6 → 40 px: SOP band 28–32 / 36–42 (brief 72 is above the band — U1 note) */
	--fs-num: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);     /* glass-panel numbers, Archivo 400–600 */
	--fw-body: 400;
	--fw-bold: 600;
	--fw-display: 700;
	--ls-display: -0.01em;
	--measure: 68ch;
	--num-features: "tnum" 1;                      /* tabular numerals in dimension tables */

	/* ---- space & shape: industrial = small radii ---- */
	--s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
	--s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
	--wrap: 1200px;
	--wrap-narrow: 820px;
	--gutter: clamp(20px, 4vw, 40px);
	--radius: 4px;                                 /* buttons, inputs (brief: radius 4) */
	--radius-lg: 22px;                             /* glass panels only (brief: radius 22) */
	--btn-h: 46px;                                 /* buttons 44–48 px */
	--header-h: 72px;

	/* ---- motion: one easing; the signature = the staple drawing "assembles" once ---- */
	--ease: cubic-bezier(.2, .6, .2, 1);
	--dur-fast: 150ms;
	--dur: 450ms;
	--dur-slow: 600ms;
	--dur-signature: 1500ms;                       /* the whole staple-drawing sequence after load (draw 900 ms → marks 600 ms), ≤ 1.6 s, once */
	--dur-draw: 1200ms;                            /* U5 wow tier: process line stroke-draw (icons 600 ms, stagger 80 ms), count-up 1400 ms */
	--rv-shift: 24px;

	/* ---- icons: 24-px grid, stroke 1.8 (brief), currentColor ---- */
	--icon-size: 24px;
	--icon-stroke: 1.8;
	--glass-blur: 14px;                            /* glass v2: blur 14 px + saturate 160 % (SPEC § 1) */
}
