.home-page,
.gipser-page {
  --home-gutter: clamp(22px, calc(6px + 3vw), 64px);
  --home-section-space: clamp(38px, 4.2vw, 70px);
  --home-paper: #f5f3ed;
  --home-stone: #e8e4da;
  --home-divider: #cac6bd;
  background: var(--home-paper);
}

.home-page {
  --home-end-bg: #282722;
  --home-end-ink: #f5f3ed;
  --home-end-muted: #d0c9be;
}

:is(.home-page, .gipser-page) .section-width {
  width: calc(100% - 2 * var(--home-gutter));
  max-width: none;
}

.home-news,
.home-company,
.home-projects,
.home-services,
.home-inquiry,
.gipser-section {
  padding-block: var(--home-section-space);
}

.home-header {
  align-items: center;
  height: auto;
  padding-block: 35px;
  padding-inline: var(--home-gutter);
}

.home-header .brand {
  width: clamp(200px, 23vw, 302px);
}

.home-header .header-actions {
  padding: 0;
}

.home-header .menu-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
}

.home-header #navigation {
  background: var(--home-paper);
  padding-inline: var(--home-gutter);
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  align-items: center;
  padding-block: 112px 96px;
  min-height: max(510px, 100vh);
  min-height: max(510px, 100svh);
  background: #dbd6c8;
  color: #f7f4ed;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgb(31 26 23 / 65%), transparent 24%),
    linear-gradient(90deg, rgb(37 31 27 / 66%), rgb(37 31 27 / 58%) 35%, transparent 72%);
  mask-image: linear-gradient(to bottom, transparent 11%, black 29%);
}

.home-hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% top;
  animation: home-photo-in .8s ease-out;
}

.home-hero h1 {
118ch;
  font-size: clamp(48px, 5.5vw, 92px);
1400;
  line-height: 1.035;
1-.025em;
  text-wrap: pretty;
}

.home-hero h2 {
  margin-top: clamp(18px, 2.4vw, 30px);
  font-size: clamp(20px, 2.4vw, 34px);
  letter-spacing: -.025em;
}

.home-hero-scroll {
  position: absolute;
  inset-inline-start: calc(50% - 25px);
  bottom: max(24px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid rgb(247 244 237 / 85%);
  border-radius: 50%;
  background: rgb(31 26 23 / 15%);
}

.home-hero-scroll > span {
  position: relative;
  width: 2px;
  height: 17px;
  border-radius: 1px;
  background: currentColor;
}

.home-hero-scroll > span::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.home-hero-scroll:hover { background: rgb(247 244 237 / 14%); }
.home-hero-scroll:focus-visible { outline-color: currentColor; }

@media (prefers-reduced-motion: no-preference) {
  .home-hero-scroll > span { animation: home-scroll-nudge 2.2s ease-in-out infinite; }
}

@keyframes home-scroll-nudge {
  0%, 24%, 78%, 100% { transform: translateY(0); }
  51% { transform: translateY(5px); }
}

.home-hero-socials {
  position: absolute;
  inset-inline-end: var(--home-gutter);
  bottom: 33px;
  display: flex;
  gap: 25px;
  font-size: 15px;
}

.home-hero-socials > * {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-block: 5px;
}

.home-hero-socials svg { flex: none; }

.home-hero-socials [aria-disabled="true"] { opacity: .75; }

.home-hero-socials a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.home-hero-socials a:focus-visible {
  outline-color: currentColor;
}

@keyframes home-photo-in {
  from { opacity: .76; }
  to { opacity: 1; }
}

.home-news {
  background: #ded9cf;
}

.home-news-grid {
  --news-gutter: clamp(18px, 2.7vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, .58fr) minmax(0, 1.75fr) repeat(2, minmax(0, 1fr));
}

.home-news-grid > h2 {
  padding-right: var(--news-gutter);
  font-size: clamp(31px, 3.1vw, 45px);
1-.012em;
}

.home-news-grid > h2::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin-top: 16px;
  background: var(--blue);
}

.home-news-story {
  display: flex;
  flex-direction: column;
  padding-inline: var(--news-gutter);
}

.home-news-story:last-child {
  padding-right: 0;
}

.home-news-story h3 {
  font-size: clamp(21px, 1.65vw, 26px);
1400;
1-.012em;
  line-height: 1.2;
  text-wrap: pretty;
}

.home-news-story--lead h3 {
  font-size: clamp(31px, 3.22vw, 47px);
1400;
  line-height: 1.12;
  text-wrap: balance;
}

.home-news-story p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.home-news-story details {
  margin-top: auto;
  padding-top: 20px;
}

.home-news-story > .home-news-category {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .07em;
  line-height: 1.35;
  text-transform: uppercase;
}

