/* ==========================================================================
   Komponenten (zu den Partials in templates/partials/)
   Wiederkehrendes Motiv: das rote Quadrat aus dem Logo.
   ========================================================================== */

/* Kicker & Überschriften -------------------------------------------------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--ink);
}
.kicker::before {
  content: "";
  flex-shrink: 0;
  width: 9px; height: 9px;
  background: var(--red);
}

.headline { font-size: var(--fs-h2); }
h1.headline { font-size: var(--fs-h1); letter-spacing: -0.03em; line-height: 1.05; }
.section-heading { max-width: 44rem; }
.section-heading__text { margin-top: 1.25rem; color: var(--muted); }

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}

/* Buttons & Pfeil-Links (eckig, wie das Logo) ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.75rem 1.6rem;
  border: 0;
  border-radius: 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn::after {
  content: "";
  width: 8px; height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.btn:hover::after { transform: translateX(3px) rotate(45deg); }
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--ink); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--ink); color: var(--white); }
.btn--small { min-height: 44px; padding: 0.6rem 1.15rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: var(--fw-bold);
  text-decoration: none;
}
.link-arrow__box {
  position: relative;
  display: inline-block;
  width: 36px; height: 36px;
  border: 1.5px solid currentColor;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s;
}
.link-arrow__box::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  margin: -4px 0 0 -6px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.link-arrow:hover .link-arrow__box { background: var(--red); border-color: var(--red); color: var(--white); }

/* Bild mit Logo-Quadrat --------------------------------------------------- */
.framed-image { position: relative; margin: 0 1.5rem 1.5rem 0; isolation: isolate; }
.framed-image::before {
  content: "";
  position: absolute;
  right: -1.5rem; bottom: -1.5rem;
  z-index: -1;
  width: 55%; height: 55%;
  border: 1.5rem solid var(--red);
}
.framed-image img { width: 100%; object-fit: cover; }

/* Listen ------------------------------------------------------------------ */
.square-list li { position: relative; padding-left: 1.1rem; line-height: 1.55; }
.square-list li + li { margin-top: 0.35rem; }
.square-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  background: var(--red);
}
.tag-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-list li {
  padding: 0.35rem 0.8rem;
  background: var(--grey);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

/* Nummerierte Zeilen (Akkordeon) ------------------------------------------ */
.rows { border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); transition: background-color 0.25s; }
.row__summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 0.25rem;
  cursor: pointer;
  list-style: none;
}
.row__summary::-webkit-details-marker { display: none; }
.row__number { min-width: 2.25rem; font-size: var(--fs-small); font-weight: var(--fw-bold); color: var(--red); }
.row__title { font-size: clamp(1.25rem, 1rem + 0.8vw, 1.75rem); transition: color 0.2s; }
.row__summary:hover .row__title { color: var(--red); }
.row__icon {
  position: relative;
  width: 40px; height: 40px;
  border: 1.5px solid var(--ink);
  transition: background-color 0.25s, border-color 0.25s, transform 0.3s var(--ease);
}
.row__icon::before,
.row__icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1.5px;
  margin: -0.75px 0 0 -7px;
  background: currentColor;
}
.row__icon::after { transform: rotate(90deg); transition: transform 0.3s var(--ease); }
.row[open] .row__icon { background: var(--red); border-color: var(--red); color: var(--white); }
.row[open] .row__icon::after { transform: rotate(0); }
.row__body { padding: 0 0.25rem 2rem calc(2.25rem + 1.75rem); max-width: 52rem; }
.row__text { margin-bottom: 1.25rem; color: var(--muted); }
.row__body .link-arrow { margin-top: 1.25rem; }
/* Zeilen ohne Nummer (z. B. FAQ): Titel links, Kästchen immer am Zeilenende */
.rows--plain .row__summary { grid-template-columns: 1fr auto; }
.rows--plain .row__body { padding-left: 0.25rem; }
@media (max-width: 599.98px) {
  .row__summary { gap: 1rem; }
  .row__body { padding-left: 0.25rem; }
}

