/* ==========================================================================
   NEXILON – Hauptstylesheet
   Design: Refined minimal, professional IT consulting
   Fonts: Plus Jakarta Sans (headings) + Source Serif 4 (body)
   ========================================================================== */

/* --- Fonts (Google Fonts, geladen in baseof.html) --- */

/* --- Custom Properties / Theming --- */
:root {
  /* Brand */
  --brand-primary: #1e3a5f;
  --brand-accent: #0891b2;
  --brand-cta: #ea580c;
  --brand-cta-hover: #c2410c;

  /* Light Mode (default) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-code: #f1f5f9;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  --nav-bg: rgba(248, 250, 252, 0.92);
  --nav-border: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 110rem;
  --content-width: 90rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-page: #0c1425;
  --bg-surface: #162032;
  --bg-surface-alt: #1c2940;
  --bg-code: #1c2940;
  --border: #2a3a52;
  --border-subtle: #1c2940;

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  --nav-bg: rgba(12, 20, 37, 0.92);
  --nav-border: #2a3a52;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);

  --brand-accent: #22d3ee;
  --brand-cta: #fb923c;
  --brand-cta-hover: #f97316;
}


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

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-page);
  transition: background var(--transition-base), color var(--transition-base);
}

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

.profile-img {
  width: 200px;
  height: auto;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}
a { color: var(--brand-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--brand-primary); }
[data-theme="dark"] a:hover { color: #67e8f9; }

::selection {
  background: var(--brand-accent);
  color: var(--text-inverse);
}


/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); margin-bottom: var(--space-md); }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.25rem); margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
h3 { font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem); margin-top: var(--space-lg); margin-bottom: var(--space-xs); }

/* Kein Extra-Abstand wenn Überschrift direkt am Seitenanfang oder nach einer anderen Überschrift steht */
h1 + h2, h2 + h3, section > .solution-content > h2:first-child,
.content-narrow > h1:first-child, .content-narrow > h2:first-child {
  margin-top: 0;
}

p { margin-bottom: var(--space-sm); color: var(--text-secondary); }
p:last-child { margin-bottom: 0; }

strong { color: var(--text-primary); }


/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

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

section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}


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

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  text-decoration: none;
}
.nav-logo:hover { color: var(--brand-accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.375rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text-primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-accent);
  transition: width var(--transition-base);
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
  width: 100%;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -0.75rem;
  min-width: 14rem;
  padding: var(--space-xs) 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  list-style: none;
  z-index: 110;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.nav-dropdown-menu a::after { display: none; }

.nav-dropdown-menu a:hover {
  background: var(--bg-surface-alt);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-primary);
}

.nav-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: all var(--transition-fast);
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-xs);
    box-shadow: var(--shadow-md);
  }

  .nav-links.is-open { display: flex; }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--space-sm);
    background: transparent;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: block;
  }
}


/* --- Hero Section --- */
.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.hero-inner {
  max-width: 52rem;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.25rem, 1.8rem + 2.5vw, 3.75rem);
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 1rem + 0.3vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 38rem;
  margin: 0 auto var(--space-lg);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}


/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}


/* --- Trust Bar --- */
.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.trust-item {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-item strong {
  color: var(--text-secondary);
}


/* --- Cards / Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

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

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

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

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

.card-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.card h3 {
  margin-bottom: var(--space-xs);
}

.card h3 a {
  color: var(--text-primary);
  text-decoration: none;
}
.card h3 a:hover { color: var(--brand-accent); }

.card p {
  font-size: 0.95rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-accent);
  margin-top: var(--space-sm);
}
.card-link:hover { gap: 0.6rem; }


/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto var(--space-xl);
}

.section-header h2 {
  margin-top: 0;
}

.section-label {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
  margin-bottom: var(--space-xs);
}


/* --- Solution Page --- */
.solution-hero {
  padding: var(--space-xl) 0 var(--space-lg);
}

.solution-hero .section-label {
  text-align: left;
}

.solution-hero h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.75rem);
}

.solution-content {
  max-width: var(--content-width);
}

.solution-content h2 {
  margin-top: var(--space-xl);
}

.solution-content ul, .solution-content ol {
  padding-left: 1.25rem;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.solution-content li {
  margin-bottom: 0.4rem;
}


/* --- CTA Section --- */
.cta-section {
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.cta-section h2 {
  margin-bottom: var(--space-xs);
}

.cta-section p {
  margin-bottom: var(--space-md);
}


/* --- References / Projects --- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-md);
}

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

.ref-card {
  background: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.ref-card h4 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.ref-card p {
  font-size: 0.9rem;
}

.ref-tag {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-accent);
  margin-bottom: 0.5rem;
}


/* --- Blog --- */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.blog-entry {
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

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

.blog-date {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.blog-entry h3 a {
  color: var(--text-primary);
}
.blog-entry h3 a:hover {
  color: var(--brand-accent);
}


/* --- Contact Form (Platzhalter) --- */
.contact-form {
  max-width: 36rem;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-accent);
}

.form-group textarea {
  min-height: 8rem;
  resize: vertical;
}


/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-2xl);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

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

.footer-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.footer-links a {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text-primary); }


/* --- Utility --- */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-lg { margin-bottom: var(--space-lg); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* --- Pricing / Subscription Cards --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

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

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
}

.pricing-card:hover {
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-md);
}

.pricing-card.featured {
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-md);
  position: relative;
}

.pricing-card.featured::before {
  content: "Empfohlen";
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-accent);
  color: var(--text-inverse);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 1rem;
  border-radius: 2rem;
}

.pricing-card-name {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.pricing-card-price {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.pricing-card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  flex-grow: 1;
}

.pricing-card-features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.35rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.pricing-card-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-accent);
  font-weight: 700;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}