.home-news-story--lead > .home-news-category { color: var(--blue); }

.home-news-story summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
  padding-block: 3px 5px;
  border-bottom: 1px solid #918b80;
  font-size: 14px;
  font-weight: 500;
}

.home-news-story summary::-webkit-details-marker {
  display: none;
}

.home-news-story summary:hover,
.home-news-story summary:focus-visible {
  color: var(--blue);
  border-color: currentColor;
}

.home-news-story details:not([open]) summary span + span,
.home-news-story details[open] summary span:first-child {
  display: none;
}

.home-news-story details p {
  margin-top: 12px;
}

@media (min-width: 761px) and (max-width: 960px) {
  .home-news-grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }

  .home-news-grid > h2 { grid-column: 1 / -1; }
}

.home-section-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 72px);
  align-items: end;
}

.home-section-top h2 {
  font-size: clamp(32px, 4.1vw, 60px);
1-.012em;
}

.home-section-top > p,
.home-company-copy {
  max-width: 460px;
  color: var(--muted);
}

.home-services h2 {
  margin-bottom: clamp(24px, 3vw, 43px);
  font-size: clamp(34px, 4.1vw, 58px);
}

.home-service-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
  gap: 12px clamp(20px, 3.2vw, 46px);
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--home-divider);
}

.home-service-links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px 12px;
  padding-block: 20px 8px;
}

.home-service-links h3 {
  font-size: clamp(22px, 1.9vw, 30px);
  text-wrap: balance;
}

.home-service-links p {
  grid-column: 1 / -1;
  max-width: 30ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.home-service-arrow { font-size: 19px; }

.home-service-links a:is(:hover, :focus-visible) h3 {
  text-decoration: underline;
  text-underline-offset: .17em;
}

@media (min-width: 761px) and (max-width: 1080px) {
  .home-service-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.home-offer-layout {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  align-items: start;
  gap: clamp(30px, 6vw, 104px);
}

.home-offer-intro h2 {
  max-width: 16ch;
  margin: 0;
  text-wrap: balance;
}

.home-offer-intro p {
  max-width: 40ch;
  margin-top: clamp(15px, 2vw, 24px);
  color: var(--muted);
}

.home-offer-layout .home-service-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px) clamp(20px, 3vw, 44px);
  border-top: 0;
}

.home-offer-layout .home-service-links a { padding: 0; }

@media (max-width: 880px) {
  .home-offer-layout { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .home-offer-layout .home-service-links { grid-template-columns: 1fr; }
}

.home-inquiry,
.home-page .home-footer {
  background: var(--home-end-bg);
  color: var(--home-end-ink);
}

.home-inquiry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(24px, 5vw, 88px);
}

.home-inquiry h2 {
  font-size: clamp(32px, 4.4vw, 65px);
}

.home-inquiry p { color: var(--home-end-muted); }
.home-inquiry-layout p { max-width: 46ch; margin-top: 15px; }

.home-inquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 25px;
  align-items: center;
  font-size: 15px;
}

.home-inquiry-primary {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-height: 46px;
  padding: 10px 16px;
  color: var(--home-end-bg);
  background: var(--home-end-ink);
}

.home-inquiry-primary:hover { background: #fff; }
.home-inquiry-phone:hover { text-decoration: underline; text-underline-offset: 4px; }

.home-inquiry a:focus-visible,
.home-page .home-footer a:focus-visible { outline-color: var(--home-end-ink); }

.home-inquiry-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 4vw, 58px);
  margin: clamp(32px, 4.2vw, 60px) 0 0;
  padding: 0;
  list-style: none;
}

.home-inquiry-steps h3 { margin-bottom: 10px; font-size: clamp(21px, 2vw, 29px); }
.home-inquiry-steps p { max-width: 35ch; font-size: 15px; line-height: 1.55; }

@media (max-width: 760px) {
  .home-inquiry-layout { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .home-inquiry-steps { grid-template-columns: 1fr; }
}

.home-projects {
  background: var(--off-white);
}

.home-projects .home-section-top {
  grid-template-columns: 1fr auto;
}

.home-projects .text-link {
  justify-self: start;
}

.home-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 30px);
  margin-top: clamp(24px, 3vw, 42px);
}

.home-project-card {
  --project-inset: clamp(17px, 2.2vw, 34px);
  --project-shade: 26 23 20;
  display: block;
  color: #faf7ef;
}

.home-project-card figure {
  position: relative;
  isolation: isolate;
  display: grid;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #28251f;
}

