:root {
  --bg: #f5f7fb;
  --bg-alt: #eef2f9;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --border: rgba(26, 26, 46, 0.1);
  --text: #1a1a2e;
  --text-soft: #4a4a63;
  --text-muted: #7a7a92;
  --primary: #e94560;
  --primary-dark: #c72e48;
  --accent: #f2a900;
  --accent-soft: #ffd166;
  --navy: #1a1a2e;
  --navy-2: #16213e;
  --navy-3: #0f3460;
  --link: #2b5fd9;
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 18px 48px rgba(26, 26, 46, 0.16);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --header-h: 76px;
  --maxw: 1180px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 42%, #0f3460 100%);
  --grad-accent: linear-gradient(120deg, #e94560 0%, #f2a900 100%);
  --grad-banner: linear-gradient(120deg, rgba(233, 69, 96, 0.92) 0%, rgba(242, 169, 0, 0.9) 100%);
}

html[data-theme="dark"] {
  --bg: #0b0e17;
  --bg-alt: #10141f;
  --surface: #161b28;
  --surface-glass: rgba(22, 27, 40, 0.66);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef1f8;
  --text-soft: #c3c9d8;
  --text-muted: #8b93a7;
  --primary: #ff5c78;
  --primary-dark: #e94560;
  --accent: #ffc233;
  --accent-soft: #ffe08a;
  --link: #7fa6ff;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.6);
  --grad-hero: linear-gradient(135deg, #0b0e17 0%, #131a2b 48%, #17233d 100%);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 85% -10%, rgba(233, 69, 96, 0.12), transparent 60%),
    radial-gradient(50vw 50vw at 0% 20%, rgba(242, 169, 0, 0.1), transparent 60%),
    radial-gradient(45vw 45vw at 60% 100%, rgba(15, 52, 96, 0.12), transparent 65%);
  pointer-events: none;
}

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

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

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.6em;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.32rem);
}

h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.4em;
}

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.3em;
  border-left: 4px solid var(--primary);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: var(--shadow-sm);
}

blockquote p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--primary);
  color: #fff;
}

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

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-logo {
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(233, 69, 96, 0.28);
  transition: transform 0.4s var(--ease);
}

.brand:hover .brand-logo {
  transform: rotate(-8deg) scale(1.06);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-slogan {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-pill);
  position: relative;
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--primary);
  background: rgba(233, 69, 96, 0.08);
  transform: translateY(-1px);
}

.main-nav a:hover::after {
  width: 46%;
}

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

.site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 14px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.14);
}

.site-search input {
  width: 168px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  padding: 6px 0;
  outline: none;
}

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

.site-search button,
.theme-toggle,
.menu-toggle {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius-pill);
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.site-search button {
  padding: 7px 16px;
  color: #fff;
  background: var(--grad-accent);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.28);
}

.site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(233, 69, 96, 0.36);
}

.theme-toggle {
  padding: 9px 16px;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  padding: 9px 16px;
  color: #fff;
  background: var(--navy);
}

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--grad-hero);
  color: #fff;
  padding: 64px 20px 0;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(233, 69, 96, 0.35), transparent 70%),
    radial-gradient(35% 55% at 80% 10%, rgba(242, 169, 0, 0.28), transparent 70%);
  filter: blur(10px);
  z-index: -1;
  animation: heroGlow 14s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 90px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  z-index: -1;
  pointer-events: none;
}

@keyframes heroGlow {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.9; }
  100% { transform: translate3d(2%, 3%, 0) scale(1.08); opacity: 1; }
}

.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  animation: fadeUp 0.9s var(--ease) both;
}

.hero-eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero h1 {
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
}

.hero-lead {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.02rem;
  max-width: 62ch;
  margin-bottom: 28px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  color: #fff;
  background: var(--grad-accent);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(233, 69, 96, 0.5);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  color: var(--navy);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.hero-visual {
  animation: fadeUp 1.1s var(--ease) 0.12s both;
}

.hero-visual svg {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transition: transform 0.6s var(--ease);
}

.hero-visual:hover svg {
  transform: translateY(-6px) rotate(-1deg);
}

.hero-banner {
  max-width: var(--maxw);
  margin: 52px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.banner-slide {
  padding: 22px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease);
  animation: fadeUp 0.9s var(--ease) both;
}

.banner-slide:nth-child(1) { animation-delay: 0.15s; }
.banner-slide:nth-child(2) { animation-delay: 0.3s; }
.banner-slide:nth-child(3) { animation-delay: 0.45s; }

.banner-slide:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(242, 169, 0, 0.5);
}

.banner-slide h2 {
  font-size: 1.05rem;
  color: var(--accent-soft);
  margin-bottom: 8px;
}

.banner-slide p {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
}

.hero-stats {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 26px 20px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item {
  text-align: center;
  padding: 10px;
}

.stat-number {
  display: block;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--grad-banner);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 20px 0;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.breadcrumb li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Sections ---------- */
.section {
  padding: 72px 20px;
}

.section-alt {
  background: var(--bg-alt);
}

.section-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.section-inner > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 28px;
}

.section-inner > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-accent);
}

.section-inner h3 {
  margin-top: 1.6em;
}

.section-inner > p:first-of-type {
  font-size: 1.02rem;
  color: var(--text-soft);
  max-width: 78ch;
}

/* ---------- Cards ---------- */
.news-item,
.article-card,
.contact-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

