/* Zentrale Farb- und Layout-Variablen – hier anpassen, wirkt auf alle Seiten */
:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f5f66;
  --line: #e2e0da;
  --accent: #1f6f5c;
  --accent-text: #ffffff;
  --radius: 14px;
  --maxw: 1040px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517;
    --surface: #1d1f22;
    --text: #ececec;
    --muted: #a3a3ab;
    --line: #2e3034;
    --accent: #4fb495;
    --accent-text: #0f1412;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

header.site {
  padding: 28px 0 0;
}

header.site .brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}

.hero {
  padding: 56px 0 32px;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 60ch;
  margin: 0;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  padding: 24px 0 64px;
}

.tile {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tile .icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 16px;
}

.tile h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
}

.tile p {
  margin: 0 0 20px;
  color: var(--muted);
  flex: 1;
}

.tile .cta {
  font-weight: 600;
  color: var(--accent);
}

/* Unterseiten */
.page {
  padding: 40px 0 64px;
  max-width: 72ch;
}

.page h1 { margin-top: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.todo {
  background: #fff3c4;
  color: #5a4600;
  padding: 2px 6px;
  border-radius: 4px;
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

footer.site a {
  color: var(--muted);
  margin-right: 16px;
}

/* Hinweis "Seite im Aufbau" auf der Startseite */
.notice {
  margin-top: 28px;
  padding: 12px 16px;
  border-left: 4px solid #c0392b;
  background: var(--surface);
  border-radius: 6px;
  max-width: 60ch;
}

/* ------------------------------------------------------------------
   IT-Service: Scroll-Erzählung
   Jede Kategorie ist zwei Bildschirmhöhen hoch. Das Bild bleibt stehen
   (sticky), die Beschreibung scrollt in der zweiten Hälfte darüber.
   ------------------------------------------------------------------ */
.it-intro { padding-bottom: 32px; }

.scroll-hint {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  text-decoration: none;
}

.story-step {
  position: relative;
  height: 200vh;
  height: 200svh;
}

.story-media {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #111;
}

.story-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.2s ease;
}

/* Abdunklung, damit weiße Schrift auf jedem Bild lesbar bleibt */
.story-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: background 0.6s ease;
}

.story-heading {
  position: relative;
  z-index: 1;
  padding: 0 20px;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.7s ease;
}

.story-index {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  opacity: 0.8;
  margin-bottom: 8px;
}

.story-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1.1;
}

.story-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 20px 14vh;
  pointer-events: none;
}

.story-card {
  max-width: 42rem;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: rgba(20, 21, 23, 0.78);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #f2f2f2;
  font-size: 1.1rem;
  pointer-events: auto;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.story-card p { margin: 0; }

/* Mit JavaScript: Text zunächst ausgeblendet, beim Hineinscrollen einblenden */
.js .story-card { opacity: 0; transform: translateY(40px); }
.js .story-step.is-reading .story-card { opacity: 1; transform: none; }
.js .story-step.is-reading .story-heading { transform: translateY(-26vh) scale(0.8); }
.js .story-step.is-reading .story-media::after { background: rgba(0, 0, 0, 0.55); }
.js .story-step.is-reading .story-media img { transform: scale(1); }

.it-contact { padding-top: 64px; }

@media (prefers-reduced-motion: reduce) {
  .story-media img,
  .story-media::after,
  .story-heading,
  .story-card { transition: none; }
  .story-media img { transform: none; }
}
