/**
 * The Four Tabs – Blog Front Page
 * frontend.css — tokens, base, layout, shared components.
 */

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
	--tft-bfp-bg: #050505;
	--tft-bfp-bg-2: #0b0f14;
	--tft-bfp-card: rgba(17, 18, 26, 0.55);
	--tft-bfp-card-solid: #11121a;
	--tft-bfp-accent: #00e5ff;
	--tft-bfp-accent-2: #3b82f6;
	--tft-bfp-accent-3: #8b5cf6;
	--tft-bfp-text: #ffffff;
	--tft-bfp-muted: #9aa3b2;
	--tft-bfp-muted-2: #6b7280;
	--tft-bfp-border: rgba(255, 255, 255, 0.08);
	--tft-bfp-border-strong: rgba(255, 255, 255, 0.16);
	--tft-bfp-glass: rgba(17, 18, 26, 0.55);
	--tft-bfp-glass-2: rgba(255, 255, 255, 0.04);
	--tft-bfp-radius-lg: 24px;
	--tft-bfp-radius-md: 16px;
	--tft-bfp-radius-sm: 10px;
	--tft-bfp-radius-pill: 999px;
	--tft-bfp-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
	--tft-bfp-shadow-glow: 0 0 0 1px rgba(0, 229, 255, 0.18), 0 20px 60px -20px rgba(0, 229, 255, 0.25);
	--tft-bfp-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--tft-bfp-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--tft-bfp-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--tft-bfp-transition: 0.45s var(--tft-bfp-ease);
}

/* ============================================================
   2. Base
   ============================================================ */
.tft-bfp,
.tft-bfp *,
.tft-bfp *::before,
.tft-bfp *::after {
	box-sizing: border-box;
}

.tft-bfp {
	font-family: var(--tft-bfp-font);
	background: var(--tft-bfp-bg);
	color: var(--tft-bfp-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
	min-height: 100vh;
	position: relative;
	scroll-behavior: smooth;
}

.tft-bfp a {
	color: inherit;
	text-decoration: none;
}

.tft-bfp img {
	max-width: 100%;
	display: block;
}

.tft-bfp-container {
	width: min(1200px, 92%);
	margin-inline: auto;
}

.tft-bfp-screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.tft-bfp-skip {
	position: fixed;
	top: -100px;
	left: 16px;
	z-index: 9999;
	padding: 12px 20px;
	border-radius: var(--tft-bfp-radius-sm);
	background: var(--tft-bfp-accent);
	color: #050505;
	font-weight: 700;
	transition: top 0.3s ease;
}

.tft-bfp-skip:focus {
	top: 16px;
}

/* ============================================================
   3. Typography
   ============================================================ */
.tft-bfp-section {
	padding: clamp(64px, 9vw, 120px) 0;
	position: relative;
}

.tft-bfp-section-head {
	max-width: 640px;
	margin-bottom: clamp(32px, 5vw, 56px);
}

.tft-bfp-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--tft-bfp-accent);
	margin-bottom: 14px;
}

.tft-bfp-eyebrow::before {
	content: "";
	width: 24px;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--tft-bfp-accent), var(--tft-bfp-accent-2));
}

.tft-bfp-section-title {
	font-size: clamp(26px, 3.6vw, 42px);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0 0 12px;
	background: linear-gradient(120deg, #fff 30%, #c9d6e8 70%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.tft-bfp-section-desc {
	color: var(--tft-bfp-muted);
	font-size: 16px;
	margin: 0;
	max-width: 560px;
}

/* ============================================================
   4. Icons & buttons
   ============================================================ */
.tft-bfp-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.tft-bfp-btn-magnetic {
	position: relative;
	transition: transform 0.3s var(--tft-bfp-ease-spring), box-shadow 0.35s ease, background 0.35s ease;
	will-change: transform;
}

/* ============================================================
   5. Chips
   ============================================================ */
.tft-bfp-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	border-radius: var(--tft-bfp-radius-pill);
	background: var(--tft-bfp-glass-2);
	border: 1px solid var(--tft-bfp-border);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	font-size: 13px;
	font-weight: 600;
	color: #d7dee8;
	transition: all 0.3s var(--tft-bfp-ease);
}

