:root {
  --brand: #c8102e;
  --brand-dark: #9e0b23;
  --brand-light: #ff4d66;
  --accent: #ffd166;
  --accent-2: #2f8f5b;
  --bg: #fdfbfc;
  --bg-soft: #fff5f6;
  --bg-alt: #f7f2f4;
  --card: #ffffff;
  --card-glass: rgba(255, 255, 255, 0.72);
  --text: #2a1d21;
  --text-soft: #5c4b51;
  --text-muted: #8a767d;
  --border: rgba(200, 16, 46, 0.12);
  --border-strong: rgba(200, 16, 46, 0.24);
  --shadow-sm: 0 2px 8px rgba(94, 20, 34, 0.06);
  --shadow-md: 0 10px 28px rgba(94, 20, 34, 0.1);
  --shadow-lg: 0 22px 54px rgba(94, 20, 34, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;
  --header-h: 64px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #ff5a72;
    --brand-dark: #ff8398;
    --brand-light: #ff8fa2;
    --accent: #ffd166;
    --accent-2: #4ec98a;
    --bg: #16101a;
    --bg-soft: #1d1319;
    --bg-alt: #221720;
    --card: #211621;
    --card-glass: rgba(38, 24, 36, 0.66);
    --text: #f6eef1;
    --text-soft: #d6c4cb;
    --text-muted: #a58f98;
    --border: rgba(255, 90, 114, 0.18);
    --border-strong: rgba(255, 90, 114, 0.32);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.54);
  }
}

html[data-theme="dark"] {
  --brand: #ff5a72;
  --brand-dark: #ff8398;
  --brand-light: #ff8fa2;
  --accent: #ffd166;
  --accent-2: #4ec98a;
  --bg: #16101a;
  --bg-soft: #1d1319;
  --bg-alt: #221720;
  --card: #211621;
  --card-glass: rgba(38, 24, 36, 0.66);
  --text: #f6eef1;
  --text-soft: #d6c4cb;
  --text-muted: #a58f98;
  --border: rgba(255, 90, 114, 0.18);
  --border-strong: rgba(255, 90, 114, 0.32);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 22px 54px rgba(0, 0, 0, 0.54);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(200, 16, 46, 0.09), transparent 46%),
    radial-gradient(circle at 92% 4%, rgba(255, 209, 102, 0.16), transparent 42%),
    radial-gradient(circle at 50% 120%, rgba(47, 143, 91, 0.08), transparent 52%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}

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

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

a:hover,
a:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

h1 {
  font-size: clamp(1.75rem, 4.4vw, 3rem);
  background: linear-gradient(120deg, var(--brand) 0%, var(--brand-light) 46%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(200, 16, 46, 0.14));
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-top: 1.6em;
}

h4 {
  font-size: 1.02rem;
  color: var(--brand-dark);
  margin-top: 1.2em;
}

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

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

li {
  margin-bottom: 0.45em;
}

li::marker {
  color: var(--brand);
  font-weight: 700;
}

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

blockquote {
  margin: 1.2em 0;
  padding: 1em 1.25em;
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-style: italic;
}

time {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 0.86em;
}

:focus-visible {
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-alt);
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.07), rgba(255, 209, 102, 0.1));
  border-bottom: 1px dashed var(--border);
}

.topbar span {
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar nav {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}

.topbar nav a {
  color: var(--text-muted);
  font-size: 0.78rem;
}

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

.brandbar {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.logo:hover {
  text-decoration: none;
  color: var(--brand);
}

.logo svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.34);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.logo:hover svg {
  transform: rotate(-8deg) scale(1.06);
  box-shadow: 0 10px 26px rgba(200, 16, 46, 0.46);
}

#main-nav {
  flex: 1 1 auto;
  min-width: 0;
}

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

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: inline-block;
  padding: 7px 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 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--brand);
  background: rgba(200, 16, 46, 0.07);
  text-decoration: none;
  transform: translateY(-1px);
}

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

#site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

#site-search input[type="search"] {
  width: 190px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: width 0.35s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

#site-search input[type="search"]::placeholder {
  color: var(--text-muted);
}

#site-search input[type="search"]:focus {
  width: 230px;
  outline: none;
  background: var(--card);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.14);
}

#site-search button,
#theme-toggle,
#menu-toggle {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.28);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#site-search button:hover,
#theme-toggle:hover,
#menu-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(200, 16, 46, 0.4);
  filter: brightness(1.06);
}

#site-search button:active,
#theme-toggle:active,
#menu-toggle:active {
  transform: translateY(0) scale(0.98);
}

#theme-toggle {
  background: linear-gradient(135deg, #3a2a33, #1f1720);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}

#menu-toggle {
  display: none;
}

#breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 10px;
}

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

#breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

#breadcrumb li + li::before {
  content: "›";
  margin: 0 6px;
  color: var(--brand);
  opacity: 0.7;
}

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

#breadcrumb a:hover {
  color: var(--brand);
}

#breadcrumb [aria-current="page"] {
  color: var(--brand);
  font-weight: 700;
}

