/* ==========================================================================
   PRIDO - Shared design tokens / base layer
   --------------------------------------------------------------------------
   Transitional foundation extracted from css-maestro.css:26-285.
   Scope:
   - Replaces explicit module dependencies on `prido-css-maestro`.
   - Keeps the same root vars, theme modes and typography/base defaults.
   - Does NOT include home-specific or component-specific rules.
   -------------------------------------------------------------------------- */

:root {
	/* Primary palette */
	--prido-primary: var(--wd-primary-color, #5e81a2);
	--prido-secondary: var(--wd-secondary-color, #2dc6c1);
	--prido-dark: #1a2a3a;
	--prido-white: #ffffff;

	/* Contextual palette */
	--prido-muted: #6b7d8e;
	--prido-bg-tint: #f2f6f9;
	--prido-bg-light: #fafcfd;
	--prido-bg-product: #f8fafc;
	--prido-border-light: #e2e8ed;

	/* Semantic aliases */
	--prido-blue: var(--prido-primary);
	--prido-teal: var(--prido-secondary);
	--text-muted: var(--prido-muted);
	--border-light: var(--prido-border-light);

	/* Adaptive theme system */
	color-scheme: light;
	--prido-theme-name: light;
	--prido-theme-ink: #1a2a3a;
	--prido-theme-muted: #66788d;
	--prido-theme-border: rgba(201, 212, 221, 0.74);
	--prido-theme-border-strong: rgba(188, 201, 212, 0.9);
	--prido-theme-canvas: #f8fafc;
	--prido-theme-canvas-soft: #f2f6f9;
	--prido-theme-surface: rgba(255, 255, 255, 0.82);
	--prido-theme-surface-soft: rgba(255, 255, 255, 0.74);
	--prido-theme-surface-strong: rgba(255, 255, 255, 0.94);
	--prido-theme-surface-alt: #f8fbfd;
	--prido-theme-overlay: rgba(18, 29, 42, 0.22);
	--prido-theme-shadow: 0 20px 44px rgba(18, 29, 42, 0.08);
	--prido-theme-shadow-soft: 0 12px 24px rgba(18, 29, 42, 0.05);
	--prido-theme-glass-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 251, 253, 0.88));
	--prido-theme-glass-fill-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(249, 251, 253, 0.78));
	--prido-theme-glass-fill-strong: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.94));
	--prido-theme-chip-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.92));
	--prido-theme-chip-fill-hover: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(236, 245, 247, 0.94));
	--prido-glass-surface: var(--prido-theme-surface);
	--prido-glass-surface-soft: var(--prido-theme-surface-soft);
	--prido-glass-surface-strong: var(--prido-theme-surface-strong);
	--prido-glass-chip: var(--prido-theme-chip-fill);
	--prido-glass-chip-hover: var(--prido-theme-chip-fill-hover);
	--prido-glass-border: var(--prido-theme-border);
	--prido-glass-border-strong: var(--prido-theme-border-strong);
	--prido-glass-shadow: var(--prido-theme-shadow);
	--prido-glass-shadow-soft: var(--prido-theme-shadow-soft);
	--prido-glass-backdrop: saturate(138%) blur(18px);
	--prido-glass-backdrop-strong: saturate(150%) blur(24px);
	--prido-glass-accent-border: color-mix(in srgb, var(--prido-secondary) 22%, var(--prido-theme-border-strong) 78%);
	--prido-glass-accent-border-strong: color-mix(in srgb, var(--prido-secondary) 34%, var(--prido-theme-border-strong) 66%);
	--prido-glass-accent-fill: color-mix(in srgb, var(--prido-secondary) 9%, var(--prido-theme-chip-fill-hover) 91%);
	--prido-glass-accent-fill-strong: color-mix(in srgb, var(--prido-secondary) 14%, var(--prido-theme-chip-fill-hover) 86%);
	--prido-glass-shell: color-mix(in srgb, var(--prido-theme-surface-strong) 84%, var(--prido-theme-canvas) 16%);
	--prido-glass-shell-soft: color-mix(in srgb, var(--prido-theme-surface) 78%, var(--prido-theme-canvas) 22%);
	--prido-glass-shell-muted: color-mix(in srgb, var(--prido-theme-surface-soft) 74%, var(--prido-theme-canvas) 26%);
	--prido-glass-radius-pill: 999px;
	--prido-glass-radius-card: 24px;
	--prido-glass-radius-panel: 32px;
	--prido-theme-arrow-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366788d' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");

	/* Global type scale */
	--prido-font-body: 'Noto Sans', sans-serif;
	--prido-font-heading: 'Outfit', sans-serif;
	--prido-font-ui: 'Noto Sans', sans-serif;

	--prido-weight-regular: 400;
	--prido-weight-medium: 500;
	--prido-weight-semibold: 600;
	--prido-weight-bold: 700;
	--prido-weight-heavy: 800;

	--prido-type-overline: clamp(0.6875rem, 0.67rem + 0.08vw, 0.75rem);
	--prido-type-small: clamp(0.75rem, 0.72rem + 0.1vw, 0.8125rem);
	--prido-type-base: clamp(0.9375rem, 0.91rem + 0.12vw, 1rem);
	--prido-type-medium: clamp(1rem, 0.97rem + 0.16vw, 1.125rem);
	--prido-type-large: clamp(1.1875rem, 1.12rem + 0.28vw, 1.3125rem);
	--prido-type-h6: clamp(1rem, 0.98rem + 0.15vw, 1.125rem);
	--prido-type-h5: clamp(1.1875rem, 1.12rem + 0.28vw, 1.3125rem);
	--prido-type-h4: clamp(1.3125rem, 1.22rem + 0.42vw, 1.625rem);
	--prido-type-h3: clamp(1.625rem, 1.44rem + 0.72vw, 2.125rem);
	--prido-type-h2: clamp(2.125rem, 1.82rem + 1.15vw, 3.4375rem);
	--prido-type-h1: clamp(2.625rem, 2.18rem + 1.55vw, 4.5rem);
	--prido-type-hero: clamp(3rem, 2.4rem + 2.2vw, 5.5rem);

	--prido-leading-display: 0.92;
	--prido-leading-heading: 1.08;
	--prido-leading-ui: 1.2;
	--prido-leading-copy: 1.62;
	--prido-leading-copy-relaxed: 1.78;

	--prido-tracking-overline: 0.14em;
	--prido-tracking-tight: -0.04em;
	--prido-tracking-display: -0.065em;

	--prido-space-2xs: clamp(0.5rem, 0.47rem + 0.1vw, 0.625rem);
	--prido-space-xs: clamp(0.8125rem, 0.78rem + 0.08vw, 0.875rem);
	--prido-space-sm: clamp(1rem, 0.95rem + 0.12vw, 1.125rem);
	--prido-space-md: clamp(1.3125rem, 1.24rem + 0.28vw, 1.5rem);
	--prido-space-lg: clamp(2.125rem, 1.96rem + 0.52vw, 2.625rem);
	--prido-space-xl: clamp(3.4375rem, 3.1rem + 1vw, 4.5rem);

	--prido-flow-heading-to-ui: var(--prido-space-xs);
	--prido-flow-heading-to-copy: var(--prido-space-sm);
	--prido-flow-copy-to-copy: var(--prido-space-sm);
	--prido-flow-section: var(--prido-space-lg);
}

