/* Styles for CMS-driven content. Builds on the variables defined in style.css. */

/* ---------- Layout helpers ---------- */
.container-narrow {
  max-width: 900px;
}

.content-section {
  padding: var(--spacing-2xl) 0;
  background-color: var(--clr-neutral-100);
}

.content-section + .content-section {
  padding-top: 0;
}

/* Banner used on sub-pages and blog posts */
.hero.page-header {
  min-height: 40vh;
  background: linear-gradient(135deg, #f5f5f0 0%, #e8e8dc 100%);
}

.hero.page-header .hero-content {
  padding-top: 120px;
  padding-bottom: var(--spacing-xl);
}

.hero.page-header .hero-title {
  margin-bottom: var(--spacing-sm);
}

/* Thin strip for signed-in editors at the very top; the header moves down below it,
   so neither the logo nor the notices at the bottom are covered. */
.preview-bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1100;
  height: 26px;
  overflow: hidden;
  background: var(--clr-neutral-900);
  color: var(--clr-neutral-100);
  font-size: .75rem;
  line-height: 26px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.has-preview .header { top: 26px; }

/* The header floats over the page. Banners (.hero) leave room for it themselves; any other section
   placed first on a page starts below it, so its content is never covered by the logo or the menu. */
:root { --header-space: 100px; }
@media (min-width: 768px) { :root { --header-space: 110px; } }

main > :first-child:not(.hero):not(.dh-hero):not(article) { margin-top: var(--header-space); }
.has-preview main > :first-child:not(.hero):not(.dh-hero):not(article) { margin-top: calc(var(--header-space) + 26px); }

/* ---------- Rich text ---------- */
.prose {
  line-height: 1.8;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2 {
  color: #a5a894;
  font-family: var(--ff-heading);
  font-size: var(--fs-800);
  line-height: 1.3;
  margin-top: 2em;
}

.prose h3 {
  font-family: var(--ff-heading);
  font-size: var(--fs-600);
  line-height: 1.3;
  margin-top: 1.75em;
}

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

.prose a {
  color: var(--clr-primary-dark);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.prose a:hover {
  color: var(--clr-neutral-900);
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.35em;
}

.prose blockquote {
  padding-left: 1.25em;
  border-left: 3px solid var(--clr-primary);
  color: var(--clr-neutral-800);
  font-style: italic;
}

.prose img {
  border-radius: var(--radius-md);
}

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 0.6em 0.8em;
  border: 1px solid var(--clr-neutral-300);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--clr-neutral-200);
  font-family: var(--ff-heading);
}

/* ---------- Columns (grid) block ---------- */
.columns-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

.column-item img {
  width: 100%;
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-md);
}

@media (min-width: 640px) {
  .columns-grid.columns-2,
  .columns-grid.columns-3,
  .columns-grid.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .columns-grid.columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .columns-grid.columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Image block ---------- */
.image-block img {
  width: 100%;
  border-radius: var(--radius-lg);
}

.image-block figcaption {
  margin-top: var(--spacing-xs);
  color: var(--clr-accent);
  font-size: var(--fs-300);
  text-align: center;
}

/* ---------- Contact ---------- */
.contact-grid.contact-grid-single {
  grid-template-columns: 1fr;
}

/* Spam trap field: kept out of sight and out of the tab order */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Blog ---------- */
.blog-header .hero-subtitle a:hover { color: var(--clr-neutral-900); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--spacing-xl) var(--spacing-lg);
}

.post-grid-more {
  margin-top: var(--spacing-xl);
  text-align: center;
}

/* Cards */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--clr-neutral-100);
  border: 1px solid var(--clr-neutral-300);
  border-radius: var(--radius-lg);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.post-card-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--clr-accent-light);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-label {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: .2rem .7rem;
  border-radius: var(--radius-md); /* same as the buttons */
  background: var(--clr-neutral-100);
  color: var(--clr-neutral-900);
  font-family: var(--ff-heading);
  font-size: .75rem;
  letter-spacing: .03em;
}

.post-label-inline {
  position: static;
  margin-right: .35rem;
  background: var(--clr-accent-light);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-md) var(--spacing-lg);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .45rem;
  color: var(--clr-accent);
  font-size: var(--fs-300);
}

.post-meta a { text-decoration: underline; text-underline-offset: .15em; }

.post-card-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-600);
  line-height: 1.3;
  text-wrap: balance;
}

/* The whole card is clickable through the title link. */
.post-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-card-title a:focus-visible { outline: none; }
.post-card:has(.post-card-title a:focus-visible) { outline: 2px solid var(--clr-primary-dark); outline-offset: 3px; }

.post-card-excerpt {
  color: var(--clr-neutral-800);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.post-card-link {
  margin-top: auto;
  padding-top: var(--spacing-sm);
  color: var(--clr-primary-dark);
  font-family: var(--ff-heading);
}

.post-arrow { display: inline-block; transition: transform var(--transition-fast); }
.post-card:hover .post-arrow { transform: translateX(4px); }

/* Featured (newest) post */
.post-featured {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: var(--spacing-2xl);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--clr-accent-light);
}

.post-featured-image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.post-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.post-featured:hover .post-featured-image img { transform: scale(1.03); }

.post-featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg);
}

.post-featured-title {
  font-family: var(--ff-heading);
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  line-height: 1.2;
  text-wrap: balance;
}

