:root {
  --primary: #e94560;
  --primary-dark: #c73550;
  --primary-light: #ff6b81;
  --secondary: #533483;
  --accent: #0f3460;
  --bg: #f8f9fc;
  --bg-alt: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a9a;
  --border: rgba(26, 26, 46, 0.1);
  --border-light: rgba(26, 26, 46, 0.06);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow: 0 8px 32px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.14);
  --shadow-glow: 0 8px 32px rgba(233, 69, 96, 0.25);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 72px;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  --gradient-primary: linear-gradient(135deg, #e94560 0%, #533483 100%);
  --gradient-accent: linear-gradient(135deg, #0f3460 0%, #533483 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.2) 100%);
}

:root.dark-mode {
  --primary: #ff6b81;
  --primary-dark: #e94560;
  --primary-light: #ff8fa3;
  --secondary: #7b5ea7;
  --accent: #1a4a7a;
  --bg: #0d0d1a;
  --bg-alt: #141428;
  --bg-card: rgba(26, 26, 46, 0.75);
  --bg-glass: rgba(26, 26, 46, 0.55);
  --text: #eaeaf5;
  --text-secondary: #b0b0d0;
  --text-muted: #8080a0;
  --border: rgba(234, 234, 245, 0.1);
  --border-light: rgba(234, 234, 245, 0.06);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 32px rgba(233, 69, 96, 0.35);
  --gradient-hero: linear-gradient(135deg, #0d0d1a 0%, #141428 40%, #1a1a3e 100%);
  --gradient-glass: linear-gradient(135deg, rgba(26, 26, 46, 0.6) 0%, rgba(26, 26, 46, 0.2) 100%);
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  transition: background var(--transition), color var(--transition);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(233, 69, 96, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(83, 52, 131, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(15, 52, 96, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main {
  position: relative;
  z-index: 1;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.4rem); }

p {
  color: var(--text-secondary);
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--text);
  font-weight: 700;
}

/* ===== Header ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition);
}

#site-header.is-sticky {
  box-shadow: var(--shadow);
  background: var(--bg-glass);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.logo:hover {
  transform: scale(1.03);
  color: var(--text);
}

.logo svg {
  flex-shrink: 0;
  border-radius: 50%;
  transition: transform var(--transition), box-shadow var(--transition);
}

.logo:hover svg {
  transform: rotate(-12deg) scale(1.08);
  box-shadow: var(--shadow-glow);
}

#site-header nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

#site-header nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

#site-header nav a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: all var(--transition);
}

#site-header nav a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width var(--transition);
}

#site-header nav a:hover {
  color: var(--primary);
  background: rgba(233, 69, 96, 0.06);
}

#site-header nav a:hover::after {
  width: 60%;
}

#menu-toggle,
#dark-toggle {
  display: none;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#dark-toggle {
  display: inline-block;
}

#menu-toggle:hover,
#dark-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ===== Sections ===== */
section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
  position: relative;
}

section > h2 {
  margin-bottom: 32px;
  padding-bottom: 16px;
  position: relative;
}

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

section > h3 {
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

section > h3::before {
  content: "";
  width: 4px;
  height: 1.1em;
  background: var(--gradient-primary);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== Hero ===== */
#hero {
  max-width: none;
  padding: 0;
  margin: 0;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 600px at 15% 20%, rgba(233, 69, 96, 0.25) 0%, transparent 70%),
    radial-gradient(circle 500px at 85% 80%, rgba(83, 52, 131, 0.3) 0%, transparent 70%),
    radial-gradient(circle 400px at 50% 50%, rgba(15, 52, 96, 0.2) 0%, transparent 70%);
  animation: heroGlow 12s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.1); }
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

#hero > * {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

#hero h1 {
  padding-top: 80px;
  color: #ffffff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  animation: fadeUp 0.8s ease-out both;
}

#hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 860px;
  font-size: 1.02rem;
  animation: fadeUp 0.8s ease-out 0.15s both;
}

#hero p strong {
  color: #ff8fa3;
  font-size: 1.1rem;
}

#hero .hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 64px;
  animation: fadeUp 0.8s ease-out 0.3s both;
}

#hero .hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#hero .hero-actions a:first-child {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

#hero .hero-actions a:first-child:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(233, 69, 96, 0.45);
  color: #fff;
}

#hero .hero-actions a:last-child {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#hero .hero-actions a:last-child:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  color: #fff;
}

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

/* ===== Breadcrumb ===== */
nav[aria-label="面包屑导航"] {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px 0;
}

nav[aria-label="面包屑导航"] ol {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

nav[aria-label="面包屑导航"] li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--text-muted);
  opacity: 0.5;
}

nav[aria-label="面包屑导航"] a {
  color: var(--text-secondary);
}

nav[aria-label="面包屑导航"] a:hover {
  color: var(--primary);
}

/* ===== About ===== */
#about {
  margin-top: 24px;
}

#about p {
  text-align: justify;
}

/* ===== Products ===== */
#products {
  background: var(--gradient-accent);
  max-width: none;
  border-radius: var(--radius-xl);
  margin: 32px auto;
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}