:root[data-theme="light"] {
	color-scheme: light;
}

:root[data-theme="dark"] {
	color-scheme: dark;
	--prido-theme-name: dark;
	--prido-theme-ink: #edf4f8;
	--prido-theme-muted: #9fb0bf;
	--prido-theme-border: rgba(255, 255, 255, 0.1);
	--prido-theme-border-strong: rgba(255, 255, 255, 0.16);
	--prido-theme-canvas: #111821;
	--prido-theme-canvas-soft: #151d27;
	--prido-theme-surface: rgba(19, 26, 34, 0.86);
	--prido-theme-surface-soft: rgba(19, 26, 34, 0.74);
	--prido-theme-surface-strong: rgba(24, 32, 41, 0.94);
	--prido-theme-surface-alt: #18202a;
	--prido-theme-overlay: rgba(4, 8, 12, 0.56);
	--prido-theme-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
	--prido-theme-shadow-soft: 0 14px 28px rgba(0, 0, 0, 0.26);
	--prido-theme-glass-fill: linear-gradient(180deg, rgba(24, 32, 42, 0.94), rgba(17, 23, 31, 0.9));
	--prido-theme-glass-fill-soft: linear-gradient(180deg, rgba(25, 34, 44, 0.86), rgba(17, 23, 31, 0.8));
	--prido-theme-glass-fill-strong: linear-gradient(180deg, rgba(28, 37, 48, 0.98), rgba(18, 24, 32, 0.94));
	--prido-theme-chip-fill: linear-gradient(180deg, rgba(30, 39, 49, 0.96), rgba(20, 26, 34, 0.92));
	--prido-theme-chip-fill-hover: linear-gradient(180deg, rgba(36, 48, 60, 0.98), rgba(21, 28, 36, 0.94));
	--prido-glass-surface: var(--prido-theme-surface);
	--prido-glass-surface-soft: var(--prido-theme-surface-soft);
	--prido-glass-surface-strong: var(--prido-theme-surface-strong);
	--prido-glass-chip: var(--prido-theme-chip-fill);
	--prido-glass-chip-hover: var(--prido-theme-chip-fill-hover);
	--prido-glass-border: var(--prido-theme-border);
	--prido-glass-border-strong: var(--prido-theme-border-strong);
	--prido-glass-shadow: var(--prido-theme-shadow);
	--prido-glass-shadow-soft: var(--prido-theme-shadow-soft);
	--prido-glass-backdrop: saturate(138%) blur(18px);
	--prido-glass-backdrop-strong: saturate(150%) blur(24px);
	--prido-glass-accent-border: color-mix(in srgb, var(--prido-secondary) 26%, var(--prido-theme-border-strong) 74%);
	--prido-glass-accent-border-strong: color-mix(in srgb, var(--prido-secondary) 38%, var(--prido-theme-border-strong) 62%);
	--prido-glass-accent-fill: color-mix(in srgb, var(--prido-secondary) 12%, var(--prido-theme-chip-fill-hover) 88%);
	--prido-glass-accent-fill-strong: color-mix(in srgb, var(--prido-secondary) 18%, var(--prido-theme-chip-fill-hover) 82%);
	--prido-glass-radius-pill: 999px;
	--prido-glass-radius-card: 24px;
	--prido-glass-radius-panel: 32px;
	--prido-theme-arrow-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d8e4ec' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		color-scheme: dark;
		--prido-theme-name: dark;
		--prido-theme-ink: #edf4f8;
		--prido-theme-muted: #9fb0bf;
		--prido-theme-border: rgba(255, 255, 255, 0.1);
		--prido-theme-border-strong: rgba(255, 255, 255, 0.16);
		--prido-theme-canvas: #111821;
		--prido-theme-canvas-soft: #151d27;
		--prido-theme-surface: rgba(19, 26, 34, 0.86);
		--prido-theme-surface-soft: rgba(19, 26, 34, 0.74);
		--prido-theme-surface-strong: rgba(24, 32, 41, 0.94);
		--prido-theme-surface-alt: #18202a;
		--prido-theme-overlay: rgba(4, 8, 12, 0.56);
		--prido-theme-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
		--prido-theme-shadow-soft: 0 14px 28px rgba(0, 0, 0, 0.26);
		--prido-theme-glass-fill: linear-gradient(180deg, rgba(24, 32, 42, 0.94), rgba(17, 23, 31, 0.9));
		--prido-theme-glass-fill-soft: linear-gradient(180deg, rgba(25, 34, 44, 0.86), rgba(17, 23, 31, 0.8));
		--prido-theme-glass-fill-strong: linear-gradient(180deg, rgba(28, 37, 48, 0.98), rgba(18, 24, 32, 0.94));
		--prido-theme-chip-fill: linear-gradient(180deg, rgba(30, 39, 49, 0.96), rgba(20, 26, 34, 0.92));
		--prido-theme-chip-fill-hover: linear-gradient(180deg, rgba(36, 48, 60, 0.98), rgba(21, 28, 36, 0.94));
		--prido-glass-surface: var(--prido-theme-surface);
		--prido-glass-surface-soft: var(--prido-theme-surface-soft);
		--prido-glass-surface-strong: var(--prido-theme-surface-strong);
		--prido-glass-chip: var(--prido-theme-chip-fill);
		--prido-glass-chip-hover: var(--prido-theme-chip-fill-hover);
		--prido-glass-border: var(--prido-theme-border);
		--prido-glass-border-strong: var(--prido-theme-border-strong);
		--prido-glass-shadow: var(--prido-theme-shadow);
		--prido-glass-shadow-soft: var(--prido-theme-shadow-soft);
		--prido-glass-backdrop: saturate(138%) blur(18px);
		--prido-glass-backdrop-strong: saturate(150%) blur(24px);
		--prido-glass-accent-border: color-mix(in srgb, var(--prido-secondary) 26%, var(--prido-theme-border-strong) 74%);
		--prido-glass-accent-border-strong: color-mix(in srgb, var(--prido-secondary) 38%, var(--prido-theme-border-strong) 62%);
		--prido-glass-accent-fill: color-mix(in srgb, var(--prido-secondary) 12%, var(--prido-theme-chip-fill-hover) 88%);
		--prido-glass-accent-fill-strong: color-mix(in srgb, var(--prido-secondary) 18%, var(--prido-theme-chip-fill-hover) 82%);
		--prido-glass-radius-pill: 999px;
		--prido-glass-radius-card: 24px;
		--prido-glass-radius-panel: 32px;
		--prido-theme-arrow-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d8e4ec' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	}
}

