/*
Theme Name: Flow Mesh
Theme URI: https://flowme.sh
Author: Startempire Wire
Description: Mobile-first block theme for flowme.sh — dark developer aesthetic with display typography, layered glow textures, glass cards, custom SVG iconography. Verified at 395/760/1024/1440.
Version: 3.0.1
Requires at least: 6.4
Tested up to: 6.7
License: Proprietary — all rights reserved. No open-source license grant.
Text Domain: flowmesh
*/

/* ============ Design tokens ============ */
:root {
	--font-display: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--fm-bg: #05070d;
	--fm-raise: #0a0f1b;
	--fm-card: #0c1220;
	--fm-blue: #60a5fa;
	--fm-violet: #a78bfa;
	--fm-cyan: #67e8f9;
	--fm-green: #7ef0b2;
	--fm-grad: linear-gradient(100deg, #7ab5ff 0%, #b39dff 55%, #8b5cf6 100%);
}

/* ============ Base ============ */
html { scroll-behavior: smooth; }
body {
	font-family: var(--font-body);
	background: var(--fm-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
/* Layered ambient glow, fixed behind everything */
body::before {
	content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(ellipse 60% 42% at 18% -4%, rgba(59, 130, 246, .13), transparent 70%),
		radial-gradient(ellipse 55% 40% at 88% 32%, rgba(139, 92, 246, .09), transparent 70%),
		radial-gradient(ellipse 70% 45% at 50% 108%, rgba(34, 211, 238, .05), transparent 70%),
		var(--fm-bg);
}
/* Film grain — the subtle texture layer */
body::after {
	content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}
::selection { background: rgba(139, 92, 246, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--fm-violet); outline-offset: 3px; border-radius: 6px; }

/* ============ Header ============ */
.fm-nav { padding: 14px 0; border-bottom: 1px solid rgba(148, 163, 184, .12); position: sticky; top: 0; z-index: 50; background: rgba(5, 7, 13, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.fm-nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fm-nav .wp-block-site-title a { display: inline-flex; align-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: #f2f5fa !important; text-decoration: none; }
.fm-nav .wp-block-site-title a::before { content: ""; width: 15px; height: 15px; margin-right: 10px; background: linear-gradient(135deg, var(--fm-blue), var(--fm-violet)); transform: rotate(45deg); border-radius: 4px; box-shadow: 0 0 14px rgba(139, 92, 246, .65); flex: none; }
.fm-nav .wp-block-buttons { gap: 8px !important; }
.fm-nav .wp-block-button__link { padding: 8px 14px !important; font-size: .85rem !important; }

/* ============ Kickers ============ */
.fm-kicker { font-family: var(--font-mono); color: var(--fm-blue); font-size: 11px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 16px !important; display: flex; align-items: center; gap: 10px; }
.fm-kicker::before { content: ""; width: 26px; height: 2px; background: var(--fm-grad); border-radius: 2px; flex: none; box-shadow: 0 0 8px rgba(139, 92, 246, .7); }

/* ============ Hero ============ */
.fm-hero { position: relative; padding: 64px 0 10px; overflow: clip; }
/* Perspective grid floor, fading into the dark */
.fm-hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background-image:
		linear-gradient(rgba(148, 163, 184, .09) 1px, transparent 1px),
		linear-gradient(90deg, rgba(148, 163, 184, .09) 1px, transparent 1px);
	background-size: 46px 46px;
	mask-image: radial-gradient(ellipse 85% 68% at 50% 0%, black 25%, transparent 78%);
	-webkit-mask-image: radial-gradient(ellipse 85% 68% at 50% 0%, black 25%, transparent 78%);
}
/* Hero glow orb */
.fm-hero::after {
	content: ""; position: absolute; top: -180px; left: 50%; width: 640px; height: 420px;
	transform: translateX(-50%); pointer-events: none;
	background: radial-gradient(ellipse at center, rgba(99, 102, 241, .16), transparent 65%);
}
.fm-hero > * { position: relative; z-index: 1; }
.fm-hero h1 { font-family: var(--font-display); font-size: clamp(2.5rem, 10.5vw, 4.4rem); line-height: 1.0; letter-spacing: -.045em; font-weight: 800; color: #f4f7fc; margin-bottom: 20px !important; max-width: 760px; text-wrap: balance; }
.fm-hero em { font-style: normal; background: var(--fm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fm-sub { box-sizing: border-box; max-width: 760px; margin-left: auto !important; margin-right: auto !important; color: #a9b2c5; font-size: clamp(1.02rem, 2.8vw, 1.22rem); line-height: 1.68; font-weight: 400; margin-bottom: 28px !important; }
.fm-hero .wp-block-buttons { gap: 12px !important; }

/* ---- Buttons ---- */
.wp-block-button__link { position: relative; overflow: hidden; font-family: var(--font-body); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, background .16s ease !important; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
	color: #fff !important; font-weight: 700 !important; border-radius: 12px !important;
	box-shadow: 0 10px 28px rgba(99, 102, 241, .38), inset 0 1px 0 rgba(255, 255, 255, .28) !important;
	border: none !important;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 14px 34px rgba(99, 102, 241, .5), inset 0 1px 0 rgba(255, 255, 255, .3) !important; }
.wp-block-button:not(.is-style-outline) .wp-block-button__link::after {
	content: ""; position: absolute; top: 0; left: -80%; width: 55%; height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
	transform: skewX(-20deg); transition: left .5s ease;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover::after { left: 130%; }
.wp-block-button.is-style-outline .wp-block-button__link { background: rgba(148, 163, 184, .06) !important; color: #cdd7e6 !important; border: 1px solid rgba(148, 163, 184, .28) !important; border-radius: 12px !important; font-weight: 600 !important; backdrop-filter: blur(6px); }
.wp-block-button.is-style-outline .wp-block-button__link:hover { transform: translateY(-2px); border-color: rgba(122, 181, 255, .6) !important; color: #fff !important; background: rgba(79, 156, 249, .1) !important; }
.fm-hero .wp-block-button__link { padding: 14px 24px !important; font-size: .96rem !important; }

/* ---- Badge pills ---- */
.fm-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0 !important; }
.fm-badges span { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(148, 163, 184, .16); border-radius: 999px; padding: 6px 14px 6px 11px; font-size: 12px; font-weight: 500; color: #9aa5bb; white-space: nowrap; background: rgba(12, 18, 32, .6); backdrop-filter: blur(4px); }
.fm-badges span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: linear-gradient(135deg, var(--fm-blue), var(--fm-violet)); box-shadow: 0 0 6px rgba(139, 92, 246, .8); flex: none; }

/* ---- Stats strip ---- */
.fm-stats { display: flex; flex-wrap: wrap; gap: 12px 30px; padding: 20px 0; border-top: 1px solid transparent; border-image: linear-gradient(90deg, rgba(122, 181, 255, .5), rgba(167, 139, 250, .25), transparent 75%) 1; border-bottom: 1px solid rgba(148, 163, 184, .1); margin: 44px 0 0 !important; }
.fm-stats b { display: block; font-family: var(--font-display); font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; color: #f2f5fa; }
.fm-stats span { font-family: var(--font-mono); font-size: 10.5px; color: #7c8699; text-transform: uppercase; letter-spacing: .14em; }

/* ============ Sections ============ */
.fm-section { padding: 48px 0; position: relative; }
.fm-h2 { font-family: var(--font-display); font-size: clamp(1.7rem, 6vw, 2.75rem); letter-spacing: -.032em; font-weight: 800; line-height: 1.06; color: #f2f5fa; margin-bottom: 12px !important; text-wrap: balance; }
.fm-h2 em { font-style: normal; background: var(--fm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fm-h2-sub { box-sizing: border-box; max-width: 760px; margin-left: auto !important; margin-right: auto !important; color: #a3adc0; font-size: 1.02rem; line-height: 1.66; margin-bottom: 28px !important; }

/* ============ Cards ============ */
.fm-cards { gap: 14px !important; }
.fm-card {
	position: relative; height: 100%;
	background: linear-gradient(180deg, #101828 0%, var(--fm-card) 100%);
	border: 1px solid rgba(148, 163, 184, .14);
	border-radius: 18px; padding: 24px 22px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 18px 44px rgba(0, 0, 0, .35);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
	overflow: hidden;
}
/* Top light-catch line */
.fm-card::before { content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px; background: linear-gradient(90deg, transparent, rgba(196, 181, 253, .55), transparent); }
.fm-card:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 22px 55px rgba(0, 0, 0, .45), 0 0 32px rgba(99, 102, 241, .14); }
.fm-card h3 { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; letter-spacing: -.015em; color: #eef2f8; margin: 16px 0 8px !important; }
.fm-card p { color: #9aa5bb; font-size: .93rem; line-height: 1.65; margin: 0 !important; }
.fm-card code { font-family: var(--font-mono); color: var(--fm-cyan); font-size: .86em; background: rgba(103, 232, 249, .08); padding: 1px 6px; border-radius: 6px; border: 1px solid rgba(103, 232, 249, .16); }

/* ---- Icon tiles ---- */
.fm-icon { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 15px; background: linear-gradient(135deg, rgba(96, 165, 250, .24), rgba(139, 92, 246, .24)); border: 1px solid rgba(167, 139, 250, .32); color: #e3ecff; flex: none; box-shadow: 0 8px 22px rgba(99, 102, 241, .28), inset 0 1px 0 rgba(255, 255, 255, .22); }
.fm-icon svg { width: 24px; height: 24px; filter: drop-shadow(0 0 5px rgba(147, 197, 253, .55)); }

/* ============ Terminal window ============ */
.fm-termwin { margin: 28px 0 0; border-radius: 18px; overflow: hidden; background: #060a13; border: 1px solid rgba(148, 163, 184, .18); box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(59, 130, 246, .07); }
.fm-termbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: rgba(148, 163, 184, .06); border-bottom: 1px solid rgba(148, 163, 184, .12); }
.fm-termbar i { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.fm-termbar i:nth-child(1) { background: #f87171; opacity: .8; }
.fm-termbar i:nth-child(2) { background: #fbbf24; opacity: .8; }
.fm-termbar i:nth-child(3) { background: #34d399; opacity: .8; }
.fm-termbar b { flex: 1; text-align: center; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; color: #7c8699; }
.fm-termbar s { font-family: var(--font-mono); font-size: 10.5px; color: #5b6577; text-decoration: none; border: 1px solid rgba(148, 163, 184, .2); border-radius: 6px; padding: 2px 8px; }
.fm-term { background: transparent !important; border: none !important; border-radius: 0 !important; padding: 20px 18px 22px !important; font-family: var(--font-mono) !important; font-size: 12px !important; line-height: 1.78 !important; color: #dbe3f0 !important; overflow-x: auto; white-space: pre; margin: 0 !important; }
.fm-term::-webkit-scrollbar { height: 8px; }
.fm-term::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .25); border-radius: 4px; }
.fm-term .c { color: #6d7790; font-style: italic; }
.fm-term .p { color: var(--fm-green); font-weight: 500; }
.fm-term .u { color: var(--fm-cyan); }

/* ============ Pricing ============ */
.fm-price-tier { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #8b94a9; margin: 0 !important; }
.fm-price-amt { font-family: var(--font-display); font-size: clamp(2.3rem, 7.5vw, 3.1rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: #f4f7fc; margin: 12px 0 6px !important; }
.fm-price-per { color: #7c8699; font-size: .86rem; margin: 0 0 18px !important; }
.fm-price-list { font-size: .9rem; color: #9aa5bb; margin: 0 !important; padding: 0 !important; list-style: none !important; }
.fm-price-list li { padding: 6px 0 6px 28px; position: relative; line-height: 1.5; }
.fm-price-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: rgba(52, 211, 153, .14); border: 1px solid rgba(52, 211, 153, .5); }
.fm-price-list li::after { content: ""; position: absolute; left: 4.5px; top: 12.5px; width: 5px; height: 3px; border-left: 1.6px solid #34d399; border-bottom: 1.6px solid #34d399; transform: rotate(-45deg); }
.fm-featured { border: 1px solid transparent !important; background: linear-gradient(#0e1526, #0e1526) padding-box, linear-gradient(165deg, rgba(122, 181, 255, .75), rgba(167, 139, 250, .18) 42%, rgba(122, 181, 255, .55)) border-box !important; box-shadow: 0 0 0 1px rgba(122, 181, 255, .12), 0 24px 70px rgba(0, 0, 0, .5), 0 0 44px rgba(99, 102, 241, .18) !important; }
.fm-featured::before { background: linear-gradient(90deg, transparent, rgba(196, 181, 253, .8), transparent); }
.fm-featured .fm-price-amt { background: var(--fm-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fm-card p.fm-flag, .fm-flag { display: inline-flex; background: linear-gradient(90deg, #7ab5ff, #c4b5fd); color: #0b0e14; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px; margin: 0 0 14px !important; box-shadow: 0 4px 14px rgba(139, 92, 246, .4); }
.fm-pricing .wp-block-buttons { gap: 8px !important; margin-top: 20px; }
.fm-pricing .wp-block-button { flex: 1 1 100%; }
.fm-pricing .wp-block-button__link { padding: 11px 16px !important; font-size: .86rem !important; width: 100%; box-sizing: border-box; }

/* ============ Footer ============ */
.fm-footer { border-top: 1px solid transparent; border-image: linear-gradient(90deg, transparent 5%, rgba(148, 163, 184, .2) 50%, transparent 95%) 1; padding: 30px 0 44px; color: #6d7790; font-size: .85rem; }
.fm-footer a { color: #8b94a9; text-decoration: none; transition: color .15s ease; }
.fm-footer a:hover { color: var(--fm-blue); }

/* ============ ≥760px (tablet) ============ */
@media (min-width: 760px) {
	.fm-nav { padding: 16px 0; }
	.fm-hero { padding: 88px 0 14px; }
	.fm-section { padding: 64px 0; }
	.fm-term { font-size: 12.5px; padding: 22px 26px 24px !important; }
	.fm-cards { gap: 18px !important; }
	.fm-card { padding: 28px 26px; }
	.fm-pricing .wp-block-button { flex: 1 1 auto; }
}

/* ============ ≥1024px (desktop) ============ */
@media (min-width: 1024px) {
	.fm-hero { padding: 110px 0 18px; }
	.fm-hero h1 { font-size: clamp(3rem, 4.6vw, 4.4rem); max-width: 760px; }
	.fm-sub { padding-right: 240px; }
	.fm-h2-sub { padding-right: 240px; }
	.fm-section { padding: 84px 0; }
	.fm-nav .wp-block-button__link { padding: 9px 18px !important; font-size: .9rem !important; }
}

/* ============ ≥1440px (large desktop) ============ */
@media (min-width: 1440px) {
	.fm-hero { padding: 128px 0 22px; }
	.fm-section { padding: 96px 0; }
	.fm-hero h1 { font-size: 4.4rem; }
}

/* ============ Small phones ============ */
@media (max-width: 480px) {
	.fm-kicker { letter-spacing: .16em; }
	.fm-term { font-size: 11px !important; }
	.fm-hero h1 { font-size: clamp(2.35rem, 11vw, 2.9rem); }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
	.wp-block-button:not(.is-style-outline) .wp-block-button__link::after { display: none; }
}
