:root {
  --brand-900: #2a1250;
  --brand-800: #3d1a72;
  --brand-700: #4a2384;
  --brand-600: #5b2c9e;
  --brand-500: #7442c2;
  --brand-400: #9163dd;
  --brand-300: #b48cf0;
  --brand-200: #d6c2fa;
  --brand-100: #ece0ff;
  --accent-500: #f5c542;
  --accent-400: #ffd766;
  --accent-600: #d9a91f;
  --teal-500: #2fd6c3;
  --pink-500: #ff6fa5;
  --bg: #f7f4fd;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-card: #ffffff;
  --bg-card-glass: rgba(255, 255, 255, 0.62);
  --text: #241a33;
  --text-soft: #4a3f5c;
  --text-muted: #6f6584;
  --border: rgba(91, 44, 158, 0.14);
  --border-strong: rgba(91, 44, 158, 0.28);
  --shadow-sm: 0 2px 8px rgba(42, 18, 80, 0.07);
  --shadow-md: 0 10px 30px rgba(42, 18, 80, 0.1);
  --shadow-lg: 0 24px 60px rgba(42, 18, 80, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
  --header-h: 72px;
  --maxw: 1200px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad-banner: linear-gradient(135deg, #2a1250 0%, #5b2c9e 38%, #7442c2 62%, #9163dd 100%);
  --grad-accent: linear-gradient(135deg, #f5c542 0%, #ff8fb1 100%);
  --grad-soft: linear-gradient(160deg, rgba(91, 44, 158, 0.08), rgba(47, 214, 195, 0.08));
}

html[data-theme="dark"] {
  --bg: #0e0a18;
  --bg-elevated: rgba(28, 20, 46, 0.72);
  --bg-card: #1a1330;
  --bg-card-glass: rgba(34, 24, 58, 0.6);
  --text: #f1ecff;
  --text-soft: #cfc4e6;
  --text-muted: #a396c2;
  --border: rgba(180, 140, 240, 0.18);
  --border-strong: rgba(180, 140, 240, 0.36);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --grad-banner: linear-gradient(135deg, #120a24 0%, #2a1250 40%, #3d1a72 70%, #5b2c9e 100%);
  --grad-soft: linear-gradient(160deg, rgba(145, 99, 221, 0.14), rgba(47, 214, 195, 0.1));
}

*,
*::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-color: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 8% -8%, rgba(91, 44, 158, 0.12), transparent 60%),
    radial-gradient(900px 520px at 100% 4%, rgba(47, 214, 195, 0.1), transparent 62%),
    radial-gradient(800px 500px at 50% 110%, rgba(255, 111, 165, 0.08), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

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

a:hover,
a:focus-visible {
  color: var(--brand-500);
}

html[data-theme="dark"] a {
  color: var(--brand-300);
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus-visible {
  color: var(--brand-200);
}

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

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

h1 { font-size: clamp(1.85rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

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

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

li {
  margin-bottom: 0.5em;
}

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

blockquote {
  margin: 1.4em 0;
  padding: 1.1em 1.4em;
  border-left: 4px solid var(--accent-500);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--bg-card-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

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

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

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

/* ============ HEADER ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elevated);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.35s 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;
  min-height: var(--header-h);
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

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

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(91, 44, 158, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.05);
}

.brand-name {
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, var(--brand-600), var(--brand-400), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

#main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.35rem;
}

#main-nav li {
  margin: 0;
}

#main-nav a {
  display: inline-block;
  padding: 0.42em 0.72em;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  position: relative;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.28em;
  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 {
  background: rgba(91, 44, 158, 0.1);
  color: var(--brand-600);
  transform: translateY(-1px);
}

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

html[data-theme="dark"] #main-nav a:hover {
  background: rgba(145, 99, 221, 0.18);
  color: var(--brand-200);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

#site-search {
  display: flex;
  align-items: center;
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search:focus-within {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(145, 99, 221, 0.18);
}

#search-input {
  width: 180px;
  padding: 0.5em 0.9em;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

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

#search-input::-webkit-search-cancel-button {
  cursor: pointer;
}

#site-search button {
  padding: 0.5em 1em;
  border: 0;
  background: var(--grad-banner);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.25s var(--ease);
}

#site-search button:hover {
  filter: brightness(1.12);
}

#theme-toggle,
#menu-toggle {
  padding: 0.5em 0.95em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-card-glass);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#theme-toggle:hover,
#menu-toggle:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  transform: translateY(-1px);
}

#menu-toggle {
  display: none;
}

/* ============ MAIN / LAYOUT ============ */
main {
  display: block;
}

main > section,
main > nav.breadcrumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

main > section {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

main > section > h2:first-child {
  position: relative;
  padding-bottom: 0.5em;
  margin-bottom: 1.2em;
}

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

/* ============ BREADCRUMB ============ */
.breadcrumb {
  padding-top: 1.1rem;
  padding-bottom: 0.4rem;
}

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

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

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

html[data-theme="dark"] .breadcrumb [aria-current="page"] {
  color: var(--brand-300);
}

/* ============ HERO ============ */
#hero {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
  position: relative;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 620px;
  background: var(--grad-banner);
  z-index: -1;
  border-radius: 0 0 48px 48px;
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}

.hero-slider {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3rem);
  position: relative;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeUp 0.9s var(--ease) both;
}

.hero-slider::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -15%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 66, 0.35), transparent 68%);
  pointer-events: none;
  filter: blur(10px);
}

.hero-slider .slide {
  display: none;
  color: #fff;
  position: relative;
  z-index: 1;
}

.hero-slider .slide.is-active {
  display: block;
  animation: fadeUp 0.7s var(--ease) both;
}

.hero-slider .slide h1,
.hero-slider .slide h2 {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  max-width: 22ch;
}

.hero-slider .slide p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 62ch;
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

.hero-slider .cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding: 0.85em 1.9em;
  border-radius: var(--radius-pill);
  background: var(--grad-accent);
  color: #2a1250;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px rgba(245, 197, 66, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}

.hero-slider .cta::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.hero-slider .cta:hover,
.hero-slider .cta:focus-visible {
  color: #2a1250;
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(245, 197, 66, 0.45);
  filter: brightness(1.05);
}

.hero-slider .cta:hover::after {
  transform: translateX(4px);
}

.slider-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.6rem;
  position: relative;
  z-index: 2;
}

.slider-controls button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.slider-controls button:hover {
  background: var(--accent-500);
  border-color: var(--accent-500);
  color: #2a1250;
  transform: scale(1.08);
}

.hero-stats {
  max-width: var(--maxw);
  margin: -1.5rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.hero-stats .stat {
  padding: 1.4rem 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.hero-stats .stat:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.hero-stats .num {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--brand-600), var(--brand-400));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="dark"] .hero-stats .num {
  background: linear-gradient(120deg, var(--brand-300), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stats .unit {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-600);
  margin-left: 0.1em;
}

.hero-stats p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============ ABOUT ============ */
#about {
  display: block;
}

#about h3 {
  margin-top: 1.6em;
  padding-left: 0.7em;
  border-left: 4px solid var(--brand-400);
  color: var(--brand-700);
}

html[data-theme="dark"] #about h3 {
  color: var(--brand-200);
}

#about ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem 1.4rem;
  list-style: none;
  padding: 0;
}

