:root {
  --bg: #0a0c11;
  --text: #f3f4f6;
  --muted: rgba(243, 244, 246, .74);
  --hair: rgba(243, 244, 246, .16);
  --hair2: rgba(243, 244, 246, .12);
  --shadow: 0 16px 55px rgba(0, 0, 0, .45);
  --radius: 18px;
  --max: 1100px;
  --pad: clamp(18px, 4vw, 34px);

  /* Premium Dark Steps */
  --card-1: #131723;  /* mid */
  --card-2: #171c2a;  /* lightest */
  --card-hero: #111422;

  --accent: rgba(180, 190, 210, .42);
  --accent-strong: rgba(215, 225, 245, .70);

  /* Grid float */
  --grid-bg: rgba(255, 255, 255, .025);
  --grid-border: rgba(255,255,255,.08);
  --grid-border-hover: rgba(255,255,255,.14);
  --grid-shadow: 0 2px 6px rgba(0,0,0,.25);
  --grid-shadow-hover: 0 6px 14px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: .15px;

  /* LAST TRY: calm, stable background (no radial hotspots -> less banding) */
  background:
    linear-gradient(180deg,
      #07080b 0%,
      #0a0c11 32%,
      #090b10 68%,
      #07080b 100%
    );
}

/* Background-only subtle noise (breaks banding, does NOT sit over cards/content) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  opacity: 0.055;
  mix-blend-mode: overlay;
}

/* Soft vignette for depth (also background-only, stable & smooth) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;

  background:
    radial-gradient(1200px 800px at 50% 12%, rgba(255,255,255,.06), transparent 62%),
    radial-gradient(900px 600px at 50% 100%, rgba(0,0,0,.35), transparent 55%);
  opacity: .75;
}

/* Ensure content sits above background layers */
body { position: relative; }
header, .wrap { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--pad) 70px;
}

/* Brand (Logo + Name) */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  text-decoration: none;
}
.brand:hover{
  text-decoration: none;
}
.brand:hover strong{
  color: var(--accent-strong);
}
.rt-logo{
  width:30px;
  height:30px;
  display:block;
  flex:0 0 auto;
  opacity:.95;
  /* keeps SVG crisp on dark background */
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.25));
}
.top strong{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
@media (max-width: 720px){
  .rt-logo{ width:28px; height:28px; }
}

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 12, 15, .6);
  border-bottom: 1px solid var(--hair2);
}

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav a {
  margin-left: 14px;
  font-size: 14px;
  color: var(--muted);
  position: relative;
}

nav a:hover {
  color: rgba(243, 244, 246, .92);
  text-decoration: none;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width .18s ease;
}

nav a:hover::after { width: 100%; }

/* Sections / Cards */
section { margin-top: 48px; }

.card {
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  background: var(--card-1);
}

/* Section rhythm */
.s-hero {
  margin-top: 64px;
  background: var(--card-hero);
}

.s-leistungen { background: var(--card-1); }
.s-vorteile { background: var(--card-2); }
.s-praxis { background: var(--card-1); }

.s-kontakt {
  margin-top: 64px;
  background: var(--card-2);
}

/* Kontakt map */
.map-embed {
  position: relative;
  margin: 12px 0 18px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--hair2);
  background: rgba(255, 255, 255, .03);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: clamp(220px, 40vw, 300px);
  border: 0;
}

.map-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  cursor: pointer;
}

.map-link:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: -2px;
}

/* Typography */
h1 {
  font-size: clamp(26px, 4.2vw, 46px);
  line-height: 1.15;
  margin: 0 0 18px;
  letter-spacing: .3px;
}

h2 {
  font-size: 22px;
  line-height: 1.25;
  margin: 0 0 18px;
  letter-spacing: .25px;
}

.card h2 {
  position: relative;
  padding-bottom: 10px;
}

.card h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 52px;
  height: 1px;
  background: var(--accent);
  opacity: .85;
}

h3 {
  font-size: 14.5px;
  margin: 0 0 6px;
  font-weight: 600;
}

p {
  margin: 0 0 18px;
  color: var(--muted);
  max-width: 78ch;
}

/* CTA Buttons */
.cta { margin-top: 18px; }

.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--hair);
  margin-right: 10px;
  font-weight: 600;
  font-size: 14px;
  background: rgba(255, 255, 255, .04);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: rgba(255, 255, 255, .06);
  text-decoration: none;
}

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

.btn.primary {
  background: #fff;
  color: #0b0c0f;
  border-color: #fff;
}

