/*
Theme Name: WP Demo
Theme URI: https://example.test/wp-demo
Author: Developer
Author URI: https://example.test
Description: CastWave 投屏产品主题
Version: 2.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: wp-demo
*/

:root {
	--cw-ink: #181818;
	--cw-muted: #84828e;
	--cw-soft: #f7f5ff;
	--cw-paper: #ffffff;
	--cw-line: #e4e0f0;
	--cw-purple: #7a62f0;
	--cw-purple-dark: #a229f5;
	--cw-blue: #5695ec;
	--cw-shadow: 0 18px 60px rgba(90, 60, 180, 0.12);
	--cw-radius: 10px;
	--cw-header: 72px;
	--cw-container: 1180px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--cw-paper);
	color: var(--cw-ink);
	font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	text-rendering: optimizeLegibility;
}

body.nav-open {
	overflow: hidden;
}

img,
svg {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
textarea {
	font: inherit;
}

button,
a {
	-webkit-tap-highlight-color: transparent;
}

:focus-visible {
	outline: 3px solid rgba(122, 98, 240, 0.5);
	outline-offset: 3px;
}

.screen-reader-text,
.skip-link {
	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: 1000;
	top: 12px;
	left: 12px;
	width: auto;
	height: auto;
	padding: 10px 14px;
	background: var(--cw-ink);
	color: #fff;
	clip: auto;
}

.container {
	width: min(100% - 40px, var(--cw-container));
	margin-inline: auto;
}

/* ── Header ──────────────────────────────── */

.site-header {
	position: sticky;
	z-index: 50;
	top: 0;
	background: rgba(255, 255, 255, 0.88);
	border-bottom: 1px solid rgba(228, 224, 240, 0.5);
	backdrop-filter: blur(18px);
	transition: box-shadow 200ms ease, background 200ms ease;
}

.site-header.is-scrolled {
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 10px 30px rgba(90, 60, 180, 0.07);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: min(100% - 40px, 1240px);
	min-height: var(--cw-header);
	margin-inline: auto;
	gap: 24px;
}

.site-brand {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	gap: 12px;
	font-weight: 700;
}

.site-brand__mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	background: linear-gradient(135deg, var(--cw-purple-dark), var(--cw-blue));
	border-radius: var(--cw-radius);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	box-shadow: 0 12px 28px rgba(162, 41, 245, 0.22);
}

.site-brand__text {
	display: grid;
	line-height: 1.05;
}

.site-brand__name {
	font-size: 19px;
}

.site-brand__sub {
	margin-top: 4px;
	color: var(--cw-muted);
	font-size: 12px;
	font-weight: 500;
}

/* ── Navigation ──────────────────────────── */

.main-navigation {
	flex: 1;
}

.main-navigation .menu {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	gap: 8px;
	list-style: none;
}

.main-navigation a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--cw-radius);
	color: #333;
	font-size: 15px;
	font-weight: 500;
	transition: color 180ms ease, background 180ms ease;
}

.main-navigation a:hover,
.main-navigation a:focus-visible {
	background: var(--cw-soft);
	color: var(--cw-purple);
}

/* ── Language Switcher ────────────────────── */

.lang-switcher {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 4px;
	padding: 3px;
	border: 1px solid var(--cw-line);
	border-radius: 20px;
	background: #fff;
}

.lang-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	padding: 0 12px;
	border-radius: 16px;
	color: var(--cw-muted);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	transition: color 180ms ease, background 180ms ease;
}

.lang-pill:hover {
	color: var(--cw-purple);
	background: var(--cw-soft);
}

.lang-pill.is-active {
	background: linear-gradient(135deg, var(--cw-purple-dark), var(--cw-blue));
	color: #fff;
	pointer-events: none;
}

/* ── Buttons ─────────────────────────────── */

.header-cta,
.button,
.footer-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: var(--cw-radius);
	cursor: pointer;
	font-weight: 600;
	line-height: 1;
	transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.header-cta {
	background: linear-gradient(to right, var(--cw-purple-dark), var(--cw-blue));
	color: #fff;
	gap: 8px;
	white-space: nowrap;
}

.header-cta svg,
.button svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.header-cta:hover,
.button:hover,
.footer-download:hover {
	transform: translateY(-2px);
}

/* ── Mobile Menu Toggle ──────────────────── */

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-radius);
	background: #fff;
	cursor: pointer;
}