.tft-bfp-chip:hover {
	border-color: rgba(0, 229, 255, 0.5);
	color: #fff;
	box-shadow: 0 0 24px rgba(0, 229, 255, 0.18);
	transform: translateY(-2px);
}

.tft-bfp-chip__count {
	font-size: 11px;
	padding: 1px 8px;
	border-radius: var(--tft-bfp-radius-pill);
	background: rgba(0, 229, 255, 0.12);
	color: var(--tft-bfp-accent);
}

/* ============================================================
   6. Search bar
   ============================================================ */
.tft-bfp-searchbar {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 720px;
	margin-bottom: 28px;
}

.tft-bfp-searchbar__icon {
	position: absolute;
	left: 20px;
	width: 22px;
	height: 22px;
	color: var(--tft-bfp-muted);
	pointer-events: none;
}

.tft-bfp-searchbar__input {
	width: 100%;
	padding: 18px 60px 18px 56px;
	font-size: 16px;
	font-family: var(--tft-bfp-font);
	color: var(--tft-bfp-text);
	background: var(--tft-bfp-glass);
	border: 1px solid var(--tft-bfp-border);
	border-radius: var(--tft-bfp-radius-pill);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	outline: none;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tft-bfp-searchbar__input::placeholder {
	color: var(--tft-bfp-muted-2);
}

.tft-bfp-searchbar__input:focus {
	border-color: rgba(0, 229, 255, 0.6);
	box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.12), 0 0 32px rgba(0, 229, 255, 0.15);
}

.tft-bfp-searchbar__clear {
	position: absolute;
	right: 10px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	background: transparent;
	color: var(--tft-bfp-muted);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.tft-bfp-searchbar__clear:hover {
	background: rgba(255, 255, 255, 0.08);
	transform: rotate(90deg);
}

.tft-bfp-searchbar.has-value .tft-bfp-searchbar__clear {
	opacity: 1;
	pointer-events: auto;
}

/* ============================================================
   7. Filters
   ============================================================ */
.tft-bfp-filters {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 44px;
}

.tft-bfp-filters__row {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.tft-bfp-filters__label {
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--tft-bfp-muted-2);
	min-width: 74px;
}

.tft-bfp-filter-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tft-bfp-filter-pills button {
	appearance: none;
	border: 1px solid var(--tft-bfp-border);
	background: var(--tft-bfp-glass-2);
	color: var(--tft-bfp-muted);
	font: 600 13px var(--tft-bfp-font);
	padding: 8px 16px;
	border-radius: var(--tft-bfp-radius-pill);
	cursor: pointer;
	transition: all 0.28s var(--tft-bfp-ease);
}

.tft-bfp-filter-pills button:hover {
	color: #fff;
	border-color: var(--tft-bfp-border-strong);
	transform: translateY(-1px);
}

.tft-bfp-filter-pills button.is-active {
	background: linear-gradient(135deg, var(--tft-bfp-accent), var(--tft-bfp-accent-2));
	color: #050505;
	border-color: transparent;
	font-weight: 700;
	box-shadow: 0 8px 24px -8px rgba(0, 229, 255, 0.5);
}

/* ============================================================
   8. Results grid
   ============================================================ */
.tft-bfp-results__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.tft-bfp-results.is-loading {
	position: relative;
	min-height: 320px;
}

.tft-bfp-results.is-loading::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(5, 5, 5, 0.55), rgba(5, 5, 5, 0.55));
	backdrop-filter: blur(2px);
	z-index: 5;
}

/* ============================================================
   9. Pagination
   ============================================================ */
