/* =========================
   Reset & Basics
========================= */
html,
body {
  min-height: 100%;
}

html {
  background: #111;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

/* =========================
   Dark/Light Mode Tokens
========================= */
:root {
  --brand-violet: #4B2382;
  --brand-red: #8B2323;
  --brand-white: #ffffff;

  --page-text: #ffffff;
  --page-text-muted: #e7ddf3;
  --heading-text: #ffffff;

  --link: #d8c4ff;
  --link-hover: #ffffff;

  --card-bg: rgba(75, 35, 130, 0.42);
  --card-bg-hover: rgba(75, 35, 130, 0.56);
  --card-border: rgba(255, 255, 255, 0.26);
  --card-border-hover: rgba(216, 196, 255, 0.55);
  --card-shadow: rgba(0, 0, 0, 0.42);
  --card-shadow-hover: rgba(0, 0, 0, 0.55);

  --selection-bg: rgba(139, 35, 35, 0.45);
  --background-overlay: rgba(18, 8, 31, 0.58);
  
  --input-bg: rgba(255,255,255,.12);
  --input-border: rgba(255,255,255,.35);
  --input-placeholder: rgba(255,255,255,.70);

}

@media (prefers-color-scheme: light) {
  :root {
    --page-text: #24162f;
    --page-text-muted: #4b3b59;
    --heading-text: #4B2382;

    --link: #4B2382;
    --link-hover: #8B2323;

    --card-bg: rgba(255, 255, 255, 0.62);
    --card-bg-hover: rgba(255, 255, 255, 0.78);
    --card-border: rgba(75, 35, 130, 0.22);
    --card-border-hover: rgba(75, 35, 130, 0.42);
    --card-shadow: rgba(75, 35, 130, 0.16);
    --card-shadow-hover: rgba(75, 35, 130, 0.25);

    --selection-bg: rgba(139, 35, 35, 0.22);
    --background-overlay: rgba(255, 255, 255, 0.42);
	
	--input-bg: rgba(255,255,255,.90);
	--input-border: rgba(75,35,130,.30);
	--input-placeholder: #777777;
  }
}

/* =========================
   Cover
========================= */

.hero {
    padding: 0;
}

.hero-image-link {
    display: block;
    overflow: hidden;
    border-radius: 24px;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .6s ease;
}

.hero-image-link:hover .hero-image {
    transform: scale(1.04);
}

.hero-text {
    display: none;
}

/* =========================
   Page Background
========================= */
html {
  background-color: #111;
  scroll-behavior: smooth;
}

header {
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

header:hover {
  transform: scale(1.03);
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow-x: hidden;

  font-family: system-ui, -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--page-text);

  background-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background-color: #111;
  background-image:
    linear-gradient(var(--background-overlay), var(--background-overlay)),
    url("bg.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* =========================
   Layout
========================= */
.container {
  position: relative;
  z-index: 1;

  width: min(900px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 0;
}

header {
  padding: 60px 0 40px;
  text-align: center;
}

header h1 {
  font-size: clamp(2rem, 6vw, 45px);
  line-height: 1.1;
  margin-bottom: 10px;
}

header p {
  color: var(--page-text-muted);
}

main {
  width: 100%;
}

section {
  width: 100%;
  margin: 60px auto;
}

.card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 32px);

  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: 0 16px 45px var(--card-shadow);

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);

  animation: softReveal 700ms ease both;
  transition:
    background 280ms ease,
    border-color 280ms ease,
    transform 280ms ease,
    box-shadow 280ms ease;
}

.card:hover,
.card:focus-within {
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  box-shadow: 0 22px 60px var(--card-shadow-hover);
  transform: translateY(-3px) scale(1.01);
}

.card:active {
  transform: scale(0.995);
}

footer .card {
  animation-delay: 120ms;
}

#kontakt {
    color: var(--brand-red);
    font-weight: 500;
}

@keyframes softReveal {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
    transition: none;
  }

  .card:hover,
  .card:focus-within {
    transform: none;
  }
}

footer {
  margin-top: 80px;
  padding: 30px 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--page-text-muted);
}

/* =========================
   Typography
========================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: normal;
  line-height: 1.1;
  color: var(--heading-text);
}

h2 {
  margin-bottom: 15px;
  font-size: clamp(1.6rem, 4vw, 36px);
  line-height: 1.2;
}

p {
  margin-bottom: 15px;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
  transition: color 180ms ease;
}

::selection {
  background: var(--selection-bg);
}

a:hover,
a:focus {
  color: var(--link-hover);
  text-decoration: underline;
}

.text-center {
  text-align: center;
}

/* =========================
   Responsive
========================= */
@media (max-width: 600px) {
  .container {
    width: min(100% - 24px, 900px);
  }

  header {
    padding: 42px 0 28px;
  }

  section {
    margin: 36px auto;
  }
}

