/*!
Theme Name: iMazingCN - 爱思助手
Theme URI: https://i4.cn
Author: i4.cn
Author URI: https://i4.cn
Description: 爱思助手智能设备管理官网主题，现代 Apple 极简风格，主色 #007AFF，辅助色 #111827，背景色 #F8FAFC。提供设备检测、应用安装、照片管理、数据迁移、系统升级与客户端下载等一站式 iOS 设备服务区块，全端响应式优先移动端。后台自定义支持 Logo、Banner、产品介绍、下载地址、服务入口与帮助文档。
Version: 1.0.0
Tested up to: 6.4
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: wm
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Design Tokens (CSS Variables)
# Base / Typography / Reset
# Layout helpers
# Components
  - Site header / nav
  - Hero / Banner
  - Feature sections (devices / apps / photos / transfer / upgrade)
  - Download CTA
  - Service / Help
  - Footer
  - Posts / pages / widgets
# Utilities / A11y
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Design Tokens
--------------------------------------------------------------*/
:root {
	/* Brand */
	--color-primary: #007AFF;
	--color-primary-hover: #0066D6;
	--color-primary-soft: rgba(0, 122, 255, 0.08);
	--color-secondary: #111827;
	--color-accent: #34C759;

	/* Surfaces */
	--color-bg: #F8FAFC;
	--color-surface: #FFFFFF;
	--color-surface-2: #F1F5F9;
	--color-border: #E5E7EB;
	--color-border-strong: #D1D5DB;

	/* Text */
	--color-text: #111827;
	--color-text-soft: #374151;
	--color-muted: #6B7280;
	--color-on-primary: #FFFFFF;

	/* Type */
	--font-sans: "Inter", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Microsoft YaHei", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
	--fs-xs: 0.75rem;
	--fs-sm: 0.875rem;
	--fs-base: 1rem;
	--fs-md: 1.125rem;
	--fs-lg: 1.25rem;
	--fs-xl: 1.5rem;
	--fs-2xl: 2rem;
	--fs-3xl: 2.5rem;
	--fs-4xl: 3.25rem;
	--lh-body: 1.65;

	/* Spacing (8px rhythm) */
	--sp-1: 8px;
	--sp-2: 16px;
	--sp-3: 24px;
	--sp-4: 32px;
	--sp-5: 48px;
	--sp-6: 64px;
	--sp-7: 96px;

	/* Shape */
	--radius-sm: 12px;
	--radius-md: 16px;
	--radius-lg: 20px;
	--radius-xl: 28px;
	--radius-pill: 999px;

	/* Shadow (soft) */
	--shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
	--shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
	--shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
	--shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.10);

	/* Layout */
	--container: 1200px;
	--container-narrow: 880px;

	/* Motion */
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--dur: 220ms;
}

/*--------------------------------------------------------------
# Generic
--------------------------------------------------------------*/
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

html,
body {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

body {
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img, svg, video {
	max-width: 100%;
	height: auto;
	display: block;
}

figure {
	margin: 0;
}

hr {
	border: 0;
	height: 1px;
	background: var(--color-border);
	margin: var(--sp-4) 0;
}

/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--sp-2);
	color: var(--color-text);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, var(--fs-4xl)); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, var(--fs-3xl)); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p {
	margin: 0 0 var(--sp-2);
	color: var(--color-text-soft);
	font-size: var(--fs-base);
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color var(--dur) var(--ease);
}

a:hover { color: var(--color-primary-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
	border-radius: 6px;
}

/*--------------------------------------------------------------
# Layout
--------------------------------------------------------------*/
.wm-container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--sp-3);
}

.wm-container--narrow {
	max-width: var(--container-narrow);
}

.wm-section {
	padding: var(--sp-6) 0;
}

@media (min-width: 1024px) {
	.wm-section {
		padding: var(--sp-7) 0;
	}
}

.wm-grid {
	display: grid;
	gap: var(--sp-3);
}

.wm-grid--2 { grid-template-columns: 1fr; }
.wm-grid--3 { grid-template-columns: 1fr; }
.wm-grid--4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
	.wm-grid--2 { grid-template-columns: repeat(2, 1fr); }
	.wm-grid--3 { grid-template-columns: repeat(2, 1fr); }
	.wm-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.wm-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.wm-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
.wm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 24px;
	border-radius: var(--radius-pill);
	font: inherit;
	font-weight: 600;
	font-size: var(--fs-base);
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.wm-btn--primary {
	background: var(--color-primary);
	color: var(--color-on-primary);
	box-shadow: var(--shadow-sm);
}
.wm-btn--primary:hover {
	background: var(--color-primary-hover);
	color: var(--color-on-primary);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.wm-btn--secondary {
	background: var(--color-surface);
	color: var(--color-text);
	border-color: var(--color-border-strong);
}
.wm-btn--secondary:hover {
	color: var(--color-primary);
	border-color: var(--color-primary);
	transform: translateY(-1px);
}

.wm-btn--ghost {
	background: transparent;
	color: var(--color-primary);
	padding: 0 12px;
}
.wm-btn--ghost:hover {
	color: var(--color-primary-hover);
	background: var(--color-primary-soft);
}

/*--------------------------------------------------------------
# Header / Nav
--------------------------------------------------------------*/
.wm-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(248, 250, 252, 0.85);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	border-bottom: 1px solid var(--color-border);
}