.home-project-card img {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-project-card figcaption {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: var(--project-inset);
  background: linear-gradient(to top, rgb(var(--project-shade) / 86%), rgb(var(--project-shade) / 71%) calc(var(--project-inset) + 24px), transparent calc(var(--project-inset) + 74px));
}

.home-project-heading {
  position: relative;
  width: 100%;
}

.home-project-heading::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(-1 * var(--project-inset)) calc(-1 * var(--project-inset)) -46px;
  background: linear-gradient(to bottom, rgb(var(--project-shade) / 80%), rgb(var(--project-shade) / 68%) calc(100% - 46px), transparent);
}

.home-project-card h3 {
  max-width: 17ch;
  font-size: clamp(21px, 2.35vw, 37px);
1400;
  line-height: 1.12;
1-.012em;
  text-wrap: balance;
}

.home-project-card p {
  margin-top: 7px;
  color: #f5eee2;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.home-project-action {
  padding-bottom: 3px;
  border-bottom: 1px solid rgb(250 247 239 / 46%);
  font-size: 13px;
  font-weight: 600;
}

.home-project-action span { margin-left: 5px; }

.home-project-card:is(:hover, :focus-visible) .home-project-action {
  border-color: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .home-project-card img { transition: transform 300ms ease-out; }
  .home-project-card:is(:hover, :focus-visible) img { transform: scale(1.025); }
}

.home-company {
  background: var(--off-white);
}

.home-company-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(24px, 3vw, 52px);
}

.home-company h2 {
  --text-fade-original: 14%;
  max-width: 16ch;
  color: #25231f;
  font-size: clamp(32px, 3.35vw, 53px);
1400;
  line-height: 1.12;
1-.012em;
  text-wrap: balance;
}

.home-company-copy {
  max-width: 38ch;
  margin-top: clamp(20px, 2.4vw, 34px);
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.65;
}

@media screen and (forced-colors: none) {
  @supports ((background-clip: text) or (-webkit-background-clip: text)) and (color: color-mix(in srgb, black, white)) {
    .home-company :where(h2, p, .text-link) {
      --text-fade-tinted: color-mix(in srgb, #777674 97%, var(--blue));
      --text-fade-end: color-mix(in srgb, currentColor var(--text-fade-original, 70%), var(--text-fade-tinted));
      background-image: linear-gradient(to bottom, currentColor, var(--text-fade-end));
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .home-company ::selection { -webkit-text-fill-color: white; }
  }
}

.home-company-sketch {
  --sketch-overlap: clamp(28px, calc(11vw - 58px), 108px);
  width: calc(100% + var(--sketch-overlap));
  max-width: none;
  margin-block-start: calc(-1 * clamp(24px, 4.75vw, 92px));
  /* Den unteren Leerraum der Skizze bei der Abschnittshöhe ausgleichen. */
  margin-block-end: calc(-.75 * var(--home-section-space));
  margin-inline-start: calc(-1 * var(--sketch-overlap));
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  mix-blend-mode: multiply;
}

@media (max-width: 840px) {
  .home-company-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .home-company-sketch { width: 100%; margin: 0; }
}

.home-company-copy .text-link {
  margin-top: 21px;
  color: var(--ink);
}

.home-company-copy .text-link:hover {
  color: var(--blue);
}

.home-footer {
  background: var(--home-stone);
  padding-block: var(--home-section-space) 22px;
}

.home-footer-main {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 42px);
  align-items: start;
  padding-bottom: clamp(28px, 3.7vw, 48px);
  font-size: 15px;
  line-height: 1.55;
}

.home-footer-main .brand { width: clamp(160px, 17vw, 218px); }

.home-page .home-footer { padding-block-start: 0; }

.home-footer address { font-style: normal; }

.home-footer-contact { display: grid; justify-items: start; }

.home-footer-bottom,
.home-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 13px 23px;
}

.home-footer-bottom {
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px solid var(--home-divider);
  font-size: 14px;
}

.home-footer-bottom small { color: var(--muted); font-size: 13px; }
.home-page .home-footer-bottom { border-top: 0; padding-top: 0; }
.home-page .home-footer-bottom small { color: var(--home-end-muted); }

.home-footer a:not(.brand):hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.gipser-hero {
  min-height: max(480px, 72vh);
  min-height: max(480px, 72svh);
}

.gipser-hero .home-hero-image { object-position: center 52%; }

.gipser-hero p {
  max-width: 38ch;
  margin-top: 17px;
  font-size: clamp(17px, 1.7vw, 23px);
  line-height: 1.45;
}

.gipser-hero .text-link { margin-top: 23px; color: inherit; }
.gipser-hero .text-link:hover { opacity: .8; }

.gipser-section-heading { align-items: start; }
.gipser-section-heading p { font-size: clamp(16px, 1.3vw, 19px); }
.gipser-section-heading .text-link { justify-self: end; align-self: end; }

