/* ============================================
   Defrax v4 — Conversion-Optimized Design System
   Corporate Design: Orange #FF6B35, Cyan #0088AA, Yellow #CC9900
   Font: Space Grotesk
   ============================================ */

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

:root {
  --primary: #FF6B35;
  --primary-hover: #ff8a47;
  --cyan: #0088AA;
  --cyan-light: #00b4d8;
  --yellow: #CC9900;
  --bg: #FAFAFB;
  --bg-card: #FFFFFF;
  --bg-elevated: #F0F0F2;
  --bg-dark: #1A1A2E;
  --text: #1A1A2E;
  --text-muted: #5A5A6E;
  --text-light: #8A8A9A;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 12px 40px rgba(255, 107, 53, 0.25);
  --font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --max-width: 1280px;
  --header-height: 76px;
  --radius: 16px;
  --radius-sm: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F14;
    --bg-card: #1A1A22;
    --bg-elevated: #24242E;
    --text: #F0F0F5;
    --text-muted: #A0A0B0;
    --text-light: #6A6A7A;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.12);
  }
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

ul, ol {
  list-style: none;
}

p {
  color: var(--text-muted);
  max-width: 65ch;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 32px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 48px;
  }
}

/* TYPOGRAPHY */

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

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-tag::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--primary);
}

.section-header {
  margin-bottom: 56px;
  text-align: center;
}

.section-header h2 {
  max-width: 700px;
  margin: 0 auto 16px;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-bounce);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(255, 107, 53, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-white {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  background: var(--bg);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 12px 24px;
  font-size: 0.85rem;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  transition: var(--transition);
}

.btn-link:hover {
  color: var(--cyan);
  gap: 12px;
}

.btn-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-arrow svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.btn-arrow:hover svg {
  transform: translateX(4px);
}

/* HEADER */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(250, 250, 251, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .header.scrolled {
    background: rgba(15, 15, 20, 0.92);
  }
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.logo img {
  height: 44px;
  width: auto;
}

.nav {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
  }
}

.nav a {
  padding: 10px 18px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: var(--bg-elevated);
}

.header-cta {
  display: none;
}

@media (min-width: 1024px) {
  .header-cta {
    display: flex;
  }
}

.mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

@media (min-width: 1024px) {
  .mobile-toggle {
    display: none;
  }
}

.mobile-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 999;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.mobile-nav.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-nav a {
  padding: 16px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-nav a.active {
  color: var(--primary);
}

.mobile-nav .btn {
  margin-top: 16px;
}

/* HERO */

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-height) + 40px) 0 120px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-elevated) 50%, var(--bg) 100%);
}

#particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero .container,
.trust-bar,
.section,
.cta-section,
.footer,
.floating-contact {
  position: relative;
  z-index: 1;
}

.trust-bar {
  z-index: 2;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(0, 136, 170, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
  }

  .hero-content {
    max-width: 760px;
  }
}

.hero-content {
  max-width: 640px;
}

/* Hero visual (Berlin SVG) */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Hero animations — alternating per load (JS adds one variant class on .hero-visual) */

/* Shared visual sizing */
.hero-visual-svg {
  display: none;
  width: 100%;
  max-width: 480px;
  height: auto;
  overflow: visible;
}

/* ---------- Variant: Berlin draw + flying orange dot ---------- */
.hero-anim-berlin .berlin-svg {
  display: block;
}

