/*
Theme Name: CB01 Landing
Theme URI: https://example.com/cb01-landing
Author: CB01
Author URI: https://example.com
Description: ธีม WordPress แบบ Landing Page น้ำหนักเบา รองรับมือถือ เมนู และการปรับแต่งหน้าแรกผ่าน Customizer
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: cb01
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
	--accent: #ffb000;
	--accent-dark: #e99700;
	--ink: #f7f8ff;
	--muted: #aeb5ca;
	--surface: #171b2e;
	--surface-2: #202640;
	--page: #0c0f1d;
	--line: rgba(255, 255, 255, 0.1);
	--radius: 20px;
	--shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
	--container: 1180px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--ink);
	background:
		radial-gradient(circle at 10% 0, rgba(255, 176, 0, 0.1), transparent 25rem),
		var(--page);
	font-family: "Noto Sans Thai", "Tahoma", system-ui, -apple-system, sans-serif;
	font-size: 16px;
	line-height: 1.7;
}

body.admin-bar .site-header {
	top: 32px;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	color: var(--accent);
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

button,
input,
textarea,
select {
	font: inherit;
}

.container {
	width: min(calc(100% - 32px), var(--container));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	z-index: 9999;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	margin: 0;
	clip: auto;
	background: #fff;
	color: #111;
	border-radius: 8px;
}

.site-header {
	position: sticky;
	z-index: 1000;
	top: 0;
	border-bottom: 1px solid var(--line);
	background: rgba(12, 15, 29, 0.88);
	backdrop-filter: blur(14px);
}

.header-inner {
	display: flex;
	align-items: center;
	min-height: 76px;
	gap: 24px;
}

.site-branding {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
}

.custom-logo {
	max-width: 190px;
	max-height: 54px;
	width: auto;
}

.site-title {
	font-size: 1.45rem;
	font-weight: 900;
	letter-spacing: -0.03em;
}

.site-title span {
	color: var(--accent);
}

.primary-navigation {
	margin-left: auto;
}

.primary-navigation ul {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-navigation a {
	display: block;
	padding: 10px 13px;
	color: var(--muted);
	font-size: 0.95rem;
	font-weight: 700;
	border-radius: 10px;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
	color: var(--ink);
	background: rgba(255, 255, 255, 0.06);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 20px;
	border: 1px solid transparent;
	border-radius: 12px;
	background: var(--accent);
	color: #191306;
	font-weight: 900;
	line-height: 1.2;
	box-shadow: 0 10px 25px rgba(255, 176, 0, 0.18);
	transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
	color: #191306;
	background: #ffc13b;
	transform: translateY(-2px);
}

.button-outline {
	border-color: var(--line);
	background: transparent;
	color: var(--ink);
	box-shadow: none;
}

.button-outline:hover {
	background: rgba(255, 255, 255, 0.07);
	color: var(--ink);
}

.menu-toggle {
	display: none;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.menu-toggle span {
	display: block;
	height: 2px;
	margin: 5px 0;
	background: currentColor;
}

.hero {
	position: relative;
	overflow: hidden;
	padding: 76px 0 42px;
}

.hero::after {
	position: absolute;
	z-index: -1;
	top: 10%;
	right: -10%;
	width: 520px;
	height: 520px;
	border-radius: 50%;
	background: rgba(72, 96, 255, 0.12);
	filter: blur(10px);
	content: "";
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
	align-items: center;
	gap: 54px;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	margin-bottom: 18px;
	border: 1px solid rgba(255, 176, 0, 0.26);
	border-radius: 999px;
	background: rgba(255, 176, 0, 0.08);
	color: #ffd775;
	font-size: 0.86rem;
	font-weight: 800;
}

.eyebrow::before {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 12px var(--accent);
	content: "";
}

.hero h1 {
	max-width: 740px;
	margin: 0 0 18px;
	font-size: clamp(2.35rem, 5vw, 4.6rem);
	line-height: 1.08;
	letter-spacing: -0.055em;
}

.hero h1 strong {
	color: var(--accent);
}

.hero-description {
	max-width: 640px;
	margin: 0 0 28px;
	color: var(--muted);
	font-size: 1.08rem;
}

.hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.hero-visual {
	position: relative;
	min-height: 470px;
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: 30px;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02)),
		var(--surface);
	box-shadow: var(--shadow);
}

.hero-card-main {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
	min-height: 420px;
	padding: 32px;
	overflow: hidden;
	border-radius: 22px;
	background:
		linear-gradient(0deg, rgba(8, 10, 23, 0.96), rgba(8, 10, 23, 0.05) 75%),
		linear-gradient(135deg, #4358c9, #9524a5 55%, #ef8c20);
}

.hero-orb {
	position: absolute;
	top: 50px;
	right: 45px;
	width: 205px;
	height: 205px;
	border: 30px solid rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	box-shadow: inset 0 0 45px rgba(255, 255, 255, 0.18), 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hero-card-main small {
	position: relative;
	color: #fff0c5;
	font-weight: 800;
}

.hero-card-main h2 {
	position: relative;
	margin: 4px 0 0;
	font-size: 2rem;
	line-height: 1.25;
}

.floating-badge {
	position: absolute;
	top: 32px;
	left: -22px;
	padding: 13px 16px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: rgba(26, 31, 54, 0.95);
	box-shadow: var(--shadow);
	font-size: 0.9rem;
	font-weight: 900;
}

.floating-badge span {
	display: block;
	color: var(--accent);
	font-size: 1.18rem;
}

.feature-strip {
	padding: 18px 0;
	border-block: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.025);
}

.feature-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
}

.feature-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 20px;
	border-right: 1px solid var(--line);
}

.feature-item:first-child {
	padding-left: 0;
}

.feature-item:last-child {
	border: 0;
}

.feature-icon {
	display: grid;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	place-items: center;
	border-radius: 13px;
	background: rgba(255, 176, 0, 0.12);
	color: var(--accent);
	font-size: 1.2rem;
}

.feature-item strong,
.feature-item small {
	display: block;
}

.feature-item small {
	color: var(--muted);
	font-size: 0.78rem;
	line-height: 1.4;
}

.section {
	padding: 74px 0;
}

.section-heading {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
}

.section-heading h2 {
	margin: 0;
	font-size: clamp(1.7rem, 3vw, 2.5rem);
	line-height: 1.2;
	letter-spacing: -0.035em;
}

.section-heading p {
	max-width: 560px;
	margin: 8px 0 0;
	color: var(--muted);
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
}

.category-card {
	padding: 22px 12px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
	text-align: center;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-card:hover {
	border-color: rgba(255, 176, 0, 0.5);
	transform: translateY(-4px);
}

.category-card .icon {
	display: grid;
	width: 54px;
	height: 54px;
	margin: 0 auto 11px;
	place-items: center;
	border-radius: 16px;
	background: var(--surface-2);
	font-size: 1.45rem;
}

.category-card strong {
	display: block;
	font-size: 0.92rem;
}

.content-panel {
	padding: clamp(24px, 5vw, 58px);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
}

.content-panel > :first-child {
	margin-top: 0;
}

.content-panel > :last-child {
	margin-bottom: 0;
}

.content-panel h1,
.content-panel h2,
.content-panel h3 {
	line-height: 1.3;
}

.content-panel p,
.content-panel li {
	color: #c6cbda;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.post-card {
	overflow: hidden;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.post-card-image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: linear-gradient(135deg, #28366e, #752a7b);
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.post-card:hover img {
	transform: scale(1.04);
}

.post-card-body {
	padding: 22px;
}

.post-card-meta {
	color: var(--accent);
	font-size: 0.78rem;
	font-weight: 800;
}

.post-card h3 {
	margin: 8px 0;
	font-size: 1.15rem;
	line-height: 1.4;
}

.post-card p {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
}

.site-main {
	min-height: 55vh;
}

.page-header {
	padding: 64px 0 24px;
}

.page-header h1 {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.5rem);
}

.pagination {
	margin-top: 30px;
}

.nav-links {
	display: flex;
	gap: 8px;
}

.page-numbers {
	display: grid;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	place-items: center;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
}

.page-numbers.current {
	background: var(--accent);
	color: #17120a;
}

.site-footer {
	padding: 54px 0 24px;
	border-top: 1px solid var(--line);
	background: #090b15;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 44px;
}

.footer-title {
	margin: 0 0 12px;
	font-size: 1.35rem;
}

.footer-description {
	max-width: 480px;
	margin: 0;
	color: var(--muted);
}

.site-footer h3 {
	margin: 0 0 14px;
	font-size: 1rem;
}

.footer-menu,
.footer-links {
	padding: 0;
	margin: 0;
	list-style: none;
}

.footer-menu li,
.footer-links li {
	margin: 7px 0;
}

.footer-menu a,
.footer-links a {
	color: var(--muted);
}

.copyright {
	padding-top: 24px;
	margin-top: 40px;
	border-top: 1px solid var(--line);
	color: #777f98;
	font-size: 0.84rem;
	text-align: center;
}

@media (max-width: 980px) {
	.primary-navigation,
	.header-actions .button-outline {
		display: none;
	}

	.primary-navigation.is-open {
		position: absolute;
		top: 76px;
		right: 16px;
		left: 16px;
		display: block;
		padding: 12px;
		border: 1px solid var(--line);
		border-radius: 16px;
		background: #14182a;
		box-shadow: var(--shadow);
	}

	.primary-navigation.is-open ul {
		display: block;
	}

	.primary-navigation.is-open a {
		padding: 12px;
	}

	.menu-toggle {
		display: block;
		margin-left: auto;
	}

	.header-actions {
		margin-left: 0;
	}

	.hero-grid {
		grid-template-columns: 1fr;
	}

	.hero-content {
		text-align: center;
	}

	.hero-description {
		margin-inline: auto;
	}

	.hero-buttons {
		justify-content: center;
	}

	.hero-visual {
		width: min(100%, 620px);
		margin-inline: auto;
	}

	.feature-grid {
		grid-template-columns: repeat(2, 1fr);
		row-gap: 16px;
	}

	.feature-item:nth-child(2) {
		border-right: 0;
	}

	.category-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 720px) {
	body.admin-bar .site-header {
		top: 46px;
	}

	.header-inner {
		min-height: 66px;
	}

	.primary-navigation.is-open {
		top: 66px;
	}

	.header-actions .button {
		display: none;
	}

	.hero {
		padding-top: 52px;
	}

	.hero-grid {
		gap: 34px;
	}

	.hero-visual {
		min-height: 390px;
		padding: 15px;
	}

	.hero-card-main {
		min-height: 358px;
		padding: 24px;
	}

	.hero-orb {
		width: 165px;
		height: 165px;
	}

	.floating-badge {
		left: 4px;
	}

	.feature-grid,
	.post-grid,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.feature-item,
	.feature-item:first-child {
		padding-inline: 0;
		border-right: 0;
	}

	.category-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.section {
		padding: 52px 0;
	}

	.section-heading {
		display: block;
	}
}
