/* Philipp Marenne — Seitenstruktur, die nicht Teil der DS-Komponenten ist
   (Hero-Layout, Sektionen, Footer, Theme-Toggle-Logik, Reveal-Animationen).
   Lädt NACH tokens.css und components.css. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/outfit-variable-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  color-scheme: light dark;
}

body {
  background-image:
    radial-gradient(ellipse 120% 80% at 0% -20%, rgba(232, 238, 245, 0.65) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(248, 246, 242, 0.9) 0%, transparent 45%);
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 120% 80% at 0% -20%, rgba(58, 95, 143, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(30, 45, 65, 0.6) 0%, transparent 45%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background-image:
      radial-gradient(ellipse 120% 80% at 0% -20%, rgba(58, 95, 143, 0.12) 0%, transparent 55%),
      radial-gradient(ellipse 80% 50% at 100% 0%, rgba(30, 45, 65, 0.6) 0%, transparent 45%);
  }
}

/* ── Skip link ─────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--blue-900);
  color: var(--white);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ── Header: sticky + Theme-Toggle-Icons ──────────────────────────────── */

.pm-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.pm-header-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.pm-toggle { cursor: pointer; flex-shrink: 0; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.pm-toggle:hover { background: var(--color-bg); border-color: var(--color-link); color: var(--color-link); }
.pm-toggle:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* Light mode: moon visible (switch to dark). Dark mode: sun visible (switch to light). */
.pm-toggle .icon-sun  { display: none; }
.pm-toggle .icon-moon { display: block; }
[data-theme="dark"] .pm-toggle .icon-sun  { display: block; }
[data-theme="dark"] .pm-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pm-toggle .icon-sun  { display: block; }
  :root:not([data-theme="light"]) .pm-toggle .icon-moon { display: none; }
}

/* Reading progress bar */

#progress { display: none; }

@supports (animation-timeline: scroll()) {
  #progress {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--color-primary);
    transform-origin: left;
    z-index: 200;
    animation: progress-grow linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes progress-grow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
  }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.25rem var(--space-gutter) 4.5rem;
  display: grid;
  gap: var(--space-hero-gap);
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr min(38%, 400px);
    padding-top: 4.5rem;
    padding-bottom: 5.5rem;
    gap: 3.5rem;
  }
}

.hero-text { order: 2; }
.hero-visual { order: 1; justify-self: center; }

@media (min-width: 900px) {
  .hero-text { order: 0; }
  .hero-visual { justify-self: end; }
}

.hero .pm-display { font-size: clamp(2.35rem, 5vw, 3.35rem); }

.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-stack-s); margin-top: 2rem; }

.portrait-frame {
  margin: 0;
  width: min(100%, 400px);
  max-width: 100%;
}

.portrait-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 48px rgba(18, 26, 40, 0.12)) drop-shadow(0 10px 24px rgba(18, 26, 40, 0.07));
}

[data-theme="dark"] .portrait-frame img {
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.35)) drop-shadow(0 10px 28px rgba(0, 0, 0, 0.2));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .portrait-frame img {
    filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.35)) drop-shadow(0 10px 28px rgba(0, 0, 0, 0.2));
  }
}

/* ── Sektionen ─────────────────────────────────────────────────────────── */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--space-section) var(--space-gutter);
}

.pm-band {
  margin-top: 2.5rem;
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

.pm-band .logos-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.contact-section {
  padding-bottom: var(--space-section);
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}

/* Leistungen */

.services-grid {
  display: grid;
  gap: 1.5rem 2rem;
  align-items: start;
}

.services-main { min-width: 0; }

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2.5rem;
  }
}

.leistungen-intro {
  margin: 0 0 1.5rem;
  color: var(--color-text);
  font-size: 1.0625rem;
  line-height: 1.68;
}

.agency-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.9rem;
  max-width: 46ch;
}

.agency-note p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--color-text);
}

.services-keywords { align-self: start; }

.leistungen-disclaimer {
  margin: 5rem 0 0;
  max-width: none;
  color: var(--color-lead);
  font-size: 1.1rem;
  line-height: 1.65;
}

.leistungen-disclaimer p { margin: 0; color: inherit; }
.leistungen-disclaimer p + p { margin-top: 0.85rem; }

/* Referenzen: echte Kundenlogos statt Platzhaltertext */

/* Feste zwei 3er-Reihen statt variablem Flex-Umbruch */
.pm-logo-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 560px) {
  .pm-logo-row { grid-template-columns: repeat(2, 1fr); }
}

.pm-logo-slot { font-size: 0; width: 100%; }

.pm-logo-slot a { display: flex; align-items: center; }

.pm-logo-slot img {
  height: 48px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.pm-logo-slot a:hover img { opacity: 1; }

/* Kontaktkarte: auf schmalen Screens eine Spalte */

@media (max-width: 480px) {
  .pm-contact-list { grid-template-columns: 1fr; }
}

/* ── Inner pages (Impressum, Datenschutz) ─────────────────────────────── */

.page-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--color-heading);
  margin: 0 0 var(--space-heading-content);
}

.page-hero .pm-lead { max-width: 48ch; margin: 0; }

.prose {
  max-width: var(--prose-max);
  margin: 0 auto;
  padding: 0 1.5rem var(--space-section);
}

.prose > *:first-child { margin-top: 0; }

.prose h2 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--color-heading);
  margin: 2.25rem 0 var(--space-heading-content);
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 1.5rem 0 var(--space-heading-content);
}

.prose h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-lead);
  margin: 1.25rem 0 var(--space-heading-content);
}

[data-theme="dark"] .prose h4 { color: var(--blue-400); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .prose h4 { color: var(--blue-400); }
}

.prose p { margin: 0 0 1rem; color: var(--color-text-muted); }
.prose .pm-list { max-width: none; }
.prose a { font-weight: 600; }

.prose address.pm-card { margin: 1rem 0 1.5rem; font-style: normal; }
.prose address.pm-card p { margin: 0 0 0.5rem; }
.prose address.pm-card p:last-child { margin-bottom: 0; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--color-footer-border);
  padding: 1.5rem;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 1.25rem;
}

.footer-inner small { margin: 0; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
}

.footer-nav a:hover { color: var(--color-link); }

.footer-sep { opacity: 0.45; user-select: none; }

/* ── Animationen ───────────────────────────────────────────────────────── */

.hero-text { transition: opacity 0.55s ease, transform 0.55s ease; }
.hero-visual { transition: opacity 0.55s ease 0.15s, transform 0.55s ease 0.15s; }

@starting-style {
  .hero-text { opacity: 0; transform: translateY(22px); }
  .hero-visual { opacity: 0; transform: translateY(16px); }
}

@supports (animation-timeline: view()) {
  @keyframes reveal-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .section-head, .pm-logo-slot, .pm-contact {
    animation: reveal-up linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@supports not (animation-timeline: view()) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
}

@supports (view-transition-name: none) {
  ::view-transition-old(root) { animation: vt-fade-out 0.2s ease both; }
  ::view-transition-new(root) { animation: vt-fade-in 0.25s ease both; }
  @keyframes vt-fade-out { to { opacity: 0; transform: translateY(-6px); } }
  @keyframes vt-fade-in { from { opacity: 0; transform: translateY(6px); } }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #progress { display: none !important; }
}