.berlin-svg path.berlin-draw {
  fill: none;
  stroke: url(#berlin-grad);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: berlin-draw 12s ease forwards;
}

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

.berlin-dot {
  fill: #F09436;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

.hero-anim-berlin .berlin-dot {
  offset-path: path("M 1050 -50 C 950 80, 900 260, 520 470");
  offset-rotate: 0deg;
  animation: berlin-dot-fly 2.6s cubic-bezier(0.4, 0, 0.2, 1) 3s forwards;
}

@keyframes berlin-dot-fly {
  0%   { opacity: 0; offset-distance: 0%; }
  8%   { opacity: 1; }
  88%  { opacity: 1; }
  100% { opacity: 1; offset-distance: 100%; }
}

.hero-anim-berlin .berlin-dot.berlin-dot-landed {
  offset-path: none;
  opacity: 1;
  animation: berlin-dot-pulse 2.4s ease-in-out infinite;
}

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

/* ---------- Variant: Reichstag draw ---------- */
.hero-anim-reichstag .reichstag-svg {
  display: block;
}

.reichstag-svg path.reichstag-draw {
  fill: none;
  stroke: url(#reichstag-grad);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100000;
  stroke-dashoffset: 100000;
  animation: reichstag-draw 120s linear forwards;
}

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

/* ---------- Variant: Brandenburg Gate draw ---------- */
.hero-anim-gate .gate-svg {
  display: block;
}

.gate-svg path.gate-draw {
  fill: none;
  stroke: url(#gate-grad);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 140000;
  stroke-dashoffset: 140000;
  animation: gate-draw 120s linear forwards;
}

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

@media (prefers-reduced-motion: reduce) {
  .berlin-draw, .reichstag-draw, .gate-draw {
    stroke-dashoffset: 0;
    animation: none;
  }
  .berlin-dot {
    opacity: 0;
    animation: none;
  }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding: 8px 16px;
  background: rgba(0, 136, 170, 0.08);
  border-radius: 999px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.hero-trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.hero-network {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.9;
}

.hero-network-svg {
  position: absolute;
  top: 50%;
  right: -10%;
  width: 110%;
  height: 120%;
  transform: translateY(-50%);
  will-change: transform;
}

.hero-network-lines {
  transform-origin: center center;
}

.hero-line {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-width: 0.75;
  animation: hero-line-drift linear infinite;
}

.hero-line-1 { stroke: url(#hn-grad-1); animation-duration: 52s; animation-delay: -5s; }
.hero-line-2 { stroke: #d7dce4; animation-duration: 47s; animation-delay: -12s; }
.hero-line-3 { stroke: url(#hn-grad-3); animation-duration: 58s; animation-delay: -8s; }
.hero-line-4 { stroke: #d7dce4; animation-duration: 44s; animation-delay: -18s; }
.hero-line-5 { stroke: url(#hn-grad-2); animation-duration: 55s; animation-delay: -2s; }
.hero-line-6 { stroke: #d7dce4; animation-duration: 49s; animation-delay: -22s; }
.hero-line-7 { stroke: url(#hn-grad-1); animation-duration: 60s; animation-delay: -15s; }
.hero-line-8 { stroke: #d7dce4; animation-duration: 46s; animation-delay: -28s; }
.hero-line-9 { stroke: url(#hn-grad-2); animation-duration: 53s; animation-delay: -9s; }
.hero-line-10 { stroke: #d7dce4; animation-duration: 51s; animation-delay: -33s; }
.hero-line-11 { stroke: url(#hn-grad-3); animation-duration: 48s; animation-delay: -14s; }
.hero-line-12 { stroke: #d7dce4; animation-duration: 56s; animation-delay: -25s; }
.hero-line-13 { stroke: url(#hn-grad-1); animation-duration: 50s; animation-delay: -7s; }
.hero-line-14 { stroke: #d7dce4; animation-duration: 54s; animation-delay: -19s; }
.hero-line-15 { stroke: url(#hn-grad-2); animation-duration: 45s; animation-delay: -31s; }
.hero-line-16 { stroke: #d7dce4; animation-duration: 57s; animation-delay: -11s; }

.hero-line:nth-child(odd) {
  opacity: 0.10;
}

.hero-line:nth-child(even) {
  opacity: 0.08;
}

.hero-node {
  fill: #1ca7b8;
  opacity: 0.12;
}

.hero-node-glow {
  fill: #ff6a3d;
  opacity: 0.08;
  filter: url(#hn-glow);
}

.hero-impulse {
  fill: none;
  stroke: #ff6a3d;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0;
  pointer-events: none;
  vector-effect: non-scaling-stroke;
}

@keyframes hero-line-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(4px, -5px) rotate(0.15deg); }
  50% { transform: translate(-3px, 4px) rotate(-0.1deg); }
  75% { transform: translate(5px, 3px) rotate(0.08deg); }
}

.hero:hover .hero-line {
  opacity: 0.18;
  stroke-width: 1;
  transition: opacity 0.8s ease, stroke-width 0.8s ease;
}

.hero:hover .hero-node {
  opacity: 0.22;
  transition: opacity 0.8s ease;
}

.hero:hover .hero-node-glow {
  opacity: 0.16;
  transition: opacity 0.8s ease;
}

@keyframes hero-impulse-travel {
  0% { stroke-dashoffset: var(--path-length); opacity: 0; }
  10% { opacity: 0.7; }
  90% { opacity: 0.7; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@media (max-width: 1023px) {
  .hero-network-svg {
    width: 140%;
    right: -30%;
    opacity: 0.7;
  }

  .hero-visual {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-line,
  .hero-node,
  .hero-impulse {
    animation: none !important;
  }

  .hero-network-svg {
    transform: translateY(-50%) !important;
  }

  .hero:hover .hero-line,
  .hero:hover .hero-node,
  .hero:hover .hero-node-glow {
    opacity: inherit;
    stroke-width: inherit;
  }
}

/* TECH LOGOS */

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

.tech-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  flex-grow: 1;
}

.tech-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  min-height: 80px;
  transition: var(--transition);
}

.tech-logo-item:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 107, 53, 0.2);
  box-shadow: var(--shadow-sm);
}

.tech-logo-item img {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(20%);
  transition: var(--transition);
}

.tech-logo-item:hover img {
  filter: grayscale(0%);
}

.tech-logo-text span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 639px) {
  .tech-logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* TRUST BAR */

.trust-bar {
  position: relative;
  z-index: 2;
  margin-top: -110px;
  padding: 24px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

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

@media (min-width: 640px) {
  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .trust-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition);
}

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

.trust-item svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
  flex-shrink: 0;
}

/* SECTIONS */

.section {
  padding: 80px 0;
  position: relative;
}

@media (min-width: 768px) {
  .section {
    padding: 100px 0;
  }
}

@media (min-width: 1024px) {
  .section {
    padding: 120px 0;
  }
}

.section.bg-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section.bg-dark h2,
.section.bg-dark h3,
.section.bg-dark .section-tag {
  color: #fff;
}

.section.bg-dark .section-tag::before {
  background: var(--primary);
}

.section.bg-dark p {
  color: rgba(255, 255, 255, 0.75);
}

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

/* PROBLEM / SOLUTION */

.problem-solution-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .problem-solution-grid {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

.problem-heading {
  white-space: nowrap;
}

.problem-card,
.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow-sm);
}

.problem-card h3,
.solution-card h3 {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.problem-card h3 {
  color: #dc2626;
}

.solution-card h3 {
  color: #22c55e;
}

.problem-list li,
.solution-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1rem;
  color: var(--text-muted);
}

.problem-list li:last-child,
.solution-list li:last-child {
  border-bottom: none;
}

.problem-list svg {
  width: 20px;
  height: 20px;
  color: #dc2626;
  flex-shrink: 0;
  margin-top: 2px;
}

.solution-list svg {
  width: 20px;
  height: 20px;
  color: #22c55e;
  flex-shrink: 0;
  margin-top: 2px;
}

/* CARDS */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 53, 0.2);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(255, 107, 53, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--primary);
  transition: var(--transition);
}

.card:hover .card-icon {
  background: var(--primary);
  color: #fff;
  transform: scale(1.05);
}

.card-icon svg {
  width: 28px;
  height: 28px;
}

.card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: none;
}

/* animated top line on most cards (except problem/solution cards) */
.stat-card,
.testimonial-card,
.reference-card,
.login-card,
.contact-form-card,
.faq-item,
.rg-card-default {
  position: relative;
  overflow: hidden;
}

.card::before,
.process-step::before,
.stat-card::before,
.testimonial-card::before,
.reference-card::before,
.login-card::before,
.contact-form-card::before,
.faq-item::before,
.rg-card-default::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(0);
  transition: transform 0.4s ease;
  z-index: 1;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card:hover::before,
.process-step:hover::before,
.stat-card:hover::before,
.testimonial-card:hover::before,
.reference-card:hover::before,
.login-card:hover::before,
.contact-form-card:hover::before,
.faq-item:hover::before,
.rg-card-default:hover::before {
  transform: scaleX(1);
}

/* SERVICES */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 53, 0.15);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
  margin-bottom: 24px;
  max-width: none;
}

.service-card .btn-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  margin-top: auto;
}

.service-card .btn-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.service-card:hover .btn-link svg {
  transform: translateX(4px);
}

/* PROCESS */

.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  position: relative;
}

@media (min-width: 768px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-bounce);
}

.process-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.process-step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.process-step h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: none;
}

/* STATS */

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

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  text-align: center;
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  transition: var(--transition);
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-4px);
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

/* TESTIMONIALS */

.testimonials-slider {
  position: relative;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s ease;
}

.testimonial-card {
  flex: 0 0 100%;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .testimonial-card {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .testimonial-card {
    flex: 0 0 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
  }
}

.testimonial-quote {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.testimonial-info strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.testimonial-info span {
  font-size: 0.85rem;
  color: var(--text-light);
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.testimonial-nav button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.testimonial-nav button:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.testimonial-nav svg {
  width: 20px;
  height: 20px;
}

/* REFERENCES */

.references-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .references-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .references-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.reference-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.reference-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.reference-card:hover::before {
  transform: scaleX(1);
}

.reference-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 53, 0.15);
}

.reference-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.reference-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: none;
}

/* FAQ */

.faq-section {
  max-width: 900px;
  margin: 0 auto;
}

.faq-category {
  margin-bottom: 48px;
}

.faq-category-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-card);
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--border-strong);
}

.faq-item.active {
  border-color: rgba(255, 107, 53, 0.2);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  transition: var(--transition);
}

.faq-item.active .faq-icon {
  background: var(--primary);
  color: #fff;
  transform: rotate(45deg);
}

.faq-icon svg {
  width: 16px;
  height: 16px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 24px 24px;
}

.faq-answer p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 12px;
}

.faq-answer li {
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* FAQ V3 CHIPS + SEARCH */

.faq-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.faq-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.faq-chip {
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: var(--transition);
}

.faq-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.faq-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.faq-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.faq-search {
  padding: 10px 38px 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  min-width: 260px;
}

.faq-search:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.08);
}

.faq-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: #fff;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
}

.faq-search-clear:hover {
  background: var(--cyan);
}

.faq-search-clear[hidden] {
  display: none;
}

.faq-categories {
  max-width: 900px;
  margin: 0 auto;
}

.faq-entry {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.faq-entry:last-child {
  border-bottom: none;
}

.faq-entry h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.faq-entry p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: none;
}

@media (max-width: 768px) {
  .faq-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .faq-filter {
    justify-content: flex-start;
  }

  .faq-search {
    min-width: auto;
    width: 100%;
  }
}

/* CTA SECTIONS */

.cta-section {
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  color: #fff;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 100px 0;
  }
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 136, 170, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 32px;
}

.cta-section .btn-white {
  margin-top: 8px;
}

.cta-section-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cta-inline {
  padding: 48px 0;
  text-align: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-inline h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.cta-inline p {
  margin: 0 auto 24px;
}

/* FOOTER */

.footer {
  background: var(--bg-dark);
  color: #fff;
  padding: 80px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  }
}

.footer-brand img {
  height: 44px;
  width: auto;
  margin-bottom: 20px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer h4 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.65);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.65);
}

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

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: #fff;
}

.footer-social svg {
  width: 18px;
  height: 18px;
}

/* CONTACT */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
  }
}

.contact-info h2 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 1.05rem;
  line-height: 1.7;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 107, 53, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-info-item .icon svg {
  width: 22px;
  height: 22px;
}

.contact-info-item h4 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text);
}

.contact-info-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-info-item a {
  color: var(--text-muted);
}

.contact-info-item a:hover {
  color: var(--primary);
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.contact-form-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.contact-form-card > p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.08);
}

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