#about ul li {
  margin: 0;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#about ul li:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

/* ============ PRODUCTS ============ */
#products h3 {
  margin-top: 1.8em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35em 0.9em;
  border-radius: var(--radius-pill);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--brand-700);
  font-size: 1.1rem;
}

html[data-theme="dark"] #products h3 {
  color: var(--brand-200);
}

#products ul {
  list-style: none;
  padding: 0;
  margin-top: 1.2em;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

#products ul li {
  margin: 0;
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#products ul li::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#products ul li:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

#products ul li:hover::before {
  opacity: 1;
}

/* ============ SOLUTIONS ============ */
#solutions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  align-items: start;
}

#solutions > h2 {
  grid-column: 1 / -1;
}

#solutions h3 {
  margin: 0 0 0.5em;
  font-size: 1.12rem;
  color: var(--brand-700);
}

html[data-theme="dark"] #solutions h3 {
  color: var(--brand-200);
}

#solutions p {
  margin: 0;
}

#solutions > p,
#solutions > h3 + p {
  padding: 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#solutions > h3 {
  margin-bottom: -0.7rem;
  padding: 0 0.4rem;
  position: relative;
  z-index: 1;
}

#solutions > p:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* ============ SCENARIOS ============ */
#scenarios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  align-items: start;
}