.post-featured-title a:hover { color: var(--clr-primary-dark); }
.post-featured-excerpt { color: var(--clr-neutral-800); font-size: var(--fs-500); }
.post-featured .btn { margin-top: var(--spacing-xs); }

@media (min-width: 900px) {
  .post-featured { grid-template-columns: 1.15fr 1fr; }
  .post-featured-image { aspect-ratio: auto; min-height: 380px; }
  .post-featured-body { padding: var(--spacing-2xl) var(--spacing-xl); }
}

/* Filter */
.post-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-xl);
}

.post-filter a {
  padding: .4rem 1.1rem;
  border: 1px solid var(--clr-neutral-300);
  border-radius: var(--radius-md); /* same as the buttons */
  font-size: var(--fs-300);
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}

.post-filter a:hover { border-color: var(--clr-primary); }

.post-filter a.active {
  background: var(--clr-neutral-900);
  border-color: var(--clr-neutral-900);
  color: var(--clr-neutral-100);
}

.post-empty {
  padding: var(--spacing-2xl) 0;
  color: var(--clr-accent);
  text-align: center;
}

/* Single post */
.post-column { max-width: 760px; }
.post-wide { max-width: 1100px; }

.post-header.hero.page-header { min-height: 0; }
.post-header .hero-content { max-width: none; padding-bottom: var(--spacing-2xl); }
.post-header .hero-title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.15; text-wrap: balance; }

.post-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--clr-accent);
  font-family: var(--ff-heading);
  font-size: var(--fs-300);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.post-breadcrumb a:hover { color: var(--clr-neutral-900); }

.post-lead {
  margin-bottom: var(--spacing-md);
  color: var(--clr-neutral-800);
  font-size: var(--fs-600);
  line-height: 1.6;
}

.post-cover {
  margin-top: calc(var(--spacing-xl) * -1);
  position: relative;
  z-index: 1;
}

.post-cover img {
  width: 100%;
  max-height: 560px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.post-content.content-section { padding-top: var(--spacing-2xl); }

.prose-article { font-size: 1.0625rem; line-height: 1.85; }
.prose-article h2 { color: var(--clr-neutral-900); font-size: var(--fs-700); }
.prose-article h2::before { content: ""; display: block; width: 40px; height: 3px; margin-bottom: .6em; background: var(--clr-primary); }
.prose-article blockquote { margin-block: 2em; padding: 0 0 0 1.25em; color: var(--clr-neutral-900); font-family: var(--ff-heading); font-size: var(--fs-600); font-style: normal; line-height: 1.5; }
.prose-article img { margin-block: 1.5em; }
.prose-article li::marker { color: var(--clr-primary-dark); }

.post-footer {
  display: grid;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-2xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--clr-neutral-300);
}

.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacing-sm); }
.post-share span { color: var(--clr-accent); font-size: var(--fs-300); }

.post-share a {
  padding: .35rem 1rem;
  border: 1px solid var(--clr-neutral-300);
  border-radius: var(--radius-md);
  font-size: var(--fs-300);
}

.post-share a:hover { border-color: var(--clr-primary); color: var(--clr-primary-dark); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); }

.post-nav-link {
  display: grid;
  gap: .25rem;
  padding: var(--spacing-md);
  border: 1px solid var(--clr-neutral-300);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.post-nav-link:hover { border-color: var(--clr-primary); background: var(--clr-neutral-200); }
.post-nav-link span { color: var(--clr-accent); font-size: var(--fs-300); }
.post-nav-link strong { font-family: var(--ff-heading); font-weight: 500; line-height: 1.35; }
.post-nav-next { text-align: right; }

@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
}

.post-related { background: var(--clr-neutral-200); }
.content-section + .content-section.post-related { padding-top: var(--spacing-2xl); }

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-2xl);
  font-family: var(--ff-heading);
}

.pagination a:hover { color: var(--clr-primary-dark); }

.pagination .disabled {
  visibility: hidden;
}

.pagination-status {
  color: var(--clr-accent);
  font-family: var(--ff-primary);
  font-size: var(--fs-300);
}

/* ---------- Visual editor: section options ---------- */
section[data-bg="white"] { background: var(--clr-neutral-100); }
section[data-bg="light"] { background: var(--clr-neutral-200); }
section[data-bg="sand"] { background: var(--clr-accent-light); }
section[data-bg="olive"] { background: var(--clr-accent); }
section[data-bg="dark"] { background: var(--clr-neutral-900); }

section:is([data-bg="olive"], [data-bg="dark"]),
section:is([data-bg="olive"], [data-bg="dark"]) :is(h1, h2, h3, h4, .section-subtitle, .section-description, .prose h2, .post-meta) {
  color: var(--clr-neutral-100);
}

section:is([data-bg="olive"], [data-bg="dark"]) .prose a { color: inherit; }

section[data-pad="none"] { padding-block: 0; }
section[data-pad="sm"] { padding-block: var(--spacing-lg); }
section[data-pad="lg"] { padding-block: var(--spacing-3xl); }

/* An explicit choice wins over the "no gap between text sections" rule above. */
.content-section + .content-section[data-pad="sm"] { padding-top: var(--spacing-lg); }
.content-section + .content-section[data-pad="lg"] { padding-top: var(--spacing-3xl); }
.content-section + .content-section[data-bg]:not([data-bg=""]):not([data-pad]),
.content-section[data-bg]:not([data-bg=""]) + .content-section:not([data-pad]) { padding-top: var(--spacing-2xl); }

