
:root {
  --ink: #07140d;
  --ink-2: #0b1d13;
  --forest: #102419;
  --forest-2: #173126;
  --gold: #d5aa50;
  --gold-soft: #c99b49;
  --cream: #f3f0e6;
  --paper: #f6f3e9;
  --muted: #bbc3bc;
  --line: rgba(213,170,80,.24);
  --dark-line: rgba(7,20,13,.14);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--cream);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }

.dev-banner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px 20px;
  background: var(--gold);
  color: var(--ink);
  font-size: .78rem;
}
.dev-banner span { font-weight: 900; letter-spacing: .1em; }
.dev-banner p { margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 10px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(7,20,13,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand img {
  width: 76px;
  height: 66px;
  object-fit: contain;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #d7ddd8;
  font-size: .92rem;
}
.main-nav a {
  position: relative;
  transition: color .2s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -9px;
  height: 1px;
  background: var(--gold);
  transition: right .2s ease;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a:hover::after { right: 0; }
.menu-button {
  display: none;
  color: var(--cream);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.hero {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 56px;
  padding: 68px 0 84px;
}
.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-weight: 900;
  font-size: .76rem;
  letter-spacing: .18em;
}
h1, h2, h3 {
  margin-top: 0;
  line-height: 1.04;
}
h1 {
  margin-bottom: 28px;
  font-size: clamp(3.5rem, 7vw, 7.2rem);
  letter-spacing: -.055em;
}
h2 {
  margin-bottom: 26px;
  font-size: clamp(2.4rem, 4.7vw, 4.8rem);
  letter-spacing: -.045em;
}
h3 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}
.lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
}
.button.primary {
  background: var(--gold);
  color: var(--ink);
}
.button.ghost {
  border: 1px solid var(--line);
  color: var(--cream);
}
.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 42px;
}
.hero-signals span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d4dbd5;
  font-size: .8rem;
}
.hero-logo-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 540px;
}
.logo-halo {
  position: absolute;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(213,170,80,.12), rgba(213,170,80,0) 65%);
  filter: blur(8px);
}
.hero-logo {
  position: relative;
  width: min(100%, 600px);
  filter: drop-shadow(0 24px 38px rgba(0,0,0,.34));
}

.problem-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--forest);
}
.problem-inner {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 70px;
  align-items: end;
  padding: 80px 0;
}
.problem-inner h2 { margin-bottom: 0; }
.problem-inner > p:last-child {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.05rem;
}

.section {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
  padding: 104px 0;
}
.section-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 46px;
}
.section-index {
  color: var(--gold);
  font-weight: 900;
}
.section-heading {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
  align-items: end;
  margin-bottom: 50px;
}
.section-heading h2 { margin-bottom: 0; }
.section-heading p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 1.03rem;
}

.cards {
  display: grid;
  gap: 18px;
}
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  min-height: 370px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--forest), var(--ink-2));
}
.card-number {
  display: inline-block;
  margin-bottom: 54px;
  color: var(--gold);
  font-weight: 900;
  font-size: 1.15rem;
}
.card p { color: var(--muted); }
.card ul {
  list-style: none;
  padding: 16px 0 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
}
.card li {
  padding: 5px 0;
  color: #d1d8d2;
  font-size: .9rem;
}

.elchi-section {
  width: min(calc(100% - 48px), var(--max));
  margin: 20px auto 0;
  padding: 26px;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: 58px;
  background: var(--forest);
  border: 1px solid var(--line);
  border-radius: 28px;
}
.elchi-visual {
  min-height: 470px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(213,170,80,.10), transparent 55%),
    var(--ink-2);
  border-radius: 22px;
}
.elchi-visual img { width: min(88%, 450px); }
.large-copy {
  max-width: 670px;
  color: var(--muted);
  font-size: 1.08rem;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 34px;
}
.mini-grid div {
  padding: 18px;
  border-top: 1px solid var(--gold);
  background: rgba(7,20,13,.36);
}
.mini-grid strong, .mini-grid span { display: block; }
.mini-grid strong { margin-bottom: 5px; color: var(--gold); }
.mini-grid span { color: var(--muted); font-size: .86rem; }

.section.light {
  width: 100%;
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
  background: var(--paper);
  color: var(--ink);
}
.light .eyebrow, .light .section-index { color: #8e6d2d; }
.light .section-kicker { border-color: var(--dark-line); }
.light .section-heading p { color: #5a645d; }
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.knowledge-grid article {
  padding: 28px;
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.42);
}
.knowledge-grid article > span {
  color: #8e6d2d;
  font-size: .75rem;
  letter-spacing: .14em;
  font-weight: 900;
}
.knowledge-grid p { color: #5d675f; }

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.agent-grid article {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--forest);
}
.agent-grid article:first-child {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--forest-2), var(--forest));
}
.agent-grid span {
  color: var(--gold);
  font-weight: 900;
}
.agent-grid h3 {
  margin: 34px 0 5px;
  font-size: 1.08rem;
}
.agent-grid p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.project-section { padding-top: 60px; }
.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.projects article {
  min-height: 250px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--ink-2);
}
.project-top {
  display: flex;
  justify-content: space-between;
  color: var(--gold);
}
.project-top span { font-weight: 900; }
.project-top small { letter-spacing: .12em; }
.projects h3 { margin-top: 72px; }
.projects p { color: var(--muted); }

