:root {
  --bg: #07030d;
  --bg-soft: #120824;
  --bg-card: #1a1032;
  --text: #f6f2ff;
  --text-soft: #c4bbd8;
  --accent: #b45bff;
  --accent-2: #ff63d0;
  --accent-3: #8a5cff;
  --chart-start: #b85cff;
  --chart-end: #ff5fbf;
  --chart-soft: rgba(184, 92, 255, 0.4);
  --spark-start: rgba(255, 95, 191, 0.9);
  --spark-end: rgba(184, 92, 255, 0.6);
  --line: rgba(255, 255, 255, 0.07);
  --shadow: 0 24px 60px rgba(3, 2, 8, 0.72);
  --radius: 0px;
}

[data-theme="light"] {
  --bg: #f4f2f8;
  --bg-soft: #ffffff;
  --bg-card: #f8f6fb;
  --text: #191626;
  --text-soft: #4f4a63;
  --accent: #6b4df4;
  --accent-2: #b75cff;
  --accent-3: #d95aa6;
  --chart-start: #6b4df4;
  --chart-end: #d95aa6;
  --chart-soft: rgba(107, 77, 244, 0.4);
  --spark-start: rgba(217, 90, 166, 0.85);
  --spark-end: rgba(107, 77, 244, 0.6);
  --line: rgba(25, 22, 38, 0.12);
  --shadow: 0 24px 60px rgba(25, 22, 38, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% 18%, rgba(180, 91, 255, 0.22), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(138, 92, 255, 0.18), transparent 46%),
    radial-gradient(circle at 18% 88%, rgba(255, 99, 208, 0.16), transparent 42%),
    radial-gradient(circle at 80% 85%, rgba(180, 91, 255, 0.12), transparent 44%),
    #05020b;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

[data-theme="light"] body {
  background: radial-gradient(circle at 12% 18%, rgba(107, 77, 244, 0.08), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(217, 90, 166, 0.06), transparent 46%),
    radial-gradient(circle at 18% 88%, rgba(183, 92, 255, 0.08), transparent 42%),
    #f5f4f8;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(6, 4, 14, 0.55);
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 0;
}

[data-theme="light"] .grain {
  opacity: 0.45;
  mix-blend-mode: multiply;
}

.glow-top,
.glow-bottom {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.6;
  z-index: 0;
}

.glow-top {
  background: rgba(184, 92, 255, 0.26);
  top: -200px;
  left: -150px;
  animation: drift 18s ease-in-out infinite;
}

.glow-bottom {
  background: rgba(255, 95, 191, 0.18);
  bottom: -200px;
  right: -120px;
  animation: drift 22s ease-in-out infinite reverse;
}

[data-theme="light"] .glow-top {
  background: rgba(107, 77, 244, 0.12);
}

[data-theme="light"] .glow-bottom {
  background: rgba(217, 90, 166, 0.1);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-content: center;
  padding: 18px 6vw;
  background: linear-gradient(120deg, rgba(16, 10, 26, 0.92), rgba(10, 7, 18, 0.78));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(8, 12, 22, 0.45);
}

[data-theme="light"] .site-header {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.96), rgba(244, 242, 249, 0.92));
  box-shadow: 0 14px 34px rgba(25, 22, 38, 0.08);
}

.header-left,
.header-actions {
  flex: 1;
}

.header-left {
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: 2;
}