.tft-bfp-pagination {
	display: flex;
	justify-content: center;
	margin-top: 56px;
}

.tft-bfp-pagination__inner {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px;
	border-radius: var(--tft-bfp-radius-pill);
	background: var(--tft-bfp-glass);
	border: 1px solid var(--tft-bfp-border);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.tft-bfp-page {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 8px;
	border-radius: 50%;
	font: 700 14px var(--tft-bfp-font);
	color: var(--tft-bfp-muted);
	background: transparent;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all 0.28s var(--tft-bfp-ease);
}

a.tft-bfp-page:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.06);
	transform: translateY(-2px);
}

.tft-bfp-page.is-current {
	background: linear-gradient(135deg, var(--tft-bfp-accent), var(--tft-bfp-accent-2));
	color: #050505;
	box-shadow: 0 8px 24px -8px rgba(0, 229, 255, 0.55);
	transform: scale(1.08);
}

.tft-bfp-page.is-disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.tft-bfp-page.tft-bfp-prev,
.tft-bfp-page.tft-bfp-next {
	font-size: 18px;
	line-height: 1;
}

/* ============================================================
   10. Load more
   ============================================================ */
.tft-bfp-loadmore {
	display: flex;
	justify-content: center;
	margin-top: 40px;
}

.tft-bfp-loadmore__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	border-radius: var(--tft-bfp-radius-pill);
	border: 1px solid rgba(0, 229, 255, 0.35);
	background: linear-gradient(135deg, rgba(0, 229, 255, 0.12), rgba(59, 130, 246, 0.12));
	color: #fff;
	font: 700 14px var(--tft-bfp-font);
	cursor: pointer;
	transition: all 0.3s var(--tft-bfp-ease);
}

.tft-bfp-loadmore__btn:hover {
	box-shadow: 0 0 32px rgba(0, 229, 255, 0.25);
	border-color: var(--tft-bfp-accent);
	transform: translateY(-2px);
}

.tft-bfp-loadmore.is-loading .tft-bfp-loadmore__spinner {
	animation: tft-bfp-spin 0.8s linear infinite;
	display: block;
}

.tft-bfp-loadmore__spinner {
	display: none;
	width: 18px;
	height: 18px;
}

@keyframes tft-bfp-spin {
	to { transform: rotate(360deg); }
}

/* ============================================================
   11. Newsletter
   ============================================================ */
.tft-bfp-newsletter__card {
	position: relative;
	overflow: hidden;
	border-radius: 28px;
	padding: clamp(40px, 7vw, 80px);
	background: linear-gradient(160deg, rgba(17, 18, 26, 0.9), rgba(11, 15, 20, 0.95));
	border: 1px solid var(--tft-bfp-border);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
}

.tft-bfp-newsletter__card::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: 1px;
	background: linear-gradient(135deg, rgba(0, 229, 255, 0.4), transparent 30%, transparent 70%, rgba(139, 92, 246, 0.4));
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	pointer-events: none;
}

.tft-bfp-newsletter__aurora {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.tft-bfp-newsletter__inner {
	position: relative;
	max-width: 620px;
	text-align: center;
	margin-inline: auto;
}

.tft-bfp-newsletter__inner .tft-bfp-section-title {
	margin-bottom: 14px;
}

.tft-bfp-newsletter__form {
	display: flex;
	gap: 12px;
	margin-top: 32px;
	flex-wrap: wrap;
	justify-content: center;
}

.tft-bfp-newsletter__input {
	flex: 1 1 300px;
	padding: 16px 22px;
	border-radius: var(--tft-bfp-radius-pill);
	border: 1px solid var(--tft-bfp-border);
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	font: 500 15px var(--tft-bfp-font);
	outline: none;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.tft-bfp-newsletter__input:focus {
	border-color: rgba(0, 229, 255, 0.6);
	box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.12);
}

.tft-bfp-newsletter__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 28px;
	border-radius: var(--tft-bfp-radius-pill);
	border: 0;
	background: linear-gradient(135deg, var(--tft-bfp-accent), var(--tft-bfp-accent-2));
	color: #050505;
	font: 800 15px var(--tft-bfp-font);
	cursor: pointer;
	transition: all 0.3s var(--tft-bfp-ease);
}