.about-section {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto 90px;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 80px;
  padding: 72px;
  background: var(--gold);
  color: var(--ink);
  border-radius: 28px;
}
.about-section .eyebrow { color: var(--ink); opacity: .72; }
.process {
  display: grid;
  gap: 0;
}
.process div {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid rgba(7,20,13,.24);
}
.process span { font-weight: 900; }
.process strong { font-size: 1.05rem; }

.footer {
  border-top: 1px solid var(--line);
  padding: 46px max(24px, calc((100vw - var(--max)) / 2));
  background: #050f09;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer-brand img {
  width: 86px;
  height: 76px;
  object-fit: contain;
}
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand strong { letter-spacing: .12em; }
.footer-brand span { color: var(--muted); font-size: .9rem; }
.footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

@media (max-width: 960px) {
  .hero,
  .problem-inner,
  .section-heading,
  .elchi-section,
  .about-section {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; }
  .hero-logo-wrap { min-height: 420px; }
  .cards.three, .knowledge-grid { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: repeat(2, 1fr); }
  .agent-grid article:first-child { grid-column: span 2; }
  .mini-grid { grid-template-columns: 1fr; }
  .about-section { padding: 44px; }
}

@media (max-width: 760px) {
  .dev-banner { align-items: flex-start; flex-direction: column; gap: 0; }
  .site-header { min-height: 74px; }
  .brand img { width: 62px; height: 54px; }
  .menu-button { display: inline-flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 18px;
    right: 18px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: var(--forest);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 22px 60px rgba(0,0,0,.36);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 10px; }
  .main-nav a::after { display: none; }
  .hero { padding-top: 48px; gap: 20px; }
  h1 { font-size: clamp(3.2rem, 16vw, 5rem); }
  h2 { font-size: clamp(2.2rem, 10vw, 3.6rem); }
  .hero-logo-wrap { min-height: 330px; }
  .problem-inner { gap: 28px; padding: 58px 0; }
  .section { padding: 76px 0; }
  .section-kicker { margin-bottom: 34px; }
  .agent-grid, .projects { grid-template-columns: 1fr; }
  .agent-grid article:first-child { grid-column: auto; }
  .elchi-section { padding: 16px; }
  .elchi-visual { min-height: 350px; }
  .about-section { padding: 32px 24px; }
  .footer-meta { flex-direction: column; }
}


/* ==========================================================
   V3.2 – SAFE RESPONSIVE + CACHE-SAFE PATCH
   ========================================================== */

html {
  scroll-padding-top: 108px;
}

body {
  overflow-x: hidden;
}

/* Only real navigation targets get anchor spacing. */
#start,
#leistungen,
#elchi,
#wissen,
#agenten,
#projekte,
#ueber-uns {
  scroll-margin-top: 108px;
}

/* Calmer heading hierarchy. */
h1 {
  font-size: clamp(3.15rem, 5.7vw, 6.15rem);
  line-height: 1.02;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.15rem, 3.8vw, 3.9rem);
  line-height: 1.08;
  text-wrap: balance;
}

/* Defensive asset sizing. */
.brand img {
  width: 76px !important;
  max-width: 76px !important;
  height: 66px !important;
  object-fit: contain;
}

.hero-logo {
  width: min(100%, 560px) !important;
  max-width: 560px !important;
  height: auto !important;
}

.elchi-visual img {
  width: min(88%, 450px) !important;
  max-width: 450px !important;
  height: auto !important;
}

.footer-brand img {
  width: 86px !important;
  max-width: 86px !important;
  height: 76px !important;
  object-fit: contain;
}

.hero-copy,
.hero-logo-wrap,
.section-heading > *,
.problem-inner > *,
.card,
.knowledge-grid article,
.agent-grid article,
.projects article {
  min-width: 0;
}

@media (max-width: 1100px) {
  .main-nav {
    gap: 20px;
    font-size: .88rem;
  }

  .hero {
    gap: 34px;
  }

  .hero-logo {
    max-width: 500px !important;
  }
}