.menu-toggle__bar {
	position: absolute;
	width: 20px;
	height: 2px;
	background: var(--cw-ink);
	border-radius: 2px;
	transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle__bar:nth-child(1) {
	transform: translateY(-6px);
}

.menu-toggle__bar:nth-child(3) {
	transform: translateY(6px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
	transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
	transform: rotate(-45deg);
}

/* ── Hero ─────────────────────────────────── */

.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 720px;
	overflow: hidden;
	background: linear-gradient(0deg, #ffffff 0%, #ede9fe 100%);
}

.hero__backdrop {
	position: absolute;
	inset: 0;
}

.hero__backdrop::after {
	position: absolute;
	inset: 0;
	content: "";
	background:
		linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 34%, rgba(255, 255, 255, 0.28) 67%, rgba(255, 255, 255, 0.04) 100%),
		linear-gradient(180deg, rgba(237, 233, 254, 0.15) 0%, rgba(255, 255, 255, 0.72) 100%);
}

.hero__backdrop img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center right;
}

.hero__content {
	position: relative;
	z-index: 2;
	padding: 110px 0 92px;
}

.eyebrow {
	margin: 0 0 16px;
	color: var(--cw-purple);
	font-size: 14px;
	font-weight: 600;
}

.hero h1,
.section-heading h2,
.archive-hero h1 {
	margin: 0;
	color: var(--cw-ink);
	font-weight: 700;
	line-height: 1.12;
}

.hero h1 {
	max-width: 680px;
	font-size: 52px;
}

.hero__lead {
	max-width: 610px;
	margin: 24px 0 0;
	color: var(--cw-muted);
	font-size: 18px;
	line-height: 1.8;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	margin-top: 34px;
	gap: 14px;
}

.button--primary {
	background: linear-gradient(to right, var(--cw-purple-dark), var(--cw-blue));
	box-shadow: 0 18px 36px rgba(162, 41, 245, 0.18);
	color: #fff;
	gap: 10px;
}

.button--secondary {
	background: rgba(255, 255, 255, 0.84);
	border-color: var(--cw-line);
	color: var(--cw-ink);
	gap: 10px;
}

/* ── Platform Strip ───────────────────────── */

.platform-strip {
	background: var(--cw-ink);
	color: #fff;
}

.platform-strip__inner {
	display: flex;
	align-items: center;
	min-height: 86px;
	gap: 20px;
	overflow-x: auto;
	scrollbar-width: thin;
}

.platform-strip span {
	flex: 0 0 auto;
	color: rgba(255, 255, 255, 0.64);
	font-size: 13px;
	font-weight: 600;
}

.platform-strip b {
	flex: 0 0 auto;
	padding: 8px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--cw-radius);
	background: rgba(255, 255, 255, 0.06);
	font-size: 15px;
	font-weight: 500;
}

/* ── Sections ─────────────────────────────── */

.section {
	padding: 96px 0;
}

.section-heading {
	max-width: 720px;
	margin: 0 auto 42px;
	text-align: center;
}

.section-heading--left {
	margin-inline: 0;
	text-align: left;
}

.section-heading h2 {
	font-size: 40px;
}

.section-heading p:not(.eyebrow) {
	margin: 18px 0 0;
	color: var(--cw-muted);
	font-size: 17px;
}

.feature-suite,
.download-center,
.faq {
	background: #faf8ff;
}

/* ── Feature Grid ─────────────────────────── */

.feature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.feature-card,
.download-card,
.scene-item,
.review-card,
.faq-item,
.post-card,
.steps li {
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-radius);
	background: var(--cw-paper);
	box-shadow: 0 14px 38px rgba(90, 60, 180, 0.05);
}

