:root {
  --brand: #ff6b9d;
  --brand-2: #6b8cff;
  --brand-3: #a78bfa;
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --fg: #1f2330;
  --fg-soft: #5a6275;
  --muted: #8a90a3;
  --card: #ffffff;
  --card-2: #f7f8fc;
  --line: #e6e8f0;
  --glass: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(31, 35, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(31, 35, 48, 0.1);
  --shadow-lg: 0 20px 50px rgba(31, 35, 48, 0.16);
  --grad-brand: linear-gradient(135deg, #ff6b9d 0%, #a78bfa 50%, #6b8cff 100%);
  --grad-soft: linear-gradient(135deg, #ffd1e3 0%, #e0d4ff 50%, #d1dcff 100%);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 64px;
}

html[data-theme="dark"] {
  --bg: #0f1118;
  --bg-soft: #161923;
  --fg: #e8eaf2;
  --fg-soft: #b6bccd;
  --muted: #8a90a3;
  --card: #1b1e29;
  --card-2: #202432;
  --line: #2a2e3d;
  --glass: rgba(27, 30, 41, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  --grad-soft: linear-gradient(135deg, #3a2140 0%, #2a2350 50%, #1e2a4a 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.8;
  font-size: 16px;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 12% 0%, rgba(255, 107, 157, 0.1), transparent 70%),
    radial-gradient(50% 45% at 88% 8%, rgba(107, 140, 255, 0.1), transparent 70%),
    radial-gradient(40% 40% at 50% 100%, rgba(167, 139, 250, 0.08), transparent 70%);
  pointer-events: none;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--brand-2);
  text-decoration: none;
}

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

::selection {
  background: rgba(255, 107, 157, 0.25);
  color: inherit;
}

/* ===== Header / Nav ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

header:hover {
  box-shadow: var(--shadow-sm);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 22px;
  min-height: var(--nav-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--fg);
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}

.logo:hover {
  transform: translateY(-1px) scale(1.02);
  color: var(--fg);
}

.logo svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 4px 10px rgba(255, 107, 157, 0.35));
  transition: transform 0.5s var(--ease), filter 0.4s var(--ease);
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.06);
  filter: drop-shadow(0 6px 16px rgba(255, 107, 157, 0.55));
}

.logo span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin-left: auto;
  align-items: center;
}

.nav ul a {
  display: inline-block;
  color: var(--fg-soft);
  font-size: 15px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}

.nav ul a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

.nav ul a:hover {
  color: var(--brand);
  background: rgba(255, 107, 157, 0.08);
}

.nav ul a:hover::after {
  width: 22px;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--grad-brand);
  background-size: 180% 180%;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 18px rgba(255, 107, 157, 0.3);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-position 0.5s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.6s var(--ease);
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 10px 26px rgba(255, 107, 157, 0.45);
}

.btn:hover::before {
  transform: translateX(120%);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.ghost:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: rgba(255, 107, 157, 0.08);
  box-shadow: 0 6px 18px rgba(255, 107, 157, 0.15);
}

.btn.ghost::before {
  display: none;
}

.search-box {
  display: none;
  gap: 6px;
  animation: fadeSlideIn 0.3s var(--ease);
}

.search-box.show {
  display: flex;
}

.search-box input {
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  background: var(--card-2);
  color: var(--fg);
  outline: none;
  font-family: inherit;
  font-size: 14px;
  width: 200px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), width 0.3s var(--ease);
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
  width: 240px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--fg);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.25s var(--ease);
}

.menu-toggle:hover {
  background: var(--card-2);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Breadcrumbs ===== */
.crumbs {
  max-width: 1180px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--muted);
  padding: 16px 22px 0;
}

.crumbs a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.crumbs a:hover {
  color: var(--brand);
}

.crumbs span {
  color: var(--fg-soft);
}

/* ===== Hero ===== */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 22px 30px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 10px -40px 10px -40px;
  z-index: -1;
  border-radius: var(--radius-lg);
  background: var(--grad-soft);
  opacity: 0.35;
  filter: blur(40px);
  pointer-events: none;
}

.hero h1 {
  font-size: 40px;
  line-height: 1.28;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
  font-weight: 800;
  animation: heroIn 0.8s var(--ease) both;
}

.hero h1 span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
}