#main-content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 20px 60px;
}

#main-content > section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.4vw, 42px);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.7s var(--ease) both;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

#main-content > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--accent-2));
  opacity: 0.9;
}

#main-content > section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#main-content > section:nth-child(2) { animation-delay: 0.05s; }
#main-content > section:nth-child(3) { animation-delay: 0.1s; }
#main-content > section:nth-child(4) { animation-delay: 0.15s; }
#main-content > section:nth-child(5) { animation-delay: 0.2s; }
#main-content > section:nth-child(6) { animation-delay: 0.25s; }

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

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.hero {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 209, 102, 0.34), transparent 42%),
    radial-gradient(circle at 92% 12%, rgba(255, 77, 102, 0.28), transparent 44%),
    linear-gradient(135deg, #2a0a12 0%, #7a0f22 46%, #c8102e 100%) !important;
  color: #fff;
  border: none !important;
  box-shadow: var(--shadow-lg) !important;
}

.hero::before {
  display: none;
}

.hero h1 {
  background: linear-gradient(110deg, #ffffff 0%, #ffe3a3 52%, #ffd166 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.34));
  margin-bottom: 0.5em;
}

.hero .lead {
  font-size: clamp(0.96rem, 1.7vw, 1.1rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 78ch;
  line-height: 1.85;
}

.hero-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 16px;
  margin: 24px 0;
  padding-bottom: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.hero-carousel::-webkit-scrollbar {
  height: 6px;
}

.hero-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.4);
  border: none;
}

.slide {
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  animation: floatY 6s ease-in-out infinite;
}

.slide:nth-child(2) { animation-delay: 0.6s; }
.slide:nth-child(3) { animation-delay: 1.2s; }

.slide:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34);
}

.slide svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  backdrop-filter: blur(12px) saturate(150%);
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.stat:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 209, 102, 0.6);
}

.stat strong {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #ffd166;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.stat span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.timeline {
  list-style: none;
  padding-left: 0;
  margin: 1.4em 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--brand), var(--accent), var(--accent-2));
  opacity: 0.5;
}

.timeline li {
  position: relative;
  padding: 10px 0 10px 36px;
  margin: 0;
  border-radius: var(--radius-sm);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 18px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.timeline li:hover {
  background: var(--bg-soft);
  transform: translateX(4px);
}

.timeline li:hover::before {
  background: var(--brand);
  transform: scale(1.15);
}

.timeline strong {
  color: var(--brand);
  margin-right: 6px;
}

#products ul,
#solutions ul,
#howto ul,
#sitemap ul,
#links ul,
#contact ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 10px;
}

#products ul li,
#solutions ul li,
#howto ul li {
  position: relative;
  padding: 12px 16px 12px 42px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#products ul li::before,
#solutions ul li::before,
#howto ul li::before {
  content: "✓";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent-2));
  border-radius: 50%;
}

#products ul li:hover,
#solutions ul li:hover,
#howto ul li:hover {
  transform: translateX(5px);
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

#howto ol {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 12px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  margin: 0;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.32);
}

#howto ol li:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#ranking h3 {
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}

#ranking h4 {
  display: inline-block;
  padding: 3px 12px;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
}

#cases blockquote {
  position: relative;
  padding: 18px 20px 18px 52px;
  background: var(--bg-soft);
  border-left: none;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-style: normal;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#cases blockquote::before {
  content: "“";
  position: absolute;
  left: 14px;
  top: 4px;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, serif;
  color: var(--brand);
  opacity: 0.45;
}

#cases blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.news-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.news-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.news-list li:hover {
  transform: translateX(5px);
  background: var(--card);
  border-color: var(--border-strong);
}

.news-list time {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand);
  background: rgba(200, 16, 46, 0.1);
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

#articles {
  display: grid;
  gap: 16px;
}

#articles h2 {
  grid-column: 1 / -1;
}

#articles article {
  padding: 20px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

#articles article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 209, 102, 0.16) 50%, transparent 70%);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}

#articles article:hover {
  transform: translateY(-5px);
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#articles article:hover::after {
  opacity: 1;
  animation: shimmer 1.6s linear infinite;
}

#articles article h3 {
  margin-top: 0;
  font-size: 1.08rem;
  color: var(--text);
}

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

#articles article p {
  margin-bottom: 0.6em;
  font-size: 0.94rem;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 4px 12px rgba(200, 16, 46, 0.26);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

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

#articles article a:hover {
  text-decoration: none;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(200, 16, 46, 0.4);
  filter: brightness(1.08);
}

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

#faq details {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

#faq details[open] {
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding: 16px 52px 16px 20px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 50%;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
  background: linear-gradient(135deg, var(--accent-2), #1f6b42);
}

#faq summary:hover {
  color: var(--brand);
}

#faq details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-soft);
  animation: fadeUp 0.4s var(--ease) both;
}

#contact ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

#contact ul li {
  padding: 14px 16px;
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

