/* ===== KÜNSTLICHES BEWUSSTSEIN — Design System ===== */
/* Dark, immersive, consciousness-themed. Fancier than the sister sites. */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Consciousness palette — violet/purple bridging to MyMindSeed */
  --bg-deep: #06060e;
  --bg-primary: #0a0a16;
  --bg-card: #0f0f1e;
  --bg-card-hover: #15152a;
  --bg-elevated: #1a1a33;

  --text-primary: #e2e8f0;
  --text-secondary: #9ca3af;
  --text-muted: #4b5563;

  --accent: #a78bfa;
  --accent-dim: #7c3aed;
  --accent-glow: rgba(167, 139, 250, 0.12);
  --accent-bright: #c4b5fd;

  --gold: #d4a853;
  --gold-dim: #a08040;
  --gold-glow: rgba(212, 168, 83, 0.08);

  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.08);

  --border: #1a1a33;
  --border-light: #252550;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Fluid typography */
  --font-size-hero: clamp(2.5rem, 7vw, 5.5rem);
  --font-size-h1: clamp(2rem, 5vw, 3.5rem);
  --font-size-h2: clamp(1.5rem, 3.5vw, 2.5rem);
  --font-size-h3: clamp(1.15rem, 2.5vw, 1.5rem);
  --font-size-body: clamp(1rem, 1.2vw, 1.125rem);
  --font-size-large: clamp(1.1rem, 1.5vw, 1.3rem);
  --font-size-small: clamp(0.85rem, 1vw, 0.925rem);
  --font-size-xs: clamp(0.75rem, 0.9vw, 0.85rem);

  /* Spacing */
  --section-padding: clamp(4rem, 10vw, 8rem);
  --content-width: 1200px;
  --content-narrow: 800px;
  --content-wide: 1400px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

::selection {
  background: var(--accent);
  color: white;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover { color: var(--accent-bright); }

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

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s ease;
  background: transparent;
}

.nav.scrolled {
  background: rgba(6, 6, 14, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  white-space: nowrap;
  text-decoration: none;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

/* Mobile menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s;
  border-radius: 1px;
}

.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-subtitle {
  font-size: var(--font-size-small);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-title {
  font-size: var(--font-size-hero);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--gold), var(--accent-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: var(--font-size-large);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

/* Gradient divider line after hero */
.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg-deep));
  z-index: 1;
  pointer-events: none;
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--section-padding) 2rem;
  position: relative;
}

.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.section-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
}

.section-title {
  font-size: var(--font-size-h1);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.section-description {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.8;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: #06060e;
}
.btn-primary:hover {
  background: var(--accent-bright);
  color: #06060e;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 0.5rem 0;
}
.btn-ghost:hover { color: var(--accent-bright); }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.4s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateY(-4px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: var(--accent-glow);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.card-icon.gold { background: var(--gold-glow); }
.card-icon.gold svg { stroke: var(--gold); }

.card-icon.cyan { background: var(--cyan-glow); }
.card-icon.cyan svg { stroke: var(--cyan); }

.card-title {
  font-size: var(--font-size-h3);
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-text {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

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

/* ===== QUOTE BLOCK ===== */
.quote-block {
  position: relative;
  padding: 2.5rem 3rem;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  border-radius: 0 16px 16px 0;
  margin: 2rem 0;
}

.quote-block::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
}

.quote-text {
  font-size: var(--font-size-large);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.quote-author {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  font-style: normal;
}

@media (max-width: 768px) {
  .quote-block {
    padding: 1.5rem 1.5rem 1.5rem 2rem;
  }
}

/* ===== SCREENSHOT SHOWCASE ===== */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.screenshot-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
}

.screenshot-item:hover {
  border-color: var(--accent);
  transform: scale(1.02);
  box-shadow: 0 20px 60px rgba(167, 139, 250, 0.08);
}

.screenshot-item img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(6, 6, 14, 0.95), transparent);
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--text-primary);
}

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

/* ===== LAYER STACK (for Anatomie teaser) ===== */
.layer-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 2rem 0;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.4s ease;
  cursor: default;
}

.layer-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateX(8px);
}

.layer-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.layer-name {
  font-weight: 600;
  font-size: var(--font-size-body);
}

