/* ═══════════════════════════════════════════
   QUANTY – Premium Landing Page
   ═══════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --bg: #EEF2FF;
  --bg-white: #FFFFFF;
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --secondary: #6366F1;
  --tertiary: #818CF8;
  --indigo-100: #E0E7FF;
  --indigo-200: #C7D2FE;
  --text: #1E293B;
  --text-light: #64748B;
  --heading: #0F172A;
  --card: #FFFFFF;
  --border: rgba(199, 210, 254, 0.8);
  --shadow-sm: 0 4px 6px -1px rgba(79,70,229,0.05), 0 2px 4px -1px rgba(79,70,229,0.03);
  --shadow-md: 0 10px 25px -5px rgba(79,70,229,0.1), 0 8px 10px -6px rgba(79,70,229,0.05);
  --shadow-lg: 0 20px 40px -5px rgba(79,70,229,0.15);
  --radius: 24px;

  --hero-bg: #06061a;
  --hero-surface: #0d0d2b;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { color: var(--heading); font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ═══ Navbar – transparent über dunklem Hero ═══ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0; height: 72px;
  background: transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(6, 6, 26, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: rgba(99, 102, 241, 0.15);
}

.navbar .container { display: flex; align-items: center; justify-content: flex-start; height: 100%; }

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.nav-logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 14px; color: #fff;
  box-shadow: 0 4px 15px rgba(79,70,229,0.35);
}

.nav-logo-text { font-size: 22px; font-weight: 800; color: #FFFFFF; }
.nav-logo-text .accent { color: var(--tertiary); }

/* ═══ Hero – Dark Premium mit abstrakten Formen ═══ */
.hero {
  position: relative;
  min-height: 100vh;
  background: var(--hero-bg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 0 24px 80px;
}

/* Abstrakte fließende 3D-Formen */
.hero-shape-1 {
  position: absolute;
  width: 900px; height: 900px;
  top: -25%; right: -15%;
  border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%;
  background: linear-gradient(
    160deg,
    rgba(79, 70, 229, 0.12) 0%,
    rgba(99, 102, 241, 0.08) 30%,
    transparent 60%
  );
  border: 1px solid rgba(99, 102, 241, 0.1);
  animation: morphShape1 20s ease-in-out infinite;
  pointer-events: none;
}

.hero-shape-2 {
  position: absolute;
  width: 700px; height: 700px;
  top: -5%; right: -5%;
  border-radius: 50% 50% 45% 55% / 60% 40% 60% 40%;
  background: linear-gradient(
    200deg,
    rgba(129, 140, 248, 0.15) 0%,
    rgba(79, 70, 229, 0.06) 40%,
    transparent 70%
  );
  border: 1px solid rgba(129, 140, 248, 0.08);
  animation: morphShape2 18s ease-in-out infinite;
  pointer-events: none;
}

.hero-shape-3 {
  position: absolute;
  width: 500px; height: 500px;
  bottom: 5%; right: 10%;
  border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%;
  background: radial-gradient(
    ellipse at 30% 30%,
    rgba(99, 102, 241, 0.1) 0%,
    transparent 60%
  );
  border: 1px solid rgba(99, 102, 241, 0.06);
  animation: morphShape3 22s ease-in-out infinite;
  pointer-events: none;
}

/* Großer Sweep-Bogen (die markante Kurve aus dem Referenzbild) */
.hero-arc {
  position: absolute;
  width: 140%; height: 100%;
  top: 10%; left: -20%;
  border: 2px solid rgba(79, 70, 229, 0.12);
  border-radius: 50%;
  background: transparent;
  animation: arcFloat 24s ease-in-out infinite;
  pointer-events: none;
}

.hero-arc-2 {
  position: absolute;
  width: 120%; height: 80%;
  top: 25%; left: -10%;
  border: 1px solid rgba(129, 140, 248, 0.08);
  border-radius: 50%;
  background: transparent;
  animation: arcFloat2 20s ease-in-out infinite;
  pointer-events: none;
}

/* Subtiler Glow/Lichtfleck */
.hero-glow {
  position: absolute;
  width: 600px; height: 600px;
  top: -10%; right: 5%;
  background: radial-gradient(
    circle,
    rgba(79, 70, 229, 0.2) 0%,
    rgba(99, 102, 241, 0.08) 30%,
    transparent 60%
  );
  border-radius: 50%;
  filter: blur(60px);
  animation: glowPulse 10s ease-in-out infinite;
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  width: 400px; height: 400px;
  bottom: 10%; left: 20%;
  background: radial-gradient(
    circle,
    rgba(129, 140, 248, 0.1) 0%,
    transparent 60%
  );
  border-radius: 50%;
  filter: blur(50px);
  animation: glowPulse2 12s ease-in-out infinite;
  pointer-events: none;
}

/* Feiner Rausch/Grain Overlay für Tiefe */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

@keyframes morphShape1 {
  0%, 100% { border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; transform: rotate(0deg) scale(1); }
  33% { border-radius: 55% 45% 60% 40% / 45% 55% 45% 55%; transform: rotate(3deg) scale(1.02); }
  66% { border-radius: 50% 50% 45% 55% / 50% 50% 55% 45%; transform: rotate(-2deg) scale(0.98); }
}

@keyframes morphShape2 {
  0%, 100% { border-radius: 50% 50% 45% 55% / 60% 40% 60% 40%; transform: rotate(0deg); }
  50% { border-radius: 55% 45% 50% 50% / 50% 50% 45% 55%; transform: rotate(-4deg); }
}

@keyframes morphShape3 {
  0%, 100% { border-radius: 60% 40% 55% 45% / 45% 55% 45% 55%; transform: translate(0, 0); }
  50% { border-radius: 45% 55% 45% 55% / 55% 45% 55% 45%; transform: translate(-20px, 15px); }
}

@keyframes arcFloat {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(2deg) translateY(-20px); }
}

