/* ==========================================================================
   GERHARD WAGLER — Kanban-Training, Coaching & Beratung
   Sales-focused, privacy-first, SEO-friendly
   Shared design tokens with wagler.ing for brand consistency
   ========================================================================== */

/* ---------- CSS Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Design Tokens (Light) ---------- */
:root,
[data-theme="light"] {
  --color-bg: #fafafa;
  --color-bg-alt: #f0f0f0;
  --color-surface: #ffffff;
  --color-surface-hover: #f5f5f5;
  --color-text: #1a1a1a;
  --color-text-secondary: #555;
  --color-text-muted: #888;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-soft: rgba(37, 99, 235, 0.08);
  --color-border: #d0d0d0;
  --color-border-hover: #b0b0b0;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.13);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --transition: 0.2s ease;
  --container-max: 1200px;
  --sticky-bg: #fef08a;
  --sticky-border: #eab308;
  --sticky-fold: #facc15;
  --sticky-ink: #713f12;
}

/* ---------- Design Tokens (Dark) ---------- */
html:has(#darkMode:checked),
[data-theme="dark"] {
  --color-bg: #0f0f0f;
  --color-bg-alt: #1a1a1a;
  --color-surface: #1e1e1e;
  --color-surface-hover: #2a2a2a;
  --color-text: #e8e8e8;
  --color-text-secondary: #aaa;
  --color-text-muted: #666;
  --color-accent: #60a5fa;
  --color-accent-hover: #93c5fd;
  --color-accent-soft: rgba(96, 165, 250, 0.1);
  --color-border: #2e2e2e;
  --color-border-hover: #444;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --sticky-bg: #854d0e;
  --sticky-border: #a16207;
  --sticky-fold: #ca8a04;
  --sticky-ink: #fef9c3;
}

/* ---------- 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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.75rem 1.5rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
  outline: 2px solid #fff;
  outline-offset: -2px;
}

/* ---------- Typography ---------- */
html {
  font-size: 16px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

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

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

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.tile:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  color: var(--color-text);
  line-height: 1.3;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background-color var(--transition), border-color var(--transition);
}

html:has(#darkMode:checked) .site-header,
[data-theme="light"] .site-header {
  background: rgba(250, 250, 250, 0.85);
}

html:not(:has(#darkMode:checked)) .site-header {
  background: rgba(250, 250, 250, 0.85);
}

html:has(#darkMode:checked) .site-header,
[data-theme="dark"] .site-header {
  background: rgba(15, 15, 15, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo:hover {
  color: var(--color-accent);
}

.logo-text {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.header-nav {
  display: flex;
  gap: 0;
  position: relative;
  align-items: stretch;
}

.header-nav a {
  position: relative;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
  padding: 0.3rem 1rem;
  z-index: 1;
}

.header-nav a:hover {
  color: var(--color-text);
}

/* Kanban card hidden by default */
.kanban-card {
  display: none;
}

/* ---------- Kanban Nav (desktop only) ---------- */
@media (min-width: 769px) {
  .kanban-nav {
    background: var(--color-bg-alt);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: visible;
  }

  .kanban-nav a {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.75rem 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .kanban-nav a + a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    height: 80%;
    border-left: 1.5px dashed var(--color-border);
  }

  .kanban-card {
    display: flex;
    position: absolute;
    top: calc(100% - 12px);
    left: 0;
    transform: rotate(2deg);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
    pointer-events: auto;
    cursor: grab;
    z-index: 2;
    opacity: 0;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(1px 2px 3px rgba(0, 0, 0, 0.15));
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
  }

  .kanban-card.is-visible {
    opacity: 1;
  }

  .kanban-card.is-dragging {
    cursor: grabbing;
    transition: opacity 0.3s ease;
    transform: rotate(4deg) scale(1.1);
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.25));
  }
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-toggle,
.theme-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  cursor: pointer;
  color: var(--color-text);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-toggle:hover,
.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

#darkMode:focus-visible + .theme-toggle {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.lang-label {
  font-size: 0.8rem;
  font-weight: 700;
}

.icon-sun { display: none; }

html:has(#darkMode:checked) .icon-sun,
[data-theme="dark"] .icon-sun { display: inline; }

html:has(#darkMode:checked) .icon-moon,
[data-theme="dark"] .icon-moon { display: none; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all var(--transition);
}

.mobile-menu-toggle:hover {
  border-color: var(--color-accent);
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: all var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-intro {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary {
  flex-direction: column;
  align-items: center;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.email-addr {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.85;
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.section-desc {
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Tile Grid ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.tile:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--color-text);
}

.tile-title {
  font-size: 1.3rem;
  font-weight: 700;
}

.tile-desc {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  flex: 1;
}

/* ---------- Service Tiles ---------- */
.service-tile {
  gap: 0.5rem;
}

.service-tile:hover {
  transform: none;
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.service-icon {
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.service-tile .tile-title {
  font-size: 1.15rem;
}

.service-tile .tile-desc {
  font-size: 0.9rem;
  line-height: 1.7;
}

.service-for {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border);
}

/* ---------- Result Tiles ---------- */
.tile-grid-results {
  grid-template-columns: repeat(3, 1fr);
}

.result-tile {
  gap: 0.5rem;
}

.result-tile:hover {
  transform: none;
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.result-industry {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent);
}

.result-tile .tile-desc {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ---------- Process Board ---------- */
.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
}

.board-col {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.board-col + .board-col {
  border-left: 1.5px dashed var(--color-border);
}

.board-col-header {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-bottom: 1.5px solid var(--color-border);
}

.board-card {
  margin: 0.75rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.06);
  transform: rotate(-0.4deg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.board-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: var(--shadow-md);
}

.board-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.board-card-desc {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ---------- Credentials ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.cert-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition);
  text-align: center;
}

.cert-tile:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.cert-tile img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.cert-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.credentials-more {
  text-align: center;
}

.credentials-more a {
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- About Compact ---------- */
.about-compact {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.about-compact p {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-link a {
  font-weight: 600;
}

/* ---------- Contact Tiles ---------- */
.tile-grid-links {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.tile-sm {
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  gap: 0.5rem;
}

.tile-sm span {
  font-weight: 600;
  font-size: 0.95rem;
}

.tile-cta {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.tile-cta:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

.tile-cta svg {
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-privacy {
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

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

/* ---------- Legal Pages ---------- */
.legal-page {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.legal-page h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.legal-page h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.legal-page h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.legal-page p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.legal-page ul,
.legal-page ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-page li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.legal-page a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-page a:hover {
  color: var(--color-accent-hover);
}

.legal-address {
  font-style: normal;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.legal-back {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.legal-back a {
  font-weight: 500;
}

/* Schwenke-generator specific classes */
ul.index {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

ul.index li {
  margin-bottom: 0.25rem;
}

a.index-link {
  text-decoration: none;
}

a.index-link:hover {
  text-decoration: underline;
}

ul.m-elements {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

ul.m-elements li {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

p.seal {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

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

/* ---------- Animations ---------- */
.anim-entry {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  .anim-entry {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .tile,
  .btn,
  .cert-tile,
  a {
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .tile-grid-results {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
    align-items: flex-end;
    text-align: right;
    z-index: 99;
  }

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

  .mobile-menu-toggle {
    display: flex;
  }

  .hero {
    padding: 4rem 0 3rem;
  }

  .section {
    padding: 3rem 0;
  }

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

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

  .board-col + .board-col {
    border-left: none;
    border-top: 1.5px dashed var(--color-border);
  }

  .tile-grid-links {
    grid-template-columns: 1fr;
  }

  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .cert-tile img {
    width: 60px;
    height: 60px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
