/**
 * Subliminal Theme — Main Stylesheet
 * Design inspired by Quintessence Self-Support app.
 *
 * @package Subliminal_Theme
 */

/* ============ CSS VARIABLES ============ */
:root {
	--st-bg: #1c1c1c;
	--st-surface: #171717;
	--st-card: #252525;
	--st-input: #2a2a2a;
	--st-border: #2a2a2a;
	--st-border-light: #3a3a3a;
	--st-text: #e5e5e5;
	--st-text-secondary: #d4d4d4;
	--st-text-muted: #9a9a9a;
	--st-text-dim: #6b6b6b;
	--st-accent: #b08968;
	--st-accent-hover: #c49a78;
	--st-font-body: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--st-font-heading: 'Ropa Sans', 'Google Sans Flex', sans-serif;
	--st-max-width: 1200px;
	--st-header-height: 80px;
}

/* ============ ANIMATIONS ============ */
@keyframes st-fade-in-up {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============ MATERIAL SYMBOLS ============ */
.material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
	vertical-align: middle;
	line-height: 1;
}

.material-symbols-outlined.icon--filled {
	font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.icon--sm {
	font-size: 18px;
}

.icon--md {
	font-size: 24px;
}

.icon--lg {
	font-size: 32px;
}

.icon--xl {
	font-size: 48px;
}

/* ============ RESET & BASE ============ */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	font-family: var(--st-font-body);
	background-color: var(--st-bg);
	color: var(--st-text);
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: var(--st-accent);
	text-decoration: none;
	transition: color 0.2s;
}

a:hover {
	color: var(--st-accent-hover);
}

img {
	max-width: 100%;
	height: auto;
}

/* ============ LAYOUT ============ */
.st-container {
	max-width: var(--st-max-width);
	margin: 0 auto;
	padding: 0 2rem;
}

.st-main {
	flex: 1;
}

.st-page {
	padding: 3rem 0;
}

.st-text-center {
	text-align: center;
}

/* ============ HEADER ============ */
.st-header {
	background-color: #000000;
	height: var(--st-header-height);
	position: sticky;
	top: 0;
	z-index: 100;
}

.st-header,
.st-header * {
	animation: none !important;
}

.st-header__inner {
	max-width: var(--st-max-width);
	margin: 0 auto;
	padding: 0 2rem;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}

/* Logo */
.st-header__logo {
	flex: 0 0 auto;
}

.st-header__logo img {
	max-height: 48px;
	width: auto;
	display: block;
}

.st-header__site-name {
	color: #ffffff;
	font-family: var(--st-font-heading);
	font-size: 1.3rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	white-space: nowrap;
}

.st-header__site-name:hover {
	color: var(--st-accent);
}

/* Nav links */
.st-header__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.st-nav-links {
	display: flex;
	gap: 1.5rem;
	list-style: none;
}

.st-nav-links li a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #ffffff;
	font-family: var(--st-font-heading);
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: color 0.2s;
	white-space: nowrap;
}

.st-nav-links li a:hover {
	color: var(--st-accent);
}

/* Header actions */
.st-header__actions {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.st-nav-action {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: #ffffff;
	font-family: var(--st-font-body);
	font-size: 0.85rem;
	font-weight: 500;
	transition: color 0.2s;
	white-space: nowrap;
}

.st-nav-action:hover {
	color: var(--st-accent);
}

.st-nav-action--muted {
	color: var(--st-text-muted);
}

.st-header__greeting {
	color: var(--st-text-muted);
	font-size: 0.85rem;
	white-space: nowrap;
}

/* Mobile toggle */
.st-header__toggle {
	display: none;
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 4px;
}

/* Mobile nav */
.st-mobile-nav {
	display: none;
	flex-direction: column;
	background-color: #000000;
	border-top: 1px solid #1a1a1a;
	padding: 1rem 2rem;
}

.st-mobile-nav a {
	color: #ffffff;
	padding: 0.75rem 0;
	border-bottom: 1px solid #1a1a1a;
	font-family: var(--st-font-heading);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.st-mobile-nav a:last-child {
	border-bottom: none;
}

.st-mobile-nav.st-mobile-nav--open {
	display: flex;
}

.st-mobile-nav-links {
	list-style: none;
}

.st-mobile-nav-links li a {
	display: block;
	color: #ffffff;
	padding: 0.75rem 0;
	border-bottom: 1px solid #1a1a1a;
	font-family: var(--st-font-heading);
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
}

/* ============ BUTTONS ============ */
.st-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 12px 24px;
	border: none;
	border-radius: 12px;
	font-family: var(--st-font-body);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
	text-decoration: none;
	line-height: 1.4;
}

.st-btn:active {
	transform: scale(0.98);
}

.st-btn--primary {
	background-color: var(--st-accent);
	color: #ffffff;
}

.st-btn--primary:hover {
	background-color: var(--st-accent-hover);
	color: #ffffff;
}

.st-btn--outline {
	background-color: transparent;
	color: var(--st-text);
	border: 1px solid var(--st-border-light);
}

.st-btn--outline:hover {
	border-color: var(--st-accent);
	color: var(--st-accent);
}

.st-btn--sm {
	padding: 8px 16px;
	font-size: 0.85rem;
	border-radius: 8px;
}

.st-btn--lg {
	padding: 16px 32px;
	font-size: 1rem;
}

/* ============ HERO SECTION ============ */
.st-hero {
	padding: 6rem 2rem;
	text-align: center;
	background: linear-gradient(180deg, #000000 0%, var(--st-bg) 100%);
}

.st-hero__content {
	max-width: 720px;
	margin: 0 auto;
	animation: st-fade-in-up 0.5s ease-out both;
}

.st-hero__title {
	font-family: 'din-2014', var(--st-font-heading);
	font-size: 3rem;
	font-weight: 700;
	color: #ffffff;
	margin-bottom: 1rem;
	text-transform: uppercase;
	letter-spacing: 2px;
}

.st-hero__subtitle {
	font-size: 1.15rem;
	color: var(--st-text-muted);
	margin-bottom: 2.5rem;
	line-height: 1.6;
}

/* Search */
.st-hero__search {
	margin-bottom: 2rem;
}

.st-search-wrapper {
	position: relative;
	max-width: 560px;
	margin: 0 auto;
}

.st-search-icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--st-text-dim);
	pointer-events: none;
}