.header-logo {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.site-header.scrolled .header-logo {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.logo {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.4px;
}

.logo img {
  height: 84px;
  width: auto;
  border: 0;
  box-shadow: none;
}

.logo-box {
  display: none;
}

.logo span {
  font-size: 1.05rem;
  color: var(--text-soft);
}

.site-nav {
  display: flex;
  gap: 22px;
  font-weight: 600;
  color: var(--text-soft);
  justify-content: flex-start;
  grid-column: 1;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

.site-nav a:hover::after,
.site-nav a:focus::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
  grid-column: 3;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  margin-right: 8px;
}

.lang-btn {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--line);
  padding: 6px 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--line);
  padding: 6px 8px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle--nav {
  display: none;
}

.lang-btn.is-active,
.lang-btn:hover {
  color: #ffffff;
  border-color: rgba(184, 92, 255, 0.6);
}

.theme-toggle:hover,
.theme-toggle:focus {
  color: #ffffff;
  border-color: rgba(184, 92, 255, 0.6);
}

[data-theme="light"] .lang-btn.is-active,
[data-theme="light"] .lang-btn:hover,
[data-theme="light"] .theme-toggle:hover,
[data-theme="light"] .theme-toggle:focus {
  color: #120b1f;
  border-color: rgba(18, 11, 31, 0.35);
}

.cta {
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  color: #0b0f1a;
  padding: 12px 22px;
  border-radius: 0;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(184, 92, 255, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="light"] .cta {
  color: #ffffff;
}

.cta-primary {
  background: linear-gradient(120deg, #ff7ad9, #b671ff);
  box-shadow: 0 18px 40px rgba(216, 107, 255, 0.35);
}

.ghost {
  padding: 12px 22px;
  border-radius: 0;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

[data-theme="light"] .ghost {
  background: #ffffff;
  border-color: rgba(16, 20, 24, 0.18);
  color: #191626;
}

.nav-toggle {
  display: none;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  transition: border-color 0.25s ease;
}

.cta:hover,
.cta:focus {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(184, 92, 255, 0.4);
}

.ghost:hover,
.ghost:focus,
.nav-toggle:hover,
.nav-toggle:focus {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

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

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  padding: 70px 6vw 40px;
  align-items: center;
}

.hero-content h1 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.6rem, 3.4vw, 4rem);
  line-height: 1.05;
  margin: 16px 0 22px;
}

.hero-content h1 span {
  display: block;
  font-size: clamp(1.4rem, 2vw, 2rem);
  color: var(--accent-2);
  margin-top: 10px;
}

.hero-note {
  margin-top: 16px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  font-weight: 600;
}

.lead {
  color: var(--text-soft);
  font-size: 1.1rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.hero-logo {
  width: min(420px, 80%);
  height: auto;
  margin-bottom: 14px;
  border: 0;
  box-shadow: none;
  opacity: 0.85;
  filter: drop-shadow(0 18px 30px rgba(8, 4, 16, 0.35));
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  background: linear-gradient(135deg, rgba(18, 10, 32, 0.9), rgba(10, 7, 20, 0.82));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

[data-theme="light"] .hero-meta {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 250, 0.92));
  border-color: rgba(25, 22, 38, 0.12);
  color: var(--text);
}

.hero-meta strong {
  font-family: "Sora", sans-serif;
  font-size: 1.8rem;
}

.hero-visual {
  display: grid;
  gap: 20px;
  position: relative;
  max-width: 560px;
  justify-items: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -20px 10% auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(184, 92, 255, 0.3), transparent 70%);
  filter: blur(10px);
  z-index: 0;
}

.logo-hero {
  width: 360px;
  max-width: 85%;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(8, 4, 16, 0.4));
}

.hero-card {
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  z-index: 1;
}

.widget-panel {
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid rgba(184, 92, 255, 0.35);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 560px;
}

[data-theme="light"] .hero-card,
[data-theme="light"] .widget-panel,
[data-theme="light"] .widget-gauge,
[data-theme="light"] .widget-bars,
[data-theme="light"] .widget-shield,
[data-theme="light"] .mini-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(25, 22, 38, 0.12);
}

.widget-chart {
  width: 100%;
  height: auto;
  max-height: 160px;
}

.widget-chart stop:first-child {
  stop-color: var(--chart-start);
}

.widget-chart stop:last-child {
  stop-color: var(--chart-end);
}

.widget-chart .chart-line.soft {
  stroke: var(--chart-soft);
}

[data-theme="light"] .widget-chart rect {
  fill: rgba(25, 22, 38, 0.06) !important;
}

.widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.widget-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.widget-metrics strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.widget-panel > *,
.widget-gauge > *,
.widget-bars > *,
.widget-shield > *,
.mini-card > * {
  position: relative;
  z-index: 1;
}

.reveal {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition: opacity 0.8s ease, transform 0.8s ease, filter 0.9s ease;
}

.reveal.is-hidden {
  opacity: 0;
  transform: none;
  filter: blur(6px);
}

.reveal.is-hidden.in-view {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.animatable.animate-in {
  animation: floaty 8s ease-in-out infinite;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.badge {
  background: rgba(184, 92, 255, 0.2);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 0;
  font-weight: 600;
}

[data-theme="light"] .badge {
  background: rgba(107, 77, 244, 0.14);
  color: #4b34c6;
}

[data-theme="light"] .hero-logo {
  opacity: 0.95;
  filter: drop-shadow(0 18px 30px rgba(18, 11, 31, 0.18));
}

.meter {
  height: 8px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.1);
  margin: 16px 0;
  overflow: hidden;
}

[data-theme="light"] .meter {
  background: rgba(25, 22, 38, 0.08);
}

.meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.w-84 { width: 84%; }
.w-78 { width: 78%; }
.w-64 { width: 64%; }
.w-88 { width: 88%; }
.w-92 { width: 92%; }
.w-82 { width: 82%; }

.hero-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

section {
  padding: 60px 6vw;
}


.proof-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  padding: 10px 6vw 30px;
}

.proof-card {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 0;
  background: linear-gradient(150deg, rgba(24, 16, 40, 0.9), rgba(16, 10, 30, 0.86));
  border: 1px solid rgba(184, 92, 255, 0.28);
  color: var(--text-soft);
  text-align: center;
  font-size: 0.85rem;
}

[data-theme="light"] .proof-card {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 250, 0.92));
  border-color: rgba(25, 22, 38, 0.1);
  color: var(--text-soft);
}

[data-theme="light"] .proof-card svg {
  color: var(--accent);
}

.proof-card svg {
  width: 40px;
  height: 40px;
  color: var(--accent-2);
}