#scenarios > h2 {
  grid-column: 1 / -1;
}

#scenarios h3 {
  margin: 0;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--grad-banner);
  color: #fff;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
}

#scenarios p {
  margin: 0;
  padding: 1.1rem 1.2rem 1.3rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 0;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#scenarios > h3 {
  margin-bottom: 0;
}

#scenarios > h3:hover + p,
#scenarios > p:hover {
  box-shadow: var(--shadow-md);
}

#scenarios > h3,
#scenarios > p {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#scenarios > h3:hover {
  transform: translateY(-2px);
}

#scenarios > p:hover {
  transform: translateY(2px);
}

/* ============ CASES ============ */
#cases h3 {
  margin-top: 1.6em;
  padding-left: 0.7em;
  border-left: 4px solid var(--accent-500);
}

#cases blockquote {
  position: relative;
}

#cases blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.1em;
  left: 0.35em;
  font-size: 3rem;
  line-height: 1;
  color: var(--brand-300);
  opacity: 0.5;
  font-family: Georgia, serif;
}

#cases blockquote p {
  padding-left: 1.4em;
}

/* ============ NEWS ============ */
#news {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
  align-items: start;
}

#news > h2 {
  grid-column: 1 / -1;
}

#news article {
  padding: 1.5rem 1.5rem 1.3rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#news article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

#news article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

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

#news article h3 {
  font-size: 1.08rem;
  margin-bottom: 0.4em;
}

#news article p {
  margin-bottom: 0.5em;
}

#news article p:last-child {
  margin-bottom: 0;
}

/* ============ ARTICLES ============ */
#articles > p:first-of-type {
  max-width: 70ch;
  color: var(--text-muted);
}

#articles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
  align-items: start;
}

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

#articles article {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background-color 0.35s var(--ease);
}

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

#articles article h3 {
  font-size: 1.08rem;
  margin-bottom: 0.5em;
  line-height: 1.45;
}

#articles article h3 a {
  color: var(--text);
  transition: color 0.25s var(--ease);
}

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

html[data-theme="dark"] #articles article h3 a:hover {
  color: var(--brand-300);
}

#articles article p {
  font-size: 0.92rem;
  margin-bottom: 0.7em;
}

#articles article > a:last-child {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45em 1.1em;
  border-radius: var(--radius-pill);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--brand-600);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

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

#articles article > a:last-child:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  transform: translateX(3px);
}

#articles article > a:last-child:hover::after {
  transform: translateX(3px);
}

html[data-theme="dark"] #articles article > a:last-child {
  color: var(--brand-200);
}

html[data-theme="dark"] #articles article > a:last-child:hover {
  color: #fff;
}

/* ============ FAQ ============ */
#faq details {
  margin-bottom: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#faq details[open] {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--brand-500);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  color: var(--accent-600);
}

#faq summary:hover {
  background: rgba(91, 44, 158, 0.06);
  color: var(--brand-600);
}

html[data-theme="dark"] #faq summary:hover {
  background: rgba(145, 99, 221, 0.14);
  color: var(--brand-200);
}

#faq details p {
  margin: 0;
  padding: 0 1.3rem 1.2rem;
  font-size: 0.94rem;
  animation: fadeUp 0.35s var(--ease) both;
}

/* ============ HOWTO ============ */
#howto h3 {
  margin-top: 1.6em;
  color: var(--brand-700);
}

html[data-theme="dark"] #howto h3 {
  color: var(--brand-200);
}

#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 1rem 1.2rem 1rem 3.4rem;
  border-radius: var(--radius-md);
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-banner);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(91, 44, 158, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

#howto ul {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

#howto ul li {
  margin: 0;
  padding: 0.7rem 1rem 0.7rem 2.4rem;
  position: relative;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.94rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#howto ul li::before {
  content: "✓";
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal-500);
  font-weight: 800;
}

#howto ul li:hover {
  border-color: var(--teal-500);
  transform: translateX(3px);
}

#howto p:last-of-type {
  padding: 1.3rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--grad-soft);
  border: 1px solid var(--border-strong);
  font-weight: 500;
  color: var(--text);
}