.gipser-offer,
.gipser-gallery {
  margin-top: clamp(24px, 3vw, 42px);
}

.gipser-offer li { padding-block: 20px 8px; }
.gipser-offer h3 { margin-bottom: 10px; }

.gipser-work { background: var(--off-white); }

.gipser-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 30px);
}

.gipser-gallery .project-image { align-self: start; }
.gipser-gallery .project-image img { height: auto; aspect-ratio: 4 / 3; }
.gipser-related .home-service-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1080px) {
  .gipser-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .home-header {
    height: auto;
    padding-block: 19px;
  }

  .home-header .brand {
    width: clamp(170px, 55vw, 235px);
  }

  .home-hero {
    min-height: max(450px, 100vh);
    min-height: max(450px, 100svh);
    padding-block: 100px 84px;
  }

  .home-hero-image {
    object-position: 67% top;
  }
  .home-hero::after {
    background: linear-gradient(
      to bottom,
      transparent 25%,
      rgb(37 31 27 / 66%) 46%,
      rgb(37 31 27 / 69%) 77%,
      rgb(31 26 23 / 76%) 100%
    );
    mask-image: none;
  }
  .home-hero h1 { font-size: clamp(34px, 8.25vw, 60px); }
  .home-hero-scroll { inset-inline-start: var(--home-gutter); bottom: max(14px, env(safe-area-inset-bottom)); }
  .home-hero-socials { bottom: 23px; gap: 21px; }

  .home-news-grid { grid-template-columns: 1fr; }
  .home-news-grid > h2 { padding: 0 0 20px; }
  .home-news-story { padding: 22px 0; }
  .home-news-story:last-child { padding-bottom: 0; }

  .home-section-top,
  .home-projects .home-section-top,
  .home-project-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .home-project-grid {
    gap: 35px;
  }

  .home-service-links { grid-template-columns: 1fr; }
  .home-service-links a { padding-block: 15px 5px; }
  .home-footer-main { grid-template-columns: 1fr; }

  .gipser-hero { min-height: max(450px, 72vh); min-height: max(450px, 72svh); }
  .gipser-hero .home-hero-image { object-position: 55% center; }
  .gipser-section-heading .text-link { justify-self: start; }
  .gipser-offer li { padding-block: 15px 5px; }
  .gipser-related .home-service-links { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .gipser-gallery { grid-template-columns: 1fr; }
}

/* Uniform MH-blue interactions on service and editorial subpages. */
.home-inquiry-primary:is(:hover, :focus-visible) { background: var(--blue); color: #fff; }
.home-company-copy .text-link:is(:hover, :focus-visible) { color: var(--blue); }
.gipser-hero .text-link:is(:hover, :focus-visible) { color: #fff; border-color: var(--blue); opacity: 1; }
.home-project-card:is(:hover, :focus-visible) .home-project-action { border-color: var(--blue); }
.home-footer a:not(.brand):is(:hover, :focus-visible) { text-decoration-color: var(--blue); }
.home-projects .text-link,
.home-project-action,
.home-news-story summary,
.home-inquiry-actions { font-size: 16px; }
.home-project-action span { margin-left: 16px; }
/* Use the same line motion in editorial modules and the shared footer. */
:is(.home-news-story summary, .home-inquiry-phone, .home-project-action, .home-footer a:not(.brand)) { position: relative; }
:is(.home-news-story summary, .home-inquiry-phone, .home-project-action, .home-footer a:not(.brand))::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--link-line-duration) var(--link-line-easing);
  pointer-events: none;
}
:is(.home-news-story summary, .home-inquiry-phone, .home-footer a:not(.brand)):is(:hover, :focus-visible)::after,
.home-project-card:is(:hover, :focus-visible) .home-project-action::after { transform: scaleX(1); }
.home-footer a:not(.brand):is(:hover, :focus-visible), .home-inquiry-phone:is(:hover, :focus-visible) { text-decoration: none; }
.home-news-story summary:is(:hover, :focus-visible) { border-color: #918b80; }
.gipser-hero .text-link:is(:hover, :focus-visible) { border-color: rgba(255, 255, 255, .55); }
.home-project-card:is(:hover, :focus-visible) .home-project-action { border-color: rgb(250 247 239 / 46%); }
.home-footer a:not(.brand) { width: fit-content; }

.home-inquiry-primary {
  background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 3px;
  min-height: 52px; padding: 14px 22px; font-weight: 600;
}
.home-inquiry-primary:is(:hover, :focus-visible) { background: #334CA9; border-color: #334CA9; color: #fff; }
@media (max-width: 760px) {
  .home-footer-contact a { min-height: 32px; display: flex; align-items: center; }
  .home-footer-nav a { min-height: 36px; display: inline-flex; align-items: center; }
}