/* Layout refinements for the main page. */
:root {
  --muted: #a2adc2;
  --line: rgba(191, 204, 235, 0.12);
  --radius: 22px;
  --hover-duration: 220ms;
  --hover-ease: cubic-bezier(0.2, 0.65, 0.3, 1);
  --hover-lift: -2px;
}

body::after { opacity: 0.022; }
h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.heading-accent { color: var(--muted); }
.js [data-reveal] { transition-delay: var(--reveal-delay, 0ms); }

.section {
  padding-block: clamp(76px, 8vw, 112px);
}

.section-head { margin-bottom: 40px; }
.section-head h2 { line-height: 1.16; }
.section-kicker { margin-bottom: 20px; font-size: 0.72rem; }

.nav { background: linear-gradient(rgba(5, 7, 13, 0.85), transparent); }
.nav-inner { height: 80px; gap: 28px; }
.nav-links { gap: 24px; }
.nav-links a { position: relative; padding-block: 8px; font-size: 0.83rem; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--c2);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--hover-duration) var(--hover-ease);
}
.nav-links a[aria-current="location"] { color: var(--text); }
.nav-links a[aria-current="location"]::after { transform: scaleX(1); }
.mobile-nav a[aria-current="location"], .footer-nav a[aria-current="location"] { color: var(--c1); }
.mobile-nav a[aria-current="location"] { box-shadow: inset 3px 0 var(--c2); padding-left: 14px; }
.nav.scrolled { border-bottom-color: var(--line); }
.mobile-nav { top: 80px; visibility: hidden; }
.mobile-nav.open { visibility: visible; }

.btn {
  min-height: 50px;
  padding-inline: 25px;
  font: 600 0.9rem/1.4 var(--font-body);
  border-radius: 12px;
  transition: transform var(--hover-duration) var(--hover-ease), box-shadow var(--hover-duration) var(--hover-ease), border-color var(--hover-duration) var(--hover-ease), background var(--hover-duration) var(--hover-ease);
}

.btn-small { min-height: 42px; padding-inline: 18px; font-size: 0.8rem; }
.btn-primary { box-shadow: 0 6px 24px rgba(99, 102, 241, 0.2); }
.btn-primary:hover { box-shadow: 0 10px 30px rgba(129, 140, 248, 0.3); }
.btn-primary:hover, .btn-ghost:hover { transform: translateY(var(--hover-lift)); }
.btn:active { transform: translateY(0) scale(0.98); }

.hero {
  min-height: min(940px, 100svh);
  padding: 156px 24px 128px;
}

