:root {
  --primary: rgba(30, 90, 115, 1);
  --secondary: rgba(29, 95, 140, 1);
  --tertiary: rgba(20, 65, 96, 1);
  --background-color: #f5f6fc;
  --footer-background: #334e68;
  --radius: 9px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Kumbh Sans", system-ui, sans-serif;
  color: var(--primary);
  background: var(--background-color);
  line-height: 1.55;
  letter-spacing: 0.01em;
}

img {
  display: block;
}

a {
  color: inherit;
}

/* ==========================================================
   Wrapper: gleicher seitlicher Abstand überall
   ========================================================== */
.wrap {
  padding-inline: 3vw;
}

/* ==========================================================
   General Section Styling
   ========================================================== */
.section-title {
  font-size: 2.1vw;
  line-height: 1.15;
  color: var(--tertiary);
  margin-bottom: 2rem;
}

/* ==========================================================
   Service Section
   ========================================================== */
.services-preview {
  padding-block: 2rem 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}

.service-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius);
  padding: 1.3rem;
  box-shadow: 0 0.5rem 1.2rem rgba(15, 23, 42, 0.05);
}

.service-card-icon {
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  margin: 0 auto 1rem;
}

.service-card h3 {
  color: var(--primary);
  font-size: 1.2vw;
  margin-bottom: 0.5rem;
}

.service-card p {
  color: rgba(15, 23, 42, 0.72);
  font-size: 1vw;
}

/* ==========================================================
   Contact Section
   ========================================================== */
.cta {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.cta-box {
  background: linear-gradient(
    135deg,
    rgba(20, 65, 96, 0.9),
    rgba(29, 95, 140, 0.9)
  );
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
}

.cta-title {
  font-size: 1.7vw;
  margin-bottom: 0.35rem;
}

.cta-text {
  color: rgba(255, 255, 255, 0.88);
  max-width: 60ch;
  font-size: 1vw;
}

.cta-button {
  display: inline-block;
  width: fit-content;
  background: #fff;
  color: var(--tertiary);
  text-decoration: none;
  font-weight: 700;
  font-size: 1vw;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
}

.cta-button:hover {
  opacity: 0.9;
}

/* ==========================================================
   Navbar
   ========================================================== */
/* Reserve the navbar's height before the header is injected, so the page
   doesn't jump on load. Matches the rendered navbar height (logo + padding). */
#main-header {
  display: block;
  min-height: calc(5.7vw + 2vh);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--background-color);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1vh;
}

.logo img {
  height: 5.7vw;
  width: auto;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.1vw;
}

.nav-item {
  display: inline-block;
  text-decoration: none;
  color: var(--primary);
  font-weight: 650;
  font-size: 1.2vw;
  letter-spacing: 0.01em;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.nav-item:hover {
  background-color: var(--primary);
  color: #fff;
}

/* Current page: primary underline (white on hover / in the mobile menu). */
.nav-item.active {
  position: relative;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: var(--radius);
  background: currentColor;
}

/* Kontakt call-to-action: filled button that stands out from the text links. */
.nav-item.nav-cta {
  background-color: var(--primary);
  color: #fff;
}

.nav-item.nav-cta:hover {
  background-color: var(--tertiary);
}

/* styling of hamburger menu in media query */
.ham-menu,
.off-screen-menu {
  display: none;
}

/* ==========================================================
   Footer
   ========================================================== */
.footer {
  background-color: var(--footer-background);
  color: #fff;
  padding: 3rem 3rem 1rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-list-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.data-impressum {
  color: #fff;
  opacity: 0.8;
}

.footer-copyright {
  margin: 1.75rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  opacity: 0.8;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}

/* Brand block: logo with a back-to-top arrow underneath. */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.to-top:hover {
  background-color: #fff;
  color: var(--primary);
  border-color: #fff;
  transform: translateY(-2px);
}

/* ==========================================================
   Hero
   ========================================================== */
.hero {
  position: relative;
  height: 75vh;
  background: #0b1f2a;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(11, 31, 42, 0.55) 0%,
    rgba(11, 31, 42, 0.22) 46%,
    rgba(11, 31, 42, 0.12) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2rem;
}

.hero-callout {
  max-width: min(24rem, 92%);
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(30, 90, 115, 0.28);
  backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.14);
}

.hero-callout-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
}

/* ==========================================================
   Intro - Section
   ========================================================== */
.intro {
  padding-bottom: 3vh;
}