/* =========================
   High Contrast Mode
========================= */

@media (prefers-contrast: more) {
  :root {
    --page-text: #ffffff;
    --heading-text: #ffffff;
    --card-border: #ffffff;
    --card-bg: #000000;
    --link: #ffffff;
  }
}

@media (prefers-contrast: more), (forced-colors: active) {
    .hero-image-link {
        display: none;
    }

    .hero-text {
        display: block;
        padding: 40px;
        text-align: center;
    }
}

/* =========================
   Call to action / Buttons
========================= */

button,
.button-like {
  background: var(--brand-violet);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

button:hover,
.button-like:hover {
  background: var(--brand-red);
  color: var(--brand-white);
}

.contact-form button {
    background: var(--brand-red);
}

.contact-form button:hover {
    filter: brightness(1.15);
}

/* =========================
	Forced Colors (Windows Accessibility)
========================= */
@media (forced-colors: active) {
  .card {
    border: 1px solid CanvasText;
    background: Canvas;
  }
}

/* =========================
	Print Stylesheet
========================= */
@media print {
  body::before {
    display: none;
  }

  .card {
    background: white;
    box-shadow: none;
    border: 1px solid #ccc;
    backdrop-filter: none;
  }

  a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}

@media print {
    .hero-image-link {
        display: none;
    }

    .hero-text {
        display: block;
    }
}

/* =========================
	FORM Stylesheet
========================= */
.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: block;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  font: inherit;
  color: var(--page-text);
  background: rgba(255, 255, 255, 0.10);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--input-placeholder);
}

.contact-form button {
  justify-self: start;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}

.privacy-note {
  font-size: 0.9rem;
  color: var(--page-text-muted);
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* =========================
   Kontakt
========================= */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 700px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================
   Accordion Cards
========================= */

.info-grid {
  width: min(100%);
  margin: 60px auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.info-grid .card {
    width: 100%;
    margin: 0;
}

.accordion-card {
  overflow: hidden;
  padding: 0;
  margin-bottom: 24px;
}

.accordion-card summary {
  list-style: none;
  cursor: pointer;

  padding: 24px 28px;

  font-size: clamp(1.2rem, 3vw, 28px);
  color: var(--heading-text);

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-card summary::-webkit-details-marker {
  display: none;
}

.accordion-card summary::after {
  content: "+";
  font-size: 1.5rem;
  transition: transform 240ms ease;
}

.accordion-card[open] summary::after {
  transform: rotate(45deg);
}

.accordion-content {
  padding: 28px;

  background-image:
    linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
    url("accordeon.png");

  background-size: cover;
  background-position: center;

  border-top: 1px solid rgba(255,255,255,0.18);

  animation: accordionReveal 240ms ease;
}

.accordion-content p {
  margin: 0;
  color: #ffffff;
}

@keyframes accordionReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .info-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Schach Scroll-Maskeneffekt
========================= */


.schach-parallax {

  height: clamp(260px, 42vw, 420px);

  margin: 24px 0;

  border-radius: 14px;

  overflow: hidden;

  background-color: #000;

  background-image: url("schach.jpg");

  background-repeat: no-repeat;

  background-size: 120% auto;

  background-position: center 30%;

  animation-name: schachScroll;

  animation-duration: 1s;

  animation-timing-function: linear;

  animation-fill-mode: both;

  animation-timeline: view();

  animation-range: entry 0% exit 100%;
}

@keyframes schachScroll {

  from {
    background-position: 20% 10%;
  }

  to {
    background-position: 80% 90%;
  }
}

/* =========================
   MapLibre
========================= */

#map {
    width: 100%;
    height: 500px;
    border-radius: 12px;
	border: 1px solid var(--card-border);
    overflow: hidden;
    margin-bottom: 15px;
}

/* =========================
   Carousel für Entlastungsangebote
========================= */

/* Mobil */
.carousel {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.carousel .card {
    flex: 0 0 100%;
    width: auto;
    margin: 0;
    scroll-snap-align: center;
    position: relative;
}

.swipe-hint {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 0.8rem;
    font-style: italic;
    opacity: .6;
    pointer-events: none;
}

/* Desktop */
@media (min-width: 900px) {
    .carousel {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        overflow: visible;
    }

    .carousel .card {
        width: 100%;
        flex: initial;
        scroll-snap-align: unset;
    }

    .swipe-hint {
        display: none;
    }
}