.hero-inner { width: 100%; max-width: 1080px; }
.badge { margin-bottom: 34px; font-size: 0.75rem; padding: 8px 14px; }
.hero h1 { width: 100%; font-size: clamp(2.15rem, 7.4vw, 6.25rem); letter-spacing: -0.055em; }
.hero h1 .hline:first-child { margin-bottom: 0.18em; }
.h1-dim { font-size: 0.62em; line-height: 1.2; letter-spacing: -0.035em; color: #c2cada; }
.hero-sub { max-width: 560px; margin-top: 30px; font-size: 1rem; line-height: 1.85; }
.hero-actions { margin-top: 32px; gap: 12px; }
.scroll-hint { bottom: 30px; font-size: 0.65rem; letter-spacing: 0.18em; }
.scroll-line { height: 32px; }
.aurora { opacity: 0.38; }

.intro { padding-block: 64px 76px; }
.intro-claim { max-width: 960px; font-size: clamp(1.5rem, 3.1vw, 2.4rem); line-height: 1.48; }
.intro-claim .w { color: #69758b; }

.story { height: 240vh; }
.story-sticky { height: 100svh; }
.story-grid { gap: 64px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.story-copy { min-height: 300px; }
.story-block h2 { max-width: 15ch; line-height: 1.16; }
.story-block p { line-height: 1.8; }
.story-visual {
  min-width: 0;
  width: 100%;
  max-width: 570px;
  justify-self: end;
}
.story-visual svg { width: 100%; max-height: 68svh; }
.story-visual .node-label { fill: #bac5d8; font-size: 15px; font-weight: 400; }
.story-visual .node-label-b { fill: #eef2fa; font-weight: 600; }
.story-visual .chaos-line { stroke: rgba(248, 113, 113, 0.32); stroke-width: 1.5; }
.story-visual .order-line { stroke-width: 2; }
.story-visual .flow-check { stroke: var(--good); }

#leistungen { border-top: 1px solid var(--line); }
.bento { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.bento-card {
  min-width: 0;
  padding: 30px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}
.bento-card, .js .bento-card.revealed {
  transition: opacity 0.7s ease var(--reveal-delay, 0ms), transform var(--hover-duration) var(--hover-ease), border-color var(--hover-duration) var(--hover-ease), box-shadow var(--hover-duration) var(--hover-ease);
}
.bento-card:hover, .js .bento-card.revealed:hover { transform: translateY(var(--hover-lift)); }
.bento-card::before, .bento-card::after { transition: opacity var(--hover-duration) var(--hover-ease); }
.bento-icon { transition: border-color var(--hover-duration) var(--hover-ease); }
.bento-card:hover .bento-icon { transform: none; box-shadow: none; }

.bento-card h3 { max-width: 28ch; font-size: 1.12rem; line-height: 1.35; }
.bento-card p { line-height: 1.75; font-size: 0.9rem; }
.bento-icon { width: 42px; height: 42px; margin-bottom: 24px; border-radius: 12px; }
.featured {
  grid-column: span 2;
  grid-row: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  column-gap: 28px;
  min-height: 300px;
  padding: 34px;
  background: linear-gradient(130deg, rgba(34, 211, 238, 0.07), rgba(129, 140, 248, 0.05) 50%, rgba(255, 255, 255, 0.02));
}

.featured > :not(.mini-window) { grid-column: 1; }
.featured h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
.featured p { max-width: 38ch; }
.chip-row { margin-top: 22px; gap: 6px; }
.chip { padding: 5px 9px; font-size: 0.7rem; }
.mini-window {
  position: relative;
  right: auto;
  bottom: auto;
  grid-column: 2;
  grid-row: 2 / span 3;
  align-self: center;
  width: 100%;
  transform: rotate(-4deg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.bento-card.wide { padding-block: 25px; }
.principles { margin-top: 30px; gap: 28px; }
.principle { padding: 20px 0; border: 0; border-radius: 0; background: none; }
.principle h3 { line-height: 1.4; font-size: 0.92rem; }
.principle p { font-size: 0.84rem; }
.principle svg { width: 18px; height: 18px; }

#prozess {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 80px;
  border-top: 1px solid var(--line);
}

#prozess .section-head { position: sticky; top: 120px; margin-bottom: 0; }
#prozess h2 { max-width: 13ch; }
.timeline { width: 100%; max-width: none; padding-left: 44px; }
.timeline-list { gap: 16px; }
.timeline-rail { left: 10px; top: 30px; bottom: 30px; }
.tstep-dot { left: -40px; }
.tstep-card { padding: 26px 28px; border-radius: 18px; }
.tstep h3 { font-size: 1.15rem; line-height: 1.3; }
.tstep p { line-height: 1.75; }

.about { border-top: 1px solid var(--line); }
.about-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 80px; }
.about-media { width: 100%; max-width: 360px; justify-self: center; }
.about-photo { border-radius: 22px; }
.about-photo::before { opacity: 0.55; }
.about-copy h2 { line-height: 1.18; }
.about-copy p { line-height: 1.85; }
.about-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.about-facts li { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; font-size: 0.78rem; }

.marquee { padding-block: 24px; }
.marquee-set { font-size: clamp(1.2rem, 2.8vw, 2rem); opacity: 0.55; }

.contact {
  max-width: 1132px;
  margin: 88px auto;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: radial-gradient(ellipse at 0 0, rgba(34, 211, 238, 0.045), transparent 65%), var(--bg-2);
}

.contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.contact h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); line-height: 1.2; }
.contact-badge { padding: 0; border: 0; background: none; margin-bottom: 24px; font-size: 0.76rem; }
.contact-sub { font-size: 0.94rem; line-height: 1.8; margin-bottom: 24px; }
.contact-list { gap: 0; }
.contact-list li { padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; gap: 5px; }
.contact-list a { overflow-wrap: anywhere; font-size: 0.94rem; }
.contact-list li > span:last-child { font-size: 0.88rem; }
.contact-label { font-size: 0.65rem; }
.contact-form { min-width: 0; padding: 28px; gap: 20px; background: rgba(255, 255, 255, 0.025); border-radius: 20px; }
.field { min-width: 0; }
.field label { font-size: 0.78rem; }
.field input, .field textarea { width: 100%; min-width: 0; background: rgba(5, 7, 13, 0.45); border-radius: 10px; font-size: 1rem; }
.form-hint { font-size: 0.72rem; line-height: 1.6; }
.footer-inner { padding-block: 34px 16px; }
.footer-nav, .footer-links { gap: 20px; }
.footer-nav a, .footer-links a { font-size: 0.8rem; }
.footer-copy { font-size: 0.74rem; padding-bottom: 26px; }

@media (max-width: 1100px) {
  .nav-inner { gap: 20px; }
  .nav-links { gap: 18px; }
  .featured { grid-template-columns: minmax(0, 1fr) 140px; gap: 0 20px; }
  .contact { margin-inline: 24px; padding: 36px; }
  .contact-grid { gap: 32px; }
  #prozess, .about-grid { gap: 44px; }
}

@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 220px; min-height: 0; }
  .principles { gap: 20px; }
}

@media (max-width: 960px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 100px; }
  .story-copy { min-height: 210px; }
  .story-visual { justify-self: center; max-width: 440px; }
  .story-block h2 { max-width: none; }
  .story-visual svg { max-height: 46svh; }
  #prozess { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  #prozess .section-head { position: static; }
  #prozess h2 { max-width: 22ch; }
  .about-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px; }
  .about-badge { padding-inline: 12px; font-size: 0.72rem; }
  .about-facts { grid-template-columns: minmax(0, 1fr); }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .contact-sub { max-width: 54ch; }
}