.intro-title {
  font-size: 2.2vw;
  letter-spacing: 0.005em;
  line-height: 1.15;
  color: var(--tertiary);
  margin-bottom: 0.6rem;
}

.intro-text {
  font-size: 1.1vw;
  color: rgba(15, 23, 42, 0.72);
  max-width: 62ch;
}

/* ==========================================================
   Supplier - Section
   ========================================================== */
.supplier {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.supplier-logo {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5rem;
  align-items: center;
}

.supplier-logo a {
  display: block;
  text-decoration: none;
}

.supplier-logo img {
  width: 100%;
  height: 7rem;
  object-fit: contain;
}

/* ==========================================================
   Phone (bis 480px)
   ========================================================== */
@media (max-width: 480px) {
  .wrap {
    padding-inline: 4.5vw;
  }

  #main-header {
    min-height: calc(8vh + 2vh);
  }

  .navbar .nav-links {
    display: none;
  }

  .navbar .logo img {
    height: 8vh;
    width: auto;
  }

  /*--- Hamburger Button ---*/
  .ham-menu {
    display: block;
    position: relative;
    height: 40px;
    width: 50px;
    margin-left: auto;
    cursor: pointer;
    z-index: 80;
  }

  .ham-menu span {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 4px;
    width: 70%;
    background-color: var(--primary);
    border-radius: 25px;
    transform: translate(-50%, -50%);
    transition: 0.3s ease;
  }

  .ham-menu span:nth-child(1) {
    top: 25%;
  }

  .ham-menu span:nth-child(3) {
    top: 75%;
  }

  .ham-menu.active span:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .ham-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .ham-menu.active span:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  /*--- Slide-In Panel ---*/
  .off-screen-menu {
    display: block;
    position: fixed;
    top: 4.3rem;
    right: 0;
    z-index: 60;
    width: min(85vw, 18rem);
    max-height: calc(100dvh - 5.2rem);
    padding: 1.2rem;
    background-color: var(--primary);
    opacity: 0.9;
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: 0 0.8rem 1.8rem rgba(0, 0, 0, 0.24);
    overflow-y: auto;
    transform: translateX(110%);
    transition: transform 0.3s ease;
  }

  .off-screen-menu.active {
    transform: translateX(0);
  }

  .off-screen-menu .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .off-screen-menu .nav-item {
    color: #fff;
    font-size: 2vh;
  }

  /* Invert the CTA inside the dark mobile menu so it still pops. */
  .off-screen-menu .nav-item.nav-cta {
    background-color: #fff;
    color: var(--primary);
  }

  .footer-inner {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }

  .footer .logo img {
    height: 8vh;
    width: auto;
  }

  .hero {
    height: 40vh;
  }

  .hero-inner {
    align-items: flex-end;
    padding-bottom: 3vh;
  }

  .hero-callout {
    max-width: 75%;
    padding: 0.9rem 1rem;
  }

  .hero-callout-title {
    font-size: 1rem;
  }

  .intro-title {
    font-size: 6vw;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .cta-box {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .cta-button {
    font-size: 1rem;
    padding: 0.8rem 1.1rem;
  }

  .intro-text,
  .service-card p,
  .cta-text {
    font-size: 1rem;
  }

  /* supplier section */
  .supplier-logo {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .supplier-logo img {
    max-width: 9rem;
    height: 4rem;
  }
}

/* ==========================================================
   Tablet (481px – 1024px)
   ========================================================== */
@media (min-width: 481px) and (max-width: 1024px) {
  #main-header {
    min-height: 4.8rem;
  }

  .logo img {
    height: 3.8rem;
  }

  .nav-links {
    gap: 1.1rem;
  }

  .nav-item {
    font-size: 0.95rem;
    padding: 0.5rem 0.6rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .intro-title {
    font-size: 1.9rem;
  }

  .intro-text {
    font-size: 1.05rem;
  }

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

  .service-card h3 {
    font-size: 1.15rem;
  }

  .service-card p {
    font-size: 1rem;
  }

  .cta-title {
    font-size: 1.5rem;
  }

  .cta-text,
  .cta-button {
    font-size: 1rem;
  }

  .supplier-logo {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .supplier-logo img {
    height: 5rem;
  }

  /* Footer als 2×2-Raster statt gequetschter Einzeiler */
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem 3rem;
  }

  /* Block nur so breit wie das Logo, Inhalt zentriert → Pfeil sitzt
     horizontal mittig unter dem Haus (wie im Phone-Modus). */
  .footer-brand {
    width: fit-content;
  }

  .footer .logo img {
    height: 5rem;
  }
}
