/* ===== Variables ===== */
:root {
  --accent: #0f3a4a;
  --brand: #f27400;
  --brand2: #ff9a3c;
  --glass: rgba(255,255,255,.04);
  --header-h: 80px;
  --ink: #e7eaee;
  --line: #20242c;
  --muted: #a7adba;
  --radius: 18px;
}

/* ===== Resets ===== */
* { box-sizing: border-box; }
html {
  background: #0a0d12;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.55;
  scroll-behavior: smooth;
}
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
section { scroll-margin-top: calc(var(--header-h) + 16px); }
.skip {
  background: #000;
  border-radius: 10px;
  color: #fff;
  left: 12px;
  opacity: 0;
  padding: 8px 12px;
  pointer-events: none;
  position: fixed;
  top: 8px;
  transform: translateY(-140%);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 3000;
}
.skip:focus { opacity: 1; pointer-events: auto; transform: none; }

/* ===== Background ===== */
.bg { inset: 0; overflow: hidden; position: fixed; z-index: -2; }
.blob { filter: blur(40px); mix-blend-mode: screen; opacity: .65; position: absolute; }
.b1 {
  animation: drift 28s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 30% 30%, rgba(242,116,0,.35), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(15,58,74,.5), transparent 55%);
  border-radius: 50%;
  height: 60vw;
  left: -10vw;
  top: -10vh;
  width: 60vw;
}
.b2 {
  animation: drift 34s ease-in-out 1s infinite alternate;
  background:
    radial-gradient(circle at 60% 40%, rgba(242,116,0,.25), transparent 60%),
    radial-gradient(circle at 40% 70%, rgba(15,58,74,.35), transparent 55%);
  border-radius: 50%;
  bottom: -15vh;
  height: 70vw;
  right: -20vw;
  width: 70vw;
}
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(3%,-3%,0); } }
.grid-overlay {
  background-image:
    linear-gradient(#0d1117 1px, transparent 1px),
    linear-gradient(90deg, #0d1117 1px, transparent 1px);
  background-size: 40px 40px;
  inset: 0;
  opacity: .18;
  position: absolute;
}

/* ===== Utils ===== */
.container { margin: auto; width: min(1120px, 92vw); }
.narrow { width: min(820px, 92vw); }
.subtle { backdrop-filter: blur(6px) saturate(1.2); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); }
.mt-xl { margin-top: 28px; }

/* ===== Header ===== */
.site-header {
  background: rgba(10,13,18,.65);
  backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  position: sticky;
  top: 0;
  z-index: 2100;
}
.header-inner {
  align-items: center;
  display: flex;
  gap: 18px;
  height: var(--header-h);
  justify-content: space-between;
}
.brand { align-items: center; display: flex; gap: 12px; min-width: 0; }
.brand-logo { filter: drop-shadow(0 6px 16px rgba(0,0,0,.45)); height: 56px; object-fit: contain; width: 56px; }
.brand-name { font-weight: 700; line-height: 1; white-space: nowrap; }
.brand-name span { display: block; font-size: 12px; letter-spacing: .08em; opacity: .75; white-space: nowrap; }
.nav { align-items: center; display: flex; gap: 22px; position: relative; }
.nav a { font-weight: 600; opacity: .95; }
.nav a:hover { opacity: 1; text-decoration: none; }
.nav .cta {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(242,116,0,.35);
  color: #111;
  padding: 10px 16px;
}

/* Larger CTA variant */
.nav .cta.cta-large { font-size: 1.1rem; padding: 14px 24px; }
.nav-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  display: none;
  gap: 6px;
  justify-content: center;
  padding: 10px;
  flex-direction: column;
}
.nav-toggle span { background: #e7eaee; border-radius: 2px; display: block; height: 2px; width: 28px; }

/* Desktop: push Anfragen button to the far right */
@media (min-width:901px){
  .nav a { order: 1; }
  #inquiryToggle { order: 2; margin-left: auto; }
}
@media (min-width:901px){
  #inquiryToggle{
    align-self: center;
    font-size: 0.95rem;
    padding: 8px 16px;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.2;
  }
}
@media (max-width:900px) {
  .nav-toggle { display: flex; }
  .nav {
    background: rgba(12,15,20,.98);
    backdrop-filter: blur(12px);
    border-top: 1px solid #1b2028;
    bottom: 0;
    display: none;
    flex-direction: column;
    gap: 8px;
    height: calc(100vh - var(--header-h));
    left: 0;
    overflow: auto;
    padding: 24px 20px;
    position: fixed;
    right: 0;
    top: var(--header-h);
    z-index: 2000;
  }
  .nav.open { display: flex; }
  .nav a { border-bottom: 1px solid #1b2028; font-size: 18px; padding: 16px 0; }

  /* Ensure Anfragen CTA is prominent on mobile */
  .nav .cta.cta-large { width: 100%; text-align: center; font-size: 1.25rem; padding: 16px 24px; }

  /* Keep dropdown floating over the list without shifting layout */
  .inquiry-menu { pointer-events: auto; }

  /* Extra spacing below CTA while menu is open so links remain clickable */
  .nav.open #inquiryToggle { margin-bottom: 84px; }
}

/* ===== Buttons ===== */
.btn {
  border: 1px solid #232936;
  border-radius: 999px;
  display: inline-block;
  padding: 12px 18px;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(242,116,0,.35);
  color: #111;
}
.btn.ghost { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border-color: #2a2f38; }
.btn.xl { font-size: 18px; padding: 14px 22px; }

/* ===== Hero ===== */
.hero { overflow: hidden; position: relative; border-bottom: 1px solid var(--line); }
.hero.hero-refined .eyebrow { opacity: .85; }
.hero-inner {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  min-height: 60vh;
  padding: 96px 0;
}
.hero h1 { font-size: clamp(40px, 7vw, 84px); letter-spacing: -.02em; margin: 0 0 12px; text-wrap: balance; }
.grad-text {
  -webkit-background-clip: text;
  animation: shineText 5s linear infinite;
  background: linear-gradient(90deg, #ffd6b0, var(--brand2), var(--brand));
  background-clip: text;
  background-size: 200% 100%;
  color: transparent;
}
@keyframes shineText { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.hero p { color: var(--muted); font-size: clamp(16px, 2.2vw, 18px); margin: 0 0 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-shapes { inset: 0; pointer-events: none; position: absolute; }
.ring { animation: grow 16s ease-in-out infinite; border: 1px solid rgba(255,255,255,.08); border-radius: 9999px; position: absolute; }
.r1 { height: 36%; left: 10%; top: 18%; width: 36%; }
.r2 { animation-delay: 3s; height: 52%; left: 24%; top: 10%; width: 52%; }
.r3 { animation-delay: 6s; height: 72%; left: 6%; top: 0; width: 72%; }
@keyframes grow { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: .35; transform: scale(1.08); } }

/* ===== Sections ===== */
.section { border-top: 1px solid var(--line); padding: 92px 0; position: relative; }
.section-divider-top::before {
  background: linear-gradient(90deg, transparent, rgba(242,116,0,.5), transparent);
  content: "";
  height: 1px;
  left: 0;
  right: 0;
  top: -1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .9s ease;
  position: absolute;
}
.section.in-view.section-divider-top::before { transform: scaleX(1); }
.section-head h2 { font-size: clamp(24px, 3.2vw, 36px); margin: 0 0 48px; }
.subheading { color: var(--muted); font-size: clamp(18px, 2.5vw, 24px); font-weight: 500; margin: -12px 0 22px; }
.lead { color: var(--muted); margin: 0 0 24px; }

/* ===== Grid / Tiles ===== */
.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;           /* ensure grid items fill row height */
}
.tile {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  backdrop-filter: blur(6px);
  border: 1px solid #232936;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 16px;
  position: relative;
  transition: box-shadow .35s ease, transform .35s ease, border-color .35s ease;
  display: flex;
  flex-direction: column;
  padding-bottom: 64px;
}
.grid > .tile { height: 100%; }

.tile h3 { font-size: 20px; margin: 12px 0 6px; }
.tile p { color: var(--muted); margin: 0; }
.ph {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, rgba(242,116,0,.18), rgba(15,58,74,.18));
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  transition: transform .4s ease;
}
.fx-glow:hover { border-color: #2f3746; box-shadow: 0 24px 60px rgba(242,116,0,.10), inset 0 0 0 1px rgba(255,255,255,.04); }
.fx-glow:hover .ph { transform: scale(1.03); }
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt:hover { transform: translateY(-8px) perspective(900px) rotateX(2deg) rotateY(-2deg); }
@media (max-width:1120px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:680px) { .grid { grid-template-columns: 1fr; } }

/* ===== Why ===== */
.points {
  display: grid;
  gap: 14px 24px;
  grid-template-columns: 1fr 1fr;
  margin: 20px 0 0;
  padding-left: 18px;
}
.points li {
  margin: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
.points.in-view li { opacity: 1; transform: none; }
.points.in-view li:nth-child(2) { transition-delay: .08s; }
.points.in-view li:nth-child(3) { transition-delay: .16s; }
.points.in-view li:nth-child(4) { transition-delay: .24s; }
@media (max-width:680px) { .points { grid-template-columns: 1fr; } }

/* ===== Kontakt + Map ===== */
.contact-info { padding-bottom: 18px; }
.contact-list {
  display: grid;
  gap: 10px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li { align-items: center; display: flex; gap: 10px; }
.contact-list i { color: #ffd6b0; text-align: center; width: 20px; }
@media (max-width:720px) { .contact-list { grid-template-columns: 1fr; } }
.map-spacing { margin-top: 24px; }
.map-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  backdrop-filter: blur(6px);
  border: 1px solid #232936;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  margin: 0 auto;
  max-width: 980px;
  overflow: hidden;
  width: 100%;
  position: relative;           /* make iframe absolutely fill */
  aspect-ratio: 16 / 7;         /* keep a nice proportion */
}
.map-card iframe {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== Footer ===== */
.site-footer { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); border-top: 1px solid var(--line); }
.footer-inner { align-items: center; display: flex; justify-content: space-between; padding: 18px 0; }
.footer-nav { display: flex; gap: 14px; }

/* ===== Reveal presets ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1.2s ease, transform 1.2s ease; }
.revealed { opacity: 1; transform: none; }
[data-anim="fade-up"] { transform: translateY(24px); }
[data-anim="fade-up-lg"] { transform: translateY(36px); }
[data-anim="scale-fade"] { transform: translateY(18px) scale(.96); }
.revealed[data-anim="scale-fade"] { transform: none; }

/* ===== Motion reduce ===== */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===== Tile image fit ===== */
.tile-img { background: transparent; display: block; inset: 0; object-fit: cover; object-position: center center; position: absolute; }

/* ===== Hero video bg ===== */
.hero-video { inset: 0; height: 100%; object-fit: cover; opacity: .38; position: absolute; width: 100%; z-index: -2; }
.hero-overlay {
  background: radial-gradient(80% 80% at 50% 40%, rgba(0,0,0,.25) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.78) 100%);
  inset: 0;
  position: absolute;
  z-index: -1;
}

/* ===== Fine-print ===== */
.fine-print {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  margin: 8px auto 0;
  opacity: .8;
  padding: 6px 10px;
  text-align: center;
  width: min(1120px, 92vw);
}
.fine-print::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  content: "";
  height: 1px;
  margin: 8px 0 10px;
  display: block;
}
@media (max-width:680px) { .fine-print { font-size: 9px; padding: 4px 8px; } }

/* ===== Inquiry dropdown ===== */
[inert], [hidden] { display: none !important; }
#inquiryToggle { margin-left: 14px; }
#inquiryToggle {
  border: none;
  outline: none;
}
#inquiryToggle:focus,
#inquiryToggle:active {
  outline: none;
  box-shadow: none;
}
.inquiry-menu {
  background: rgba(12,14,18,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  display: grid;
  gap: 8px;
  min-width: 240px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 2000;
}
.inquiry-menu::before {
  background: inherit;
  border-left: 1px solid rgba(255,255,255,.08);
  border-top: 1px solid rgba(255,255,255,.08);
  content: "";
  height: 14px;
  position: absolute;
  right: 18px;
  top: -8px;
  transform: rotate(45deg);
  width: 14px;
}
.inquiry-item {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,.06);
  border: 0;
  border-radius: 10px;
  color: #edf1f7;
  cursor: pointer;
  font: inherit;
  padding: 10px 12px;
  text-align: left;
}
.inquiry-item .title { display: block; font-weight: 600; line-height: 1.15; }
.inquiry-item .sub { display: block; font-size: 11px; opacity: .75; margin-top: 2px; line-height: 1.25; }
.inquiry-item:hover,
.inquiry-item:focus { background: rgba(255,255,255,.12); outline: none; }
@media (max-width:900px) {
  #inquiryToggle { margin-left: 0; }
  .nav .cta.cta-large { width: 100%; text-align: center; font-size: 1.25rem; padding: 16px 24px; }
  .nav.open #inquiryToggle { margin-bottom: 10px; }
  .inquiry-menu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 40px));
    top: 84px; /* under Anfragen */
    margin-top: 0;
    z-index: 2500;
    backdrop-filter: saturate(140%) blur(8px);
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
    padding: 10px;
  }
}

