/* Site-spezifische Ergänzungen */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s5);
  margin-bottom: var(--s6);
}

.section-head h2 {
  margin-top: 8px;
}

.service-card {
  scroll-margin-top: 72px;
}

.service-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
  min-height: 100%;
}

.service-card-media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.service-card-link:hover .title,
.service-card-link:hover .service-card-more {
  color: var(--fg);
}

.service-card-more {
  display: inline-block;
  margin-top: var(--s3);
  font-size: 13px;
}

.section--flush {
  border-top: 0;
}

.detail-page {
  padding-top: 48px;
  padding-bottom: var(--s8);
}

.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 28px;
  max-width: 720px;
}

.detail-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.detail-hero-icon {
  flex: none;
  font-size: 28px;
  color: var(--accent);
  line-height: 1;
}

.detail-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.detail-lead {
  margin: 0;
  max-width: 640px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
}

.detail-lead--body {
  font-size: 15.5px;
  line-height: 1.7;
}

.detail-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0;
  max-width: 720px;
}

.detail-media {
  margin-top: 28px;
  max-width: 720px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}

.detail-media img {
  display: block;
  width: 100%;
  height: auto;
}

.detail-content {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.detail-body {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
}

.detail-body p {
  margin: 0 0 1em;
}

.detail-body p:last-child {
  margin-bottom: 0;
}

.about-sections {
  display: flex;
  flex-direction: column;
  gap: 36px;
  max-width: 720px;
}

.about-block h2 {
  margin: 8px 0 14px;
  font-size: 1.2rem;
}

.detail-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-points li {
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.detail-points li strong {
  color: var(--fg);
  font-weight: 600;
  font-size: 13.5px;
}

.detail-points li span {
  display: block;
}

.detail-block {
  max-width: 1080px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.tag-extras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s6);
  max-width: 960px;
}

.tag-extra-block--wide {
  grid-column: 1 / -1;
}

.tag-extra-block h2 {
  margin-top: 8px;
  font-size: 1.2rem;
}

.tag-tools {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
}

.tag-tools li {
  padding: 0;
  border: 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
}

.service-grid {
  display: grid;
  gap: var(--s5);
}

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

.service-grid-page {
  grid-template-columns: 1fr;
  gap: var(--s6);
}

.service-card--detail .body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.service-card--detail .title {
  font-size: 1.15rem;
}

.service-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.service-points li {
  display: grid;
  gap: 4px;
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.service-points li strong {
  color: var(--fg);
  font-weight: 600;
  font-size: 13.5px;
}

.service-points li span {
  display: block;
}

.service-icon {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: var(--s2);
  line-height: 1;
}

@media (max-width: 768px) {
  .detail-page {
    padding-top: 32px;
  }

  .detail-title {
    font-size: 26px;
  }

  .detail-rule {
    margin: 28px 0;
  }
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s5);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7);
  align-items: start;
}

.contact-form-wrap {
  position: sticky;
  top: 88px;
}

.contact-form input[disabled],
.contact-form textarea[disabled],
.contact-form select[disabled] {
  opacity: .72;
}

.service-card .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tag-picker {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.tag-picker-group + .tag-picker-group {
  padding-top: var(--s2);
}

.tag-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag-picker-row .check {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.image-preview {
  margin-bottom: var(--s3);
}

.image-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.image-gallery-item {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0;
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
}

.image-gallery-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.image-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.icon-picker-preview {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: var(--s3);
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.icon-picker button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  cursor: pointer;
  font-size: 16px;
}

.icon-picker button.selected,
.icon-picker button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.drag-col {
  width: 36px;
}

.drag-handle {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  font-family: var(--font-mono);
  padding: 4px 6px;
}

.drag-handle:active {
  cursor: grabbing;
}

.sortable-block.drag-over,
tr.drag-over {
  outline: 1px dashed var(--accent);
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s5);
}

.admin-page-card .title {
  font-size: 16px;
}

.projects-toolbar {
  display: flex;
  gap: var(--s5);
  align-items: flex-end;
  margin-bottom: var(--s6);
  flex-wrap: wrap;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card-link {
  flex: 1;
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-card-link:hover {
  color: inherit;
}

.project-card .body {
  padding: 18px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.project-card .body p {
  margin: 0;
  font-size: 14px;
}

.project-card .body .title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.project-card-actions {
  padding: 0 var(--s4) var(--s4);
  margin-top: auto;
}

.project-like.liked,
.project-like[aria-pressed="true"] {
  color: var(--err);
}

.ideas-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s6);
}

.ideas-layout-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ideas-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--s4);
}