.layer-desc {
  color: var(--text-muted);
  font-size: var(--font-size-small);
  margin-left: auto;
}

@media (max-width: 768px) {
  .layer-desc { display: none; }
}

/* ===== BOOK TEASER ===== */
.book-teaser {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.book-cover {
  flex-shrink: 0;
  width: 220px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transition: transform 0.4s ease;
}

.book-cover:hover { transform: rotate(-2deg) scale(1.03); }

.book-cover img { width: 100%; height: auto; }

.book-info h3 {
  font-size: var(--font-size-h2);
  font-weight: 700;
  margin-bottom: 1rem;
}

.book-info p {
  color: var(--text-secondary);
  font-size: var(--font-size-body);
  margin-bottom: 1rem;
}

.book-series {
  margin-top: 1.5rem;
}

.book-series-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: var(--font-size-small);
  color: var(--text-muted);
}

.book-series-item.available { color: var(--text-secondary); }

.book-series-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-light);
  flex-shrink: 0;
}

.book-series-item.available .book-series-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

@media (max-width: 768px) {
  .book-teaser {
    flex-direction: column;
    text-align: center;
  }
  .book-cover { width: 180px; }
}

/* ===== ECOSYSTEM LINKS ===== */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.eco-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.4s ease;
}

.eco-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(167, 139, 250, 0.06);
}

.eco-card-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.eco-card-title {
  font-size: var(--font-size-h3);
  font-weight: 700;
  color: var(--text-primary);
}

.eco-card-desc {
  font-size: var(--font-size-small);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== DIVIDER ===== */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
  margin: 0 auto;
  max-width: var(--content-width);
}

/* ===== FOOTER ===== */
.footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  font-size: var(--font-size-small);
  transition: color 0.3s;
}

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

.footer-copy {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

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

/* Stagger children */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .reveal:nth-child(6) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(7) { transition-delay: 0.35s; }
.stagger-children .reveal:nth-child(8) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(9) { transition-delay: 0.45s; }

/* ===== TWO-COLUMN LAYOUT ===== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

@media (max-width: 900px) {
  .two-col,
  .two-col.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    direction: ltr;
  }
}

/* ===== GLOW EFFECTS ===== */
.glow-purple {
  box-shadow: 0 0 60px rgba(167, 139, 250, 0.08), 0 0 120px rgba(167, 139, 250, 0.04);
}

.glow-gold {
  box-shadow: 0 0 60px rgba(212, 168, 83, 0.08), 0 0 120px rgba(212, 168, 83, 0.04);
}

/* ===== SUBPAGE HERO (smaller) ===== */
.subpage-hero {
  padding: 10rem 2rem 4rem;
  text-align: center;
  position: relative;
}

.subpage-hero .section-label { justify-content: center; }

.subpage-hero .section-title {
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.subpage-hero .section-description {
  max-width: 600px;
  margin: 0 auto;
}

/* ===== PROSE (for content-heavy pages) ===== */
.prose {
  max-width: var(--content-narrow);
  margin: 0 auto;
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  line-height: 1.9;
}

.prose h2 {
  font-size: var(--font-size-h2);
  font-weight: 700;
  color: var(--text-primary);
  margin: 3rem 0 1.25rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-size: var(--font-size-h3);
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

.prose ul, .prose ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* ===== ICON: custom inline SVG helper ===== */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon svg {
  width: 1em;
  height: 1em;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== MyMindSeed logo inline ===== */
.mms-logo {
  display: inline-block;
  vertical-align: middle;
}

.mms-logo img {
  height: 1.2em;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  filter: brightness(0.9);
}

/* ===== FEATURED STAT ===== */
.stat-row {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}

.stat-label {
  font-size: var(--font-size-small);
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ===== GENERAL MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .section {
    padding: clamp(3rem, 8vw, 5rem) 1.25rem;
  }

  .hero {
    padding: 5rem 1.25rem 3rem;
  }

  .nav {
    padding: 0.75rem 1.25rem;
  }

  .stat-row {
    gap: 1.5rem;
  }

  .card {
    padding: 1.5rem;
  }

  .quote-block {
    margin: 1.5rem 0;
  }
}

@media (max-width: 480px) {
  .hero-cta-group {
    flex-direction: column;
    align-items: center;
  }
  .btn { width: 100%; justify-content: center; }
}