/* === Service pages & CTA additions === */
.btn.small { padding: 6px 12px; font-size: 0.9rem; border-radius: 999px; }
.tile-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
}

.tile-cta .btn.small {
  display: block;
  width: 100%;
  padding: 16px 18px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border: 0;
  color: #111;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: none;
  text-align: center;
  line-height: 1.2;
}
.tile-cta .btn.small:hover { filter: brightness(1.05); transform: none; }

/* Spacing utilities used on service pages */
.mt-l { margin-top: 18px; }
.mt-m { margin-top: 12px; }

/* Hero section for service subpages */
.service-hero { position: relative; padding: 96px 0 48px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.service-hero .container { position: relative; z-index: 1; }
.service-hero h1 { font-size: clamp(28px, 3.2vw, 42px); margin: 0 0 8px; }
.service-hero .lead { max-width: 60ch; }
.service-hero .hero-bg { position: absolute; inset: 0; opacity: .15; pointer-events: none; }

/* Content layout */
.service-content { padding: 32px 0 84px; }
.service-content .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.service-card { grid-column: span 8; background: var(--glass); border: 1px solid #232936; border-radius: var(--radius); padding: 24px; backdrop-filter: blur(6px); }
.service-aside { grid-column: span 4; }
@media (max-width: 900px) {
  .service-content .grid { grid-template-columns: 1fr; }
  .service-card, .service-aside { grid-column: span 1; }
}

/* Lists and boxes */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feature-list li { display: grid; grid-template-columns: 24px 1fr; align-items: start; gap: 12px; }
.feature-list i { margin-top: 3px; color: #ffd6b0; }

.price-box { border: 1px dashed rgba(255,255,255,.25); border-radius: 12px; padding: 14px; margin-top: 12px; background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); }

/* Breadcrumbs */
.breadcrumbs { font-size: .95rem; margin-bottom: 16px; opacity: .9; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.lightbox { position: fixed; inset:0; background: rgba(4,6,10,.85); backdrop-filter: blur(6px); display:none; align-items:center; justify-content:center; z-index: 4000; padding: 24px; }
.lightbox.active { display:flex; }

/* Dialog adapts to image, constrained by viewport */
.lightbox-dialog {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid #232936;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 92vh;  /* rely on viewport height */
  width: auto;
  height: auto;
  overflow: hidden;
}

.lightbox-media {
  display:flex;
  align-items:center;
  justify-content:center;
  background: #0b0f15;
  max-width: 100%;
  max-height: 100%;
}

/* Image scales by height first, never clipped */
.lightbox-media img {
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 85vh;  /* leave room for borders/close button */
  object-fit: contain;
}
.lightbox-bar { display: none; }
.lightbox-caption { display: none !important; }
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  appearance: none;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  border: 0;
  border-radius: 999px;
  color: #111;
  padding: 8px 14px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(242,116,0,.35);
}
.lightbox-close:hover,
.lightbox-close:focus-visible { filter: brightness(1.05); outline: none; }

/* ===== Lightbox arrow controls ===== */
.lightbox-dialog { position: relative; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(12,14,18,.45);
  backdrop-filter: blur(6px) saturate(120%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  line-height: 1;
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  background: rgba(12,14,18,.65);
  box-shadow: 0 14px 36px rgba(0,0,0,.55);
  outline: none;
}

@media (max-width: 680px) {
  .lightbox-prev, .lightbox-next { width: 48px; height: 48px; }
}

.service-card .gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.service-card .gallery > img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;        /* consistent tile shape */
  object-position: center;
  border-radius: 14px;         /* rounded corners */
  background: #0b0f15;         /* fallback bg */
  box-shadow: 0 16px 40px rgba(0,0,0,.30);
  border: 1px solid #232936;
  transition: transform .25s ease, box-shadow .25s ease;
}

.service-card .gallery > img:hover {
  transform: scale(1.02);
  box-shadow: 0 22px 60px rgba(0,0,0,.40);
}

@media (max-width: 900px){
  .service-card .gallery { grid-template-columns: 1fr 1fr; }
}

/* ===== Impressum page specific ===== */
.impressum-page .service-content .container {
  display: flex;
  justify-content: center;
}

.impressum-page .service-content .grid {
  display: flex;
  justify-content: center;
}

.impressum-page .service-card {
  grid-column: auto;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Datenschutz page specific ===== */
.datenschutz-page .service-content .container {
  display: flex;
  justify-content: center;
}

.datenschutz-page .service-content .grid {
  display: flex;
  justify-content: center;
}

.datenschutz-page .service-card {
  grid-column: auto;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}