.hero p {
  color: var(--fg-soft);
  font-size: 17px;
  margin-bottom: 22px;
  animation: heroIn 0.8s 0.12s var(--ease) both;
}

.hero .lead {
  font-size: 17px;
  color: var(--fg-soft);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: heroIn 0.8s 0.24s var(--ease) both;
}

.hero-art {
  background: var(--grad-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: heroIn 0.9s 0.15s var(--ease) both;
  border: 1px solid var(--glass-border);
}

.hero-art::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -40%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6), transparent 60%);
  border-radius: 50%;
  animation: floatBlob 10s ease-in-out infinite;
  pointer-events: none;
}

.hero-art::after {
  content: "";
  position: absolute;
  bottom: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 60%);
  border-radius: 50%;
  animation: floatBlob 12s ease-in-out infinite reverse;
  pointer-events: none;
}

.hero-art svg {
  width: 100%;
  max-width: 340px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 30px rgba(31, 35, 48, 0.12));
  transition: transform 0.6s var(--ease);
}

.hero-art:hover svg {
  transform: translateY(-6px) scale(1.02);
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatBlob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -20px) scale(1.1);
  }
}

/* ===== Carousel ===== */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-top: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.carousel:hover {
  box-shadow: var(--shadow-md);
}

.slides {
  display: flex;
  transition: transform 0.55s var(--ease);
  will-change: transform;
}

.slide {
  min-width: 100%;
  padding: 24px 26px 8px;
}

.slide h3 {
  margin: 0 0 8px;
  font-size: 19px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.slide p {
  color: var(--fg-soft);
  font-size: 15px;
  margin-bottom: 0;
}

.dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 14px 10px 16px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--line);
  cursor: pointer;
  transition: background 0.3s var(--ease), width 0.3s var(--ease), transform 0.3s var(--ease);
}

.dot:hover {
  transform: scale(1.3);
}

.dot.active {
  background: var(--grad-brand);
  width: 22px;
}

/* ===== Main ===== */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px 70px;
}

section {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: none;
}

section[id] {
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

h2 {
  font-size: 29px;
  margin-bottom: 22px;
  position: relative;
  padding-left: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.35;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 6px;
  border-radius: 4px;
  background: var(--grad-brand);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

h3 {
  font-size: 21px;
  margin: 24px 0 12px;
  font-weight: 700;
  color: var(--fg);
}

h4 {
  font-size: 17px;
  margin: 18px 0 8px;
  color: var(--brand-2);
  font-weight: 700;
}

p {
  color: var(--fg-soft);
  margin-bottom: 14px;
}

.lead {
  font-size: 17px;
  color: var(--fg);
  line-height: 1.85;
}

/* ===== Grid ===== */
.grid {
  display: grid;
  gap: 22px;
}

.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ===== Card ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 157, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 157, 0.35);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover::after {
  opacity: 1;
  transform: scale(1.2);
}

.card h3 {
  margin-top: 0;
  font-size: 18px;
  color: var(--fg);
  transition: color 0.3s var(--ease);
  position: relative;
  z-index: 1;
}

.card:hover h3 {
  color: var(--brand);
}

.card p {
  font-size: 15px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.card .meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card .meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.15);
}

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  text-align: center;
  margin-top: 28px;
  padding: 28px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.stats > div {
  position: relative;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

.stats > div:hover {
  transform: translateY(-4px);
  background: rgba(255, 107, 157, 0.06);
}

.stats > div:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--line);
}

