/*
 * RXFloor — Design Tokens
 *
 * Single source of truth for color, type, space, motion, layout.
 * Every clamp() below is continuous from ~360px to ~1920px viewport so the
 * type and spacing scale smoothly without breakpoint overrides.
 */

:root {
	/* ── Color ── */
	--rx-ink: #000000;
	--rx-charcoal: #2d3742;
	--rx-graphite: #4a5562;
	--rx-fog: #8a929c;
	--rx-mist: #c4cad0;
	--rx-cloud: #f6f7f8;
	--rx-paper: #ffffff;

	--rx-lime: #a4d500;        /* Pantone 383 */
	--rx-lime-deep: #6b8c00;   /* Pantone 392 */
	--rx-lime-glow: rgba(164, 213, 0, 0.18);

	/* Semantic roles */
	--rx-surface: var(--rx-paper);
	--rx-surface-soft: var(--rx-cloud);
	--rx-surface-inverse: var(--rx-ink);
	--rx-surface-inverse-soft: var(--rx-charcoal);
	--rx-text: var(--rx-charcoal);
	--rx-text-soft: var(--rx-graphite);
	--rx-text-muted: var(--rx-fog);
	--rx-text-inverse: var(--rx-paper);
	--rx-text-inverse-soft: rgba(255, 255, 255, 0.78);
	--rx-text-inverse-muted: rgba(255, 255, 255, 0.56);
	--rx-accent: var(--rx-lime);
	--rx-accent-deep: var(--rx-lime-deep);
	--rx-accent-glow: var(--rx-lime-glow);
	--rx-border: rgba(45, 55, 66, 0.12);
	--rx-border-strong: rgba(45, 55, 66, 0.28);
	--rx-border-inverse: rgba(255, 255, 255, 0.12);
	--rx-border-inverse-strong: rgba(255, 255, 255, 0.24);
	--rx-overlay: rgba(0, 0, 0, 0.6);

	/* ── Type ──
	   Brand-locked: Aptos exclusively, in 4 weights per the official norm.
	   Hierarchy comes from weight + size + letter-spacing, not from a second
	   typeface.
	     Aptos Light    (300) — body, lead, sub-titles, lists
	     Aptos SemiBold (600) — Titre 3, UI labels
	     Aptos Bold     (700) — Titre 1, section heads
	     Aptos ExtraBold(800) — Titre 2, display moments, stat figures
	*/
	--rx-font: "Aptos", system-ui, -apple-system, "Segoe UI", sans-serif;
	--rx-font-display: var(--rx-font);

	--rx-text-xs:   clamp(0.72rem, 0.66rem + 0.18vw, 0.84rem);
	--rx-text-sm:   clamp(0.84rem, 0.78rem + 0.22vw, 0.96rem);
	--rx-text-md:   clamp(0.96rem, 0.9rem  + 0.26vw, 1.08rem);
	--rx-text-lg:   clamp(1.08rem, 1rem    + 0.32vw, 1.24rem);
	--rx-text-xl:   clamp(1.24rem, 1.1rem  + 0.6vw,  1.5rem);
	--rx-text-2xl:  clamp(1.5rem,  1.2rem  + 1.3vw,  2rem);
	--rx-text-3xl:  clamp(2rem,    1.4rem  + 2.5vw,  2.8rem);
	--rx-text-4xl:  clamp(2.4rem,  1.6rem  + 3.4vw,  3.8rem);
	--rx-text-5xl:  clamp(3rem,    1.8rem  + 5vw,    5.2rem);
	--rx-text-6xl:  clamp(3.6rem,  2rem    + 6.6vw,  7rem);
	--rx-text-7xl:  clamp(4rem,    2.2rem  + 8vw,    8.5rem);
	--rx-text-display: clamp(5rem, 2.5rem + 12vw, 14rem);

	--rx-leading-tight:  0.92;
	--rx-leading-snug:   1.12;
	--rx-leading-normal: 1.5;
	--rx-leading-loose:  1.65;

	--rx-tracking-tight:   -0.04em;
	--rx-tracking-snug:    -0.02em;
	--rx-tracking-normal:  0;
	--rx-tracking-wide:    0.04em;
	--rx-tracking-widest:  0.14em;

	--rx-weight-light:    300;
	--rx-weight-regular:  400;
	--rx-weight-medium:   500;
	--rx-weight-semibold: 600;
	--rx-weight-bold:     700;
	--rx-weight-black:    800;

	/* ── Space (fluid) ── */
	--rx-space-1:  clamp(0.25rem, 0.22rem + 0.1vw, 0.3rem);
	--rx-space-2:  clamp(0.5rem,  0.44rem + 0.2vw, 0.6rem);
	--rx-space-3:  clamp(0.75rem, 0.66rem + 0.3vw, 0.9rem);
	--rx-space-4:  clamp(1rem,    0.88rem + 0.4vw, 1.2rem);
	--rx-space-5:  clamp(1.25rem, 1.1rem  + 0.5vw, 1.5rem);
	--rx-space-6:  clamp(1.5rem,  1.32rem + 0.6vw, 1.8rem);
	--rx-space-8:  clamp(2rem,    1.76rem + 0.8vw, 2.4rem);
	--rx-space-10: clamp(2.5rem,  2.2rem  + 1vw,   3rem);
	--rx-space-12: clamp(3rem,    2.64rem + 1.2vw, 3.6rem);
	--rx-space-16: clamp(4rem,    3.52rem + 1.6vw, 4.8rem);
	--rx-space-20: clamp(5rem,    4.4rem  + 2vw,   6rem);
	--rx-space-24: clamp(6rem,    5.28rem + 2.4vw, 7.2rem);
	--rx-space-32: clamp(8rem,    7rem    + 3.2vw, 9.6rem);

	--rx-section-pad-block:  clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
	--rx-section-pad-inline: clamp(1.25rem, 0.6rem + 2.6vw, 3rem);
	--rx-content-max: 76rem;
	--rx-prose-max: 38rem;

	/* ── Motion ── */
	--rx-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
	--rx-ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
	--rx-ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);

	--rx-dur-instant:   120ms;
	--rx-dur-fast:      240ms;
	--rx-dur-medium:    420ms;
	--rx-dur-slow:      720ms;
	--rx-dur-cinematic: 1200ms;

	/* ── Layout ──
	   Sharper than typical web defaults — closer to industrial/architectural
	   spec sheets than to consumer SaaS. Cards get small radii, photos slightly
	   larger.
	*/
	--rx-radius-sm:   2px;
	--rx-radius-md:   4px;
	--rx-radius-lg:   6px;
	--rx-radius-xl:   10px;
	--rx-radius-pill: 999px;

	--rx-shadow-sm:   0 4px 16px rgba(0, 0, 0, 0.08);
	--rx-shadow-md:   0 12px 32px rgba(0, 0, 0, 0.12);
	--rx-shadow-lg:   0 24px 60px rgba(0, 0, 0, 0.18);
	--rx-shadow-hero: 0 40px 100px rgba(0, 0, 0, 0.24);

	/* ── Triangle motif (shape primitives) ── */
	--rx-triangle-tl:    polygon(0 0, 100% 0, 0 100%);
	--rx-triangle-tr:    polygon(0 0, 100% 0, 100% 100%);
	--rx-triangle-br:    polygon(100% 0, 100% 100%, 0 100%);
	--rx-triangle-bl:    polygon(0 0, 100% 100%, 0 100%);
	--rx-triangle-right: polygon(0 0, 100% 50%, 0 100%);

	/* ── System ── */
	--rx-header-height: clamp(3.6rem, 3.2rem + 1vw, 4.6rem);
	--rx-admin-offset:  0px;
	--rx-z-base:     0;
	--rx-z-content:  1;
	--rx-z-decor:    2;
	--rx-z-overlay:  10;
	--rx-z-header:   50;
	--rx-z-modal:    100;
}

body.admin-bar { --rx-admin-offset: 32px; }
@media (max-width: 782px) {
	body.admin-bar { --rx-admin-offset: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--rx-dur-instant:   0ms;
		--rx-dur-fast:      0ms;
		--rx-dur-medium:    0ms;
		--rx-dur-slow:      0ms;
		--rx-dur-cinematic: 0ms;
	}
}
