/* =============================================
   grafinelle GmbH – Stylesheet
   ============================================= */

/* --- Design Tokens --- */
:root {
  --color-bg:        #F7F5F1;
  --color-dark:      #111111;
  --color-accent:    #4A7C00;
  --color-neutral:   #D4CFC4;
  --color-text:      #111111;
  --color-text-muted: #5a5550;

  --font-headline: 'Roboto Slab', Georgia, serif;
  --font-body:     'DM Sans', Arial, sans-serif;

  --max-width: 1100px;
  --section-padding: 96px;
  --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: var(--section-padding) 0;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in--delay {
  transition-delay: 0.15s;
}

/* --- Typography --- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
  display: block;
}
.eyebrow--light {
  color: var(--color-accent);
}

.section__headline {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 48px;
  color: var(--color-text);
}
.section__headline--light {
  color: #F7F5F1;
}
.section__intro {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 56px;
  margin-top: -32px;
}

.accent {
  color: var(--color-accent);
}

/* --- Accent Rule --- */
.accent-rule {
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  margin-bottom: 32px;
}

/* --- CTA Link --- */
.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 2px;
  transition: gap var(--transition), opacity var(--transition);
}
.cta-link:hover {
  gap: 12px;
  opacity: 0.8;
}

/* =============================================
   Header & Navigation
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.site-header.is-scrolled {
  background: rgba(247, 245, 241, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 1px 32px rgba(17, 17, 17, 0.08);
}

/* Logo & Nav weiß über Hero, dunkel nach Scroll */
.logo img {
  height: 60px;
  width: auto;
  filter: brightness(0) invert(1);
  transition: filter 0.4s ease;
}
.site-header.is-scrolled .logo img {
  filter: none;
}
.nav__link {
  color: rgba(255, 255, 255, 0.9);
}
.site-header.is-scrolled .nav__link {
  color: var(--color-text-muted);
}
.nav__link:hover,
.nav__link.is-active {
  color: #fff;
}
.site-header.is-scrolled .nav__link:hover,
.site-header.is-scrolled .nav__link.is-active {
  color: var(--color-text);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  position: relative;
  z-index: 101;
}

.nav__list {
  display: flex;
  list-style: none;
  gap: 40px;
}
.nav__link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--transition);
  position: relative;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}
.nav__link:hover,
.nav__link.is-active {
  color: var(--color-text);
}
.nav__link:hover::after,
.nav__link.is-active::after {
  width: 100%;
}

/* Mobile toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all 0.3s ease;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   Hero
   ============================================= */
/* --- Slide-in Animation --- */
@keyframes slideInLeft {
  from { transform: translateX(calc(-100% - 40px)); opacity: 0; }
  to   { transform: translateX(0);                  opacity: 1; }
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Gradient oben: schwarz → transparent für Lesbarkeit des Headers */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 115%; /* etwas größer für Parallax-Spielraum */
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  will-change: transform;
}

.hero__glass {
  position: relative;
  z-index: 2;
  background: rgba(247, 245, 241, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  padding: 48px 52px 48px 40px;
  max-width: 560px;
  border-radius: 16px;
  animation: slideInLeft 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero__headline {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 32px;
  color: var(--color-text);
}

/* =============================================
   Leistungen
   ============================================= */
.leistungen {
  background: var(--color-neutral);
  border-top: none;
}
.leistungen__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.leistung-card {
  background: rgba(247, 245, 241, 0.65);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: 0 2px 20px rgba(17, 17, 17, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.leistung-card:hover {
  box-shadow: 0 6px 32px rgba(17, 17, 17, 0.10);
  transform: translateY(-3px);
}
.leistung-card__title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 16px;
  color: var(--color-text);
}
.leistung-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* =============================================
   Über uns (dark)
   ============================================= */
.section--dark {
  background: var(--color-dark);
  color: #F7F5F1;
}
.ueber-uns {
  position: relative;
  overflow: hidden;
}
.ueber-uns__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  opacity: 0.35;
}
.ueber-uns__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  /* linksbündig: kein mx-auto */
}
.ueber-uns__text {
  color: rgba(247, 245, 241, 0.85);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* =============================================
   Projekte
   ============================================= */
.projekte {
  border-top: 1px solid var(--color-neutral);
}
.projekte__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: auto auto auto;
  gap: 0 48px;
}
.projekt-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  row-gap: 0;
}
.projekt-card__image {
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 8px;
}
.projekt-card__image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.projekt-card:hover .projekt-card__image img {
  transform: scale(1.03);
}
.projekt-card__logo {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding-bottom: 16px;
}
.projekt-card__logo img {
  height: 24px;
  width: auto;
  display: block;
}
.projekt-card__logo--mijo img {
  height: 40px;
}
.projekt-card__image--dark {
  background: #111111;
}
.projekt-card__image--dark img {
  object-fit: contain;
  object-position: center;
}
.projekt-card__title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.projekt-card__body p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 20px;
}
.projekt-link {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition), opacity var(--transition);
}
.projekt-link:hover {
  gap: 8px;
  opacity: 0.8;
}

/* =============================================
   Kontakt
   ============================================= */
.kontakt {
  background: #1a2e1a;
}
.kontakt__inner {
  max-width: 600px;
}
.kontakt .section__headline {
  color: var(--color-bg);
}
.kontakt__text {
  color: rgba(247, 245, 241, 0.75);
  font-size: 1.05rem;
  margin-bottom: 36px;
  margin-top: -24px;
}
.kontakt__email {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.15rem;
  color: #a8cc78;
  border-bottom: 1px solid #a8cc78;
  padding-bottom: 2px;
  transition: opacity var(--transition);
}
.kontakt__email:hover {
  opacity: 0.75;
}

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--color-dark);
  color: rgba(247, 245, 241, 0.5);
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer__copy {
  font-size: 0.875rem;
}
.site-footer nav {
  display: flex;
  gap: 28px;
}
.footer__link {
  font-size: 0.875rem;
  color: rgba(247, 245, 241, 0.5);
  transition: color var(--transition);
}
.footer__link:hover {
  color: #F7F5F1;
}

/* =============================================
   Unterseiten (Impressum / Datenschutz)
   ============================================= */
.subpage-main {
  padding: 80px 0 96px;
  min-height: 70vh;
}
.subpage-main h1 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 48px;
  padding-left: 20px;
  border-left: 4px solid var(--color-accent);
}
.subpage-main h2 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.15rem;
  margin: 36px 0 12px;
  color: var(--color-text);
}
.subpage-main p,
.subpage-main address {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  font-style: normal;
  margin-bottom: 12px;
  max-width: 640px;
}
.subpage-main a {
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent);
}
.subpage-main .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  border-bottom: none;
  margin-bottom: 48px;
  transition: color var(--transition);
}
.subpage-main .back-link:hover { color: var(--color-text); }

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 900px) {
  :root { --section-padding: 72px; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero__visual { order: -1; }
  .leistungen__grid {
    grid-template-columns: 1fr;
  }
  .projekte__grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }
}

@media (max-width: 680px) {
  :root { --section-padding: 56px; }
  .container { padding: 0 24px; }

  .hero { padding: 72px 0 56px; }
  .hero__headline { font-size: 1.75rem; }

  /* Mobile nav */
  .nav__toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--color-bg);
    padding: 40px 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--color-neutral);
  }
  .main-nav.is-open {
    transform: translateX(0);
  }
  .nav__list {
    flex-direction: column;
    gap: 32px;
  }
  .nav__link {
    font-size: 1.25rem;
  }

  .leistung-card { padding: 32px 24px; }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
}