.stat-num {
  font-size: 34px;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ===== Article list ===== */
.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 8px;
}

.article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  box-shadow: var(--shadow-sm);
}

.article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-brand);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.45s var(--ease);
}

.article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(107, 140, 255, 0.35);
}

.article:hover::before {
  transform: scaleY(1);
}

.article h3 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--fg);
  line-height: 1.5;
  transition: color 0.3s var(--ease);
}

.article:hover h3 {
  color: var(--brand);
}

.article .meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.article p {
  font-size: 15px;
  flex: 1;
  margin-bottom: 12px;
}

.article a.more {
  font-weight: 600;
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--brand);
  position: relative;
  transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}

.article a.more::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.article a.more:hover {
  gap: 10px;
  color: var(--brand-2);
}

.article a.more:hover::after {
  transform: translateX(3px);
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--card);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.faq-item:hover {
  border-color: rgba(255, 107, 157, 0.35);
  box-shadow: var(--shadow-sm);
}

.faq-item.open {
  border-color: rgba(255, 107, 157, 0.5);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-family: inherit;
  line-height: 1.6;
  transition: color 0.25s var(--ease);
}

.faq-q:hover {
  color: var(--brand);
}

.faq-q span {
  transition: transform 0.35s var(--ease), color 0.25s var(--ease);
  color: var(--brand);
  font-weight: 800;
  font-size: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 107, 157, 0.1);
  line-height: 1;
}

.faq-item.open .faq-q span {
  transform: rotate(45deg);
  background: var(--grad-brand);
  color: #fff;
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
  padding: 0 20px;
}

.faq-item.open .faq-a {
  max-height: 500px;
}

.faq-a p {
  padding-bottom: 18px;
  margin: 0;
  font-size: 15px;
  color: var(--fg-soft);
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

/* ===== HowTo ===== */
.howto-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  box-shadow: var(--shadow-sm);
}

.howto-step:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 157, 0.35);
}

.step-num {
  flex: 0 0 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(255, 107, 157, 0.35);
  transition: transform 0.4s var(--ease);
}

.howto-step:hover .step-num {
  transform: scale(1.1) rotate(-8deg);
}

.howto-step h4 {
  margin: 0 0 4px;
  color: var(--fg);
  font-size: 16px;
}

.howto-step p {
  margin: 0;
  font-size: 15px;
  color: var(--fg-soft);
}

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--fg-soft);
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  box-shadow: var(--shadow-sm);
  line-height: 1.6;
}

.contact-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(107, 140, 255, 0.35);
}

.contact-item svg {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: var(--brand);
  margin-top: 2px;
  transition: transform 0.35s var(--ease);
}

.contact-item:hover svg {
  transform: scale(1.15) rotate(-6deg);
}

.contact-item span {
  word-break: break-word;
}

/* ===== Tags ===== */
.tag {
  display: inline-block;
  background: rgba(255, 107, 157, 0.12);
  color: var(--brand);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 13px;
  margin: 0 6px 6px 0;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
  font-weight: 500;
}

.tag:hover {
  background: var(--grad-brand);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

/* ===== Footer ===== */
footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 48px 22px 24px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-brand);
  opacity: 0.7;
}

.foot {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.foot > div {
  min-width: 0;
}

.foot h4 {
  color: var(--fg);
  margin-bottom: 14px;
  font-size: 16px;
  position: relative;
  padding-bottom: 8px;
}

.foot h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-brand);
}

.foot p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.foot ul {
  list-style: none;
}

.foot ul li {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.foot ul li:hover {
  transform: translateX(4px);
}

.foot ul a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}

.foot ul a:hover {
  color: var(--brand);
}

.copyright {
  max-width: 1180px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

/* ===== Back to top ===== */
#backTop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  font-size: 18px;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(255, 107, 157, 0.45);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#backTop:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 32px rgba(255, 107, 157, 0.6);
}