.wm-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-3);
	min-height: 64px;
}

.wm-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--color-text);
	font-weight: 700;
	font-size: var(--fs-md);
	text-decoration: none;
}

.wm-brand__mark {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--color-primary) 0%, #4DA3FF 100%);
	display: inline-grid;
	place-items: center;
	color: #fff;
}

.wm-nav-toggle {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-sm);
	background: transparent;
	border: 1px solid var(--color-border);
	color: var(--color-text);
	cursor: pointer;
}

.wm-nav {
	display: none;
	align-items: center;
	gap: var(--sp-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.wm-nav.is-open {
	display: flex;
	position: absolute;
	top: 64px;
	left: 0;
	right: 0;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	background: var(--color-surface);
	padding: var(--sp-2);
	margin: 0 var(--sp-2);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
}

.wm-nav a {
	display: block;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	color: var(--color-text-soft);
	font-weight: 500;
	text-decoration: none;
}
.wm-nav a:hover,
.wm-nav .current-menu-item a {
	background: var(--color-primary-soft);
	color: var(--color-primary);
}

.wm-header__cta {
	display: none;
}

@media (min-width: 1024px) {
	.wm-nav-toggle { display: none; }
	.wm-nav {
		display: flex;
		flex-direction: row;
		position: static;
		background: transparent;
		box-shadow: none;
		padding: 0;
		margin: 0;
	}
	.wm-header__cta { display: inline-flex; }
}

/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
.wm-hero {
	position: relative;
	padding: var(--sp-6) 0 var(--sp-7);
	overflow: hidden;
}

.wm-hero__bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(1200px 600px at 50% -100px, rgba(0, 122, 255, 0.18), transparent 60%),
		linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg) 100%);
	z-index: 0;
	pointer-events: none;
}

.wm-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sp-4);
	align-items: center;
}

@media (min-width: 1024px) {
	.wm-hero__inner {
		grid-template-columns: 1.05fr 1fr;
		gap: var(--sp-5);
	}
}

.wm-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: var(--radius-pill);
	background: var(--color-primary-soft);
	color: var(--color-primary);
	font-size: var(--fs-sm);
	font-weight: 600;
	width: max-content;
}

.wm-hero__title {
	font-size: clamp(2.25rem, 4vw + 1rem, var(--fs-4xl));
	font-weight: 800;
	line-height: 1.1;
	margin: var(--sp-2) 0;
	letter-spacing: -0.02em;
}

.wm-hero__lead {
	font-size: var(--fs-md);
	color: var(--color-text-soft);
	max-width: 52ch;
	margin-bottom: var(--sp-3);
}

.wm-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-1);
	margin-bottom: var(--sp-3);
}

.wm-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	color: var(--color-muted);
	font-size: var(--fs-sm);
}

.wm-hero__meta span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wm-hero__visual {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-xl);
	background: linear-gradient(135deg, #fff 0%, #EAF2FF 100%);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}

.wm-hero__visual::after {
	content: "";
	position: absolute;
	inset: 16px;
	border-radius: var(--radius-lg);
	background:
		radial-gradient(circle at 30% 30%, rgba(0,122,255,0.15), transparent 50%),
		radial-gradient(circle at 70% 70%, rgba(52,199,89,0.15), transparent 55%);
}

/*--------------------------------------------------------------
# Section header
--------------------------------------------------------------*/
.wm-section-head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto var(--sp-5);
}
.wm-section-head__eyebrow {
	display: inline-block;
	font-size: var(--fs-sm);
	font-weight: 600;
	color: var(--color-primary);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin-bottom: 8px;
}
.wm-section-head__title {
	margin-bottom: 12px;
}
.wm-section-head__lead {
	color: var(--color-muted);
	font-size: var(--fs-md);
	margin: 0;
}

/*--------------------------------------------------------------
# Feature cards
--------------------------------------------------------------*/
.wm-card {
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	padding: var(--sp-3);
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--color-border);
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.wm-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
}

.wm-card__icon {
	width: 48px;
	height: 48px;
	display: inline-grid;
	place-items: center;
	border-radius: var(--radius-md);
	background: var(--color-primary-soft);
	color: var(--color-primary);
}

.wm-card__title {
	font-size: var(--fs-lg);
	margin: 0;
}

.wm-card__desc {
	color: var(--color-muted);
	margin: 0;
}