section[data-width="narrow"] > .container { max-width: 900px; }
section[data-width="wide"] > .container { max-width: 1440px; }
section[data-width="full"] > .container { max-width: none; }

@media (max-width: 767.98px) {
  [data-hide="mobile"] { display: none !important; }
}

@media (min-width: 768px) {
  [data-hide="desktop"] { display: none !important; }
}

/* ---------- Visual editor: elements ---------- */
.content-image {
  width: 100%;
  border-radius: var(--radius-lg);
}

.img-rounded { border-radius: var(--radius-lg); }
.img-circle { aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.img-natural { width: auto; }

.spacer { height: var(--spacing-xl); }
.spacer[data-size="sm"] { height: var(--spacing-md); }
.spacer[data-size="lg"] { height: var(--spacing-2xl); }
.spacer[data-size="xl"] { height: var(--spacing-3xl); }

.divider {
  margin: var(--spacing-lg) 0;
  border: 0;
  border-top: 1px solid var(--clr-neutral-300);
}

.btn-block { display: block; width: 100%; text-align: center; }

.content-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--clr-neutral-100);
  border: 1px solid var(--clr-neutral-300);
  border-radius: var(--radius-lg);
}

.content-card > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.content-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
}

.content-card-body h3 {
  font-family: var(--ff-heading);
  font-size: var(--fs-600);
  line-height: 1.3;
}

.content-card-body .btn { margin-top: auto; }

.testimonial {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.testimonial blockquote {
  font-family: var(--ff-heading);
  font-size: var(--fs-700);
  line-height: 1.4;
}

.testimonial figcaption {
  margin-top: var(--spacing-sm);
  color: var(--clr-accent);
}

.video-embed,
.map-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--clr-accent-light);
  border-radius: var(--radius-lg);
}

.video-embed iframe,
.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.accordion-item {
  border-bottom: 1px solid var(--clr-neutral-300);
}

.accordion-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  font-family: var(--ff-heading);
  font-size: var(--fs-500);
  cursor: pointer;
  list-style: none;
}

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

.accordion-item summary::after {
  content: "+";
  flex: none;
  color: var(--clr-primary-dark);
  font-size: var(--fs-700);
  line-height: 1;
}

.accordion-item[open] summary::after { content: "–"; }

.accordion-body { padding-bottom: var(--spacing-md); }

.gallery img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.embed-block { max-width: 900px; margin-inline: auto; padding: var(--spacing-2xl) var(--container-padding); }

/* Bootstrap's grid sits inside the site's own .container, which already has side padding. */
.container > .row { margin-inline: calc(var(--bs-gutter-x) * -.5); }

/* ---------- Uploaded logo ---------- */
.logo .logo-image {
  width: auto;
  height: 60px;
  max-width: min(60vw, 320px);
  object-fit: contain;
}

@media (min-width: 768px) {
  .logo .logo-image { height: 70px; }
}

.header.scrolled .logo .logo-image { height: 50px; }

.footer-logo .logo-image {
  width: auto;
  height: 60px;
  max-width: 100%;
  margin-bottom: var(--spacing-md);
  object-fit: contain;
}

/* ---------- Icons ---------- */
.service-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.service-icon[data-icon-style="plain"],
.service-icon[data-icon-style="large"] {
  background: none;
  color: var(--clr-accent);
}

.service-icon[data-icon-style="plain"] img { width: 70px; height: 70px; }

.service-icon[data-icon-style="large"] { width: 120px; height: 120px; }
.service-icon[data-icon-style="large"] :is(img, svg) { width: 120px; height: 120px; }

/* ---------- Sections with a background image (banners) ---------- */
section[data-bg-image] {
  position: relative;
  background-repeat: no-repeat;
}

/* The decorative line pattern of the hero would show through the photo. */
section[data-bg-image] .hero-background { display: none; }

section[data-overlay]:not([data-overlay=""])::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / var(--overlay, .45));
  pointer-events: none;
}

section[data-overlay="light"] { --overlay: .25; }
section[data-overlay="medium"] { --overlay: .45; }
section[data-overlay="strong"] { --overlay: .65; }

section[data-overlay]:not([data-overlay=""]) > * { position: relative; }

section[data-overlay]:not([data-overlay=""]),
section[data-overlay]:not([data-overlay=""]) :is(h1, h2, h3, h4, p, .hero-subtitle, .section-subtitle, .section-description) {
  color: var(--clr-neutral-100);
}

section[data-overlay]:not([data-overlay=""]) .btn-outline {
  border-color: var(--clr-neutral-100);
  color: var(--clr-neutral-100);
}

section[data-min] { display: flex; flex-direction: column; justify-content: center; }
section[data-min=""] { display: block; }
section[data-min="sm"] { min-height: 240px; }
section[data-min="md"] { min-height: 420px; }
section[data-min="lg"] { min-height: 620px; }
section[data-min="screen"] { min-height: 100vh; min-height: 100svh; }
section[data-min]:not([data-min=""]) > .container { width: 100%; }