.feature-card {
	min-height: 200px;
	padding: 24px;
	transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.feature-card:hover {
	border-color: rgba(122, 98, 240, 0.35);
	box-shadow: var(--cw-shadow);
	transform: translateY(-4px);
}

.feature-card__tag {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 10px;
	border-radius: 6px;
	background: var(--cw-soft);
	color: var(--cw-purple);
	font-size: 12px;
	font-weight: 600;
}

.feature-card h3,
.download-card h3,
.scene-item h3,
.steps h3 {
	margin: 14px 0 8px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.feature-card p,
.download-card p,
.scene-item p,
.steps p,
.review-card blockquote,
.faq-item p,
.post-card p {
	margin: 0;
	color: var(--cw-muted);
	font-size: 15px;
}

/* ── Workflow ──────────────────────────────── */

.workflow__grid,
.scenes__grid,
.faq__grid {
	display: grid;
	grid-template-columns: 0.85fr 1.15fr;
	align-items: start;
	gap: 52px;
}

.steps {
	display: grid;
	padding: 0;
	margin: 0;
	gap: 16px;
	list-style: none;
}

.steps li {
	position: relative;
	padding: 24px 24px 24px 94px;
}

.steps span {
	position: absolute;
	top: 24px;
	left: 24px;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: var(--cw-radius);
	background: linear-gradient(135deg, var(--cw-purple-dark), var(--cw-blue));
	color: #fff;
	font-weight: 700;
}

/* ── Download Center ──────────────────────── */

.download-tabs {
	display: flex;
	justify-content: center;
	margin-bottom: 24px;
	gap: 8px;
}

.download-tab {
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-radius);
	background: #fff;
	color: var(--cw-muted);
	cursor: pointer;
	font-weight: 600;
	transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.download-tab.is-active {
	border-color: rgba(122, 98, 240, 0.3);
	background: var(--cw-soft);
	color: var(--cw-purple);
}

.download-grid {
	display: grid;
	grid-template-columns: minmax(0, 560px);
	justify-content: center;
	gap: 18px;
}

.download-card {
	position: relative;
	display: none;
	min-height: 260px;
	padding: 28px;
	overflow: hidden;
}

.download-card.is-active {
	display: block;
}

.download-card::before {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 5px;
	background: linear-gradient(to right, var(--cw-purple-dark), var(--cw-blue));
	content: "";
}

.download-card span {
	color: var(--cw-purple);
	font-size: 13px;
	font-weight: 600;
}

.download-card .button {
	margin-top: 24px;
}

/* ── Scenes ────────────────────────────────── */

.scene-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.scene-item {
	padding: 24px;
}

.scene-item:nth-child(2) {
	border-color: rgba(86, 149, 236, 0.25);
}

.scene-item:nth-child(3) {
	border-color: rgba(122, 98, 240, 0.25);
}

/* ── Reviews ───────────────────────────────── */

.review-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.review-card {
	padding: 28px;
	margin: 0;
}

.review-card blockquote {
	font-size: 16px;
	line-height: 1.75;
}

.review-card figcaption {
	margin-top: 20px;
	color: var(--cw-ink);
	font-weight: 600;
	font-size: 14px;
}

/* ── FAQ ───────────────────────────────────── */

.faq-list {
	display: grid;
	gap: 12px;
}

.faq-item {
	overflow: hidden;
}

.faq-item button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 62px;
	padding: 0 20px;
	border: 0;
	background: transparent;
	color: var(--cw-ink);
	cursor: pointer;
	font-weight: 600;
	text-align: left;
}

.faq-item button svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
	transition: transform 180ms ease;
}

.faq-item.is-open button svg {
	transform: rotate(45deg);
}

.faq-item__answer {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 220ms ease;
}

.faq-item.is-open .faq-item__answer {
	grid-template-rows: 1fr;
}

.faq-item__answer p {
	min-height: 0;
	padding: 0 20px 20px;
	overflow: hidden;
}

/* ── CTA Section ──────────────────────────── */

.cta-section {
	padding: 80px 0;
	background: linear-gradient(135deg, var(--cw-purple-dark), var(--cw-blue));
	text-align: center;
}

.cta-section__inner {
	max-width: 640px;
	margin-inline: auto;
}

.cta-section h2 {
	margin: 0;
	color: #fff;
	font-size: 36px;
	font-weight: 700;
}

.cta-section p {
	margin: 16px 0 28px;
	color: rgba(255, 255, 255, 0.85);
	font-size: 17px;
}

.cta-section .button--primary {
	background: #fff;
	color: var(--cw-purple-dark);
	box-shadow: 0 18px 36px rgba(0, 0, 0, 0.15);
}

/* ── Blog Archive ──────────────────────────── */

.archive-main {
	padding: 82px 0;
	background: #faf8ff;
}

.archive-hero {
	max-width: 720px;
	margin-bottom: 36px;
}

.archive-hero h1 {
	font-size: 44px;
}

.archive-hero p:not(.eyebrow) {
	color: var(--cw-muted);
	font-size: 18px;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.post-card {
	overflow: hidden;
}

.post-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--cw-soft);
}

.post-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card__body {
	padding: 22px;
}

.post-card__meta {
	margin-bottom: 8px;
	color: var(--cw-purple);
	font-size: 13px;
	font-weight: 600;
}

.entry-title {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 1.28;
	font-weight: 600;
}

