/* ============================================================
   Fritz Bäbler & Co. — Stylesheet
   Struktur: Tokens → Reset → Layout → Komponenten → Responsive
   ============================================================ */

/* ── DESIGN TOKENS ── */
:root {
  /* Farben */
  --stone:      #1a1612;    /* Haupthintergrund dunkel */
  --stone-2:    #221e19;    /* leicht aufgehellt */
  --sand:       #f4ede3;    /* Haupttext auf dunkel */
  --warm:       #ede5d8;    /* warmer Hellton */
  --warm-2:     #e0d6c8;    /* etwas dunkler */
  --concrete:   #9a8f83;    /* gedämpfter Subtext */
  --accent:     #c8440a;    /* Terrakotta-Akzent */
  --accent-h:   #e05520;    /* Hover */
  --white:      #faf8f5;    /* Fast-Weiss */

  /* Typografie */
  --font-display: 'Bebas Neue', sans-serif;
  --font-serif:   'DM Serif Display', serif;
  --font-body:    'DM Sans', sans-serif;

  /* Abstände */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Container */
  --max-w: 1200px;
  --gutter: clamp(1.25rem, 5vw, 3rem);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur:  0.25s;

  /* Schatten */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.18);
  --shadow-md: 0 8px 32px rgba(0,0,0,.28);
}


/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--stone);
  color: var(--sand);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .55;
}


/* ── LAYOUT UTILITIES ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── TYPOGRAPHY UTILITIES ── */
.eyebrow {
  display: block;
  font-size: clamp(.68rem, 1.5vw, .76rem);
  font-weight: 500;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.eyebrow--dark { color: var(--accent); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.1;
  color: var(--sand);
}
.section-title--dark { color: var(--stone); }

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}


/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fade-up {
  opacity: 0;
  animation: fadeUp .8s var(--ease) var(--delay, 0s) forwards;
}
.animate-fade-in {
  opacity: 0;
  animation: fadeIn 1s var(--ease) var(--delay, 0s) forwards;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }


/* ══════════════════════════════════════════
   KOMPONENTEN
══════════════════════════════════════════ */

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95rem 1.8rem;
  transition: background var(--dur) var(--ease),
              transform  var(--dur) var(--ease);
}
.btn svg { flex-shrink: 0; transition: transform var(--dur) var(--ease); }
.btn:hover svg { transform: translateX(5px); }
.btn--primary {
  background: var(--accent);
  color: var(--white);
}
.btn--primary:hover { background: var(--accent-h); transform: translateX(3px); }
.btn--full { width: 100%; justify-content: center; }


/* ── NAVIGATION ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(to bottom, rgba(26,22,18,.96) 0%, rgba(26,22,18,0) 100%);
  backdrop-filter: blur(4px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: .12em;
  color: var(--sand);
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo-initial { color: var(--accent); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav__link {
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--concrete);
  transition: color var(--dur);
}
.nav__link:hover { color: var(--sand); }
.nav__link--cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: .55rem 1.2rem;
}
.nav__link--cta:hover { background: var(--accent-h); }

/* Burger button (mobile only, hidden by default) */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  z-index: 210;
}
.nav__burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--sand);
  transition: transform var(--dur) var(--ease), opacity var(--dur);
}
.nav__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ── HERO ── */
.hero {
  min-height: 100svh;
  padding-top: 68px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(200,68,10,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero__content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 8vw, 6rem);
}

.hero__text { display: flex; flex-direction: column; align-items: flex-start; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 9vw, 9rem);
  line-height: .9;
  letter-spacing: .03em;
  color: var(--sand);
  margin-bottom: var(--space-6);
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  line-height: 1.7;
  color: var(--concrete);
  max-width: 36ch;
  margin-bottom: var(--space-8);
}

/* Hero visual */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero__visual picture { display: block; }
.hero__img {
  width: 100%;
  max-width: 380px;
  height: auto;
  aspect-ratio: 5/8;
  object-fit: cover;
  object-position: top center;
  filter: sepia(10%) contrast(1.08);
  border-bottom: 4px solid var(--accent);
  margin-inline: auto;
}
/* Fallback when img fails to load */
.hero__visual.img-fallback {
  background: var(--stone-2);
  min-height: 320px;
  border: 1px dashed var(--concrete);
  border-radius: 2px;
}

/* Wave divider */
.hero__wave {
  line-height: 0;
  margin-top: auto;
}
.hero__wave svg { width: 100%; height: 60px; }


/* ── MARQUEE ── */
.marquee-bar {
  background: var(--accent);
  padding: .75rem 0;
  overflow: hidden;
}
.marquee__track { overflow: hidden; }
.marquee__inner {
  display: inline-flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
}
.marquee__inner span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .15em;
  color: var(--white);
  flex-shrink: 0;
}
.marquee__inner .sep { color: rgba(255,255,255,.4); }

/* Pause on reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .marquee__inner { animation: none; }
}


/* ── SERVICES ── */
.services { padding-block: clamp(4rem, 8vw, 7rem); }
.section-sand { background: var(--sand); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(26,22,18,.13);
}

.service-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  border-right: 1px solid rgba(26,22,18,.13);
  border-bottom: 1px solid rgba(26,22,18,.13);
  transition: background var(--dur) var(--ease);
}
.service-card:nth-child(3n)   { border-right: none; }
.service-card:nth-child(n+4)  { border-bottom: none; }
.service-card:hover { background: var(--warm-2); }

.service-card__num {
  position: absolute; top: .8rem; right: 1.2rem;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
  opacity: .07;
  pointer-events: none;
  transition: opacity .4s, transform .4s;
}
.service-card:hover .service-card__num { opacity: .12; transform: scale(1.2) translate(-4px,-4px); }