#products::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 500px at 80% 20%, rgba(233, 69, 96, 0.2) 0%, transparent 70%),
    radial-gradient(circle 400px at 20% 80%, rgba(83, 52, 131, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

#products > * {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#products > h2 {
  color: #fff;
}

#products > h2::after {
  background: linear-gradient(90deg, #ff8fa3, #e94560);
}

#products > h3 {
  color: #ff8fa3;
}

#products > h3::before {
  background: linear-gradient(180deg, #ff8fa3, #e94560);
}

#products p {
  color: rgba(255, 255, 255, 0.85);
}

#products p strong {
  color: #fff;
}

/* ===== Solutions ===== */
#solutions > h3 {
  margin-top: 28px;
}

#solutions > h3:first-of-type {
  margin-top: 0;
}

/* ===== Cases ===== */
#cases {
  background: var(--bg-alt);
  max-width: none;
  border-radius: var(--radius-xl);
  margin: 32px auto;
  padding: 64px 24px;
  border: 1px solid var(--border-light);
}

#cases > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#cases > h3 {
  margin-top: 28px;
}

#cases > h3:first-of-type {
  margin-top: 0;
}

/* ===== News ===== */
#news > h3 {
  margin-top: 28px;
  padding: 20px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: none;
  transition: all var(--transition);
}

#news > h3::before {
  display: none;
}

#news > h3 + p {
  padding: 0 24px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: 0;
  margin-bottom: 16px;
  transition: all var(--transition);
}

#news > h3:hover {
  border-color: rgba(233, 69, 96, 0.3);
  box-shadow: var(--shadow-sm);
}

#news > h3:hover + p {
  border-color: rgba(233, 69, 96, 0.3);
  box-shadow: var(--shadow-sm);
}

/* ===== Articles ===== */
#articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

#articles > h2 {
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

#articles article {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#articles article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

#articles article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(233, 69, 96, 0.25);
}

#articles article:hover::before {
  transform: scaleX(1);
}

#articles article h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.15rem;
  color: var(--text);
  transition: color var(--transition);
}

#articles article:hover h3 {
  color: var(--primary);
}

#articles article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 500;
}

#articles article p:nth-of-type(2) {
  font-size: 0.92rem;
  flex: 1;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  align-self: flex-start;
  transition: all var(--transition);
}

#articles article a::after {
  content: "→";
  transition: transform var(--transition);
}

#articles article a:hover {
  gap: 10px;
  color: var(--primary-light);
}

#articles article a:hover::after {
  transform: translateX(4px);
}

/* ===== HowTo ===== */
#howto {
  background: var(--bg-alt);
  max-width: none;
  border-radius: var(--radius-xl);
  margin: 32px auto;
  padding: 64px 24px;
  border: 1px solid var(--border-light);
  counter-reset: howto-step;
}

#howto > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#howto > h3 {
  margin-top: 28px;
}

#howto > h3:first-of-type {
  margin-top: 0;
}

#howto > h3:nth-of-type(3)::before {
  counter-increment: howto-step;
  content: counter(howto-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

#howto > h3:nth-of-type(3) {
  gap: 10px;
}

#howto > h3:nth-of-type(3)::before {
  background: var(--gradient-primary);
}

#howto > p {
  padding-left: 36px;
}

/* ===== FAQ ===== */
#faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#faq > h2 {
  margin-bottom: 8px;
}

#faq details {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

#faq details[open] {
  border-color: rgba(233, 69, 96, 0.3);
  box-shadow: var(--shadow);
}

#faq details:hover {
  border-color: rgba(233, 69, 96, 0.2);
}

#faq summary {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--transition), background var(--transition);
  position: relative;
}

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

#faq summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition), color var(--transition);
  line-height: 1;
  width: 24px;
  text-align: center;
}

#faq details[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

#faq summary:hover {
  color: var(--primary);
  background: rgba(233, 69, 96, 0.04);
}

#faq details p {
  padding: 0 24px 20px;
  font-size: 0.94rem;
  color: var(--text-secondary);
  animation: fadeUp 0.3s ease-out;
}

/* ===== Contact ===== */
#contact {
  background: var(--gradient-accent);
  max-width: none;
  border-radius: var(--radius-xl);
  margin: 32px auto;
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}

#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 500px at 10% 30%, rgba(233, 69, 96, 0.2) 0%, transparent 70%),
    radial-gradient(circle 400px at 90% 70%, rgba(83, 52, 131, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

#contact > * {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#contact > h2 {
  color: #fff;
}

#contact > h2::after {
  background: linear-gradient(90deg, #ff8fa3, #e94560);
}

#contact > h3 {
  color: #ff8fa3;
}

#contact > h3::before {
  background: linear-gradient(180deg, #ff8fa3, #e94560);
}

#contact p {
  color: rgba(255, 255, 255, 0.85);
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

#contact li {
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.94rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

#contact li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.6);
}

#contact li:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ===== Sitemap ===== */
#sitemap ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