/* Projektkacheln – Mosaik mit Parallax und Hover-Quadrat ---------------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 2rem + 3vw, 5rem) var(--col-gap);
}
.project-card__link { display: block; color: inherit; text-decoration: none; }
.project-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--grey);
}
.project-card__parallax {
  position: absolute;
  inset: -8% 0;               /* Reserve für die Parallax-Bewegung */
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.project-card__parallax img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale 0.9s var(--ease), filter 0.6s var(--ease);
}
.project-card:hover .project-card__parallax img { scale: 1.06; }

/* Rotes Quadrat wächst beim Hover aus der Ecke (Logo-Motiv) */
.project-card__corner {
  position: absolute;
  left: 0; bottom: 0;
  width: 72px; height: 72px;
  background: var(--red);
  transform: scale(0);
  transform-origin: left bottom;
  transition: transform 0.45s var(--ease);
}
.project-card__corner::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 12px; height: 12px;
  margin: -6px 0 0 -9px;
  border-top: 2px solid var(--white);
  border-right: 2px solid var(--white);
  transform: rotate(45deg);
}
.project-card:hover .project-card__corner { transform: scale(1); }

.project-card__body { padding-top: 1.25rem; }
.project-card__customer {
  display: block;
  margin-bottom: 0.75rem;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--muted);
}
.project-card__category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.35rem;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.project-card__category::before { content: ""; width: 7px; height: 7px; background: var(--red); }
.project-card__title {
  font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem);
  transition: color 0.3s var(--ease);
}
.project-card:hover .project-card__title { color: var(--red); }
.project-card__text { margin: 0.6rem 0 0; max-width: 36rem; color: var(--muted); }