/* ---------- Announcements ---------- */
.announcement-bar {
  --ann-bg: var(--clr-accent);
  --ann-fg: var(--clr-neutral-100);
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  background: var(--ann-bg);
  color: var(--ann-fg);
  box-shadow: 0 -4px 18px rgb(0 0 0 / .12);
  transform: translateY(100%);
  transition: transform var(--transition-base), bottom var(--transition-base);
}

.announcement-bar.is-visible { transform: none; }

.announcement-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm) var(--spacing-md);
  max-width: var(--container-width);
  margin-inline: auto;
  padding: .85rem var(--container-padding);
}

.announcement-text { flex: 1; min-width: 0; font-size: var(--fs-300); line-height: 1.5; }
.announcement-text strong { font-family: var(--ff-heading); font-size: var(--fs-400); }
.announcement-text .announcement-message { display: inline; }
.announcement-text .announcement-message > * { display: inline; margin: 0; }
.announcement-text strong + .announcement-message::before { content: " – "; }
.announcement-message a { color: inherit; text-decoration: underline; text-underline-offset: .15em; }

.announcement-button { flex: none; background: var(--ann-fg); color: var(--ann-bg); }
.announcement-button:hover { opacity: .9; }

.announcement-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
}

.announcement-close:hover { background: rgb(255 255 255 / .15); }
.announcement-close:focus-visible, .announcement-button:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.tone-important { --ann-bg: var(--clr-neutral-900); --ann-fg: var(--clr-neutral-100); }
.tone-light { --ann-bg: var(--clr-accent-light); --ann-fg: var(--clr-neutral-900); }
.tone-light .announcement-close:hover { background: rgb(0 0 0 / .06); }

@media (max-width: 640px) {
  .announcement-bar-inner { flex-wrap: wrap; padding-right: 3.5rem; position: relative; }
  .announcement-bar .announcement-button { display: inline-flex; width: auto; padding-inline: 1rem; }
  .announcement-bar .announcement-close { position: absolute; top: .5rem; right: .5rem; }
}

.announcement-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: var(--spacing-md);
  opacity: 0;
  transition: opacity 200ms ease;
}

.announcement-modal.is-visible { opacity: 1; }
.announcement-modal[hidden] { display: none; }

.announcement-backdrop { position: absolute; inset: 0; background: rgb(29 29 27 / .55); }

.announcement-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 2 * var(--spacing-md));
  overflow-y: auto;
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
  border-radius: var(--radius-lg);
  background: var(--clr-neutral-100);
  box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.98);
  transition: transform 200ms ease;
}

.announcement-modal.is-visible .announcement-dialog { transform: none; }

.announcement-dialog h2 {
  margin: 0 2rem var(--spacing-sm) 0;
  font-family: var(--ff-heading);
  font-size: var(--fs-800);
  line-height: 1.25;
}

.announcement-dialog .announcement-close { position: absolute; top: .75rem; right: .75rem; color: var(--clr-neutral-800); }
.announcement-dialog .announcement-close:hover { background: var(--clr-neutral-300); }
.announcement-actions { display: flex; flex-wrap: wrap; gap: var(--spacing-sm); margin-top: var(--spacing-lg); }

html.announcement-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .announcement-bar, .announcement-modal, .announcement-dialog { transition: none; }
}

/* ---------- Header: sub-menus ---------- */
.nav-item-row { display: flex; align-items: center; justify-content: center; gap: .25rem; }

.submenu-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.submenu-toggle:hover { background: rgb(0 0 0 / .06); }
.submenu-toggle:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 2px; }
.nav-item.is-open > .nav-item-row .submenu-toggle { transform: rotate(180deg); }

.submenu-link {
  display: block;
  font-family: var(--ff-heading);
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.submenu-link:hover, .submenu-link:focus-visible { color: var(--clr-primary-dark); }

/* Phones and tablets: the full-screen menu shows sub-links below their parent, opened by the arrow. */
@media (max-width: 1023.98px) {
  .submenu { display: none; padding-top: var(--spacing-xs); }
  .nav-item.is-open > .submenu { display: grid; gap: var(--spacing-xs); }
  .submenu-link { font-size: var(--fs-600); color: var(--clr-neutral-800); }
}

/* Desktop: a dropdown that opens on hover, keyboard focus or click. */
@media (min-width: 1024px) {
  .nav-item.has-submenu { position: relative; }
  .nav-item-row { gap: 0; }
  .submenu-toggle { width: 24px; height: 24px; margin-left: .1rem; }

  .submenu {
    position: absolute;
    top: calc(100% + .75rem);
    left: -1rem;
    z-index: 20;
    min-width: 230px;
    padding: .5rem;
    border-radius: var(--radius-md);
    background: var(--clr-neutral-100);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  }

  /* Bridges the gap between link and dropdown, so the pointer can travel across it. */
  .submenu::before { content: ""; position: absolute; right: 0; bottom: 100%; left: 0; height: .9rem; }

  .nav-item.has-submenu:hover > .submenu,
  .nav-item.has-submenu:focus-within > .submenu,
  .nav-item.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }

  .submenu-link { padding: .55rem .85rem; border-radius: var(--radius-sm); color: var(--clr-neutral-900); font-size: var(--fs-400); white-space: nowrap; }
  .submenu-link:hover, .submenu-link:focus-visible { background: var(--clr-neutral-200); }
}

/* ---------- Footer columns ---------- */
.footer-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.footer-text { max-width: 32ch; }