/*--------------------------------------------------------------
# Device showcase
--------------------------------------------------------------*/
.wm-devices {
	position: relative;
	min-height: 320px;
	border-radius: var(--radius-xl);
	background: linear-gradient(180deg, #FFFFFF 0%, #EAF2FF 100%);
	box-shadow: var(--shadow-md);
	padding: var(--sp-4);
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr;
	align-items: center;
	gap: var(--sp-3);
}

@media (min-width: 768px) {
	.wm-devices { grid-template-columns: 1fr auto; }
}

.wm-devices__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.wm-devices__chip {
	padding: 8px 14px;
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-text-soft);
	font-size: var(--fs-sm);
	font-weight: 500;
}

.wm-devices__art {
	width: 220px;
	max-width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius-lg);
	background:
		radial-gradient(circle at 50% 35%, #FFFFFF 0 22%, transparent 23%),
		linear-gradient(160deg, #F1F5F9, #E2E8F0);
	margin-inline: auto;
	box-shadow: var(--shadow-md);
}

/*--------------------------------------------------------------
# Download block
--------------------------------------------------------------*/
.wm-download {
	background: linear-gradient(135deg, var(--color-primary) 0%, #4DA3FF 100%);
	color: var(--color-on-primary);
	border-radius: var(--radius-xl);
	padding: var(--sp-5);
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sp-3);
	box-shadow: var(--shadow-lg);
}
@media (min-width: 768px) {
	.wm-download { grid-template-columns: 1.4fr 1fr; align-items: center; }
}

.wm-download h2 { color: #fff; }
.wm-download p { color: rgba(255,255,255,0.85); }

.wm-download__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.wm-download .wm-btn--secondary {
	background: rgba(255,255,255,0.12);
	color: #fff;
	border-color: rgba(255,255,255,0.4);
}
.wm-download .wm-btn--secondary:hover {
	background: rgba(255,255,255,0.2);
	color: #fff;
	border-color: #fff;
}

.wm-btn--white {
	background: #fff;
	color: var(--color-primary);
}
.wm-btn--white:hover {
	background: #fff;
	color: var(--color-primary-hover);
	transform: translateY(-1px);
}

/*--------------------------------------------------------------
# Help / FAQ
--------------------------------------------------------------*/
.wm-faq details {
	background: var(--color-surface);
	border-radius: var(--radius-md);
	padding: var(--sp-2) var(--sp-3);
	box-shadow: var(--shadow-xs);
	border: 1px solid var(--color-border);
}
.wm-faq details + details { margin-top: 12px; }
.wm-faq summary {
	cursor: pointer;
	font-weight: 600;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.wm-faq summary::-webkit-details-marker { display: none; }
.wm-faq summary::after {
	content: "";
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--color-muted);
	border-bottom: 2px solid var(--color-muted);
	transform: rotate(45deg);
	transition: transform var(--dur) var(--ease);
}
.wm-faq details[open] summary::after { transform: rotate(225deg); }
.wm-faq details > *:not(summary) {
	margin-top: 12px;
	color: var(--color-text-soft);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.wm-footer {
	background: var(--color-secondary);
	color: rgba(255,255,255,0.78);
	padding: var(--sp-5) 0 var(--sp-3);
	margin-top: var(--sp-6);
}

.wm-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sp-4);
}
@media (min-width: 768px) {
	.wm-footer__grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}

.wm-footer h4 {
	color: #fff;
	font-size: var(--fs-sm);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: var(--sp-2);
}
.wm-footer ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.wm-footer li { margin-bottom: 8px; }
.wm-footer a {
	color: rgba(255,255,255,0.78);
	font-size: var(--fs-sm);
}
.wm-footer a:hover { color: #fff; }

.wm-footer__bottom {
	margin-top: var(--sp-4);
	padding-top: var(--sp-2);
	border-top: 1px solid rgba(255,255,255,0.1);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 12px;
	font-size: var(--fs-sm);
	color: rgba(255,255,255,0.6);
}

/*--------------------------------------------------------------
# Posts / pages
--------------------------------------------------------------*/
.wm-page {
	padding: var(--sp-5) 0;
}

.wm-page__title {
	margin-bottom: var(--sp-2);
}

.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.5em; }
.entry-content h3 { margin-top: 1.25em; }
.entry-content img { border-radius: var(--radius-md); }

.widget {
	background: var(--color-surface);
	border-radius: var(--radius-md);
	padding: var(--sp-2);
	box-shadow: var(--shadow-xs);
	border: 1px solid var(--color-border);
}
.widget + .widget { margin-top: var(--sp-2); }

/*--------------------------------------------------------------
# Utilities / A11y
--------------------------------------------------------------*/
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--color-primary);
	color: #fff;
	clip: auto !important;
	clip-path: none;
	display: block;
	font-size: var(--fs-sm);
	font-weight: 700;
	height: auto;
	left: 16px;
	padding: 12px 16px;
	text-decoration: none;
	top: 16px;
	width: auto;
	z-index: 100000;
}

.skip-link {
	position: absolute;
	top: -40px;
	left: 8px;
	background: var(--color-primary);
	color: #fff;
	padding: 8px 14px;
	border-radius: var(--radius-sm);
	z-index: 100;
}
.skip-link:focus { top: 8px; }

/*--------------------------------------------------------------
# Motion preferences
--------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