.tft-bfp-newsletter__btn:hover {
	box-shadow: 0 12px 40px -8px rgba(0, 229, 255, 0.55);
	transform: translateY(-2px);
}

.tft-bfp-newsletter__note {
	min-height: 22px;
	margin-top: 16px;
	font-size: 14px;
	color: var(--tft-bfp-muted);
}

.tft-bfp-newsletter__note.is-success { color: #4ade80; }
.tft-bfp-newsletter__note.is-error { color: #f87171; }

/* ============================================================
   12. Empty state
   ============================================================ */
.tft-bfp-empty {
	text-align: center;
	padding: clamp(48px, 8vw, 96px) 24px;
	border: 1px dashed var(--tft-bfp-border-strong);
	border-radius: var(--tft-bfp-radius-lg);
	background: var(--tft-bfp-glass);
}

.tft-bfp-empty__icon {
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	margin: 0 auto 20px;
	border-radius: 20px;
	background: rgba(0, 229, 255, 0.08);
	color: var(--tft-bfp-accent);
}

.tft-bfp-empty__icon .tft-bfp-icon {
	width: 32px;
	height: 32px;
}

.tft-bfp-empty__title {
	font-size: 22px;
	font-weight: 800;
	margin: 0 0 8px;
}

.tft-bfp-empty__desc {
	color: var(--tft-bfp-muted);
	margin: 0 0 24px;
}

.tft-bfp-empty__reset {
	padding: 12px 24px;
	border-radius: var(--tft-bfp-radius-pill);
	border: 1px solid rgba(0, 229, 255, 0.4);
	background: transparent;
	color: #fff;
	font: 700 14px var(--tft-bfp-font);
	cursor: pointer;
	transition: all 0.3s var(--tft-bfp-ease);
}

.tft-bfp-empty__reset:hover {
	background: rgba(0, 229, 255, 0.12);
	box-shadow: 0 0 24px rgba(0, 229, 255, 0.2);
}

/* ============================================================
   13. Skeleton loader
   ============================================================ */
.tft-bfp-skeleton-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.tft-bfp-skeleton {
	border-radius: var(--tft-bfp-radius-lg);
	background: var(--tft-bfp-card);
	border: 1px solid var(--tft-bfp-border);
	overflow: hidden;
	padding: 12px 12px 24px;
}

.tft-bfp-skeleton__media {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: var(--tft-bfp-radius-md);
	margin-bottom: 18px;
}

.tft-bfp-skeleton__line {
	display: block;
	height: 14px;
	border-radius: 8px;
	margin: 0 8px 10px;
}

.shimmer {
	background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.04) 75%);
	background-size: 200% 100%;
	animation: tft-bfp-shimmer 1.6s infinite;
}

@keyframes tft-bfp-shimmer {
	from { background-position: 200% 0; }
	to { background-position: -200% 0; }
}

/* ============================================================
   14. Focus & accessibility
   ============================================================ */
.tft-bfp :focus-visible {
	outline: 2px solid var(--tft-bfp-accent);
	outline-offset: 3px;
	border-radius: 6px;
}

.tft-bfp ::selection {
	background: rgba(0, 229, 255, 0.3);
	color: #fff;
}

.tft-bfp-body {
	background: var(--tft-bfp-bg);
}

/* Scrollbar */
.tft-bfp::-webkit-scrollbar { width: 10px; }
.tft-bfp::-webkit-scrollbar-track { background: #050505; }
.tft-bfp::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, rgba(0, 229, 255, 0.5), rgba(59, 130, 246, 0.5));
	border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
	.tft-bfp {
		scroll-behavior: auto;
	}
}