html,
body {
	background: var(--prido-theme-canvas);
	color: var(--prido-theme-ink);
}

html {
	font-size: 16px;
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--prido-font-body);
	font-size: var(--prido-type-base);
	line-height: var(--prido-leading-copy-relaxed);
}

.website-wrapper {
	background: transparent;
}

:where(h1, h2, h3, h4, h5, h6) {
	margin: 0;
	color: var(--prido-theme-ink);
	font-family: var(--prido-font-heading);
	font-weight: var(--prido-weight-bold);
	line-height: var(--prido-leading-heading);
	letter-spacing: var(--prido-tracking-tight);
	text-wrap: balance;
}

:where(h1) {
	font-size: var(--prido-type-h1);
}

:where(h2) {
	font-size: var(--prido-type-h2);
}

:where(h3) {
	font-size: var(--prido-type-h3);
}

:where(h4) {
	font-size: var(--prido-type-h4);
}

:where(h5) {
	font-size: var(--prido-type-h5);
}

:where(h6) {
	font-size: var(--prido-type-h6);
}

:where(p, li, dd, dt, blockquote) {
	font-size: var(--prido-type-base);
	line-height: var(--prido-leading-copy-relaxed);
}

:where(p) {
	margin: 0 0 var(--prido-flow-copy-to-copy);
}

:where(p:last-child) {
	margin-bottom: 0;
}

:where(small, label, .prido-type-small) {
	font-size: var(--prido-type-small);
	line-height: 1.45;
}

:where(button, .button, input, select, textarea) {
	font-family: var(--prido-font-ui);
}