@media (max-width: 720px) {
  .section { padding: 68px 24px; }
  .section-head { margin-bottom: 30px; }
  .section-head h2 { font-size: clamp(1.75rem, 5.8vw, 2.35rem); }
  .nav-inner { height: 68px; padding-inline: 20px; gap: 16px; }
  .mobile-nav { top: 68px; }
  .hero { min-height: 86svh; padding: 130px 24px 88px; }
  .hero h1 { font-size: clamp(2.15rem, 7.4vw, 3.4rem); }
  .h1-dim { font-size: 0.65em; }
  .badge { font-size: 0.68rem; margin-bottom: 28px; }
  .hero-sub { font-size: 0.92rem; line-height: 1.8; max-width: 44ch; margin-top: 24px; }
  .hero-actions { margin-top: 28px; }
  .hero-actions .btn { width: auto; }
  .scroll-hint { display: none; }
  .intro { padding-block: 28px 60px; }
  .intro-claim { font-size: clamp(1.35rem, 4.2vw, 1.8rem); }
  .story { height: auto; }
  .story-sticky { position: static; height: auto; overflow: visible; }
  .story-grid { display: flex; flex-direction: column; gap: 20px; padding: 12px 24px 52px; }
  .story-copy { width: 100%; min-height: 0; display: grid; gap: 0; }
  .story-progress { display: none; }
  .story-block, .story-block.is-active { position: static; padding: 26px 0; opacity: 1; transform: none; pointer-events: auto; border-top: 1px solid var(--line); }
  .story-kicker { font-size: 0.65rem; margin-bottom: 14px; }
  .story-block h2 { max-width: none; font-size: 1.5rem; margin-bottom: 12px; }
  .story-block p { max-width: 48ch; font-size: 0.9rem; }
  .story-visual { width: 100%; max-width: 420px; }
  .story-visual svg { max-height: none; }
  .story-visual .node-label-b { font-size: 20px; }
  .bento-card, .featured { padding: 26px; }
  .featured { display: block; }
  .mini-window { display: none; }
  .principles { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 20px; }
  .principle { padding-block: 18px; border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: 0; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .about-media { max-width: 320px; justify-self: start; }
  .about-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .about-badge { font-size: 0.8rem; }
  .marquee { padding-block: 20px; }
  .contact { margin: 48px 20px; padding: 28px; border-radius: 22px; }
  .contact-form { padding: 22px; }
  .footer-inner { align-items: flex-start; gap: 24px; }
  .footer-brand { flex-basis: 100%; }
  .footer-nav { flex-basis: 100%; gap: 12px 22px; }
}

@media (max-width: 480px) {
  .nav-inner > .btn-small { display: none; }
  .brand { font-size: 1.08rem; }
  .hero-actions { width: 100%; max-width: 340px; }
  .hero-actions .btn { width: 100%; }
  .bento { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .featured, .bento-card.wide { grid-column: auto; }
  .bento-icon { margin-bottom: 20px; }
  .bento-card.wide { gap: 18px; }
  .bento-card.wide h3 { font-size: 1.05rem; }
  .timeline { padding-left: 28px; }
  .timeline-rail { left: 4px; }
  .tstep-dot { left: -29px; width: 12px; height: 12px; }
  .tstep-card { padding: 22px; }
  .about-copy h2 { font-size: 1.85rem; }
  .contact { padding: 24px 20px; }
  .contact-form { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-claim .w { color: var(--text); }
  .intro-claim .w.accent { color: transparent; }
  .story { height: auto; }
  .story-sticky { position: static; height: auto; padding-block: 48px; }
  .story-copy { display: grid; gap: 28px; }
  .story-progress { display: none; }
  .story-block, .story-block.is-active { position: static; padding: 0; opacity: 1; transform: none; }
}