#sitemap li a {
  display: block;
  padding: 12px 18px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#sitemap li a:hover {
  color: var(--primary);
  border-color: rgba(233, 69, 96, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  background: var(--bg-card);
}

/* ===== Links ===== */
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

#links li a {
  display: inline-block;
  padding: 10px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

#links li a:hover {
  color: #fff;
  background: var(--gradient-primary);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* ===== Legal ===== */
#legal {
  background: var(--bg-alt);
  max-width: none;
  border-radius: var(--radius-xl);
  margin: 32px auto;
  padding: 64px 24px;
  border: 1px solid var(--border-light);
}

#legal > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

#legal > h3 {
  margin-top: 28px;
}

#legal > h3:first-of-type {
  margin-top: 0;
}

/* ===== Footer ===== */
footer {
  background: var(--gradient-hero);
  padding: 48px 24px 32px;
  text-align: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  margin-top: 32px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 400px at 20% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 70%),
    radial-gradient(circle 400px at 80% 50%, rgba(83, 52, 131, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

footer p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

footer p:first-child {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.95rem;
}

footer p:last-child {
  margin-bottom: 0;
  margin-top: 16px;
}

footer a {
  color: #ff8fa3;
  font-weight: 600;
  padding: 8px 20px;
  border: 1px solid rgba(255, 143, 163, 0.3);
  border-radius: 100px;
  display: inline-block;
  transition: all var(--transition);
}

footer a:hover {
  background: #ff8fa3;
  color: #1a1a2e;
  border-color: #ff8fa3;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.4);
}

/* ===== Back to top ===== */
#back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: all var(--transition);
  box-shadow: var(--shadow-glow);
}

#back-to-top::before {
  content: "↑";
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

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

#back-to-top:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 36px rgba(233, 69, 96, 0.5);
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Selection ===== */
::selection {
  background: rgba(233, 69, 96, 0.25);
  color: var(--text);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
}

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  #site-header nav a {
    padding: 8px 10px;
    font-size: 0.84rem;
  }

  section {
    padding: 48px 20px;
  }

  #hero h1 {
    padding-top: 64px;
  }

  #hero .hero-actions {
    padding-bottom: 48px;
  }
}

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

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

  .logo span {
    font-size: 1rem;
  }

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

  #site-header nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow), padding var(--transition);
    padding: 0 16px;
  }

  #site-header nav.is-open {
    max-height: 600px;
    padding: 16px;
  }

  #site-header nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  #site-header nav a {
    display: block;
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  #site-header nav a::after {
    display: none;
  }

  #site-header nav a:hover {
    background: rgba(233, 69, 96, 0.08);
  }

  section {
    padding: 40px 16px;
  }

  section > h2 {
    margin-bottom: 24px;
  }

  #hero {
    border-radius: 0 0 var(--radius) var(--radius);
  }

  #hero h1 {
    padding-top: 48px;
  }

  #hero .hero-actions {
    padding-bottom: 40px;
    gap: 12px;
  }

  #hero .hero-actions a {
    padding: 12px 24px;
    font-size: 0.92rem;
    flex: 1;
    min-width: 140px;
    text-align: center;
  }

  #products,
  #cases,
  #howto,
  #contact,
  #legal {
    border-radius: var(--radius);
    margin: 20px auto;
    padding: 40px 16px;
  }

  #articles {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  #sitemap ul {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }

  #back-to-top {
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
  }

  footer {
    padding: 36px 16px 28px;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    padding: 0 12px;
  }

  .logo svg {
    width: 32px;
    height: 32px;
  }

  .logo span {
    font-size: 0.92rem;
  }

  #dark-toggle,
  #menu-toggle {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  section {
    padding: 32px 12px;
  }

  #hero h1 {
    padding-top: 40px;
    font-size: 1.4rem;
  }

  #hero p {
    font-size: 0.92rem;
  }

  #hero .hero-actions {
    padding-bottom: 32px;
    flex-direction: column;
  }

  #hero .hero-actions a {
    width: 100%;
  }

  #products,
  #cases,
  #howto,
  #contact,
  #legal {
    padding: 32px 12px;
  }

  #articles article {
    padding: 22px 18px;
  }

  #faq summary {
    padding: 16px 18px;
    font-size: 0.94rem;
  }

  #faq details p {
    padding: 0 18px 16px;
    font-size: 0.88rem;
  }

  #contact li {
    padding: 14px 16px;
    font-size: 0.88rem;
  }

  #sitemap ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  #sitemap li a {
    padding: 10px 12px;
    font-size: 0.82rem;
    text-align: center;
  }

  #links ul {
    gap: 8px;
  }

  #links li a {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  #back-to-top {
    bottom: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
  }

  #back-to-top::before {
    font-size: 1.2rem;
  }

  footer p {
    font-size: 0.82rem;
  }
}

/* ===== 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;
  }
}

/* ===== Print ===== */
@media print {
  #site-header,
  #back-to-top,
  #dark-toggle,
  #menu-toggle,
  footer a {
    display: none !important;
  }

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

  section {
    page-break-inside: avoid;
  }
}