.section-head h2 {
  font-family: "Sora", sans-serif;
  font-size: 2.2rem;
  margin-bottom: 10px;
  background: linear-gradient(120deg, #ffffff, #d5c8ff, #ff5fbf);
  -webkit-background-clip: text;
  color: transparent;
}

[data-theme="light"] .section-head h2 {
  /* Avoid gradient-text artifacts in some browsers/light mode. */
  background: none;
  color: var(--text);
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

.section-head p {
  color: var(--text-soft);
}

.software-promo-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 34px;
  align-items: center;
}

.software-promo {
  padding: 44px 6vw;
}

.software-promo-copy h2 {
  font-family: "Sora", sans-serif;
  font-size: clamp(2.1rem, 2.6vw, 3rem);
  line-height: 1.08;
  margin: 12px 0 14px;
}

.software-promo-copy p {
  color: var(--text-soft);
  max-width: 56ch;
}

.software-promo-copy {
  position: relative;
  z-index: 2;
}

.promo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.software-promo-visual {
  display: grid;
  gap: 16px;
  align-content: start;
  position: relative;
  z-index: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .pill {
  background: rgba(25, 22, 38, 0.04);
}

.code-window {
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid rgba(184, 92, 255, 0.35);
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

[data-theme="light"] .code-window {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(25, 22, 38, 0.12);
}

.code-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .code-window-bar {
  background: rgba(25, 22, 38, 0.02);
}

.code-window-title {
  margin-left: 6px;
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
}

.code-window .pill {
  margin-left: auto;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  opacity: 0.9;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.code-window-body {
  position: relative;
  padding: 14px 14px 16px;
}

.code-window {
  --code-line-h: 20px;
}

.code-text {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: var(--code-line-h);
  color: var(--text-soft);
  white-space: pre;
  overflow: hidden;
}

.code-row {
  display: block;
  padding: 0 2px;
  border-radius: 0;
}

.code-row .typed {
  color: var(--text-soft);
}

.code-row .code-ghost {
  color: rgba(184, 92, 255, 0.8);
  opacity: 0.6;
}

.code-row .typed .kw {
  color: var(--accent-2);
  font-weight: 600;
}

.code-row .typed .fn {
  color: #d8c9ff;
}

[data-theme="light"] .code-row .typed .fn {
  color: #302356;
}

.code-row.is-active {
  color: var(--text);
  background: rgba(184, 92, 255, 0.14);
}

[data-theme="light"] .code-row.is-active {
  background: rgba(107, 77, 244, 0.12);
}

/* Cursor lives on the active line, so we don't need JS-driven positioning (CSP-safe). */
.code-row .typed::after {
  content: "";
  display: none;
  width: 10px;
  height: 2px;
  background: var(--accent-2);
  opacity: 0.9;
  margin-left: 6px;
  transform: translateY(-2px);
}

.code-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(184, 92, 255, 0.14) 40%, transparent 70%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

@keyframes sweep {
  0% { transform: translateX(-120%); opacity: 0; }
  15% { opacity: 1; }
  55% { opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

@keyframes cursor-blink {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 0.95; }
}

.code-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 720px) {
  .code-meta {
    grid-template-columns: 1fr;
  }
}

.services-grid,
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.services-grid article {
  background: linear-gradient(145deg, rgba(24, 16, 40, 0.92), rgba(16, 10, 30, 0.88));
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="light"] .services-grid article {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 244, 250, 0.92));
}

.services-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(5, 12, 24, 0.65);
}

.tag {
  display: inline-flex;
  margin-top: 16px;
  padding: 6px 12px;
  border-radius: 0;
  background: rgba(184, 92, 255, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
}

[data-theme="light"] .tag {
  background: rgba(107, 77, 244, 0.14);
  color: #4b34c6;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  align-items: center;
}

.checklist {
  margin-top: 20px;
  list-style: none;
  display: grid;
  gap: 12px;
}

.checklist li {
  position: relative;
  padding-left: 28px;
  color: var(--text-soft);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 0;
}

.split-card {
  background: linear-gradient(135deg, #160b2a, #1b0f33, #120a24);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

[data-theme="light"] .split-card {
  background: linear-gradient(135deg, #ffffff, #f4f2f8);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.process-grid article {
  background: linear-gradient(145deg, rgba(24, 14, 40, 0.95), rgba(16, 9, 28, 0.85));
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(180, 91, 255, 0.25);
  box-shadow: var(--shadow);
}

.process-grid span {
  font-family: "Sora", sans-serif;
  font-size: 1.4rem;
  color: var(--accent-2);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.stat-grid strong {
  font-size: 1.6rem;
  font-family: "Sora", sans-serif;
}

.portfolio {
  background: linear-gradient(120deg, #0d0716, #10081c, #0a0513);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

[data-theme="light"] .portfolio {
  background: linear-gradient(120deg, #ffffff, #f4f2f8, #ffffff);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 24px;
  align-items: start;
}

.portfolio-visual img,
.insight-visual img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.visual-caption {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.widget-stack {
  display: grid;
  gap: 16px;
}

.widget-gauge {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid rgba(184, 92, 255, 0.35);
  border-radius: 0;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.widget-gauge span {
  display: block;
  color: var(--accent-2);
  font-weight: 600;
}

.widget-bars {
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid rgba(184, 92, 255, 0.35);
  border-radius: 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.widget-bars h4 {
  font-size: 0.95rem;
  color: var(--text);
}

.widget-bars .widget-title {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 700;
}

.bar {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.bar div {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0;
  height: 8px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.accordion details {
  background: linear-gradient(160deg, rgba(28, 18, 44, 0.9), rgba(16, 10, 30, 0.88));
  border-radius: 0;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(6, 12, 24, 0.45);
}

[data-theme="light"] .accordion details {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 250, 0.92));
}

.accordion summary {
  cursor: pointer;
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  list-style: none;
}

.accordion p {
  margin-top: 14px;
  color: var(--text-soft);
}

.accordion summary::marker {
  display: none;
}

.accordion ul {
  margin-top: 14px;
  padding-left: 18px;
  color: var(--text-soft);
}

.security {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  align-items: center;
  background: linear-gradient(130deg, #170d28, #1e1332, #140a24);
  border-radius: var(--radius);
  margin: 0 6vw;
  box-shadow: var(--shadow);
}

[data-theme="light"] .security {
  background: linear-gradient(130deg, #ffffff, #f4f2f8);
}

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

.pill-grid {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-grid span {
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 0;
  font-size: 0.85rem;
}

[data-theme="light"] .pill-grid span {
  background: rgba(18, 11, 31, 0.06);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.insights-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

.insight-card {
  background: linear-gradient(160deg, rgba(28, 18, 44, 0.92), rgba(16, 10, 30, 0.88));
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="light"] .insight-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 250, 0.92));
}

.insight-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(5, 12, 24, 0.65);
}

.insight-card.highlight {
  background: linear-gradient(135deg, rgba(184, 92, 255, 0.2), rgba(255, 95, 191, 0.2));
}

.cta-band {
  background: linear-gradient(120deg, #1a1028, #22153a, #150a24);
  border-radius: var(--radius);
  margin: 0 6vw 50px;
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

[data-theme="light"] .cta-band {
  background: linear-gradient(120deg, #ffffff, #f4f2f8);
}

.widget-shield {
  display: grid;
  justify-items: center;
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid rgba(184, 92, 255, 0.35);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.widget-shield svg {
  width: 100px;
  height: auto;
}

.certifications .section-head {
  margin-bottom: 16px;
}

.cert-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  align-items: center;
}

.cert-card {
  display: grid;
  place-items: center;
  height: 130px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px rgba(7, 4, 14, 0.35);
}

[data-theme="light"] .cert-card {
  border-color: rgba(18, 11, 31, 0.12);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 30px rgba(28, 16, 60, 0.12);
}

.cert-card img {
  max-width: 240px;
  max-height: 100px;
  width: 92%;
  height: auto;
  object-fit: contain;
  background: transparent;
  opacity: 0.95;
}

.widget-shield-meta {
  margin-top: 10px;
  text-align: center;
}

.widget-shield-meta span {
  display: inline-block;
  margin-top: 6px;
  color: var(--accent-2);
  font-weight: 600;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mini-card {
  background: rgba(20, 12, 32, 0.65);
  border: 1px solid rgba(184, 92, 255, 0.3);
  border-radius: 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  color: var(--text-soft);
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .mini-card {
  color: #4a435e;
}

.mini-card h4 {
  color: var(--text);
  font-size: 0.95rem;
}

.mini-title {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.mini-title + p {
  margin-top: 6px;
}

.mini-card.wide {
  grid-column: 1 / -1;
}

.ring {
  width: 80px;
  height: 80px;
  border-radius: 0;
  border: 8px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-2);
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-weight: 700;
}

.spark {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  align-items: end;
  height: 50px;
}

.spark i {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, var(--spark-start), var(--spark-end));
  border-radius: 0;
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pop-dot {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes draw-gauge {
  to {
    stroke-dashoffset: 40;
  }
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

@keyframes fill-bar {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

/* Duplicate keyframes to allow deterministic restarts via class toggling (cycle-a/cycle-b). */
@keyframes fill-bar-a {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@keyframes fill-bar-b {
  from {
    transform: scaleX(0);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

@keyframes glow-shield {
  0%, 100% {
    filter: drop-shadow(0 12px 24px rgba(184, 92, 255, 0.25));
  }
  50% {
    filter: drop-shadow(0 18px 36px rgba(255, 95, 191, 0.35));
  }
}

@keyframes draw-check {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-check-a {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes draw-check-b {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes meter-fill-a {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

@keyframes meter-fill-b {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

@keyframes spin-ring {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spark-rise {
  0%, 100% {
    transform: scaleY(0.6);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(20px, -10px, 0);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Scroll-triggered animations:
   Use class toggling only (no play-state / JS inline styles), so animations reliably restart on re-enter. */
.widget-chart .chart-line {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
}

.widget-chart .chart-dot {
  opacity: 0;
  transform-origin: center;
  transform: scale(0.6);
}

.widget-gauge-svg .gauge-value {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
}

.widget-gauge-svg .gauge-dot {
  transform-origin: center;
}

.widget-bars .bar i {
  transform: scaleX(0);
  transform-origin: left;
}

.meter span {
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left;
}

.widget-shield .shield-shape {
  filter: drop-shadow(0 14px 28px rgba(184, 92, 255, 0.25));
}

.widget-shield .shield-check {
  /* Give enough dash length across browsers so the check reliably draws. */
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
}

/* Ensure the check is visible on the dark gradient shield, even if the SVG has a stroke attribute. */
.widget-shield .shield-check {
  stroke: rgba(255, 255, 255, 0.9);
}

.animatable.animate-in .chart-line {
  animation: draw-line 2.4s ease forwards;
}

.animatable.animate-in .chart-line.soft {
  animation-delay: 0.3s;
}

.animatable.animate-in .chart-dot {
  animation: pop-dot 0.8s ease forwards;
  animation-delay: 1.2s;
}

.animatable.animate-in .chart-dot.soft {
  animation-delay: 1.4s;
}

.animatable.animate-in .gauge-value {
  animation: draw-gauge 2s ease forwards;
}

.animatable.animate-in .gauge-dot {
  animation: pulse-dot 2s ease infinite;
}

.animatable.animate-in .bar i {
  animation: fill-bar-a 2s ease forwards;
}

.animatable.animate-in.cycle-b .bar i {
  animation-name: fill-bar-b;
}

.animatable.animate-in .shield-shape {
  animation: glow-shield 3.5s ease-in-out infinite;
}

.animatable.animate-in .shield-check {
  animation: draw-check-a 1.6s ease forwards;
  animation-delay: 0.6s;
}

.animatable.animate-in.cycle-b .shield-check {
  animation-name: draw-check-b;
}

.animatable.animate-in .ring {
  animation: spin-ring 6s linear infinite;
}

.animatable.animate-in .spark i {
  animation: spark-rise 2.4s ease-in-out infinite;
}

.animatable.animate-in .code-sweep {
  animation: sweep 3.6s ease-in-out infinite;
}

.animatable.animate-in .code-row.is-active .typed::after {
  display: inline-block;
  animation: cursor-blink 1.1s steps(2, end) infinite;
}

.hero-card.animatable.animate-in .meter span {
  animation: meter-fill-a 1.8s ease forwards;
}

.hero-card.animatable.animate-in.cycle-b .meter span {
  animation-name: meter-fill-b;
}

.site-footer {
  padding: 40px 6vw;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  display: grid;
  gap: 12px;
}

.site-footer a {
  color: var(--text-soft);
  margin-right: 16px;
}

.footer-link-btn {
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text-soft);
  cursor: pointer;
  margin-right: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link-btn:hover,
.footer-link-btn:focus {
  color: var(--text);
}

/* Cookie banner + settings modal (CSP-safe, no inline styles). */
.cookie-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(20, 12, 32, 0.78);
  border: 1px solid rgba(184, 92, 255, 0.35);
  box-shadow: 0 18px 50px rgba(6, 12, 24, 0.55);
  backdrop-filter: blur(12px);
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

[data-theme="light"] .cookie-banner-inner {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(25, 22, 38, 0.12);
  box-shadow: 0 18px 50px rgba(28, 16, 60, 0.15);
}

.cookie-text {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.35;
}

.cookie-text a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.cookie-actions .cta,
.cookie-modal-actions .cta {
  /* Keep legible in both themes; global light-mode .cta sets white text which clashes here. */
  color: #0b0f1a;
}

[data-theme="light"] .cookie-actions .cta,
[data-theme="light"] .cookie-modal-actions .cta {
  color: #0b0f1a;
}

.cookie-actions .ghost,
.cookie-modal-actions .ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.22);
}

[data-theme="light"] .cookie-actions .ghost,
[data-theme="light"] .cookie-modal-actions .ghost {
  background: rgba(25, 22, 38, 0.04);
  border-color: rgba(25, 22, 38, 0.22);
  color: #191626;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.cookie-modal.is-open {
  display: grid;
  place-items: center;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 6, 12, 0.62);
  backdrop-filter: blur(6px);
}

.cookie-modal-panel {
  position: relative;
  width: min(720px, calc(100% - 28px));
  background: rgba(20, 12, 32, 0.92);
  border: 1px solid rgba(184, 92, 255, 0.35);
  box-shadow: 0 24px 70px rgba(6, 12, 24, 0.7);
  padding: 18px;
  display: grid;
  gap: 12px;
}

[data-theme="light"] .cookie-modal-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(25, 22, 38, 0.12);
  box-shadow: 0 24px 70px rgba(28, 16, 60, 0.18);
}

.cookie-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cookie-modal-head h2 {
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
  margin: 0;
}

.cookie-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.cookie-options {
  display: grid;
  gap: 10px;
}

.cookie-option {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .cookie-option {
  background: rgba(25, 22, 38, 0.04);
}

.cookie-option strong {
  display: block;
  margin-bottom: 2px;
}

.cookie-option p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cookie-fineprint {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.contact-hero,
.impressum {
  padding: 100px 6vw 40px;
  background: linear-gradient(130deg, #0d0716, #12081e, #0a0513);
}

[data-theme="light"] .contact-hero,
[data-theme="light"] .impressum {
  background: linear-gradient(130deg, #ffffff, #f4f2f8);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 40px 6vw 80px;
}

.contact-card {
  background: linear-gradient(160deg, rgba(24, 14, 40, 0.95), rgba(16, 9, 28, 0.9));
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

[data-theme="light"] .contact-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 243, 250, 0.92));
}

.recaptcha-wrap {
  display: flex;
  align-items: flex-start;
}

.contact-mail {
  color: var(--accent);
  font-weight: 600;
}

.contact-mail:hover,
.contact-mail:focus {
  text-decoration: underline;
}

form {
  display: grid;
  gap: 16px;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 0;
  border: 1px solid var(--line);
  font-family: inherit;
  background: rgba(12, 8, 20, 0.7);
  color: var(--text);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.impressum-content {
  padding: 40px 6vw 80px;
  max-width: 900px;
}

.impressum-content h2 {
  margin-top: 30px;
  font-family: "Sora", sans-serif;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .hero-visual {
    max-width: 620px;
    justify-items: start;
    margin-left: -40px;
  }

  .hero-visual::before {
    inset: -20px auto auto 0;
  }

  .widget-panel {
    max-width: 620px;
  }
}

@media (max-width: 960px) {
  .site-nav {
    display: none;
    flex-direction: column;
    background: var(--bg-card);
    position: absolute;
    left: 6vw;
    right: 6vw;
    top: calc(100% + 8px);
    padding: 20px;
    border-radius: 0;
    box-shadow: var(--shadow);
    gap: 12px;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .theme-toggle--header {
    display: none;
  }

  .theme-toggle--nav {
    display: inline-flex;
    align-self: flex-start;
    margin-top: 6px;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .security {
    margin: 0;
    border-radius: 0;
  }

  .portfolio-grid,
  .insights-wrap {
    grid-template-columns: 1fr;
  }

  .widget-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .site-nav {
    width: auto;
  }

  .hero {
    padding-top: 40px;
  }
}
