/* ==========================================================================
   Malermeister Götz – Stylesheet (Mobile First)
   Farben aus den Logos: Magenta #E4007C, Petrol #0099A1, Gold #8C6F29,
   Anthrazit #575756, Kontrast R203 G203 B205 (#CBCBCD)
   ========================================================================== */

:root {
  --magenta: #e4007c;
  --magenta-hover: #c8006d;
  --magenta-soft: rgba(228, 0, 124, 0.1);
  --teal: #0099a1;
  --gold: #8c6f29;
  --anthracite: #575756;
  --contrast: #cbcbcd;
  --dark: #282828;
  --dark-deep: #1f1f1f;
  --white: #ffffff;
  --paper: #f3f3f4;
  --line: #e2e2e4;
  --ink: #282828;
  --ink-soft: #5f5f62;
  --on-dark: rgba(255, 255, 255, 0.92);
  --on-dark-soft: rgba(255, 255, 255, 0.66);
  --line-dark: rgba(255, 255, 255, 0.12);

  --header-h: 72px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--magenta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 8vw, 4.6rem); }
h2 { font-size: clamp(2rem, 5.4vw, 3.2rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.015em; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }

.ico { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 1000;
  padding: 0.6rem 1rem; border-radius: 8px;
  background: var(--magenta); color: var(--white); text-decoration: none;
  transform: translateY(-200%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 52px; padding: 0.8rem 1.6rem;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.btn .ico { width: 1.1em; height: 1.1em; transition: transform 0.25s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn-primary { background: var(--magenta); color: var(--white); box-shadow: 0 10px 26px -12px rgba(228, 0, 124, 0.85); }
.btn-primary:hover { background: var(--magenta-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn-sm { min-height: 40px; padding: 0.45rem 1.15rem; font-size: 0.9rem; }
.btn-block { width: 100%; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 1rem; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--magenta);
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.eyebrow-light { color: var(--contrast); }
.eyebrow-light::before { background: var(--magenta); }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.35); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: block; flex-shrink: 0; }
.brand img { width: 98px; height: auto; mix-blend-mode: multiply; }

.menu-toggle {
  display: grid; place-items: center; width: 46px; height: 46px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--white);
  color: var(--ink); cursor: pointer;
}
.menu-toggle .ico { width: 24px; height: 24px; grid-area: 1 / 1; }
.menu-toggle .ico-close, .menu-toggle[aria-expanded="true"] .ico-open { display: none; }
.menu-toggle[aria-expanded="true"] .ico-close { display: block; }

.main-nav {
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
  background: var(--white);
  display: flex; flex-direction: column; gap: 1.5rem;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0s linear 0.3s;
  overflow-y: auto;
}
.main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav li + li { border-top: 1px solid var(--line); }
.main-nav ul a {
  display: block; padding: 1.05rem 0.25rem;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.main-nav ul a.is-active { color: var(--magenta); }
.nav-phone {
  display: inline-flex; align-items: center; gap: 0.6rem; align-self: flex-start;
  padding: 0.8rem 1.2rem; border-radius: 999px; background: var(--paper);
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.nav-phone .ico { color: var(--magenta); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 3.5rem;
  background: var(--dark); color: var(--on-dark);
}
.hero-media {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(28, 28, 28, 0.35) 0%, rgba(28, 28, 28, 0.55) 55%, rgba(28, 28, 28, 0.9) 100%);
}
.hero-inner { max-width: 1200px; }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero h1 span { color: var(--contrast); font-weight: 700; }
.hero-lead { font-size: clamp(1.05rem, 2.6vw, 1.25rem); color: var(--on-dark); max-width: 36rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-actions .btn { flex: 1 1 auto; }
.hero-facts {
  list-style: none; margin: 2.75rem 0 0; padding: 1.5rem 0 0;
  display: flex; flex-wrap: wrap; gap: 1.25rem 2.5rem;
  border-top: 1px solid var(--line-dark);
}
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--white); letter-spacing: -0.02em; line-height: 1.2; }
.hero-facts span { font-size: 0.85rem; color: var(--on-dark-soft); }

/* ---------- Bereiche ---------- */
.section { padding: clamp(4.5rem, 11vw, 7.5rem) 0; }
.section-paper { background: var(--paper); }
.section-white { background: var(--white); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark h2 { color: var(--white); }
.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }
.section-head-wide { max-width: none; }
.section-head-wide h2 { max-width: 44rem; }
.section-intro { font-size: 1.1rem; color: var(--ink-soft); }
.section-dark .section-intro { color: var(--on-dark-soft); }

/* ---------- Der Malermeister: Logo-Karten ---------- */
.brands { display: grid; gap: 1.25rem; }
.brand-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
}
.brand-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -26px rgba(0, 0, 0, 0.4); border-color: var(--contrast); }
.brand-logo { overflow: hidden; border-bottom: 4px solid var(--accent); }
.brand-logo img { width: 100%; aspect-ratio: 925 / 595; object-fit: cover; transition: transform 0.6s var(--ease); }
.brand-card:hover .brand-logo img { transform: scale(1.04); }
.brand-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem 1.5rem 1.6rem; }
.brand-body h3 { margin-bottom: 0.45rem; }
.brand-body p { color: var(--ink-soft); font-size: 0.97rem; }
.brand-link {
  margin-top: auto; display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.88rem; font-weight: 600; color: var(--accent);
  word-break: break-word;
}
.brand-link .ico { width: 1.05em; height: 1.05em; transition: transform 0.25s var(--ease); }
.brand-card:hover .brand-link .ico { transform: translateX(3px); }