.ideas-list {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.idea-card .title {
  font-size: 16px;
}

.idea-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.idea-tech {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.idea-tech .label {
  display: inline;
  margin-right: 6px;
}

.idea-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  white-space: normal;
}

.tag-sortable-row {
  min-height: 36px;
}

.sortable-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pill-handle,
.block-handle {
  border: 0;
  background: transparent;
  cursor: grab;
  color: inherit;
  opacity: .7;
  padding: 0 2px;
}

.sortable-pill.dragging,
.sortable-block.dragging,
tr.dragging {
  opacity: .55;
}

.tag-admin-label {
  cursor: pointer;
}

.ideas-submit-layout {
  max-width: 560px;
}

.idea-submit-form .body {
  padding: var(--s5);
}

.form-status {
  margin-top: var(--s3);
  font-size: 14px;
  color: var(--ok);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: var(--fg);
  color: var(--bg);
  font-size: 14px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.tag-admin-pill {
  gap: 6px;
}

.tag-admin-pill .tag-admin-edit {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: inherit;
  font-family: var(--font-mono);
  padding: 0 2px;
}

.nav-muted {
  color: var(--muted);
  font-size: 13px;
}

.nav-user {
  font-size: 13px;
  color: var(--muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Backend-Navigation -------------------------------------------------- */

.admin-header {
  overflow: visible;
}

.admin-header .inner {
  max-width: 1180px;
  align-items: center;
  gap: var(--s4);
  padding-top: 14px;
  padding-bottom: 14px;
  overflow: visible;
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.admin-nav-dd {
  position: relative;
}

.admin-nav-dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur) ease, background var(--dur) ease;
}

.admin-nav-dd-btn:hover,
.admin-nav-dd.is-open .admin-nav-dd-btn {
  color: var(--fg);
  background: var(--surface-2);
}

.admin-nav-dd.is-current > .admin-nav-dd-btn {
  color: var(--fg);
}

.admin-nav-dd-btn .fa-chevron-down {
  font-size: 10px;
  opacity: .7;
  transition: transform var(--dur) ease;
}

.admin-nav-dd.is-open .admin-nav-dd-btn .fa-chevron-down {
  transform: rotate(180deg);
}

.admin-nav-dd-menu {
  display: none;
  min-width: 168px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}

.admin-nav-dd.is-open > .admin-nav-dd-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-dd-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--dur) ease, background var(--dur) ease;
}

.admin-nav-dd-menu a:hover {
  color: var(--fg);
  background: var(--surface-2);
}

.admin-nav-dd-menu a[aria-current="page"] {
  color: var(--fg);
  background: var(--accent-soft);
}

.admin-nav > .nav-actions {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

@media (min-width: 769px) {
  .admin-header .admin-nav {
    gap: 4px 8px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    overflow: visible !important;
  }

  .admin-nav-dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
  }

  .admin-nav > .nav-actions {
    width: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: 0 !important;
  }
}

@media (max-width: 768px) {
  .admin-header .inner {
    align-items: center;
  }

  .admin-nav {
    gap: 0;
    justify-content: stretch;
  }

  .admin-nav-dd {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav-dd-btn {
    width: 100%;
    justify-content: space-between;
    padding: 12px 4px;
    border-radius: 0;
    font-size: 14px;
  }

  .admin-nav-dd-btn:hover,
  .admin-nav-dd.is-open .admin-nav-dd-btn {
    background: transparent;
  }

  .admin-nav-dd-menu {
    position: static;
    min-width: 0;
    margin: 0 0 8px;
    padding: 0 0 4px 8px;
    border: 0;
    border-left: 2px solid var(--line);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .admin-nav-dd-menu a {
    padding: 10px 8px;
    font-size: 14px;
  }

  .admin-nav-dd-menu a[aria-current="page"] {
    font-weight: 600;
  }

  .admin-nav > .nav-actions {
    width: 100%;
    margin: 16px 0 0;
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    justify-content: flex-start;
  }
}

/* --- Backend Anfragen ---------------------------------------------------- */

.inquiry-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.inquiry-open-count {
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
}

.inquiry-filters {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.inquiry-filter {
  padding: 6px 12px;
  border-radius: var(--r);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.inquiry-filter:hover {
  color: var(--fg);
}

.inquiry-filter.is-active {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.inquiry-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(340px, 1.25fr);
  gap: 20px;
  align-items: start;
}

.inquiry-layout .panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

.inquiry-list .table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
}

#inquiries-table tbody tr[data-inquiry-id] {
  cursor: pointer;
}

#inquiries-table tbody tr[data-inquiry-id]:hover td {
  background: var(--surface-2);
}

#inquiries-table tbody tr.is-active td {
  background: var(--accent-soft);
  font-weight: 600;
}

.badge.inquiry-status-new {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.badge.inquiry-status-open {
  color: var(--status-active);
  border-color: var(--status-active);
  background: var(--status-active-soft);
}

.badge.inquiry-status-closed {
  color: var(--ok);
  border-color: var(--ok);
  background: var(--ok-soft);
}

.inquiry-detail {
  padding: 20px;
  min-height: 420px;
}

.inquiry-detail-head h2 {
  margin: 8px 0 0;
  font-size: 22px;
}

.inquiry-detail-head #inquiry-meta {
  margin-top: 6px;
}

.inquiry-meta-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.inquiry-meta-form .field {
  margin: 0;
}

.inquiry-meta-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.inquiry-messages {
  margin-top: 24px;
  max-height: min(48vh, 480px);
}

.inquiry-reply-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

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

  .inquiry-meta-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .inquiry-meta-form {
    grid-template-columns: 1fr;
  }
}