.st-search-input {
	width: 100%;
	padding: 16px 20px 16px 50px;
	background-color: var(--st-input);
	border: 1px solid var(--st-border-light);
	border-radius: 28px;
	color: var(--st-text);
	font-family: var(--st-font-body);
	font-size: 1rem;
	outline: none;
	transition: border-color 0.2s, background-color 0.2s;
}

.st-search-input:focus {
	outline: none;
	border: 2px solid var(--st-accent);
	background-color: #333333;
}

.st-search-input::placeholder {
	color: var(--st-text-dim);
}

/* CTAs */
.st-hero__ctas {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
}

/* ============ SECTIONS ============ */
.st-section {
	padding: 4rem 2rem;
	animation: st-fade-in-up 0.4s ease-out 0.1s both;
}

/* ============ RESOURCE CARDS ============ */
.st-resources-section {
	padding: 0 2rem 3rem;
	animation: st-fade-in-up 0.4s ease-out 0.4s both;
}

.st-resource-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.st-resource-card {
	background-color: var(--st-card);
	border: 1px solid var(--st-border);
	border-radius: 12px;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
}

.st-resource-card__title {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--st-text-muted);
	margin: 0 0 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--st-border);
}

.st-resource-card__text {
	font-size: 0.85rem;
	color: var(--st-text-muted);
	line-height: 1.6;
	margin: 0;
	flex: 1;
}

.st-resource-card__text a {
	color: var(--st-accent);
	text-decoration: none;
}

.st-resource-card__text a:hover {
	color: var(--st-accent-hover);
	text-decoration: underline;
}

.st-resource-card__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin-top: 0.75rem;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--st-accent);
	text-decoration: none;
	transition: color 0.2s;
}

.st-resource-card__link:hover {
	color: var(--st-accent-hover);
}

.st-resource-banner {
	background-color: var(--st-card);
	border: 1px solid var(--st-border);
	border-radius: 12px;
	padding: 1.25rem 2rem;
	margin-top: 1.25rem;
	text-align: left;
}

.st-resource-banner p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--st-text-muted);
	line-height: 1.6;
}

.st-resource-banner .material-symbols-outlined {
	vertical-align: middle;
	margin-right: 0.3rem;
}

.st-resource-banner a {
	color: var(--st-accent);
	text-decoration: none;
	font-weight: 500;
}

.st-resource-banner a:hover {
	color: var(--st-accent-hover);
	text-decoration: underline;
}

@media (max-width: 768px) {
	.st-resource-cards {
		grid-template-columns: 1fr;
	}
}

.st-section--cta {
	padding: 5rem 2rem;
	background-color: var(--st-surface);
	border-top: 1px solid var(--st-border);
	animation: st-fade-in-up 0.4s ease-out 0.6s both;
}

.st-section__title {
	font-family: 'din-2014', var(--st-font-heading);
	font-size: 1.75rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 0.75rem;
	text-align: center;
}

.st-section__note {
	color: var(--st-text-muted);
	font-size: 0.9rem;
	margin-bottom: 2rem;
	line-height: 1.6;
	text-align: center;
}

.st-section__note a {
	color: var(--st-accent);
	font-weight: 500;
}

