@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ── LIGHT MODE (default) ─────────────────────────────────────────── */
:root {
  --green:        #2b9766;
  --green-dark:   #1f7350;
  --green-light:  #3ab87c;
  --green-dim:    rgba(43,151,102,0.10);
  --green-dim2:   rgba(43,151,102,0.18);
  --bg:           #f5f3ef;
  --bg2:          #ede9e3;
  --bg3:          #e4dfd7;
  --card:         #ffffff;
  --card2:        #f5f3ef;
  --text:         #252321;
  --text2:        #3a3836;
  --muted:        #5a5855;
  --muted2:       #9a9690;
  --border:       rgba(37,35,33,0.10);
  --border2:      rgba(37,35,33,0.18);
  --border-green: rgba(43,151,102,0.30);
  --shadow:       rgba(37,35,33,0.06);
  --radius:       14px;
  --radius-sm:    8px;
  --mono:         'IBM Plex Mono', monospace;
  --transition:   0.25s ease;
  /* progress bar */
  --progress-h:   3px;
}

/* ── DARK MODE ────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #1a1816;
  --bg2:          #252321;
  --bg3:          #2f2d2b;
  --card:         #252321;
  --card2:        #2f2d2b;
  --text:         #f0ede8;
  --text2:        #d4d0c8;
  --muted:        #9a9690;
  --muted2:       #6a6865;
  --border:       rgba(255,255,255,0.08);
  --border2:      rgba(255,255,255,0.15);
  --border-green: rgba(43,151,102,0.35);
  --shadow:       rgba(0,0,0,0.25);
  --green-dim:    rgba(43,151,102,0.14);
  --green-dim2:   rgba(43,151,102,0.22);
}

/* ── RESET ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
  cursor: none; /* custom cursor takes over on desktop */
}
@media (hover: none) { body { cursor: auto; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── SCROLL PROGRESS BAR ──────────────────────────────────────────── */
#progress-bar {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: var(--progress-h); width: 0%;
  background: var(--green);
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── CUSTOM CURSOR (desktop only) ────────────────────────────────── */
#cursor-dot {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  width: 7px; height: 7px;
  background: var(--green);
  transition: transform 0.08s ease, background 0.15s;
}
#cursor-ring { display: none; }
body.cursor-hover #cursor-dot { transform: translate(-50%,-50%) scale(2.2); background: var(--green-dark); }
body.cursor-click #cursor-dot { transform: translate(-50%,-50%) scale(0.5); }
@media (hover: none) { #cursor-dot { display: none; } }

/* ── NAVIGATION ───────────────────────────────────────────────────── */
nav {
  position: sticky; top: var(--progress-h); z-index: 200;
  background: rgba(245,243,239,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 2.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
  transition: background var(--transition);
}
[data-theme="dark"] nav { background: rgba(26,24,22,0.92); }
.nav-logo { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.nav-logo span { color: var(--green); }
.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--muted); transition: color var(--transition); }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--text) !important; color: var(--card) !important;
  padding: 0.5rem 1.1rem; border-radius: 6px;
  font-weight: 600 !important; font-size: 0.85rem;
  transition: background var(--transition) !important;
}
.nav-cta:hover { background: var(--green) !important; }

/* Mobile hamburger toggle (hidden on desktop) */
.nav-burger {
  display: none;
  background: transparent; border: none; cursor: pointer;
  width: 36px; height: 36px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 0;
}
.nav-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Dark/Light Toggle */
.theme-toggle {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 20px; padding: 0.35rem 0.55rem;
  cursor: none; display: flex; align-items: center; gap: 0.35rem;
  transition: background var(--transition);
}
.theme-toggle:hover { border-color: var(--green); }
.theme-toggle svg { width: 16px; height: 16px; stroke: var(--muted2); transition: stroke var(--transition); }
.theme-toggle:hover svg { stroke: var(--green); }

/* ── BUTTONS ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; cursor: none;
  border: none; transition: all var(--transition);
  text-decoration: none; font-family: 'Inter', sans-serif;
  position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--text); color: var(--card);
}
.btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}
.btn-primary:hover::after { left: 150%; }
.btn-primary:hover { background: var(--green); transform: translateY(-1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green::after {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}
.btn-green:hover::after { left: 150%; }
.btn-green:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border2);
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ── SECTIONS ─────────────────────────────────────────────────────── */
section { padding: 5.5rem 2.5rem; }
.container { max-width: 1120px; margin: 0 auto; }
.section-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 0.75rem; display: inline-block;
}
.section-title {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -0.035em;
  color: var(--text); margin-bottom: 0.5rem;
}
.section-sub { font-size: 1.05rem; color: var(--muted); max-width: 580px; line-height: 1.75; margin-top: 0.75rem; }

/* ── UNDERLINE / HIGHLIGHT ────────────────────────────────────────── */
/* Option 1: Marker highlight - hinter den Text gelegt */
.u-mark {
  position: relative; display: inline;
  background: linear-gradient(transparent 52%, rgba(43,151,102,0.28) 52%);
  padding: 0 2px;
  transition: background 0.3s;
}
[data-theme="dark"] .u-mark {
  background: linear-gradient(transparent 52%, rgba(43,151,102,0.35) 52%);
}