@media (max-width: 960px) {
  html {
    scroll-padding-top: 96px;
  }

  #start,
  #leistungen,
  #elchi,
  #wissen,
  #agenten,
  #projekte,
  #ueber-uns {
    scroll-margin-top: 96px;
  }

  .hero-logo {
    max-width: 460px !important;
    margin-inline: auto;
  }

  h1 {
    font-size: clamp(3rem, 9vw, 5rem);
  }

  h2 {
    font-size: clamp(2.05rem, 6.5vw, 3.3rem);
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 84px;
  }

  #start,
  #leistungen,
  #elchi,
  #wissen,
  #agenten,
  #projekte,
  #ueber-uns {
    scroll-margin-top: 84px;
  }

  .hero,
  .section,
  .problem-inner,
  .elchi-section,
  .about-section {
    width: min(calc(100% - 32px), var(--max));
  }

  .brand img {
    width: 62px !important;
    max-width: 62px !important;
    height: 54px !important;
  }

  .hero-logo {
    max-width: 360px !important;
  }

  h1 {
    font-size: clamp(2.65rem, 13vw, 4rem);
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }
}

@media (max-width: 420px) {
  .hero-logo {
    max-width: 310px !important;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}


/* ==========================================================
   V3.3 – EXACT NAVIGATION + HEIGHT RESPONSIVE DESKTOP
   ========================================================== */

/* Navigation gets a slightly tighter gap now that "Start" is visible. */
.main-nav {
  gap: 24px;
}

/* The browser no longer needs to guess anchor offsets; JS positions targets exactly. */
#start,
#leistungen,
#elchi,
#wissen,
#agenten,
#projekte,
#ueber-uns {
  scroll-margin-top: 0;
}

/* Desktop windows with limited vertical space (e.g. 1366×768 / 1920×850). */
@media (min-width: 961px) and (max-height: 900px) {
  .site-header {
    min-height: 72px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand img {
    width: 62px !important;
    max-width: 62px !important;
    height: 54px !important;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    padding-bottom: 54px;
    gap: 44px;
  }

  .hero-logo-wrap {
    min-height: 430px;
  }

  .hero-logo {
    max-width: 470px !important;
  }

  h1 {
    font-size: clamp(3rem, 5vw, 5.2rem);
  }

  h2 {
    font-size: clamp(2rem, 3.15vw, 3.25rem);
  }

  .lead {
    font-size: 1rem;
  }

  .hero-signals {
    margin-top: 28px;
  }

  .problem-inner {
    padding-top: 54px;
    padding-bottom: 54px;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-kicker {
    margin-bottom: 28px;
  }

  .section-heading {
    margin-bottom: 30px;
  }

  .card {
    min-height: 0;
    padding: 24px;
  }

  .card-number {
    margin-bottom: 28px;
  }

  .elchi-section {
    margin-top: 0;
  }

  .elchi-visual {
    min-height: 360px;
  }

  .mini-grid {
    margin-top: 22px;
  }

  .agent-grid article {
    min-height: 142px;
    padding: 19px;
  }

  .agent-grid h3 {
    margin-top: 24px;
  }

  .projects article {
    min-height: 205px;
    padding: 24px;
  }

  .projects h3 {
    margin-top: 46px;
  }

  .about-section {
    margin-bottom: 60px;
    padding: 48px;
  }
}

/* Very short desktop/browser windows. */
@media (min-width: 961px) and (max-height: 760px) {
  .site-header {
    min-height: 64px;
  }

  .brand img {
    width: 54px !important;
    max-width: 54px !important;
    height: 47px !important;
  }

  .main-nav {
    font-size: .84rem;
    gap: 18px;
  }

  .hero {
    padding-top: 28px;
    padding-bottom: 38px;
  }

  .hero-logo-wrap {
    min-height: 350px;
  }

  .hero-logo {
    max-width: 390px !important;
  }

  h1 {
    font-size: clamp(2.7rem, 4.6vw, 4.4rem);
  }

  h2 {
    font-size: clamp(1.85rem, 2.8vw, 2.8rem);
  }

  .lead {
    line-height: 1.5;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-signals {
    margin-top: 20px;
  }

  .section,
  .problem-inner {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .card {
    padding: 20px;
  }

  .card-number {
    margin-bottom: 20px;
  }

  .card p,
  .card li {
    font-size: .86rem;
  }

  .agent-grid article {
    min-height: 122px;
  }

  .agent-grid h3 {
    margin-top: 18px;
  }

  .projects article {
    min-height: 180px;
  }

  .projects h3 {
    margin-top: 34px;
  }
}

/* Tablet/mobile: explicit Start link lives inside the menu as well. */
@media (max-width: 760px) {
  .main-nav {
    gap: 0;
  }
}


/* V3.4 – Projects anchor refinement */
.project-section {
  position: relative;
}

/* Keep the Projects label/title comfortably below the fixed navigation
   even in short desktop windows. */
@media (min-width: 961px) {
  .project-section .section-kicker {
    margin-top: 8px;
  }
}