.portal-header .inner,
.portal-footer {
  max-width: var(--content);
}

.portal-footer {
  padding: var(--s5) var(--s4);
  text-align: center;
}

@media (max-width: 768px) {
  .portal-footer {
    padding: 12px var(--s4) 14px;
    font-size: 11px;
  }
}

.portal-feed {
  max-width: 640px;
  border-top: 1px solid var(--line);
  padding-top: var(--s4);
}

.portal-feed summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.portal-feed summary:hover {
  color: var(--fg);
}

.portal-feed-url {
  flex: 1 1 220px;
  min-width: 0;
  font: inherit;
  font-size: 13px;
  font-family: var(--font-mono);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--fg);
}

.portal-messages {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  max-height: 360px;
  overflow-y: auto;
  padding: var(--s3);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.portal-message {
  padding: var(--s3);
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}

.portal-message.staff {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.portal-message-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--muted);
}

.portal-message-meta strong {
  color: var(--fg);
}

.portal-message p {
  margin: 0;
  font-size: 14px;
  color: var(--fg);
}

.client-assignments {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  max-height: 280px;
  overflow-y: auto;
}

.client-assignment-toolbar input[type="search"],
.client-assignment-toolbar select {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--fg);
}

.client-assignment[data-hidden="true"] {
  display: none;
}

.client-assignment {
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.client-assignment textarea {
  width: 100%;
  margin-top: 8px;
}

.admin-messages {
  max-height: 300px;
}

.portal-project-card.has-updates {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft);
}

@media (max-width: 900px) {
  .service-grid-home,
  .placeholder-grid,
  .ideas-layout-compact,
  .ideas-layout {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-form-wrap {
    position: static;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s3);
  }

  .projects-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .projects-toolbar .field {
    max-width: none !important;
    width: 100%;
  }
}

@media (max-width: 768px) {
  main > .section:first-child > .container {
    padding-top: 20px !important;
  }

  main > .section:first-child > .container[style*="padding-bottom"] {
    padding-bottom: 16px !important;
  }

  main > .section:first-child h1 {
    font-size: clamp(1.45rem, 5.5vw, 1.75rem);
    line-height: 1.2;
  }

  main > .section:first-child .label {
    margin-bottom: 6px !important;
  }

  main > .section:first-child p,
  main > .section:first-child .intro-copy {
    font-size: 15px !important;
    margin-top: 10px !important;
  }

  main > .section:first-child + .section.alt {
    border-top: 0;
  }

  main > .section:first-child + .section.alt > .container {
    padding-top: 0 !important;
  }

  main > .section:only-child > .container {
    padding-top: 20px !important;
    padding-bottom: var(--s6) !important;
  }

  main > .section .container > div[style*="margin-top:24px"] {
    margin-top: 14px !important;
  }

  main > .section .stack[style*="margin-top:40px"] {
    margin-top: 24px !important;
  }

  .breadcrumbs {
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .service-grid-page {
    grid-template-columns: 1fr;
  }

  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .row[style*="justify-content:space-between"] {
    flex-direction: column;
    align-items: stretch !important;
    gap: var(--s4) !important;
  }

  .row[style*="justify-content:space-between"] > .btn,
  .row[style*="justify-content:space-between"] > .row {
    width: 100%;
  }

  .row[style*="justify-content:space-between"] > .row {
    justify-content: stretch;
  }

  .row[style*="justify-content:space-between"] > .row .btn {
    flex: 1;
  }

  .client-assignment-toolbar {
    flex-direction: column;
    align-items: stretch !important;
  }

  .client-assignment-toolbar input[type="search"],
  .client-assignment-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .section .container > .row {
    flex-direction: column;
    align-items: stretch;
  }

  .section .container > .row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Homepage positioning */
.home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--s7);
  align-items: start;
  padding-top: 64px;
  padding-bottom: 48px;
}