.entry-content a {
	color: var(--cw-purple);
	font-weight: 600;
}

.nav-links {
	display: flex;
	justify-content: center;
	margin-top: 32px;
	gap: 12px;
}

.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	border: 1px solid var(--cw-line);
	border-radius: var(--cw-radius);
	background: #fff;
}

/* ── Shortcode ────────────────────────────── */

.castwave-shortcode-downloads {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* ── Footer ────────────────────────────────── */

.site-footer {
	background: #1a1030;
	color: #d4ccf0;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr repeat(3, 1fr);
	padding: 64px 0 40px;
	gap: 36px;
}

.site-footer h2,
.site-footer h3,
.site-footer p {
	margin-top: 0;
}

.site-footer h2 {
	margin: 18px 0 8px;
	font-size: 26px;
	font-weight: 700;
}

.site-footer h3 {
	margin-bottom: 16px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
}

.site-footer p,
.site-footer a {
	color: rgba(212, 204, 240, 0.72);
	font-size: 14px;
}

.site-footer a {
	display: block;
	margin: 8px 0;
	transition: color 180ms ease;
}

.site-footer a:hover {
	color: #fff;
}

.social-link::before {
	content: "▸ ";
}

.footer-download {
	display: inline-flex;
	margin-top: 18px;
	background: #fff;
	color: var(--cw-purple-dark) !important;
}

.site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 0 28px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	gap: 20px;
}

.site-footer__bottom p {
	margin: 0;
	font-size: 12px;
}

/* ── Reveal Animation ──────────────────────── */

.reveal {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* ── Responsive ────────────────────────────── */

@media (max-width: 1080px) {
	.hero {
		min-height: 660px;
	}

	.hero h1 {
		max-width: 620px;
		font-size: 42px;
	}

	.hero__lead {
		max-width: 560px;
		font-size: 17px;
	}

	.feature-grid,
	.review-grid,
	.post-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.workflow__grid,
	.scenes__grid,
	.faq__grid,
	.site-footer__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	:root {
		--cw-header: 64px;
	}

	.container,
	.site-header__inner {
		width: min(100% - 28px, var(--cw-container));
	}

	.menu-toggle {
		position: relative;
		display: inline-flex;
	}

	.main-navigation {
		position: fixed;
		inset: var(--cw-header) 0 auto;
		display: none;
		padding: 16px 14px 24px;
		background: rgba(255, 255, 255, 0.98);
		border-bottom: 1px solid var(--cw-line);
		box-shadow: 0 20px 40px rgba(90, 60, 180, 0.1);
	}

	.main-navigation.is-open {
		display: block;
	}

	.main-navigation .menu {
		display: grid;
		justify-content: stretch;
		gap: 4px;
	}

	.main-navigation a {
		justify-content: center;
	}

	.header-cta {
		display: none;
	}

	.lang-switcher {
		margin-left: auto;
	}

	.hero {
		min-height: auto;
	}

	.hero__backdrop::after {
		background:
			linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 56%, rgba(255, 255, 255, 0.5) 100%),
			linear-gradient(90deg, rgba(237, 233, 254, 0.4), rgba(255, 255, 255, 0.25));
	}

	.hero__backdrop img {
		object-position: 64% center;
	}

	.hero__content {
		padding: 82px 0 74px;
	}

	.hero h1 {
		font-size: 36px;
	}

	.section {
		padding: 72px 0;
	}

	.section-heading h2,
	.archive-hero h1 {
		font-size: 32px;
	}

	.site-footer__bottom {
		display: grid;
	}
}

@media (max-width: 640px) {
	.site-brand__sub {
		display: none;
	}

	.hero h1 {
		font-size: 30px;
	}

	.hero__lead,
	.section-heading p:not(.eyebrow) {
		font-size: 15px;
	}

	.hero__actions,
	.castwave-shortcode-downloads {
		display: grid;
	}

	.feature-grid,
	.scene-list,
	.review-grid,
	.post-grid {
		grid-template-columns: 1fr;
	}

	.download-tabs {
		justify-content: stretch;
	}

	.download-tab {
		flex: 1;
		padding: 0 10px;
	}

	.steps li {
		padding: 22px;
	}

	.steps span {
		position: static;
		margin-bottom: 14px;
	}

	.cta-section h2 {
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 1ms !important;
		scroll-behavior: auto !important;
		transition-duration: 1ms !important;
	}

	.reveal {
		opacity: 1;
		transform: none;
	}
}