/* ---------- Projects ---------- */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl) var(--spacing-lg);
}

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid .project-card.is-large { grid-column: span 2; }
  .project-grid .project-card.is-large .project-card-image { aspect-ratio: 8 / 3; }
}

@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.project-card { position: relative; }
.project-card-link { position: relative; display: block; color: inherit; }
.project-card-link:focus-visible { outline: none; }
.project-card-link:focus-visible .project-card-image { outline: 3px solid var(--clr-primary-dark); outline-offset: 3px; }

.project-card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--clr-accent-light);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-card-link:hover .project-card-image img { transform: scale(1.05); }

.project-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: .2rem .7rem;
  border-radius: var(--radius-md);
  background: var(--clr-neutral-900);
  color: var(--clr-neutral-100);
  font-size: .75rem;
}

.project-card-arrow {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--clr-neutral-100);
  color: var(--clr-neutral-900);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.project-card-link:hover .project-card-arrow,
.project-card-link:focus-visible .project-card-arrow { opacity: 1; transform: none; }

@media (hover: none) { .project-card-arrow { display: none; } }

.project-card-body { padding-top: var(--spacing-sm); }

.project-card-category {
  margin-bottom: .2rem;
  color: var(--clr-primary-dark);
  font-family: var(--ff-heading);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project-card-title {
  font-family: var(--ff-heading);
  font-size: var(--fs-600);
  line-height: 1.3;
  text-wrap: balance;
  transition: color var(--transition-fast);
}

.project-card-link:hover .project-card-title { color: var(--clr-primary-dark); }
.project-card-meta { margin-top: .15rem; color: var(--clr-accent); font-size: var(--fs-300); }
.project-card.is-large .project-card-title { font-size: var(--fs-800); }

/* Detail page */
.project-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 48vh;
  padding: 150px 0 var(--spacing-2xl);
  background: linear-gradient(135deg, #f5f5f0 0%, #e8e8dc 100%);
  overflow: hidden;
}

.project-hero.has-image { min-height: 72vh; min-height: 72svh; color: var(--clr-neutral-100); }

.project-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.project-hero.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(20 20 18 / .78) 0%, rgb(20 20 18 / .25) 45%, rgb(20 20 18 / .35) 100%);
}

.project-hero-content { position: relative; z-index: 1; width: 100%; }
.project-hero.has-image .post-breadcrumb, .project-hero.has-image .post-breadcrumb a { color: rgb(255 255 255 / .85); }
.project-hero.has-image .post-breadcrumb a:hover { color: var(--clr-neutral-100); }

.project-title {
  max-width: 18ch;
  font-family: var(--ff-heading);
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem);
  line-height: 1.08;
  text-wrap: balance;
}

.project-subline { margin-top: var(--spacing-sm); font-size: var(--fs-600); opacity: .9; }

.project-layout { display: grid; gap: var(--spacing-2xl); }

@media (min-width: 960px) {
  .project-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--spacing-3xl); align-items: start; }
  .project-facts { position: sticky; top: 120px; }
}

.project-text { max-width: 760px; }

.project-facts {
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  background: var(--clr-neutral-200);
}

.project-facts h2 { margin-bottom: var(--spacing-sm); font-family: var(--ff-heading); font-size: var(--fs-600); }
.project-facts dl > div { padding: .7rem 0; border-bottom: 1px solid var(--clr-neutral-300); }
.project-facts dl > div:last-child { border-bottom: 0; }
.project-facts dt { color: var(--clr-accent); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.project-facts dd { font-family: var(--ff-heading); }
.project-facts h3 { margin: var(--spacing-md) 0 var(--spacing-xs); font-family: var(--ff-heading); font-size: var(--fs-400); }
.project-services { display: flex; flex-wrap: wrap; gap: .4rem; }
.project-services li { padding: .25rem .75rem; border-radius: var(--radius-md); background: var(--clr-neutral-100); font-size: var(--fs-300); }

.project-gallery { padding: 0 0 var(--spacing-3xl); }

.project-nav { padding: 0 0 var(--spacing-3xl); }
.project-nav-grid { display: grid; gap: var(--spacing-md); }

@media (min-width: 720px) { .project-nav-grid { grid-template-columns: 1fr 1fr; } }

.project-nav-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-sm);
  border: 1px solid var(--clr-neutral-300);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.project-nav-link:hover { border-color: var(--clr-primary); background: var(--clr-neutral-200); }
.project-nav-link.is-next { flex-direction: row-reverse; text-align: right; }
.project-nav-link img { width: 96px; height: 72px; flex: none; border-radius: var(--radius-md); object-fit: cover; }
.project-nav-text { display: grid; gap: .15rem; min-width: 0; }
.project-nav-text span { color: var(--clr-accent); font-size: var(--fs-300); }
.project-nav-text strong { font-family: var(--ff-heading); font-weight: 500; line-height: 1.3; }

@media (min-width: 720px) { .project-nav-link.is-next:only-child { grid-column: 2; } }

.project-others { background: var(--clr-neutral-200); }
.content-section + .content-section.project-others { padding-top: var(--spacing-2xl); }

/* ---------- Carousel ---------- */
.carousel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--spacing-sm) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.carousel-head .section-header { margin-bottom: 0; text-align: left; }
.carousel-head .section-title { margin-bottom: 0; }