@keyframes arcFloat2 {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(15px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes glowPulse2 {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Hero Content */
.hero-content {
  position: relative; z-index: 2;
  max-width: 620px;
}

.hero-content h1 {
  color: #FFFFFF;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.hero-content h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--tertiary) 0%, var(--primary) 50%, var(--secondary) 100%);
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  color: rgba(255,255,255,0.55);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  max-width: 440px;
}

.hero-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 40px;
  padding: 16px 36px; border-radius: 980px;
  background: var(--primary); color: #fff;
  font-size: 16px; font-weight: 600;
  border: none; cursor: pointer;
  box-shadow: 0 8px 30px rgba(79,70,229,0.4);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), box-shadow 0.3s, background 0.3s;
  text-decoration: none;
}
.hero-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(79,70,229,0.55);
  background: var(--primary-dark);
  color: #fff;
}
.hero-cta svg { width: 18px; height: 18px; fill: #fff; }

/* "Read More" Link unten rechts im Hero */
.hero-scroll {
  position: absolute;
  bottom: 80px; right: 48px;
  z-index: 2;
  color: rgba(255,255,255,0.6);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
  transition: color 0.3s;
}
.hero-scroll:hover { color: #fff; }
.hero-scroll-arrow {
  display: inline-block;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ═══ Übergang Hero → Badges ═══ */
.hero-to-light {
  height: 120px;
  background: linear-gradient(180deg, var(--hero-bg) 0%, var(--bg) 100%);
}

/* ═══ 6 Badges Grid ═══ */
.badges-section {
  padding: 20px 0 120px;
  position: relative;
  z-index: 2;
  background: var(--bg);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 900px) { .badges-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .badges-grid { grid-template-columns: 1fr; } }

.premium-badge-container {
  perspective: 1500px;
  cursor: pointer;
  height: 260px;
}

.premium-badge-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius);
}

.premium-badge-container:hover .premium-badge-inner,
.premium-badge-container.flipped .premium-badge-inner {
  transform: rotateY(180deg);
}

.premium-badge-container:hover .premium-badge-inner {
  box-shadow: var(--shadow-lg);
}

.premium-badge-front, .premium-badge-back {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.premium-badge-front {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid #FFFFFF;
}

.premium-badge-front::before {
  content: '';
  position: absolute; top: -50px; left: -50px; width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, transparent 70%);
  border-radius: 50%; opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}

.premium-badge-container:hover .premium-badge-front::before { opacity: 1; }

.premium-badge-back {
  background: #FFFFFF;
  transform: rotateY(180deg);
  border: 1px solid var(--border);
  padding: 24px;
}

.badge-icon {
  width: 56px; height: 56px; margin: 0 auto 20px;
  background: linear-gradient(135deg, #f0f0ff, var(--indigo-100));
  border: 1px solid var(--indigo-200);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s;
}

.premium-badge-container:hover .badge-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
}

.badge-icon-small {
  width: 32px; height: 32px; margin: 0 auto 12px;
  background: var(--indigo-100);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.premium-badge-front h3 { margin-bottom: 8px; font-size: 1.3rem; }
.tap-hint {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 12px;
  opacity: 0.8;
}

.premium-badge-back h3 { margin-bottom: 12px; font-size: 1.2rem; color: var(--heading); }
.premium-badge-back p { font-size: 14px; color: var(--text-light); line-height: 1.6; margin: 0; }

/* ═══ Footer ═══ */
.footer {
  padding: 40px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}

.footer .nav-logo-text { color: var(--heading); }
.footer .nav-logo-text .accent { color: var(--primary); }

.footer-links {
  display: flex; gap: 24px; list-style: none;
}
.footer-links a { color: var(--text-light); font-size: 13.5px; font-weight: 500; }
.footer-links a:hover { color: var(--primary); }

.footer-copy { font-size: 13px; color: var(--text-light); }

@media (max-width: 600px) {
  .footer-content { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; flex-wrap: wrap; }
}

/* ═══ Legal Pages ═══ */
.legal-page { padding-top: 120px; padding-bottom: 80px; min-height: 100vh; background: var(--bg-white); }
.legal-header { margin-bottom: 40px; text-align: center; }
.legal-breadcrumb { font-size: 13px; color: var(--text-light); margin-bottom: 14px; display: inline-block; padding: 6px 16px; background: var(--bg); border-radius: 100px; }
.legal-header h1 { margin-bottom: 12px; }
.legal-date { font-size: 14px; color: var(--text-light); }
.legal-content { max-width: 720px; margin: 0 auto; }
.legal-content h2 { font-size: 1.25rem; margin-top: 40px; margin-bottom: 16px; color: var(--primary); }
.legal-content p, .legal-content li { font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 12px; }
.legal-content ul { list-style: none; padding-left: 0; }
.legal-content ul li { padding-left: 20px; position: relative; }
.legal-content ul li::before { content: '–'; position: absolute; left: 0; color: var(--primary); font-weight: bold; }
.legal-content a { text-decoration: underline; text-underline-offset: 3px; }

/* Legal pages navbar override */
.navbar-light { background: rgba(238, 242, 255, 0.85); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid rgba(199, 210, 254, 0.5); }
.navbar-light .nav-logo-text { color: var(--heading); }
.navbar-light .nav-logo-text .accent { color: var(--primary); }

/* ═══ Animations ═══ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal-d1 { animation-delay: 0.1s; }
.reveal-d2 { animation-delay: 0.2s; }
.reveal-d3 { animation-delay: 0.3s; }
.reveal-d4 { animation-delay: 0.4s; }
.reveal-d5 { animation-delay: 0.5s; }
.reveal-d6 { animation-delay: 0.6s; }

/* Hero-spezifische Reveal */
.hero-reveal {
  opacity: 0;
  animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-reveal-d1 { animation-delay: 0.3s; }
.hero-reveal-d2 { animation-delay: 0.6s; }
.hero-reveal-d3 { animation-delay: 0.9s; }

/* ═══ Scrollbar ═══ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--indigo-200); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
::selection { background: var(--primary); color: #fff; }

/* ═══ Responsive Hero ═══ */
@media (max-width: 768px) {
  .hero { padding: 0 20px 60px; min-height: 90vh; }
  .hero-content h1 { font-size: clamp(2.2rem, 8vw, 3.5rem); }
  .hero-shape-1 { width: 500px; height: 500px; right: -30%; top: -15%; }
  .hero-shape-2 { width: 400px; height: 400px; right: -20%; }
  .hero-shape-3 { width: 300px; height: 300px; }
  .hero-scroll { display: none; }
  .hero-arc, .hero-arc-2 { display: none; }
}