.st-section__note a:hover {
	color: var(--st-accent-hover);
}

.st-section__subtitle {
	color: var(--st-text-muted);
	font-size: 1.05rem;
	margin-bottom: 2rem;
	max-width: 520px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.6;
}

/* ============ TOPICS GRID ============ */
.st-topics-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2rem;
	max-width: var(--st-max-width);
	margin: 0 auto;
}

.st-topics-col {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.st-topic-section {
	background-color: var(--st-card);
	border: 1px solid var(--st-border);
	border-radius: 12px;
	padding: 1.5rem;
	animation: st-fade-in-up 0.4s ease-out both;
}

.st-topics-col:first-child .st-topic-section:nth-child(1),
.st-topics-col:last-child .st-topic-section:nth-child(1) { animation-delay: 0.15s; }
.st-topics-col:first-child .st-topic-section:nth-child(2),
.st-topics-col:last-child .st-topic-section:nth-child(2) { animation-delay: 0.25s; }
.st-topics-col:first-child .st-topic-section:nth-child(3),
.st-topics-col:last-child .st-topic-section:nth-child(3) { animation-delay: 0.35s; }
.st-topics-col:first-child .st-topic-section:nth-child(4),
.st-topics-col:last-child .st-topic-section:nth-child(4) { animation-delay: 0.45s; }
.st-topics-col:last-child .st-topic-section:nth-child(1) { animation-delay: 0.2s; }
.st-topics-col:last-child .st-topic-section:nth-child(2) { animation-delay: 0.3s; }
.st-topics-col:last-child .st-topic-section:nth-child(3) { animation-delay: 0.4s; }
.st-topics-col:last-child .st-topic-section:nth-child(4) { animation-delay: 0.5s; }

.st-topic-section__header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--st-border);
}

.st-topic-section__icon {
	color: var(--st-accent);
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.st-topic-section__icon svg {
	width: 24px;
	height: 24px;
}

.st-topic-section__title {
	font-family: var(--st-font-body);
	font-size: 1rem;
	font-weight: 600;
	color: var(--st-text);
	margin: 0;
}

.st-topic-section__links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.st-topic-section__links li a {
	display: block;
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 0.9rem;
	color: var(--st-text-muted);
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.st-topic-section__links li a:hover {
	background-color: var(--st-input);
	color: var(--st-text);
}

/* ============ FOOTER ============ */
.st-footer {
	background-color: var(--st-surface);
	margin-top: auto;
}

.st-footer__widgets {
	max-width: var(--st-max-width);
	margin: 0 auto;
	padding: 2rem;
	display: flex;
	gap: 2rem;
}

.st-footer-widget {
	flex: 1;
}

.st-footer-widget__title {
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--st-text-muted);
	margin-bottom: 1rem;
}

.st-footer__bottom {
	max-width: var(--st-max-width);
	margin: 0 auto;
	padding: 1.5rem 2rem;
	border-top: 1px solid var(--st-border);
	text-align: center;
}

.st-footer__bottom p {
	font-size: 0.85rem;
	color: var(--st-text-dim);
}

/* ============ POST/ARTICLE STYLES ============ */
.st-post {
	max-width: 800px;
	margin: 0 auto;
}

.st-post h1,
.st-post h2 {
	font-family: var(--st-font-heading);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.st-post h1 {
	font-size: 2rem;
	margin-bottom: 1rem;
}

.st-post h2 a {
	color: var(--st-text);
}

.st-post h2 a:hover {
	color: var(--st-accent);
}

.st-post__meta {
	color: var(--st-text-muted);
	font-size: 0.9rem;
	margin-bottom: 2rem;
}

.st-post__content {
	font-size: 1rem;
	line-height: 1.8;
	color: var(--st-text-secondary);
}

.st-post__content p {
	margin-bottom: 1rem;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--st-bg);
}

::-webkit-scrollbar-thumb {
	background-color: #3a3a3a;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background-color: #4a4a4a;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
	.st-header__nav {
		display: none;
	}

	.st-header__actions {
		display: none;
	}

	.st-header__toggle {
		display: flex;
	}

	.st-hero__title {
		font-size: 2.25rem;
	}
}

@media (max-width: 768px) {
	.st-topics-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {

	.st-hero {
		padding: 4rem 1.5rem;
	}

	.st-hero__title {
		font-size: 1.75rem;
	}

	.st-hero__ctas {
		flex-direction: column;
		align-items: center;
	}

	.st-hero__ctas .st-btn {
		width: 100%;
		max-width: 320px;
	}

	.st-section {
		padding: 3rem 1.5rem;
	}

	.st-container {
		padding: 0 1.5rem;
	}

	.st-header__inner {
		padding: 0 1rem;
	}
}