.carousel-controls { display: flex; align-items: center; gap: .5rem; }
.carousel-counter { min-width: 3.5rem; color: var(--clr-accent); font-size: var(--fs-300); text-align: right; font-variant-numeric: tabular-nums; }

.carousel-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--clr-neutral-300);
  border-radius: 50%;
  background: var(--clr-neutral-100);
  color: var(--clr-neutral-900);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), opacity var(--transition-fast);
}

.carousel-button:hover:not(:disabled) { border-color: var(--clr-neutral-900); background: var(--clr-neutral-900); color: var(--clr-neutral-100); }
.carousel-button:disabled { opacity: .35; cursor: default; }
.carousel-button:focus-visible { outline: 2px solid var(--clr-primary-dark); outline-offset: 2px; }
.carousel.is-static .carousel-button, .carousel.is-static .carousel-counter { display: none; }

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: var(--spacing-md);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline: 2px solid var(--clr-primary-dark); outline-offset: 4px; border-radius: var(--radius-lg); }
.carousel-slide { scroll-snap-align: start; min-width: 0; }

.gallery-slide { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg); background: var(--clr-accent-light); }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 768px) { .gallery-slide { aspect-ratio: 16 / 9; } }

/* Card carousels show several cards at once, with the next one peeking in on phones. */
.carousel-track.has-cards { grid-auto-columns: 82%; gap: var(--spacing-lg); padding-bottom: 4px; }

@media (min-width: 640px) { .carousel-track.has-cards { grid-auto-columns: calc((100% - var(--spacing-lg)) / 2); } }
@media (min-width: 1024px) { .carousel-track.has-cards { grid-auto-columns: calc((100% - 2 * var(--spacing-lg)) / 3); } }

.carousel-thumbs { display: flex; gap: .5rem; margin-top: var(--spacing-sm); padding: 3px; overflow-x: auto; scrollbar-width: thin; }

.carousel-thumb {
  flex: none;
  width: 88px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--clr-accent-light);
  opacity: .55;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.carousel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.carousel-thumb:hover, .carousel-thumb.is-active { opacity: 1; }
.carousel-thumb.is-active { outline: 2px solid var(--clr-primary-dark); outline-offset: 2px; }
.carousel-thumb:focus-visible { outline: 2px solid var(--clr-neutral-900); outline-offset: 2px; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .project-card-image img, .project-card-arrow, .submenu { transition: none; }
}

/* Ready-made sections on small phones */
.services-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.post-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (max-width: 575.98px) {
  .row.g-5 { --bs-gutter-y: 2rem; }
  .hero-cta { flex-wrap: wrap; }
  .testimonial blockquote { font-size: var(--fs-600); }
}

/* The project photo starts below the transparent header, so logo and menu stay readable. */
.project-hero.has-image {
  min-height: 62vh;
  min-height: 62svh;
  margin: 96px clamp(.75rem, 2vw, 1.5rem) 0;
  padding-top: var(--spacing-3xl);
  border-radius: var(--radius-lg);
}

@media (min-width: 768px) {
  .project-hero.has-image { margin-top: 118px; }
}

.has-preview .project-hero.has-image { margin-top: 124px; }

/* Long German compound words in titles wrap with a hyphen instead of running off small screens. */
.project-title, .project-card-title, .post-header .hero-title, .post-featured-title { hyphens: auto; overflow-wrap: break-word; }

@media (max-width: 575.98px) {
  .project-title { font-size: clamp(1.75rem, 1.1rem + 4vw, 2.2rem); }
}

/* ---------- Readable text colours ----------
   The brand colours stay for surfaces (buttons' outlines, bands, icons). Where they colour small text,
   slightly darker shades are used so the text meets the WCAG AA contrast guideline (4.5:1). */
:root {
  --clr-text-accent: hsl(46, 5%, 39%);
  --clr-text-primary: hsl(69, 9%, 37%);
  --clr-button: hsl(46, 5%, 44%);
}

.hero-subtitle, .section-subtitle, .team-qualifications li, .contact-item a, .required, .cookie-content a,
.image-block figcaption, .post-meta, .post-empty, .post-breadcrumb, .post-share span, .post-nav-link span,
.pagination-status, .testimonial figcaption, .project-card-meta, .project-facts dt, .project-nav-text span,
.carousel-counter {
  color: var(--clr-text-accent);
}

.nav-link:hover, .nav-link:focus, .nav-link.active, .team-name, .prose a, .post-card-link,
.project-card-category, .submenu-link:hover, .submenu-link:focus-visible, .contact-item a:hover,
.post-share a:hover, .pagination a:hover, .post-featured-title a:hover, .project-card-link:hover .project-card-title {
  color: var(--clr-text-primary);
}

.prose h2 { color: hsl(69, 8%, 40%); }
.prose-article h2 { color: var(--clr-neutral-900); }

/* Filled buttons: white text needs a slightly darker background. */
.btn-primary { background-color: var(--clr-button); border-color: var(--clr-button); }

/* Shown only when reached with the keyboard. */
.skip-link { background: var(--clr-neutral-900); }

/* Dark bands keep their light link colours. */
section:is([data-bg="olive"], [data-bg="dark"]) :is(.section-subtitle, .post-meta, .prose a),
section[data-overlay]:not([data-overlay=""]) :is(.hero-subtitle, .section-subtitle) {
  color: var(--clr-neutral-100);
}
.btn-primary:hover { background-color: var(--clr-text-primary); border-color: var(--clr-text-primary); }