.service-card__icon {
  width: 40px; height: 40px;
  color: var(--accent);
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

.service-card__name {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--stone);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}
.service-card__desc {
  font-size: .85rem;
  line-height: 1.65;
  color: #6a5e56;
}


/* ── ÜBER UNS ── */
.about {
  padding-block: clamp(4rem, 8vw, 7rem);
  background: var(--stone);
}
.about__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}

.about__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--concrete);
  line-height: 1.5;
  margin-top: var(--space-6);
  border-top: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  padding-block: var(--space-4);
}
.about__body {
  font-size: .9rem;
  line-height: 1.8;
  color: var(--concrete);
  margin-top: var(--space-4);
}

.about__stats {
  margin-top: var(--space-10);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}
.stat { border-left: 2px solid var(--accent); padding-left: var(--space-4); }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--sand);
  line-height: 1;
}
.stat__label {
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--concrete);
  margin-top: .2rem;
}


/* ── PORTRAIT ── */
.section-warm { background: var(--warm); }
.portrait {
  padding-block: clamp(4rem, 7vw, 6rem);
}
.portrait__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  max-width: 960px;
  margin-inline: auto;
}

.portrait__img-wrap {
  position: relative;
  flex-shrink: 0;
}
.portrait__img-wrap::after {
  content: '';
  position: absolute;
  bottom: -10px; right: -10px;
  width: 100%; height: 100%;
  border: 2px solid var(--accent);
  z-index: 0;
}
.portrait__img {
  position: relative;
  z-index: 1;
  width: clamp(160px, 22vw, 240px);
  height: auto;
  aspect-ratio: 4/5.7;
  object-fit: cover;
  object-position: top center;
  filter: sepia(8%) contrast(1.06);
  display: block;
}

.portrait__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.45;
  color: var(--stone);
  padding-left: var(--space-6);
  border-left: 3px solid var(--accent);
}
.portrait__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: .15em;
  color: var(--accent);
  margin-top: var(--space-6);
}
.portrait__role {
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #8a7d74;
  margin-top: .2rem;
}
.portrait__body {
  font-size: .88rem;
  line-height: 1.75;
  color: #5e524a;
  margin-top: var(--space-4);
}


/* ── KONTAKT ── */
.contact {
  background: var(--stone);
  padding-block: clamp(4rem, 8vw, 7rem);
}
.contact__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.contact__list { margin-top: var(--space-8); display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: var(--space-8); }
.contact__item { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.contact__icon {
  width: 38px; height: 38px;
  background: rgba(200,68,10,.1);
  border: 1px solid rgba(200,68,10,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.contact__text {
  font-size: .9rem;
  line-height: 1.65;
  color: var(--concrete);
}
.contact__text strong {
  display: block;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: .25rem;
}
.contact__link { color: var(--concrete); text-decoration: none; transition: color var(--dur); }
.contact__link:hover { color: var(--accent); }


/* ── FOOTER ── */
.site-footer {
  background: #0f0d0b;
  padding-block: var(--space-8);
  border-top: 1px solid rgba(255,255,255,.06);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
}
.footer__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: .12em;
  color: var(--concrete);
}
.footer__logo span { color: var(--accent); }
.footer__logo-amp { color: var(--accent); }
.footer__address {
  font-size: .82rem;
  color: rgba(154,143,131,.6);
}
.footer__address a { color: inherit; text-decoration: none; transition: color var(--dur); }
.footer__address a:hover { color: var(--accent); }


/* ════════════════════════════════════════
   RESPONSIVE — TABLET  (< 1024px)
════════════════════════════════════════ */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(3n)  { border-right: 1px solid rgba(26,22,18,.13); }
  .service-card:nth-child(2n)  { border-right: none; }
  /* Last row bottom borders */
  .service-card:nth-last-child(-n+2) { border-bottom: none; }
  .service-card:nth-child(n+5)       { border-bottom: none; }
}


/* ════════════════════════════════════════
   RESPONSIVE — MOBILE  (< 768px)
════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Nav burger */
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: 0; top: 68px;
    background: rgba(26,22,18,.97);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-8);
    text-align: center;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
    backdrop-filter: blur(8px);
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__link { font-size: 1.1rem; letter-spacing: .25em; color: var(--sand); }
  .nav__link--cta { padding: .8rem 2rem; }

  /* Hero */
  .hero__content {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding-block: clamp(2rem, 6vw, 3.5rem);
  }
  .hero__text { order: 1; }
  .hero__visual {
    order: 0;
    max-width: 280px;
    margin-inline: auto;
    width: 100%;
  }
  .hero__img { max-width: 100%; }
  /* Services */
  .services__grid {
    grid-template-columns: 1fr;
    border: none;
  }
  .service-card {
    border: none !important;
    border-bottom: 1px solid rgba(26,22,18,.13) !important;
  }
  .service-card:last-child { border-bottom: none !important; }

  /* Portrait */
  .portrait__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    justify-items: center;
    text-align: center;
  }
  .portrait__quote { border-left: none; padding-left: 0; border-top: 3px solid var(--accent); padding-top: var(--space-4); }

  /* Contact */
  .contact__list { flex-direction: column; align-items: center; }

  /* Stats */
  .about__stats { grid-template-columns: 1fr; gap: var(--space-4); }
}


/* ════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE  (< 400px)
════════════════════════════════════════ */
@media (max-width: 400px) {
  .hero__title { font-size: clamp(3rem, 15vw, 4.5rem); }
  .hero__visual { max-width: 220px; }
}


/* ── ACCESSIBILITY: focus-visible ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── PRINT ── */
@media print {
  .site-header, .marquee-bar { display: none; }
  body { background: white; color: black; }
}