/* Sammel-Kachel: Aufzählung mehrerer Kunden/Websites unter dem Titel */
.project-card__entries {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.project-card__entries li {
  padding: 0.35rem 0.8rem;
  background: var(--grey);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}
.project-card__entries li:has(a) { padding: 0; }
.project-card__entries a {
  display: block;
  padding: 0.35rem 0.8rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.project-card__entries a::after { content: " ↗"; color: var(--red); }
.project-card__entries a:hover { background: var(--red); color: var(--white); }
.project-card__entries a:hover::after { color: var(--white); }

/* Mosaik ab Tablet: breit / schmal im Wechsel, schmale Kacheln hochkant und versetzt */
@media (min-width: 768px) {
  .project-grid--mosaic { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .project-grid--mosaic .project-card:nth-child(4n+1) { grid-column: 1 / 8; }
  .project-grid--mosaic .project-card:nth-child(4n+2) { grid-column: 9 / 13; margin-top: clamp(4rem, 8vw, 9rem); }
  .project-grid--mosaic .project-card:nth-child(4n+3) { grid-column: 1 / 6; margin-top: clamp(-6rem, -4vw, -2rem); }
  .project-grid--mosaic .project-card:nth-child(4n+4) { grid-column: 7 / 13; margin-top: clamp(2rem, 4vw, 5rem); }
  .project-grid--mosaic .project-card:nth-child(4n+2) .project-card__media,
  .project-grid--mosaic .project-card:nth-child(4n+3) .project-card__media { aspect-ratio: 4 / 5; }
}

/* Gestaffeltes Einblenden */
.js .project-card[data-reveal]:nth-child(4n+2) { transition-delay: 0.12s; }
.js .project-card[data-reveal]:nth-child(4n+3) { transition-delay: 0.06s; }
.js .project-card[data-reveal]:nth-child(4n+4) { transition-delay: 0.18s; }

/* Logo-Raster ------------------------------------------------------------- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.logo-grid li {
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.logo-grid img {
  max-height: 56px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.8;
  mix-blend-mode: multiply;
  transition: filter 0.3s, opacity 0.3s;
}
.logo-grid li:hover img { filter: none; opacity: 1; }
.logo-grid__name { font-size: 1.375rem; font-weight: var(--fw-bold); letter-spacing: -0.01em; }
@media (min-width: 768px) { .logo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Kennzahlen -------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(3rem, 2rem + 3vw, 5rem) 0 0;
  border-top: 1px solid var(--line);
}
.stats__item {
  display: flex;
  flex-direction: column-reverse;
  padding: 1.75rem 1.25rem 0 0;
}
.stats__value {
  margin: 0;
  font-size: clamp(2.5rem, 1.8rem + 2vw, 3.75rem);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--red);
}
.stats__label { margin-top: 0.5rem; font-weight: var(--fw-medium); }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats__item + .stats__item { padding-left: 1.5rem; border-left: 1px solid var(--line); }
}

/* Prozessschritte --------------------------------------------------------- */
.steps { display: grid; gap: var(--col-gap); }
.steps__item { padding: 2rem; background: var(--white); }
.steps__item .kicker { color: var(--red); }
.steps__title { margin-bottom: 0.75rem; font-size: var(--fs-h3); }
.steps__text { color: var(--muted); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Kontakt: rotes Panel + Formular ----------------------------------------- */
.contact { display: grid; }
.contact__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  background: var(--red);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.contact__panel::after {
  /* angeschnittenes Logo-Quadrat */
  content: "";
  position: absolute;
  right: -5rem; bottom: -5rem;
  z-index: -1;
  width: 14rem; height: 14rem;
  border: 3rem solid rgba(255, 255, 255, 0.12);
}
.contact__panel .kicker { color: rgba(255, 255, 255, 0.85); }
.contact__panel .kicker::before { background: var(--white); }
.contact__panel .headline { font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); }
.contact__panel .section-heading__text { color: rgba(255, 255, 255, 0.85); }
.contact__person { display: flex; align-items: flex-end; gap: 1.5rem; margin-top: auto; }
.contact__photo {
  position: relative;
  flex-shrink: 0;
  box-sizing: content-box;
  width: 160px; height: 160px;
  border: 4px solid var(--white);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.45);
}
.contact__photo::after {
  /* kleines weißes Quadrat als Logo-Akzent */
  content: "";
  position: absolute;
  right: -12px; bottom: -12px;
  width: 24px; height: 24px;
  background: var(--white);
}
@media (max-width: 599.98px) {
  .contact__person { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .contact__photo { width: 120px; height: 120px; }
}
.contact__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.contact__name { margin: 0; font-size: 1.375rem; font-weight: var(--fw-bold); line-height: 1.2; }
.contact__role { margin: 0; font-size: var(--fs-small); opacity: 0.85; }
.contact__links { font-size: 1.125rem; font-weight: var(--fw-medium); }
.contact__links a { text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.45); }
.contact__links a:hover { border-bottom-color: var(--white); }
.contact__form { padding: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); background: var(--grey); }
@media (min-width: 1024px) {
  .contact { grid-template-columns: 5fr 7fr; }
}

/* Formular (Klassen werden in jukemedia.php an das Form-Plugin übergeben) -- */
.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.form > * { grid-column: 1 / -1; }
.form > .form__field--half { grid-column: span 1; }
@media (max-width: 599.98px) { .form > .form__field--half { grid-column: 1 / -1; } }
.form__field { margin: 0; }
.form__label-wrap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form__input {
  width: 100%;
  min-height: 54px;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  border-radius: 0;
  background: var(--white);
  font-size: var(--fs-small);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}
.form__input::placeholder { color: var(--muted); opacity: 1; }
.form__input:focus { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--red); }
.form__input--select {
  padding-right: 2.5rem;
  color: var(--muted);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2316181c' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 1rem center;
}
.form__input--select:has(option:checked:not([value=""])) { color: var(--ink); }
.form__input--textarea { min-height: 11rem; resize: vertical; }