.contact-form .btn {
  width: 100%;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 16px;
  text-align: center;
}

.form-success {
  background: rgba(0, 200, 100, 0.08);
  border: 1px solid rgba(0, 200, 100, 0.2);
  color: #00c864;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.form-error {
  background: rgba(255, 51, 85, 0.08);
  border: 1px solid rgba(255, 51, 85, 0.2);
  color: #ff3355;
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

/* FLOATING CONTACT BUTTON */

.floating-contact {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.floating-contact-main {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
  transition: var(--transition-bounce);
}

.floating-contact-main:hover {
  transform: scale(1.08);
  background: var(--primary-hover);
}

.floating-contact-main svg {
  width: 28px;
  height: 28px;
}

.floating-contact-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.floating-contact.open .floating-contact-menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.floating-contact-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  transition: var(--transition);
}

.floating-contact-menu a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.floating-contact-menu svg {
  width: 18px;
  height: 18px;
}

/* Scroll to top */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition);
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-to-top:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

/* PAGE HEADER */

.page-header {
  padding: calc(var(--header-height) + 60px) 0 60px;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-elevated) 100%);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 16px;
}

.page-header p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
}

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

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

/* CONTENT SECTIONS */

.content-section {
  padding: 60px 0;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: var(--text);
}

.content-card h3 {
  font-size: 1.2rem;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--cyan);
}

