:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.lang-en {
  display: none;
}

html[lang="en"] .lang-de {
  display: none;
}

html[lang="en"] .lang-en {
  display: revert;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.75rem 1rem;
  transform: translateY(-200%);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  transform: translateY(var(--header-lift, 0rem)) scale(var(--header-scale, 1));
  transform-origin: top center;
  transition: min-height 220ms ease, padding 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease, transform 160ms ease;
  will-change: transform;
}

.site-header.is-scrolled {
  min-height: 4.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  overflow: hidden;
  width: 2.65rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy strong {
  font-size: 0.9rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.72rem;
}

.site-nav,
.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links,
.nav-actions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a,
.nav-actions a,
.nav-actions button {
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.language-link {
  display: none;
  min-height: 2.4rem;
  align-items: center;
  justify-content: center;
  padding-inline: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.js .language-link {
  display: inline-flex;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero {
  display: grid;
  min-height: calc(100vh - 5.5rem);
  align-items: center;
  gap: 3rem;
  padding-block: 4rem 7rem;
}

.hero-copy h1 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(4.2rem, 10vw, 8.6rem);
  font-weight: 750;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

.hero-lead {
  max-width: 37rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.button-arrow {
  font-size: 1.1em;
}

.flow-canvas {
  position: relative;
  min-height: 34rem;
  overflow: hidden;
}

.flow-canvas svg {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.flow-shape {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  display: none;
  pointer-events: none;
  transform-origin: 50% 50%;
  will-change: transform;
}

.flow-canvas--interactive svg {
  z-index: 5;
  pointer-events: none;
}

.signal-core {
  position: absolute;
  z-index: 3;
  display: grid;
  width: 9rem;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  isolation: isolate;
  text-align: center;
}

.signal-core > img {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 43%;
  filter: saturate(0.78) contrast(1.06);
}

.signal-core::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgb(9 7 17 / 12%) 62%, rgb(9 7 17 / 78%) 100%);
  content: "";
}

.signal-status {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0.78rem;
  left: 0;
  display: block;
  margin: 0;
  color: #fff9f2;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-shadow: 0 1px 0 rgb(0 0 0 / 55%), 0 0 0.5rem rgb(0 0 0 / 65%);
  animation: signal-status-breathe 7.2s ease-in-out infinite;
  text-transform: uppercase;
}

.signal-status > span {
  display: block;
}

@keyframes signal-status-breathe {
  0%,
  100% {
    opacity: 0;
    text-shadow: 0 1px 0 rgb(0 0 0 / 55%), 0 0 0.5rem rgb(0 0 0 / 65%);
  }

  50% {
    opacity: 1;
    text-shadow: 0 1px 0 rgb(0 0 0 / 55%), 0 0 0.8rem rgb(255 249 242 / 32%), 0 0 1.2rem rgb(255 249 242 / 14%);
  }
}

.signal-tag {
  position: absolute;
  z-index: 4;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section {
  padding-block: clamp(5rem, 10vw, 9rem);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

.section-kicker {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-header h2,
.contact-card h2 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.section-intro {
  max-width: 50rem;
  margin: 0 0 1rem auto;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.7;
}

#about .section-header {
  margin-bottom: 2rem;
}

.about-grid,
.project-grid,
.capability-grid {
  display: grid;
  gap: 1rem;
}

.about-grid {
  grid-template-columns: repeat(3, 1fr);
}

.principle,
.project-card,
.capability-card,
.contact-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.principle {
  min-height: 15rem;
  padding: 1.6rem;
}

.principle-number {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.principle h3,
.project-card h3,
.capability-card h3 {
  margin: 2.2rem 0 0.75rem;
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.principle p,
.project-card p,
.capability-card p,
.contact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.project-grid {
  grid-template-columns: repeat(12, 1fr);
}

.project-card {
  grid-column: span 6;
  min-height: 24rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  text-decoration: none;
}

.project-card::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-image: var(--project-preview-overlay), var(--project-preview-url);
  background-position: center, right center;
  background-repeat: no-repeat;
  background-size: 100% 100%, auto 100%;
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.project-card.is-preview-active::after {
  opacity: 1;
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-card:nth-child(3),
.project-card:nth-child(4) {
  grid-column: span 6;
  min-height: 20rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card h3 {
  max-width: 12ch;
  margin-top: 4.5rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
}

.project-card p {
  max-width: 36rem;
}

.project-link {
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  display: grid;
  width: 3rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 1.2rem;
}

.capability-grid {
  grid-template-columns: repeat(2, 1fr);
}

.capability-card {
  min-height: 17rem;
  padding: 1.7rem;
}

.capability-card h3 {
  margin-top: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding: clamp(2rem, 7vw, 5rem);
}

.contact-card p {
  max-width: 42rem;
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.telegram-icon {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 2.5rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer a {
  font-weight: 800;
  text-decoration: none;
}

.legal-main {
  flex: 1;
  min-height: 0;
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

body.legal-page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
}

.legal-heading {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(3.5rem, 7.5vw, 5.5rem);
  letter-spacing: -0.07em;
  line-height: 0.88;
}

.legal-intro {
  max-width: 46rem;
  margin: 1.75rem 0 3rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 56rem;
}

.legal-card {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  background: var(--surface);
}

.legal-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-card p,
.legal-card address {
  margin: 0;
  color: var(--muted);
  font-style: normal;
  line-height: 1.75;
}

.legal-card a {
  color: var(--text);
  font-weight: 800;
}

.legal-back {
  margin-top: 2.5rem;
}

@media (max-height: 820px) and (min-width: 881px) {
  body.legal-page .legal-main {
    padding-block: 2rem;
  }

  body.legal-page .legal-intro {
    margin: 1rem 0 1.5rem;
  }

  body.legal-page .legal-back {
    margin-top: 1.5rem;
  }

  body.legal-page .site-footer {
    padding-block: 1.5rem;
  }
}

@media (max-height: 680px) and (min-width: 881px) {
  body.legal-page {
    height: auto;
  }

  body.legal-page .legal-main {
    min-height: min-content;
    padding-block: 0.5rem;
  }

  body.legal-page .legal-heading {
    font-size: clamp(3rem, 6vw, 4rem);
  }

  body.legal-page .legal-intro {
    margin: 0.75rem 0 1rem;
  }

  body.legal-page .legal-back {
    margin-top: 1rem;
  }

  body.legal-page .site-footer {
    padding-block: 1rem;
  }
}

@media (max-width: 880px) {
  body.legal-page {
    height: auto;
  }

  body.legal-page .legal-main {
    min-height: min-content;
  }
}

@media (max-width: 880px) {
  .site-header {
    top: 0.5rem;
    align-items: flex-start;
    padding-block: 1rem;
  }

  .site-header.is-scrolled {
    padding-block: 0.6rem;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 5rem;
  }

  .flow-canvas {
    min-height: 26rem;
  }

  .section-header,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .about-grid,
  .capability-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 1.25rem, 1180px);
  }

  .brand-copy {
    display: none;
  }

  .site-nav,
  .nav-actions {
    gap: 0.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.8rem, 21vw, 6rem);
  }

  .project-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card:nth-child(3),
  .project-card:nth-child(4) {
    grid-column: auto;
    min-height: 22rem;
  }

  .contact-actions {
    display: grid;
  }

  .contact-actions .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .signal-status {
    animation: none;
    opacity: 1;
    text-shadow: 0 1px 0 rgb(0 0 0 / 55%), 0 0 0.5rem rgb(0 0 0 / 65%);
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
}
