/* ===== Patvik CV Builder — base tokens + host reset =====
 *
 * Loaded on both the builder and dashboard shells before builder.css /
 * dashboard.css. Defines the CSS custom properties everything downstream
 * reads (--ink, --paper, --primary, --font-*, etc.) and the host-scoped
 * element reset so the WP theme can't bleed into the builder DOM.
 *
 * Anything visual lives in builder.css / dashboard.css. This file is
 * intentionally tiny.
 */

:root {
	/* Palette */
	--primary:        #ff671f;
	--primary-soft:   #ffb88a;
	--primary-deep:   #d44a0a;

	--ink:            #1a1410;
	--ink-soft:       #2a2018;
	--ink-mute:       #5a4a3e;
	--ink-faint:      #8a7866;

	--paper:          #faf6ef;
	--paper-soft:     #f3ecdf;
	--paper-deeper:   #ebe2cf;

	--peach:          #f5d6a8;
	--peach-soft:     #fde9c8;

	--rule:           rgba(26, 20, 16, 0.12);
	--rule-strong:    rgba(26, 20, 16, 0.22);

	/* Type */
	--font-sans:     "Manrope", system-ui, sans-serif;
	--font-display:  "Instrument Serif", "Newsreader", Georgia, serif;
	--font-deva:     "Mukta", "Noto Sans Devanagari", system-ui, sans-serif;

	/* Density / layout knobs (overridable per shell) */
	--pad-sect:  120px;
	--pad-block:  32px;
	--gap:        24px;
	--container: 1280px;

	/* Surface */
	--bg:           var(--paper);
	--fg:           var(--ink);
	--fg-mute:      var(--ink-mute);
	--surface:      #ffffff;
	--surface-soft: var(--paper-soft);
	--card-shadow:  0 1px 0 rgba(26,20,16,0.04), 0 12px 32px -16px rgba(26,20,16,0.18);
}

[data-density="compact"] {
	--pad-sect:  80px;
	--pad-block: 20px;
	--gap:       16px;
}

[data-theme="dark"] {
	--bg:           #14100c;
	--fg:           #f5ede0;
	--fg-mute:      #b8a896;
	--surface:      #1d1812;
	--surface-soft: #221c15;
	--rule:         rgba(245, 237, 224, 0.10);
	--rule-strong:  rgba(245, 237, 224, 0.22);
	--paper:        #14100c;
	--paper-soft:   #1d1812;
	--paper-deeper: #261f16;
	--ink:          #f5ede0;
	--ink-soft:     #e8dcc8;
	--ink-mute:     #b8a896;
	--ink-faint:    #8a7866;
	--card-shadow:  0 1px 0 rgba(255,255,255,0.03), 0 12px 32px -16px rgba(0,0,0,0.6);
}

/* Font-pair overrides (used by data-fontpair="..." on the host) */
[data-fontpair="manrope_instrument"] {
	--font-sans:    "Manrope", system-ui, sans-serif;
	--font-display: "Instrument Serif", Georgia, serif;
}
[data-fontpair="geist_newsreader"] {
	--font-sans:    "Geist", system-ui, sans-serif;
	--font-display: "Newsreader", Georgia, serif;
}
[data-fontpair="space_crimson"] {
	--font-sans:    "Space Grotesk", system-ui, sans-serif;
	--font-display: "Crimson Pro", Georgia, serif;
}

/* Reset — scoped to the builder host so the WP theme can't bleed into the
   builder DOM (and vice versa). Universal box-sizing inside the host. */
.patvik-cvb-host,
.patvik-cvb-host *,
.patvik-cvb-host *::before,
.patvik-cvb-host *::after { box-sizing: border-box; }
.patvik-cvb-host {
	font-family: var(--font-sans);
	background: var(--bg);
	color: var(--fg);
	font-size: 16px;
	line-height: 1.55;
	font-weight: 400;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
.patvik-cvb-host img,
.patvik-cvb-host svg { display: block; max-width: 100%; }
.patvik-cvb-host button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
.patvik-cvb-host a { color: inherit; text-decoration: none; }
.patvik-cvb-host :is(h1,h2,h3,h4,h5,h6,p) { margin: 0; }

/* Devanagari font swap — applied to any node with class="deva" anywhere in
   the builder/dashboard JSX trees. Letter-spacing is collapsed because
   Devanagari doesn't tolerate tracking. */
.deva { font-family: var(--font-deva); letter-spacing: 0; }

/* Loading splash before React boots */
.patvik-cvb-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 80px 24px;
	color: var(--ink-mute);
	font-family: var(--font-sans);
}
.patvik-cvb-loading-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--primary);
	animation: patvik-pulse 1.2s ease-in-out infinite;
}
@keyframes patvik-pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

/* Sign-in shortcode — kept zero-dep so it works on any theme. */
.patvik-signin {
	max-width: 420px;
	margin: 0 auto;
	padding: 32px 28px;
	background: var(--surface);
	border: 1px solid var(--rule);
	border-radius: 18px;
	font-family: var(--font-sans);
	color: var(--ink);
}
.patvik-signin h2 {
	font-family: var(--font-display);
	font-size: 30px;
	line-height: 1.1;
	margin: 0 0 6px;
	font-weight: 400;
}
.patvik-signin-hint { color: var(--ink-mute); font-size: 14px; margin: 0 0 18px; }
.patvik-signin form { display: flex; flex-direction: column; gap: 10px; }
.patvik-signin-label {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-mute);
	font-weight: 600;
}
.patvik-signin input[type="email"] {
	font: inherit;
	font-size: 15px;
	padding: 12px 14px;
	border: 1px solid var(--rule-strong);
	border-radius: 10px;
	background: var(--paper);
	color: var(--ink);
}
.patvik-signin input[type="email"]:focus { outline: 0; border-color: var(--ink); }
.patvik-signin button {
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	padding: 13px 18px;
	border-radius: 999px;
	background: var(--ink);
	color: var(--paper);
	cursor: pointer;
}
.patvik-signin button:hover { background: var(--primary); }
.patvik-signin button:disabled { opacity: 0.6; cursor: wait; }
.patvik-signin-error {
	background: #fbeae9;
	color: #7a1813;
	font-size: 13px;
	padding: 10px 14px;
	border-radius: 10px;
	margin-bottom: 14px;
}
.patvik-signin-result {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--paper-soft);
	color: var(--ink);
	font-size: 14px;
	line-height: 1.5;
}
.patvik-signin--in { padding: 18px 22px; }