.home-hero-copy {
  min-width: 0;
}

.home-media--hero {
  width: 100%;
  min-width: 0;
  align-self: start;
  margin-top: 4px;
}

.home-hero-title {
  max-width: 18ch;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.15;
}

.home-hero-lead {
  max-width: 620px;
  margin-top: 18px;
  font-size: 17px;
}

.home-promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-promises li {
  position: relative;
}

.home-promises li + li::before {
  content: "·";
  position: absolute;
  left: -12px;
  color: var(--accent);
}

.home-areas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s5);
}

.home-area .title {
  font-size: 18px;
  margin-bottom: 10px;
}

.home-area-tech {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.home-area-tech .label {
  display: inline;
  margin-right: 6px;
}

.home-area-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  font-size: 13px;
}

.home-copy {
  max-width: 560px;
  margin-top: 12px;
  font-size: 16px;
}

.home-audience {
  max-width: 720px;
}

.home-list {
  margin: 16px 0 0;
  padding-left: 1.15em;
  max-width: 560px;
}

.home-list--triggers {
  max-width: 640px;
  columns: 1;
}

.home-list li {
  margin: 8px 0;
}

.home-deliverables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.home-deliverables li {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  background: var(--surface);
  font-size: 14px;
}

/* 16:9 media slot — image or blueprint placeholder */
.home-media {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.home-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-media--empty {
  background:
    linear-gradient(180deg, rgba(26, 28, 30, .02), rgba(26, 28, 30, .06)),
    var(--surface-2);
}

.home-media-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  opacity: .9;
  pointer-events: none;
}

.home-media-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}

[data-theme="dark"] .home-media--empty {
  background:
    linear-gradient(180deg, rgba(241, 241, 240, .03), rgba(241, 241, 240, .07)),
    var(--surface-2);
}

.home-poc {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--s7);
  align-items: start;
}

.poc-block {
  min-width: 0;
}

.poc-block .btn {
  margin-top: 20px;
}

.home-media--panel {
  width: 100%;
  min-width: 0;
  align-self: start;
}

.home-steps-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 28px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}

.home-steps-inline li {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--fg);
}

.home-steps-inline-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--accent);
}

.home-steps-inline-label {
  color: var(--muted);
}

.home-project-card > .home-project-media {
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-project-card > .home-project-media .home-media {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}

.home-project-detail-media {
  margin: 28px 0 0;
}

.service-group + .service-group {
  margin-top: var(--s8);
}

.service-group-lead {
  margin-top: 10px;
  max-width: 640px;
  color: var(--muted);
}

.contact-guide {
  margin: 12px 0 0;
  padding-left: 1.2em;
  max-width: 420px;
  font-size: 15px;
}

.contact-guide li {
  margin: 6px 0;
}

@media (max-width: 960px) {
  .home-hero-inner,
  .home-areas,
  .home-poc {
    grid-template-columns: 1fr;
  }

  .home-media--hero {
    order: -1;
    max-width: 420px;
  }
}

/* Backend Style Guide */
.brand-guide-lead {
  margin-top: 12px;
  max-width: 640px;
}

.brand-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.brand-toc a {
  color: var(--muted);
}

.brand-toc a:hover {
  color: var(--fg);
}

.brand-block {
  margin-top: var(--s8);
  max-width: 800px;
}

.brand-block h2 {
  margin-top: 8px;
}

.brand-block h3 {
  margin: 28px 0 12px;
  font-size: 15px;
}

.brand-block > p {
  margin-top: 12px;
}

.brand-pillars {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.brand-pillars li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.brand-pillars strong {
  font-size: 14px;
}

.brand-pillars span {
  color: var(--muted);
  font-size: 14px;
}

.brand-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 15px;
}

.brand-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s5);
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.brand-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.brand-swatch {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}

.brand-swatch-chip {
  display: block;
  height: 64px;
  border-bottom: 1px solid var(--line);
}

.brand-swatch-meta {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  font-size: 12px;
}

.brand-swatch-meta strong {
  font-size: 13px;
}

.brand-swatch-meta code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--faint);
}

.brand-type-samples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  margin-top: 12px;
}

.brand-type-sans {
  margin: 8px 0;
  font-size: 18px;
  color: var(--fg);
}

.brand-type-mono {
  margin: 8px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--fg);
}

.brand-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  margin-top: 20px;
}

.brand-examples > div {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.brand-examples p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--fg);
}

.brand-media-row {
  margin-top: 20px;
  max-width: 480px;
}

@media (max-width: 720px) {
  .brand-type-samples,
  .brand-examples {
    grid-template-columns: 1fr;
  }
}