/* Draw-in SVG underline (for hero only) */
.u-draw {
  position: relative; display: inline-block;
}
.u-draw svg {
  position: absolute; bottom: -5px; left: 0;
  width: 100%; height: 8px; overflow: visible;
  pointer-events: none;
}
.u-draw path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1) 0.8s;
}
.u-draw.drawn path { stroke-dashoffset: 0; }

/* ── CARDS ────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover {
  box-shadow: 0 6px 24px var(--shadow);
  transform: translateY(-2px);
}

/* ── BADGE ────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(43,151,102,0.25);
}

/* ── TICKER ───────────────────────────────────────────────────────── */
.ticker-wrap {
  overflow: hidden; background: var(--text);
  padding: 0.65rem 0; white-space: nowrap;
  transition: background var(--transition);
}
.ticker-inner { display: inline-block; animation: tickerAnim 32s linear infinite; }
.ticker-inner:hover { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0 1.5rem; font-size: 0.78rem;
  font-weight: 600; font-family: var(--mono);
  color: rgba(255,255,255,0.55);
}
.ticker-item .t-val { color: var(--green-light); }
.ticker-sep { color: rgba(255,255,255,0.2); padding: 0 0.25rem; }
@keyframes tickerAnim { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ── DIVIDER ──────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); }

/* ── REVEAL ANIMATIONS ────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Staggered children */
.stagger > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.visible > * { opacity: 1; transform: translateY(0); }

/* ── SECTION LABEL SLIDE ──────────────────────────────────────────── */
.section-label {
  opacity: 0; transform: translateX(-12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.section-label.visible { opacity: 1; transform: translateX(0); }

/* ── BACK TO TOP ──────────────────────────────────────────────────── */
#back-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 500;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff;
  border: none; cursor: none;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 4px 14px rgba(43,151,102,0.35);
}
#back-top.visible { opacity: 1; transform: translateY(0); }
#back-top svg { width: 18px; height: 18px; stroke: #fff; }

/* ── FORMS ────────────────────────────────────────────────────────── */
input, textarea, select {
  background: var(--bg2); border: 1.5px solid var(--border2);
  border-radius: var(--radius-sm); color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 0.9rem;
  padding: 0.7rem 0.95rem; width: 100%; outline: none;
  transition: border-color var(--transition), background var(--transition);
}
input:focus, textarea:focus { border-color: var(--green); background: var(--card); }
input::placeholder, textarea::placeholder { color: var(--muted2); }
input[type="range"] {
  accent-color: var(--green);
  padding: 0; background: transparent; border: none;
  height: 4px; cursor: pointer;
}
label {
  display: block; font-size: 0.75rem; font-weight: 700;
  color: var(--muted); margin-bottom: 0.4rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── GRID HELPERS ─────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.25rem; }

/* ── FOOTER ───────────────────────────────────────────────────────── */
footer {
  background: var(--text); color: rgba(255,255,255,0.45);
  padding: 2.5rem 2.5rem; text-align: center; font-size: 0.8rem;
  transition: background var(--transition);
}
footer a { color: rgba(255,255,255,0.4); transition: color var(--transition); }
footer a:hover { color: var(--green-light); }
.footer-links { display: flex; gap: 1.5rem; justify-content: center; margin-bottom: 0.75rem; flex-wrap: wrap; }

/* ── ACCESSIBILITY ────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .ticker-inner { animation: none; }
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; position: relative; }
  .nav-burger { display: flex; order: 3; }
  .nav-logo { order: 1; }
  .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1.25rem;
    gap: 0;
    max-height: 0; overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    pointer-events: none;
  }
  .nav-links.open {
    max-height: 80vh; opacity: 1; pointer-events: all;
    overflow-y: auto;
  }
  .nav-links li { width: 100%; }
  .nav-links a, .nav-links button {
    display: flex; width: 100%;
    padding: 0.85rem 0.25rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
  }
  .nav-links li:last-child a,
  .nav-links li:nth-last-child(2) a { border-bottom: none; }
  .nav-links .nav-cta { justify-content: center; margin-top: 0.75rem; border-bottom: none !important; }
  .nav-links .theme-toggle { justify-content: flex-start; border: none; background: transparent; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--border); border-radius: 0; }
  section { padding: 3.5rem 1.25rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
  .btn { cursor: pointer; }
}

/* ── PARQET IMAGE PREVIEW ──────────────────────────────────────── */
.depot-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
}
.depot-preview:hover { border-color: var(--border-green); }
.depot-preview iframe { width: 100%; display: block; }

/* ── HERO GRID PATTERN (alle Seiten) ─────────────────────────────── */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37,35,33,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,35,33,0.07) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  pointer-events: none; z-index: 0;
}
[data-theme="dark"] .hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
}

/* ── PAGE GRID BACKGROUND (Hero-Bereiche) ─────────────────────────── */
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(37,35,33,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,35,33,0.07) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  pointer-events: none; z-index: 0;
}
[data-theme="dark"] .hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
}

/* Content in Grid-Hero-Bereichen immer über dem Grid */
.tools-hero .container, .vid-hero .container, .empf-hero .container,
.nl-hero > *:not(.hero-grid), .depot-page-hero .container {
  position: relative; z-index: 1;
}