.form .form-input-wrapper:has(.form__checkbox) { display: flex; align-items: flex-start; gap: 0.85rem; margin-top: 0.5rem; }
.form__checkbox {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin: 2px 0 0;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  appearance: none;
  cursor: pointer;
}
.form__checkbox:checked {
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M1 5l3.5 3.5L11 1'/%3E%3C/svg%3E") no-repeat center;
  border-color: var(--red);
}
.form label.inline { display: block !important; font-size: var(--fs-small); line-height: 1.55; color: var(--muted); }
.form label.inline a { color: var(--ink); text-underline-offset: 2px; }
.form .required { color: inherit; }
.form__actions { margin-top: 0.75rem; }

/* Spamschutz-Feld (Honeypot) für Menschen unsichtbar */
.form-honeybear { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; }
.form__field:has([data-grav-field="cap"]) { display: none; }

.form-errors, .form__errors { color: var(--red); font-size: var(--fs-small); }
.form__field.has-errors .form__input { border-color: var(--red); }
.notices {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border-left: 4px solid var(--red);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}
.notices.green, .notices.success { border-left-color: #1b7a3d; }

/* Fließtext (Impressum, Datenschutz …) ------------------------------------ */
.prose h2 { margin: 3.5rem 0 1.25rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.prose h3 { margin: 2.25rem 0 0.75rem; font-size: var(--fs-h3); }
.prose h4 { margin: 1.75rem 0 0.5rem; font-size: var(--fs-body); }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--red); text-underline-offset: 2px; overflow-wrap: anywhere; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.2rem; }
@media (min-width: 1024px) { .prose { grid-column: 3 / 11; } }

/* Blog -------------------------------------------------------------------- */
.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 2rem + 2vw, 4rem) var(--col-gap);
}
@media (min-width: 700px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.post-card__link { display: block; height: 100%; color: inherit; text-decoration: none; }
.post-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--grey);
}
.post-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: scale 0.9s var(--ease);
}
.post-card:hover .post-card__media img { scale: 1.05; }
.post-card:hover .project-card__corner { transform: scale(1); }
.post-card__body { padding-top: 1.25rem; }
.post-card__meta {
  margin: 0 0 0.5rem;
  font-size: var(--fs-kicker);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}
.post-card__title {
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  transition: color 0.3s var(--ease);
}
.post-card:hover .post-card__title { color: var(--red); }
.post-card__text { margin: 0.6rem 0 0; color: var(--muted); font-size: var(--fs-small); }

/* Seitenzahlen */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: clamp(3rem, 2.5rem + 2vw, 5rem);
  font-weight: var(--fw-medium);
}
.pager__list { display: flex; gap: 0.5rem; }
.pager__num {
  display: grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--line);
  text-decoration: none;
}
.pager__num:hover { border-color: var(--ink); }
.pager__num.is-active { background: var(--red); border-color: var(--red); color: var(--white); }
.pager__step { text-decoration: none; }
.pager__step:hover { color: var(--red); }

/* Beitrag */
.post-hero h1.headline { font-size: clamp(2.125rem, 1.4rem + 2.6vw, 3.5rem); max-width: 22ch; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 1.5rem 0 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--muted);
}
.post { padding-top: clamp(2.5rem, 2rem + 3vw, 5rem); }
.post__image { margin: 0 0 clamp(2.5rem, 2rem + 2vw, 4rem); }
.post__image img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
@media (min-width: 1024px) { .post__image { grid-column: 2 / 12; } }
.post__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 3rem 0 0 !important; padding: 0 !important; list-style: none; }
.post__tags li {
  padding: 0.35rem 0.75rem;
  background: var(--grey);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}
.post__author {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--red);
  background: var(--grey);
  font-size: var(--fs-small);
  color: var(--muted);
}
.post__author-name { margin-bottom: 0.25rem; font-weight: var(--fw-bold); color: var(--ink); }