.btn.primary:hover { background: #fff; border-color: #fff; }

/* Grid blocks */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

/* “Schweben” – minimal */
.grid-item {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: var(--grid-bg);
  border: 1px solid var(--grid-border);
  box-shadow: var(--grid-shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.grid-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--grid-shadow-hover);
  border-color: var(--grid-border-hover);
}

.grid-item h3 {
  font-size: 14px;
  letter-spacing: .15px;
  margin: 0 0 8px;
  font-weight: 650;
}

.grid-item p {
  margin: 0;
  max-width: none;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(243, 244, 246, .70);
}

.benefit-title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .15px;
  margin: 0 0 8px;
  color: rgba(243, 244, 246, .92);
}

.benefit-text {
  margin: 0;
  max-width: none;
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(243, 244, 246, .70);
}

/* Expandable details (Kernkompetenzen / Vorteile) */
.expandable .expand-toggle {
  margin-top: 10px;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--accent-strong);
  cursor: pointer;
}

.expandable .expand-toggle:hover { text-decoration: underline; }

.expandable .expand-toggle:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 4px;
  border-radius: 10px;
}

.expandable .expand-content {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .10);
}

.expandable .expand-content p {
  margin: 0 0 10px;
  max-width: none;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(243, 244, 246, .76);
}

.expandable .expand-content p:last-child { margin-bottom: 0; }

/* Praxis-Verzahnung */
.practice-list {
  margin: 0;
  padding-left: 18px;
}

.practice-item {
  display: grid;
  gap: 6px;
  padding: 2px 0;
}

.practice-links {
  font-size: 12.5px;
  color: rgba(243, 244, 246, .66);
}

.practice-link {
  color: rgba(243, 244, 246, .84);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 244, 246, .18);
}

.practice-link:hover {
  border-bottom-color: rgba(243, 244, 246, .35);
  text-decoration: none;
}

.practice-link:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Gentle highlight when navigating to a card */
.grid-item.focused {
  border-color: rgba(215, 225, 245, .35);
  box-shadow: 0 0 0 1px rgba(215, 225, 245, .18), var(--grid-shadow-hover);
}


/* Expandable cards (Kernkompetenzen / Vorteile) */
.grid-item.expandable {
  cursor: pointer;
}

.grid-item.expandable:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

/* Detail area separator + subtle fade-in */
.grid-item.expandable .expand-content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hair2);

  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .18s ease, transform .18s ease;
font-size: 13.5px;
  line-height: 1.6;
  color: rgba(243, 244, 246, .75);
}

.grid-item.expandable .expand-content.is-open {
  opacity: 1;
  transform: translateY(0);
}

/* Short, subtle focus highlight when opened via "Bezug" */
.grid-item.expandable.focused {
  border-color: var(--grid-border-hover);
}


/* Footer */
footer {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(243, 244, 246, .6);
  border-top: 1px solid var(--hair2);
  padding-top: 16px;
}

footer a { color: rgba(243, 244, 246, .70); }

@media (max-width: 900px) {
  .top { padding: 12px var(--pad); }
}

/* Responsive refinements */
@media (max-width: 1024px) {
  .s-hero { margin-top: 48px; }
}

@media (max-width: 720px) {
  /* Global spacing */
  section { margin-top: 36px; }
  .card { padding: 26px; }

  /* Hero spacing */
  .s-hero { margin-top: 20px; padding-top: 28px; padding-bottom: 28px; }

  /* Mobile h1 */
  h1 { font-size: clamp(26px, 7vw, 34px); }

  /* Mobile: Navigation kompakter */
  .top {
    padding: 10px var(--pad);
    gap: 10px;
  }

  .top strong {
    font-size: 14px;
    letter-spacing: .2px;
    white-space: nowrap;
  }

  nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 6px;
  }

  nav a {
    margin-left: 10px;
    font-size: 13px;
  }

  nav a::after { bottom: -5px; }

  /* Mobile: Hero CTA leicht stapeln */
  .s-hero .cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .s-hero .btn {
    margin-right: 0;
    width: 100%;
    text-align: center;
  }
}

/* --- Header layout on small screens ---
   Goal:
   - Keep single-line header until it really becomes tight
   - Switch to 2-line header only on small phones
*/
@media (max-width: 600px) {
  .top{
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .brand{
    justify-content: flex-start;
  }

  nav{
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 14px;
  }

  nav a{
    margin-left: 0;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Hide GmbH on small screens */
  .brand-suffix{
    display: none;
  }
}

/* Extra-small devices */
@media (max-width: 380px) {
  .rt-logo{
    width: 26px;
    height: 26px;
  }
}