/* Clear keyboard focus for links and buttons (the original only changed the colour). */
:is(.nav-link, .submenu-link, .btn, .post-filter a, .project-nav-link, .post-nav-link, .post-share a, .logo a, .contact-item a, .prose a):focus-visible {
  outline: 2px solid var(--clr-text-primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer a:focus-visible, .cta-section .btn:focus-visible, .announcement-bar a:focus-visible { outline: 2px solid var(--clr-neutral-100); outline-offset: 3px; border-radius: 4px; }

/* ---------- Hero templates (visual editor, "Hero-Vorlagen") ----------
   Five art-directed heroes, one screen high. Text and images are placed freely in %; sizes use --u
   (1% of the width, or less on wide, low screens), so the composition keeps its proportions. */
.dh-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  --u: min(1vw, 1.7778svh);
  height: 100vh;
  height: min(100svh, 62.5vw); /* full screen; at most 16:10 on tall screens */
  min-height: 320px;
  background: #000;
  color: #fff;
}

.dh-hero .dh-art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
.dh-hero .dh-shade { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.dh-hero .dh-headline {
  position: absolute;
  z-index: 3;
  margin: 0;
  color: inherit;
  font-family: "bp-source-serif-4", Georgia, "Times New Roman", serif; /* declared in /theme-fonts.css */
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .92;
  text-transform: none;
}
/* Lines are separated by line breaks. Indented layouts (1 and 5) indent every line after the first. */
.dh-hero .dh-headline { padding-left: var(--dh-indent, 0); text-indent: calc(-1 * var(--dh-indent, 0)); }
/* Heroes added before 1.12.2026 have one <span> per line. */
.dh-hero .dh-headline > span { display: block; text-indent: 0; }
.dh-hero .dh-headline > span:first-child { margin-left: calc(-1 * var(--dh-indent, 0)); }

.dh-hero :is(.dh-support, .dh-micro, .dh-social) {
  position: absolute;
  z-index: 4;
  margin: 0;
  color: inherit;
  font-size: max(1rem, calc(1.35 * var(--u)));
  line-height: 1.42;
}
.dh-hero .dh-micro small { display: block; margin-bottom: .4em; font-size: max(1rem, .85em); opacity: .75; }
.dh-hero .dh-social { display: flex; gap: calc(1.7 * var(--u)); font-size: max(1rem, calc(1.48 * var(--u))); font-weight: 700; text-transform: uppercase; }
.dh-hero .dh-social a { color: inherit; text-decoration: none; }
.dh-hero .dh-social a:hover { text-decoration: underline; text-underline-offset: .2em; }
.dh-hero .dh-social a:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

/* 1 – full image, headline bottom left */
.dh-v1 .dh-art { object-position: 54% center; }
.dh-v1 .dh-shade { background: linear-gradient(90deg, #16000066, transparent 65%), linear-gradient(0deg, #0007, transparent 45%); }
.dh-v1 .dh-headline { left: 4%; bottom: 7%; font-size: calc(14 * var(--u)); }
.dh-v1 .dh-headline { --dh-indent: calc(5 * var(--u)); }
.dh-v1 .dh-support { right: 4%; bottom: 6%; width: 19%; text-align: right; }

/* 2 – centred headline behind a cut-out object */
.dh-v2 { background: #000; }
.dh-v2 .dh-headline { top: 32%; left: 0; z-index: 1; width: 100%; font-size: calc(12.5 * var(--u)); letter-spacing: -.07em; text-align: center; white-space: nowrap; }
.dh-v2 .dh-art { inset: auto auto 0 15%; z-index: 2; width: 70%; height: auto; aspect-ratio: 2.25; }
.dh-v2 .dh-micro, .dh-v5 .dh-micro { left: 4%; bottom: 5%; }
.dh-v2 .dh-social, .dh-v5 .dh-social { right: 4%; bottom: 5%; }

/* 3 – portrait, headline bottom right, long text bottom left */
.dh-v3 { background: #8148d9; }
.dh-v3 .dh-art { object-position: 50% center; }
.dh-v3 .dh-shade { background: linear-gradient(0deg, #10104d88, transparent 40%), linear-gradient(90deg, #24277d44, transparent 40%); }
.dh-v3 .dh-headline { right: 4%; bottom: 7%; font-size: calc(12 * var(--u)); text-align: right; }
.dh-v3 .dh-support { left: 4%; bottom: 8.8%; width: 31%; }
.dh-v3 .dh-social { left: 4%; top: 43%; }
.dh-v3 .dh-micro { right: 4%; top: 43%; }

/* 4 – headline right-aligned on the left, text in the middle */
.dh-v4 { background: #007e99; }
.dh-v4 .dh-art { object-position: center; }
.dh-v4 .dh-shade { background: linear-gradient(0deg, #002d3a77, transparent 50%), linear-gradient(90deg, #003d5266, transparent 45%); }
.dh-v4 .dh-headline { left: 4%; top: 27%; width: 40%; font-size: calc(8.4 * var(--u)); text-align: right; }
.dh-v4 .dh-support { left: 45%; bottom: 8.5%; width: 23%; }
.dh-v4 .dh-micro { left: 4%; bottom: 4.4%; }
.dh-v4 .dh-social { right: 4%; top: 32%; }

/* 5 – light, headline left, three images that widen on hover */
.dh-v5 { background: #f1ede5; color: #11151b; }
.dh-v5 .dh-headline { left: 4%; top: 32%; font-size: calc(8.6 * var(--u)); }
.dh-v5 .dh-headline { --dh-indent: calc(12 * var(--u)); }
.dh-v5 .dh-support { left: 4%; top: 65%; width: 28%; color: #5b5149; }

.dh-gallery { position: absolute; top: 22%; right: 4%; left: 50%; z-index: 2; height: 55%; display: flex; align-items: center; gap: var(--u); }
.dh-gallery-item { flex: 1; min-width: 0; height: 50%; margin: 0; overflow: hidden; border-radius: 6px; transition: flex .3s ease, height .3s ease; }
.dh-gallery-item img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 0; }
.dh-gallery:not(:hover) .dh-gallery-item:first-child, .dh-gallery-item:hover { flex: 1.65; height: 100%; }

@media (prefers-reduced-motion: reduce) { .dh-gallery-item { transition: none; } }

/* Phones and small tablets held upright: portrait stage, one screen high */
@media (max-width: 767px) and (orientation: portrait) {
  .dh-hero { --u: 1vw; height: 100svh; max-height: 240vw; min-height: 560px; }
  .dh-hero :is(.dh-support, .dh-micro) { font-size: max(1rem, 3.7vw); }
  .dh-hero .dh-social { gap: 3vw; font-size: max(.95rem, 3.2vw); }

  .dh-v1 .dh-art { object-position: 58% center; }
  .dh-v1 .dh-headline { left: 5%; bottom: 21%; font-size: 19vw; }
  .dh-v1 .dh-support { right: 5%; bottom: 7%; width: 55%; }

  .dh-v2 .dh-headline { top: 22%; font-size: 15vw; }
  .dh-v2 .dh-art { inset: 32% auto auto 0; width: 100%; }
  .dh-v2 .dh-micro, .dh-v5 .dh-micro { left: 5%; bottom: 5%; }
  .dh-v2 .dh-social, .dh-v5 .dh-social { right: 5%; bottom: 5%; flex-direction: column; gap: .3em; text-align: right; }

  .dh-v3 .dh-headline { right: 5%; bottom: 40%; font-size: 18vw; }
  .dh-v3 .dh-support { left: 5%; bottom: 5%; width: 90%; }
  /* Top elements start below the site header (about 15% of the stage). */
  .dh-v3 .dh-social { left: 5%; top: 19%; }
  .dh-v3 .dh-micro { right: 5%; top: 25%; text-align: right; }

  .dh-v4 .dh-art { object-position: 50% center; }
  .dh-v4 .dh-headline { left: 5%; top: 26%; width: 80%; font-size: 14vw; text-align: left; }
  .dh-v4 .dh-support { left: 36%; bottom: 13%; width: 59%; }
  .dh-v4 .dh-micro { left: 5%; bottom: 5%; }
  .dh-v4 .dh-social { right: 5%; top: 19%; }

  .dh-v5 .dh-headline { left: 5%; top: 16%; font-size: 13vw; }
  .dh-v5 .dh-headline { --dh-indent: 5vw; }
  .dh-v5 .dh-support { left: 5%; top: 33%; width: 90%; }
  .dh-gallery { top: 47%; right: 5%; left: 5%; height: 33%; gap: 2vw; }
}

/* A hero template at the top of a page runs up under the transparent header. Over the dark ones
   (all but no. 5) the header turns white until the page is scrolled or the phone menu is opened. */
main > .dh-hero:first-child:not(.dh-v5)::after,
.vb-chrome-header + [data-gjs-type="wrapper"] > .dh-hero:first-child:not(.dh-v5)::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 28%;
  background: linear-gradient(rgb(0 0 0 / .45), transparent);
  pointer-events: none;
}

body:has(main > .dh-hero:first-child:not(.dh-v5)):not(:has(.menu-toggle.active)) .header:not(.scrolled) .logo :is(svg, img),
.vb-chrome-header:has(+ [data-gjs-type="wrapper"] > .dh-hero:first-child:not(.dh-v5)) .header .logo :is(svg, img) {
  filter: brightness(0) invert(1);
}
body:has(main > .dh-hero:first-child:not(.dh-v5)):not(:has(.menu-toggle.active)) .header:not(.scrolled) .hamburger {
  background-color: #fff;
}
@media (min-width: 1024px) {
  body:has(main > .dh-hero:first-child:not(.dh-v5)) .header:not(.scrolled) :is(.nav-list > .nav-item > .nav-link, .nav-list > .nav-item > .nav-item-row > .nav-link, .submenu-toggle) {
    color: #fff;
  }
}
@media (min-width: 700px) {
  .vb-chrome-header:has(+ [data-gjs-type="wrapper"] > .dh-hero:first-child:not(.dh-v5)) .header :is(.nav-link, .submenu-toggle) {
    color: #fff;
  }
}


/* Very low screens (phones held sideways): keep headline and main text, drop the small extras. */
@media (max-height: 500px) and (orientation: landscape) {
  .dh-hero :is(.dh-social, .dh-micro) { display: none; }
  .dh-hero .dh-support { font-size: .875rem; }
  .dh-v3 .dh-support { width: 40%; }
  .dh-v4 .dh-support { width: 30%; }
}
