/**
 * EddyTools custom overrides + theme tokens.
 *
 * Tailwind handles utilities; this file defines the CSS variables those
 * utilities resolve to (so Dark/Light flips cleanly) and the glassy gradient +
 * grid background, plus a few things utilities can't reach.
 */

/* ---------------------------------------------------------------------------
   Color tokens — DARK (default). Values are space-separated RGB channels so
   Tailwind's `rgb(var(--x) / <alpha-value>)` colors get working opacity.
--------------------------------------------------------------------------- */
:root,
:root[data-theme="dark"] {
	--ink-950: 9 11 20;      /* page base            */
	--ink-900: 15 18 30;     /* nav / deep panels    */
	--ink-800: 22 26 42;     /* cards / surfaces     */
	--ink-700: 30 35 54;     /* elevated surfaces    */
	--line: 255 255 255;     /* borders + overlays   */

	--page-tint: rgba(99, 102, 241, 0.16); /* brand glow in bg */
	--grid-color: rgba(255, 255, 255, 0.035);
	--fg-strong: #ffffff;
	--fg-1: #cbd5e1;
	color-scheme: dark;
}

/* ---------------------------------------------------------------------------
   Color tokens — LIGHT.
--------------------------------------------------------------------------- */
:root[data-theme="light"] {
	--ink-950: 244 246 251;
	--ink-900: 255 255 255;
	--ink-800: 255 255 255;
	--ink-700: 236 240 248;
	--line: 15 23 42;

	--page-tint: rgba(99, 102, 241, 0.1);
	--grid-color: rgba(15, 23, 42, 0.055);
	--fg-strong: #0f172a;
	--fg-1: #475569;
	color-scheme: light;
}

html {
	scroll-behavior: smooth;
}

/* Glassy gradient + grid background applied site-wide (beats the body's
   .bg-ink-950 utility via the :root prefix). Cards sit translucent on top. */
:root body {
	background-color: rgb(var(--ink-950));
	background-image:
		linear-gradient(var(--grid-color) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
		radial-gradient(60rem 40rem at 50% -8%, var(--page-tint), transparent 70%),
		radial-gradient(48rem 32rem at 100% 0%, rgba(34, 211, 238, 0.08), transparent 70%);
	background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%;
	background-position: center top;
	background-attachment: fixed;
}

/* ---------------------------------------------------------------------------
   Light-mode text remaps. Neutral text utilities are literal in the markup,
   so remap the ones used for body/heading text (buttons on brand fills keep
   their color via `!text-white`).
--------------------------------------------------------------------------- */
:root[data-theme="light"] .text-white { color: #0f172a; }
:root[data-theme="light"] .text-slate-300 { color: #334155; }
:root[data-theme="light"] .text-slate-400 { color: #475569; }
:root[data-theme="light"] .text-slate-500 { color: #64748b; }
:root[data-theme="light"] .text-slate-600 { color: #94a3b8; }
/* Soften the raw-white CTA button so it reads on a light page. */
:root[data-theme="light"] .bg-white { box-shadow: 0 1px 0 rgba(15,23,42,.06), 0 10px 30px -12px rgba(15,23,42,.25); }
/* Keep white text on solid brand fills (buttons, badges, avatars) in light mode. */
:root[data-theme="light"] .from-brand-500.text-white,
:root[data-theme="light"] .bg-brand-600.text-white { color: #ffffff; }

/* Local grid-pattern blocks (hero, CTA) — theme-aware via the token. */
.nf-grid {
	background-image:
		linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
		linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
	background-size: 56px 56px;
}

/* Header scroll state — tighten and deepen the glass on scroll. */
#site-header.nf-scrolled nav {
	background-color: rgb(var(--ink-900) / 0.9);
	box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
}

/* Primary nav (WordPress-generated menu) — style menu items to match. */
.nf-menu {
	display: flex;
	align-items: center;
	gap: 2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.nf-menu a {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--fg-1);
	text-decoration: none;
	transition: color 0.2s ease;
}
.nf-menu a:hover {
	color: var(--fg-strong);
}

/* Reveal-on-scroll animation. */
[data-reveal] {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].nf-revealed {
	opacity: 1;
	transform: none;
}

/* Pagination styling. */
.nf-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	margin: 0 0.15rem;
	border-radius: 0.75rem;
	border: 1px solid rgb(var(--line) / 0.12);
	color: var(--fg-1);
	text-decoration: none;
	transition: all 0.2s ease;
}
.nf-pagination .page-numbers:hover,
.nf-pagination .page-numbers.current {
	background: linear-gradient(to right, #6366f1, #4f46e5);
	border-color: transparent;
	color: #ffffff;
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	[data-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.animate-float {
		animation: none !important;
	}
}

/* ---------------------------------------------------------------------------
   Block editor / pattern layout
--------------------------------------------------------------------------- */
.eddytools-blocks--full .alignfull {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.eddytools-blocks .wp-block-columns {
	gap: 1.5rem;
}

.eddytools-blocks .wp-block-separator {
	border-color: rgb(var(--line) / 0.12);
	opacity: 1;
}

.eddytools-blocks .wp-block-quote {
	border: 0;
	padding: 0;
	margin: 0 auto;
	max-width: 48rem;
}

.eddytools-blocks .wp-block-quote cite {
	display: block;
	margin-top: 1.5rem;
	font-size: 0.875rem;
	font-style: normal;
	color: #94a3b8;
}

/* Core Buttons — EddyTools variants (used by patterns). */
.wp-block-button.et-btn-primary .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border: 0;
	border-radius: 0.75rem;
	padding: 0.875rem 1.75rem;
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff !important;
	background-image: linear-gradient(to right, #6366f1, #4f46e5);
	box-shadow: 0 0 60px -12px rgba(99, 102, 241, 0.55);
	text-decoration: none;
	transition: filter 0.2s ease;
}

.wp-block-button.et-btn-primary .wp-block-button__link:hover {
	filter: brightness(1.1);
	color: #ffffff !important;
}

.wp-block-button.et-btn-ghost .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-radius: 0.75rem;
	padding: 0.875rem 1.75rem;
	font-size: 1rem;
	font-weight: 600;
	color: #ffffff !important;
	background: rgb(var(--line) / 0.05);
	border: 1px solid rgb(var(--line) / 0.15);
	text-decoration: none;
	transition: background 0.2s ease;
}

.wp-block-button.et-btn-ghost .wp-block-button__link:hover {
	background: rgb(var(--line) / 0.1);
	color: #ffffff !important;
}

.wp-block-button.has-custom-width .wp-block-button__link {
	width: 100%;
}

:root[data-theme="light"] .wp-block-button.et-btn-ghost .wp-block-button__link {
	color: #0f172a !important;
}