.content-card p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-card ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-card li {
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.content-card a {
  color: var(--primary);
  text-decoration: underline;
}

/* LOGIN / RG DOWNLOAD */

.login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .login-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
}

.login-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 53, 0.15);
}

.login-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.login-card p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.login-card .btn {
  width: 100%;
}

.rg-card-form {
  display: none;
  margin-top: 20px;
}

.rg-card-form.active {
  display: block;
}

.rg-card-form input {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
}

.rg-card-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.rg-card-form .btn {
  width: 100%;
  margin-bottom: 8px;
}

.rg-form-message {
  min-height: 24px;
  font-size: 0.85rem;
  margin-top: 8px;
}

.rg-form-message.success {
  color: #00c864;
}

.rg-form-message.error {
  color: #ff3355;
}

/* CHAT WIDGET */

.chat-widget-wrap {
  margin-top: 40px;
}

/* Kontakt-Chat: weniger Abstand zwischen Header und Chat-Karte */
.section-chat {
  padding-top: 20px;
}
.section-chat .chat-widget-wrap {
  margin-top: 24px;
}

.chat-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 640px;
  box-shadow: var(--shadow-md);
}

.chat-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-elevated);
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.chat-header-text {
  min-width: 0;
}

.chat-header-text h4,
.chat-header-name {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1px;
  color: var(--text);
}