/* ============ CONTACT ============ */
#contact ul {
  list-style: none;
  padding: 0;
  margin: 1.2em 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

#contact ul li {
  margin: 0;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.94rem;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}

#contact h3 {
  margin-top: 1.8em;
  color: var(--brand-700);
}

html[data-theme="dark"] #contact h3 {
  color: var(--brand-200);
}

/* ============ SITEMAP ============ */
#sitemap ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.4em;
}

#sitemap ul li {
  margin: 0;
}

#sitemap ul a {
  display: inline-block;
  padding: 0.42em 1em;
  border-radius: var(--radius-pill);
  background: var(--bg-card-glass);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

#sitemap ul a:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  transform: translateY(-2px);
}

#sitemap h3 {
  margin-top: 1.4em;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ============ FOOTER ============ */
#site-footer {
  margin-top: 2rem;
  background: var(--grad-banner);
  color: rgba(255, 255, 255, 0.82);
  border-radius: 48px 48px 0 0;
  position: relative;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 66, 0.18), transparent 68%);
  pointer-events: none;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) 1.25rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem 2.5rem;
  position: relative;
  z-index: 1;
}

#site-footer h2 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.6em;
}

#site-footer h3 {
  color: var(--accent-400);
  font-size: 1rem;
  margin: 1.1em 0 0.4em;
}

#site-footer p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
  margin-bottom: 0.7em;
}

#site-footer a {
  color: var(--accent-400);
}

#site-footer a:hover {
  color: #fff;
}

.footer-inner .copyright {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* ============ BACK TO TOP ============ */
#back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 90;
  padding: 0.7em 1.1em;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--grad-banner);
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease), transform 0.35s var(--ease), filter 0.25s var(--ease);
}

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

#back-to-top:hover {
  filter: brightness(1.15);
  transform: translateY(-3px);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  #main-nav a {
    font-size: 0.86rem;
    padding: 0.4em 0.55em;
  }
  #search-input {
    width: 140px;
  }
}

@media (max-width: 960px) {
  .header-inner {
    flex-wrap: wrap;
  }
  #main-nav {
    order: 3;
    flex-basis: 100%;
    display: none;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.4rem;
  }
  #main-nav.is-open {
    display: block;
    animation: fadeUp 0.35s var(--ease) both;
  }
  #main-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }
  #main-nav a {
    display: block;
    padding: 0.65em 0.9em;
    border-radius: var(--radius-sm);
  }
  #main-nav a::after {
    display: none;
  }
  #menu-toggle {
    display: inline-block;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
  .header-inner {
    padding: 0.55rem 1rem;
    gap: 0.6rem;
  }
  .brand-name {
    font-size: 1rem;
  }
  #site-search {
    flex: 1 1 auto;
    min-width: 0;
  }
  #search-input {
    width: 100%;
    min-width: 0;
  }
  .header-tools {
    flex-basis: 100%;
    margin-left: 0;
  }
  .hero-slider {
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.3rem;
  }
  .hero-slider .slide h1,
  .hero-slider .slide h2 {
    max-width: none;
  }
  .hero-stats {
    margin-top: -1rem;
    gap: 0.7rem;
  }
  .hero-stats .stat {
    padding: 1.1rem 0.8rem;
    border-radius: var(--radius-md);
  }
  #solutions,
  #scenarios,
  #news,
  #articles,
  #contact ul {
    grid-template-columns: 1fr;
  }
  #about ul,
  #products ul {
    grid-template-columns: 1fr;
  }
  #site-footer {
    border-radius: 32px 32px 0 0;
  }
  #back-to-top {
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.65em 0.95em;
  }
}

@media (max-width: 420px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .slider-controls button {
    width: 34px;
    height: 34px;
  }
  #theme-toggle,
  #menu-toggle,
  #site-search button {
    font-size: 0.8rem;
    padding: 0.5em 0.8em;
  }
}

/* ============ PRINT ============ */
@media print {
  #site-header,
  #back-to-top,
  .hero-slider .slider-controls,
  #site-search {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  main > section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  #site-footer {
    background: #fff;
    color: #000;
    border-radius: 0;
  }
  #site-footer h2,
  #site-footer h3,
  #site-footer p {
    color: #000;
  }
}