/* ---------- Dein Ansprechpartner ---------- */
.person { display: grid; gap: clamp(2.5rem, 6vw, 4.5rem); align-items: center; }
.person-photo { position: relative; margin: 0; }
.person-photo::before {
  content: ""; position: absolute; inset: auto -12px -12px auto; width: 62%; height: 62%; z-index: 0;
  border-radius: var(--radius); background: var(--contrast);
}
.person-photo img {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 38% 30%;
  border-radius: var(--radius);
}
.person-photo figcaption {
  position: absolute; z-index: 2; left: 1rem; bottom: 1rem;
  display: flex; flex-direction: column;
  padding: 0.75rem 1.1rem; border-radius: 12px;
  background: rgba(255, 255, 255, 0.95); box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.45);
  border-left: 4px solid var(--magenta);
}
.person-photo figcaption strong { font-size: 1rem; line-height: 1.3; }
.person-photo figcaption span { font-size: 0.82rem; color: var(--ink-soft); }
.person-text .lead { font-size: 1.15rem; color: var(--ink); }
.person-text p { color: var(--ink-soft); }
.milestones {
  list-style: none; margin: 2rem 0 2.25rem; padding: 0;
  display: grid; gap: 0.75rem;
}
.milestones li {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 0.9rem 1.1rem; border-radius: 12px; background: var(--paper);
  border-left: 4px solid var(--contrast);
}
.milestones li:nth-child(1) { border-left-color: var(--gold); }
.milestones li:nth-child(2) { border-left-color: var(--teal); }
.milestones li:nth-child(3) { border-left-color: var(--magenta); }
.milestones strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; min-width: 3.2rem; }
.milestones span { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 3rem; }
.contact-info { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-info li { display: flex; align-items: center; gap: 0.9rem; color: var(--on-dark); }
.contact-info .ico {
  width: 44px; height: 44px; padding: 11px; border-radius: 12px;
  background: rgba(228, 0, 124, 0.16); color: #ff4fa7;
}
.contact-info a, .contact-info span { color: var(--white); text-decoration: none; font-weight: 500; line-height: 1.5; }
.contact-info a:hover { color: var(--contrast); text-decoration: underline; }

.contact-form {
  display: grid; gap: 1rem; align-content: start;
  padding: clamp(1.4rem, 4vw, 2.25rem); border-radius: var(--radius);
  background: var(--white); color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.field-row { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field > span { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 0.75rem 0.95rem;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23575756' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 18px; padding-right: 2.6rem;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: var(--white); border-color: var(--magenta); box-shadow: 0 0 0 4px var(--magenta-soft);
}
.field .is-invalid, .field input.is-invalid, .field textarea.is-invalid { border-color: #c62828; background: #fff5f5; }
.check { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.88rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0.15rem 0 0; flex-shrink: 0; accent-color: var(--magenta); }
.check input.is-invalid { outline: 2px solid #c62828; outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; font-size: 0.92rem; min-height: 1.4em; }
.form-status.is-success { color: #1b7f3b; font-weight: 600; }
.form-status.is-error { color: #c62828; font-weight: 600; }

/* ---------- Fußzeile ---------- */
.site-footer {
  background: var(--dark-deep); color: var(--on-dark-soft);
  padding: 1.75rem 0 calc(1.75rem + env(safe-area-inset-bottom));
  font-size: 0.88rem; border-top: 1px solid var(--line-dark);
}
.footer-inner { display: flex; flex-direction: column; gap: 0.9rem; }
.footer-inner p { margin: 0; }
.footer-credit { color: var(--on-dark-soft); }
.footer-credit a { font-weight: 600; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.footer-inner a, .link-btn {
  color: var(--contrast); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit;
}
.footer-inner a:hover, .link-btn:hover { color: var(--white); text-decoration: underline; }

/* ---------- Rechtstexte (Dialoge) ---------- */
.legal {
  width: min(760px, calc(100% - 2rem)); max-height: calc(100% - 2rem);
  padding: 0; border: 0; border-radius: var(--radius);
  background: var(--white); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
}
.legal::backdrop { background: rgba(20, 20, 20, 0.65); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.legal:target:not([open]) { display: block; position: fixed; inset: 0; margin: auto; z-index: 500; overflow: auto; }
.legal-inner { position: relative; padding: clamp(1.75rem, 5vw, 3rem); }
.legal h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); padding-right: 2.5rem; }
.legal h3 { font-size: 1.02rem; margin: 1.8rem 0 0.4rem; }
.legal p { color: var(--ink-soft); font-size: 0.95rem; }
.legal-date { margin-top: 2rem; font-size: 0.85rem !important; }
.legal-close {
  position: sticky; top: 0; float: right; margin: -0.5rem -0.5rem 0 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.legal-close:hover { border-color: var(--magenta); color: var(--magenta); }

/* ---------- Cookie-Hinweis ---------- */
.cookie {
  position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 300;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.2rem;
  padding: 1rem 1.2rem; border-radius: 16px;
  background: var(--dark); color: var(--on-dark); font-size: 0.9rem;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6); border: 1px solid var(--line-dark);
  animation: cookie-in 0.5s var(--ease) both;
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0; flex: 1 1 14rem; }
.cookie a { color: var(--white); }
@keyframes cookie-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Einblenden beim Scrollen ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (min-width: 640px) {
  .wrap { padding: 0 2rem; }
  .hero-actions .btn { flex: 0 0 auto; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .milestones { grid-template-columns: repeat(3, 1fr); }
  .milestones li { flex-direction: column; gap: 0.15rem; }
  .cookie { left: auto; right: 1.5rem; bottom: 1.5rem; max-width: 400px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 760px) {
  .brands { grid-template-columns: repeat(3, 1fr); }
  .brand-body { padding: 1.4rem 1.3rem 1.5rem; }
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --header-h: 88px; }
  .brand img { width: 120px; }
  .menu-toggle { display: none; }
  .main-nav {
    position: static; padding: 0; background: none;
    flex-direction: row; align-items: center; gap: 1.75rem;
    opacity: 1; visibility: visible; transform: none; overflow: visible;
  }
  .main-nav ul { display: flex; align-items: center; gap: 0.35rem; }
  .main-nav li + li { border: 0; }
  .main-nav ul a {
    padding: 0.55rem 1rem; border-radius: 999px;
    font-family: var(--font); font-size: 0.97rem; font-weight: 600; letter-spacing: 0;
    transition: color 0.2s, background 0.2s;
  }
  .main-nav ul a:hover { background: var(--paper); }
  .main-nav ul a.nav-cta { background: var(--magenta); color: var(--white); padding: 0.6rem 1.3rem; margin-left: 0.4rem; }
  .main-nav ul a.nav-cta:hover { background: var(--magenta-hover); }
  .main-nav ul a.nav-cta.is-active { color: var(--white); }
  .nav-phone { align-self: center; padding: 0; background: none; font-size: 0.95rem; line-height: 1; }
  .nav-phone:hover { color: var(--magenta); }

  .hero-media { object-position: 50% 50%; }
  .hero::after { background: linear-gradient(90deg, rgba(28, 28, 28, 0.55) 0%, rgba(28, 28, 28, 0.15) 60%, rgba(28, 28, 28, 0) 100%); }
  .hero-inner { padding-top: 2rem; }
  .brand-body { padding: 1.75rem 1.75rem 1.9rem; }
  .person { grid-template-columns: 1fr 1.05fr; }
  .person-photo img { aspect-ratio: 4 / 5; object-position: 36% 40%; }
  .person-photo::before { inset: auto -20px -20px auto; }
  .contact { grid-template-columns: 0.9fr 1.1fr; gap: 4.5rem; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .cookie, .contact-form, .hero-media { display: none !important; }
  .hero { min-height: auto; padding: 2rem 0; background: none; color: var(--ink); }
  .hero h1, .section-dark h2 { color: var(--ink); }
}