.news-item::before,
.article-card::before,
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.news-item:hover,
.article-card:hover,
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(233, 69, 96, 0.35);
}

.news-item:hover::before,
.article-card:hover::before,
.contact-card:hover::before {
  transform: scaleX(1);
}

.news-item {
  margin-bottom: 20px;
}

.news-item h3 {
  margin-top: 0;
}

.meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.summary {
  color: var(--text-soft);
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

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

.read-more:hover::after {
  transform: translateX(4px);
}

/* Articles grid */
#articles .section-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

#articles .section-inner > h2,
#articles .section-inner > p:first-of-type {
  grid-column: 1 / -1;
}

.article-card {
  display: flex;
  flex-direction: column;
}

.article-card h3 {
  margin-top: 0;
  font-size: 1.08rem;
}

.article-card .read-more {
  margin-top: auto;
  padding-top: 8px;
}

/* ---------- HowTo ---------- */
#howto .section-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

#howto ol li {
  position: relative;
  padding: 12px 16px 12px 56px;
  margin-bottom: 12px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

#howto ol li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
}

#howto ol li:hover {
  transform: translateX(6px);
  background: rgba(233, 69, 96, 0.08);
}

/* ---------- FAQ ---------- */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 22px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.faq-list details:hover {
  border-color: rgba(233, 69, 96, 0.35);
  box-shadow: var(--shadow-md);
}

.faq-list details[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.faq-list summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 36px;
  transition: color 0.25s var(--ease);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(233, 69, 96, 0.1);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.faq-list details[open] summary {
  color: var(--primary);
}

.faq-list details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: var(--primary);
  color: #fff;
}

.faq-list details p {
  margin: 0 0 18px;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
  animation: fadeIn 0.35s var(--ease) both;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.contact-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--primary);
}

.contact-card p {
  margin: 0 0 8px;
  font-size: 0.92rem;
  line-height: 1.65;
}

.contact-card p:last-child {
  margin-bottom: 0;
}

/* ---------- Sitemap & Links ---------- */
.sitemap-list,
.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitemap-list li,
.links-list li {
  margin: 0;
}

.sitemap-list a,
.links-list a {
  display: inline-block;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease), background-color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.sitemap-list a:hover,
.links-list a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(233, 69, 96, 0.3);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--grad-hero);
  color: rgba(255, 255, 255, 0.8);
  padding: 56px 20px 40px;
  margin-top: 0;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr;
  gap: 32px;
  align-items: start;
}

.footer-brand .footer-name {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 8px;
  background: var(--grad-banner);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-brand p,
.footer-meta p {
  margin: 0 0 6px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.68);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-nav a {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.72);
  position: relative;
}

.footer-nav a:hover {
  color: var(--accent-soft);
}

.footer-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--accent-soft);
  transition: width 0.3s var(--ease);
}

.footer-nav a:hover::after {
  width: 100%;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-accent);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  box-shadow: 0 10px 26px rgba(233, 69, 96, 0.4);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(233, 69, 96, 0.5);
}

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

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .main-nav a {
    padding: 8px 8px;
    font-size: 0.84rem;
  }

  .site-search input {
    width: 130px;
  }

  .hero-inner {
    gap: 32px;
  }
}

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    display: none;
    border-top: 1px solid var(--border);
    padding-top: 10px;
  }

  .main-nav.is-open {
    display: block;
    animation: fadeIn 0.3s var(--ease) both;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .main-nav a {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
  }

  .main-nav a::after {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
    max-width: 520px;
    margin: 0 auto;
  }

  .hero-banner {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 680px) {
  :root {
    --header-h: 64px;
  }

  .header-inner {
    padding: 10px 14px;
    gap: 10px;
  }

  .brand-slogan {
    display: none;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .site-search {
    flex: 1;
    min-width: 0;
    padding-left: 12px;
  }

  .site-search input {
    width: 100%;
    min-width: 0;
  }

  .site-search button {
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .theme-toggle {
    padding: 9px 12px;
    font-size: 0.78rem;
  }

  .menu-toggle {
    padding: 9px 14px;
    font-size: 0.78rem;
  }

  .hero {
    padding: 40px 16px 0;
  }

  .hero-lead {
    font-size: 0.95rem;
  }

  .hero-cta .btn {
    flex: 1;
    padding: 12px 18px;
  }

  .hero-stats {
    padding: 20px 8px 32px;
    gap: 14px;
  }

  .stat-label {
    font-size: 0.76rem;
  }

  .section {
    padding: 48px 16px;
  }

  .section-inner > h2 {
    margin-bottom: 20px;
  }

  .news-item,
  .article-card,
  .contact-card {
    padding: 20px;
  }

  #howto .section-inner {
    padding: 24px 18px;
  }

  #howto ol li {
    padding: 10px 12px 10px 50px;
  }

  .faq-list details {
    padding: 2px 16px;
  }

  .footer-inner {
    gap: 20px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 0.76rem;
  }
}

@media (max-width: 420px) {
  .brand-text {
    display: none;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .sitemap-list a,
  .links-list a {
    padding: 7px 14px;
    font-size: 0.82rem;
  }
}

/* ---------- Motion & print ---------- */
@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;
  }

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

@media print {
  .site-header,
  .back-to-top,
  .hero-visual,
  .hero-banner,
  .hero-stats,
  .site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .hero {
    background: none;
    color: #000;
    padding: 0;
  }

  .hero h1,
  .hero-lead {
    color: #000;
  }

  .section {
    padding: 20px 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}