#backTop:active {
  transform: scale(0.95);
}

/* ===== Focus states (accessibility) ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ===== Responsive: tablet ===== */
@media (max-width: 1024px) {
  .hero {
    gap: 28px;
  }
  .hero h1 {
    font-size: 34px;
  }
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }
  .hero-art {
    order: -1;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
  .hero h1 {
    font-size: 32px;
  }
  .g3,
  .g4,
  .article-list,
  .g2 {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }
  .stats > div:not(:last-child)::after {
    display: none;
  }
  .stats > div:nth-child(odd)::after {
    content: "";
    display: block;
    position: absolute;
    right: -8px;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: var(--line);
  }
  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  h2 {
    font-size: 25px;
  }
}

/* ===== Responsive: mobile ===== */
@media (max-width: 680px) {
  body {
    font-size: 15px;
  }
  .nav {
    padding: 10px 16px;
    gap: 10px;
    position: relative;
  }
  .nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    gap: 2px;
    margin-left: 0;
    animation: fadeSlideIn 0.3s var(--ease);
  }
  .nav ul.open {
    display: flex;
  }
  .nav ul a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }
  .nav ul a::after {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .search-box.show {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    z-index: 5;
  }
  .search-box input,
  .search-box input:focus {
    width: 100%;
  }
  .logo {
    font-size: 18px;
  }
  .logo svg {
    width: 30px;
    height: 30px;
  }
  .nav-actions {
    margin-left: auto;
  }
  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  #themeToggle,
  #searchToggle {
    padding: 8px 11px;
  }
  .crumbs {
    padding: 12px 16px 0;
  }
  .hero {
    padding: 22px 16px 20px;
    gap: 22px;
  }
  .hero h1 {
    font-size: 27px;
    line-height: 1.35;
  }
  .hero p,
  .hero .lead {
    font-size: 15.5px;
  }
  .hero-art {
    padding: 20px;
    border-radius: var(--radius-md);
  }
  .hero-cta {
    gap: 10px;
  }
  .hero-cta .btn {
    flex: 1;
    min-width: 130px;
  }
  main {
    padding: 0 16px 50px;
  }
  section {
    padding: 34px 0;
  }
  h2 {
    font-size: 22px;
    padding-left: 15px;
    margin-bottom: 18px;
  }
  h2::before {
    width: 5px;
    top: 6px;
    bottom: 6px;
  }
  h3 {
    font-size: 18px;
    margin: 20px 0 10px;
  }
  h4 {
    font-size: 16px;
  }
  .grid {
    gap: 16px;
  }
  .card,
  .article {
    padding: 18px;
    border-radius: var(--radius-sm);
  }
  .card:hover,
  .article:hover {
    transform: translateY(-3px);
  }
  .stats {
    padding: 20px 12px;
    gap: 18px 12px;
    border-radius: var(--radius-md);
  }
  .stat-num {
    font-size: 26px;
  }
  .stat-label {
    font-size: 13px;
  }
  .article-list {
    gap: 16px;
  }
  .faq-q {
    padding: 15px 16px;
    font-size: 15px;
  }
  .faq-a {
    padding: 0 16px;
  }
  .howto-step {
    padding: 14px;
    gap: 12px;
  }
  .step-num {
    flex: 0 0 32px;
    height: 32px;
    font-size: 14px;
  }
  .contact-item {
    padding: 14px;
    font-size: 14px;
  }
  footer {
    padding: 36px 16px 20px;
  }
  .foot {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .copyright {
    margin-top: 24px;
    font-size: 12px;
  }
  #backTop {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero h1,
  .hero p,
  .hero-cta,
  .hero-art {
    animation: none;
  }
}

/* ===== Print ===== */
@media print {
  header,
  footer,
  #backTop,
  .hero-art,
  .carousel,
  .nav-actions {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  body::before {
    display: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  section {
    page-break-inside: avoid;
  }
}