.chat-header-text p,
.chat-header-sub {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.3;
  max-width: 380px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-header-phone {
  display: inline-block;
  margin-top: 3px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.chat-header-phone:hover {
  color: var(--cyan);
}

.chat-header-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.chat-header-link:hover {
  color: var(--cyan);
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.chat-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00c864;
  animation: pulse 2s infinite;
}

.chat-header-btn {
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-header-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-primary);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg-user {
  align-self: flex-end;
}

.chat-msg-bot {
  align-self: flex-start;
}

.chat-bubble {
  padding: 14px 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: 18px;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-msg-bot .chat-bubble p { margin: 0 0 8px; }
.chat-msg-bot .chat-bubble p:last-child { margin-bottom: 0; }
.chat-msg-bot .chat-bubble ul,
.chat-msg-bot .chat-bubble ol { margin: 0 0 8px; padding-left: 20px; }
.chat-msg-bot .chat-bubble li { margin-bottom: 2px; }
.chat-msg-bot .chat-bubble strong { font-weight: 700; }
.chat-msg-bot .chat-bubble h3,
.chat-msg-bot .chat-bubble h4 { margin: 8px 0 4px; }

.chat-msg-user .chat-bubble {
  background: var(--primary);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}

.chat-msg-bot .chat-bubble {
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 18px 18px 18px 4px;
  border: 1px solid var(--border);
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 24px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.chat-typing-dots {
  display: flex;
  gap: 4px;
}

.chat-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-light);
  animation: typing 1.2s ease-in-out infinite;
}

.chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-input-form {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-input-form input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text);
}

.chat-input-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.chat-input-form button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-input-form button:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-input-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 12px;
}

.chat-quick-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.chat-quick-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.chat-disclaimer {
  padding: 12px 24px 16px;
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ANIMATIONS */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

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

.fade-in-up {
  animation: fadeSlideUp 0.7s ease forwards;
}

/* RESPONSIVE */

@media (max-width: 1023px) {
  .header-cta {
    display: none;
  }

  .nav {
    display: none;
  }

  .hero-floating-card {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 68px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 60px;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-trust {
    justify-content: center;
  }

  .section {
    padding: 60px 0;
  }

  .card {
    padding: 24px;
  }

  .service-card {
    padding: 24px;
  }

  .process-step {
    padding: 24px;
  }

  .cta-section {
    padding: 60px 0;
  }

  .cta-section-buttons {
    flex-direction: column;
  }

  .cta-section-buttons .btn {
    width: 100%;
  }

  .contact-form-card {
    padding: 24px;
  }

  .footer-grid {
    gap: 36px;
  }

  .floating-contact {
    bottom: 16px;
    right: 16px;
  }

  .scroll-to-top {
    bottom: 16px;
    left: 16px;
    width: 48px;
    height: 48px;
  }

  .floating-contact-main {
    width: 52px;
    height: 52px;
  }

  .floating-contact-main svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-tag {
    font-size: 0.7rem;
    padding: 6px 12px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .trust-item {
    font-size: 0.85rem;
  }

  .stat-card {
    padding: 24px 16px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .testimonial-card {
    padding: 24px;
  }

  .content-card {
    padding: 24px;
  }
}