#contact form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding: clamp(18px, 3vw, 28px);
  background: linear-gradient(135deg, var(--bg-soft), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

#contact label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: -8px;
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

#contact textarea {
  resize: vertical;
  min-height: 120px;
}

#contact input::placeholder,
#contact textarea::placeholder {
  color: var(--text-muted);
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.14);
}

#contact button[type="submit"] {
  justify-self: start;
  padding: 12px 38px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(200, 16, 46, 0.32);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

#contact button[type="submit"]:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(200, 16, 46, 0.44);
  filter: brightness(1.07);
}

#contact button[type="submit"]:active {
  transform: translateY(0) scale(0.98);
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
}

#sitemap ul li,
#links ul li {
  margin: 0;
}

#sitemap a,
#links a {
  display: block;
  padding: 11px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: var(--brand);
  background: var(--card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

#site-footer {
  position: relative;
  margin-top: 20px;
  padding: 46px 20px 90px;
  color: rgba(255, 255, 255, 0.86);
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 209, 102, 0.16), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(255, 77, 102, 0.18), transparent 44%),
    linear-gradient(160deg, #2a0a12 0%, #4d0a18 52%, #1c060d 100%);
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--brand), var(--accent), var(--accent-2)) 1;
}

#site-footer > * {
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
}

#site-footer h2 {
  font-size: 1.05rem;
  color: #fff;
  padding-left: 14px;
  margin-bottom: 0.5em;
}

#site-footer h2::before {
  width: 4px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

#site-footer p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
  line-height: 1.8;
}

.footer-meta {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-meta p {
  margin: 0 0 6px;
}

.footer-meta p:first-child {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffd166;
}

#site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

#site-footer nav a {
  display: inline-block;
  padding: 7px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#site-footer nav a:hover {
  background: rgba(255, 209, 102, 0.2);
  border-color: rgba(255, 209, 102, 0.5);
  color: #ffd166;
  text-decoration: none;
  transform: translateY(-2px);
}

#site-footer section {
  margin-bottom: 22px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#site-footer section:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 209, 102, 0.28);
}

#site-footer section p {
  margin: 0;
}

#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  width: 52px;
  height: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(200, 16, 46, 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

#back-to-top::before {
  content: "↑";
  display: block;
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 1px;
}

#back-to-top:hover {
  transform: translateY(-5px) scale(1.06);
  box-shadow: 0 16px 38px rgba(200, 16, 46, 0.56);
  filter: brightness(1.08);
}

#back-to-top:active {
  transform: translateY(0) scale(0.96);
}

@media (min-width: 900px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  #articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1080px) {
  #main-nav a {
    padding: 7px 9px;
    font-size: 0.86rem;
  }

  #site-search input[type="search"] {
    width: 150px;
  }

  #site-search input[type="search"]:focus {
    width: 180px;
  }
}

@media (max-width: 900px) {
  .topbar {
    font-size: 0.72rem;
  }

  .brandbar {
    gap: 12px;
    padding: 10px 16px;
  }

  #main-nav {
    order: 5;
    flex-basis: 100%;
    display: none;
  }

  #main-nav.is-open {
    display: block;
    animation: fadeUp 0.35s var(--ease) both;
  }

  #main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 0;
    border-top: 1px dashed var(--border);
  }

  #main-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
  }

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

  #menu-toggle {
    display: inline-block;
    margin-left: auto;
  }

  #site-search {
    order: 6;
    flex-basis: 100%;
    margin-top: 4px;
  }

  #site-search input[type="search"] {
    flex: 1;
    width: 100%;
  }

  #site-search input[type="search"]:focus {
    width: 100%;
  }

  #theme-toggle {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  #main-content {
    padding: 20px 14px 48px;
  }

  #main-content > section {
    border-radius: var(--radius);
    margin-bottom: 20px;
  }

  .hero-carousel {
    grid-auto-columns: 82%;
  }

  #site-footer {
    padding: 36px 16px 96px;
  }
}

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 14px;
  }

  .topbar nav {
    gap: 12px;
  }

  .brandbar {
    padding: 10px 14px;
  }

  .logo {
    font-size: 1.05rem;
  }

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

  #breadcrumb {
    padding: 0 14px 8px;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 5px;
  }

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

  .stat {
    padding: 14px 8px;
  }

  .hero-carousel {
    grid-auto-columns: 88%;
  }

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

  #contact button[type="submit"] {
    justify-self: stretch;
    width: 100%;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }

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

  #faq summary::after {
    right: 14px;
    width: 24px;
    height: 24px;
  }

  #faq details p {
    padding: 0 16px 16px;
  }

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

  .timeline li {
    padding-left: 30px;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline li::before {
    left: 1px;
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 380px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .brandbar {
    gap: 8px;
  }

  #theme-toggle {
    padding: 7px 10px;
    font-size: 0.72rem;
  }
}

@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;
  }
}

@media print {
  #site-header,
  #site-footer nav,
  #back-to-top,
  #site-search,
  #theme-toggle,
  #menu-toggle,
  .hero-carousel {
    display: none !important;
  }

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

  #main-content > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

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