/* ── Shared enine-* PNC chrome — bauhaus's real values ──────────────
   font-size/font-weight for the title classes deliberately NOT set here:
   h3/h4 already get their size from the `h3, .h3`/`h4, .h4` rules below
   and their weight from the h1-h6 rule's `--enine_site_heading_weight`
   (itself `var(--enine-heading-weight, 700)`, config-overridable) —
   duplicating either here would fight that override instead of reading
   it. Section padding stays wired to the same canonical
   `--enine-section-pad` variable every other theme's `.enine-section`
   reads (docs/THEME_SPEC.md §7). */
.enine-section {
  padding-block: var(--enine-section-pad, 3rem);
  --bs-border-color: color-mix(in srgb, currentColor 20%, transparent);
}
.enine-section-title,
.enine-child-title { margin-bottom: 0.25rem; }
.enine-section-tagline,
.enine-child-tagline { margin-bottom: 0.5rem; opacity: 0.5; font-weight: 600; }
.enine-grid { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; }

/* Child card tagline, text/icon-child cells only: `.enine-child-tagline`'s
   default half-opacity/semibold caption treatment reads wrong here — a
   plain paragraph is what these child cards actually want. Scoped to the
   14 text/icon-child codes only (never t1m/i1m/m1m, whose child IS media
   and keeps the caption treatment, and never mnm, which already carries
   its own `.mnm-text` class instead of `.enine-child-tagline`). */
.pnc-tnt .enine-child-tagline, .pnc-tnm .enine-child-tagline, .pnc-tni .enine-child-tagline,
.pnc-mnt .enine-child-tagline, .pnc-mni .enine-child-tagline,
.pnc-int .enine-child-tagline, .pnc-inm .enine-child-tagline, .pnc-ini .enine-child-tagline,
.pnc-t1t .enine-child-tagline, .pnc-t1i .enine-child-tagline,
.pnc-m1t .enine-child-tagline, .pnc-m1i .enine-child-tagline,
.pnc-i1t .enine-child-tagline, .pnc-i1i .enine-child-tagline {
  opacity: 1;
  font-weight: 400;
  font-size: 1rem;
}

:root {
  --enine_site_heading_weight: var(--enine-heading-weight, 700);
  --bs-border-radius: var(--enine-radius, 0.375rem);
  --enine_site_shadow_1: var(--enine-shadow, 0 0.25rem 0.75rem rgba(30, 80, 160, 0.12));
  --enine_site_overlay_bg_soft: #08080808;
  --enine_site_overlay_bg_strong: #08080888;
  --enine_site_badge_weight: 400;
  --enine_site_hero_min_h: 420px;
  --enine_site_hero_section_min_h: 500px;
  --enine_site_tracking_tight: var(--enine-tracking-heading, -0.04em);
  --enine_site_tracking_loose: -0.02em;
  --enine_site_icon_badge_size: 48px;
  --enine_site_jumbotron_panel_padding: min(2.5rem, 40px);
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 { font-weight: var(--enine_site_heading_weight); }
h3, .h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4, .h4 { font-size: clamp(1rem, 1.5vw, 1.125rem); }
.enine-icon-inline { font-size: 1.125em; }
/* Accent is a background colour; as text it is only tinted into the
   surrounding foreground so it stays legible on any section. */
.text-info { color: color-mix(in srgb, var(--bs-info) 40%, currentColor) !important; }
:is(.pnc-ini, .pnc-tni, .pnc-mni, .pnc-i1i, .pnc-t1i, .pnc-m1i) i.text-info { color: var(--bs-info) !important; }
.text-light { --link-c: rgb(var(--bs-light-rgb)); }
.enine-featured-title { font-size: clamp(1.125rem, 2vw, 1.5rem); }
.row-gap-md-6 { row-gap: 5rem !important; }

.shadow { box-shadow: var(--enine_site_shadow_1) !important; }

/* Hide border on last card per row at each breakpoint */
/* nth-child offset +1 accounts for the col-12 header div (child 1) in _representations.html */
@media (max-width: 767.98px) {
  .sep-card > .border-end { border-right: 0 !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .sep-card > .border-end:nth-child(2n+1) { border-right: 0 !important; }
}
@media (min-width: 992px) {
  .sep-card > .border-end:nth-child(4n+1) { border-right: 0 !important; }
}

/* Hide border on last icon per row — compact layout (1 → 3 → 6) */
@media (max-width: 767.98px) {
  .sep-icon > .border-end { border-right: 0 !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .sep-icon > .border-end:nth-child(3n+1) { border-right: 0 !important; }
}
@media (min-width: 992px) {
  .sep-icon > .border-end:nth-child(6n+1) { border-right: 0 !important; }
}

.icon-stack { font-size: 1.5em; }
@media (min-width: 768px) { .icon-stack { font-size: 2em; } }

/* Float section: clearfix on desktop, flex-column on mobile so float element drops below content */
.float-section::after { content: ""; display: block; clear: both; }
@media (max-width: 767px) {
  .float-section { display: flex; flex-direction: column; }
  .float-section > .float-block-start,
  .float-section > .float-block-end,
  .float-section > .float-block-end-sm {
    order: 2;
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

/* Responsive float blocks for /1 auto templates.
   Mobile: full-width block, no float, bottom margin only.
   md+: 50% wide, floated left or right, with gap toward the prose. */
.float-block-start,
.float-block-end {
  width: 100%;
  margin-bottom: calc(var(--bs-gutter-x) * 0.5);
}
@media (min-width: 768px) {
  .float-block-start {
    float: left;
    width: 50%;
    margin-right: var(--bs-gutter-x);
    margin-bottom: calc(var(--bs-gutter-x) * 0.5);
  }
  .float-block-end {
    float: right;
    width: 50%;
    margin-left: var(--bs-gutter-x);
    margin-bottom: calc(var(--bs-gutter-x) * 0.5);
  }
  .float-block-end-sm {
    float: right;
    width: 33.333%;
    margin-left: var(--bs-gutter-x);
    margin-bottom: calc(var(--bs-gutter-x) * 0.5);
  }
}

.enine_site_img_contain { object-fit: contain; }

/* icon badge: 48×48 info-tinted square used in i/0, i/n/t, i/1/t */
.enine_site_icon_badge {
  width: var(--enine_site_icon_badge_size);
  height: var(--enine_site_icon_badge_size);
  background: rgba(var(--bs-info-rgb), 0.15);
  color: var(--bs-info) !important;
}

/* above-the-fold hero section min-height */
.enine_site_hero_section { min-height: var(--enine_site_hero_section_min_h); }

/* jumbotron text panel in split-hero layout */
.enine_site_jumbotron_panel {
  padding-block: var(--enine_site_jumbotron_panel_padding);
}

/* Hero section for m/0 */
.media-hero { min-height: var(--enine_site_hero_min_h); }
.media-hero-img { object-fit: contain; }
/* Homepage hero: title/subtitle/CTA row, optionally beside a hero image. */
.home-hero {
  padding-block: 3rem;
  background: var(--bs-primary);
  color: var(--bs-primary-fg);
  --link-c: var(--bs-primary-fg);
  min-height: var(--enine_site_hero_section_min_h);
  display: flex;
  align-items: center;
  font-size: clamp(1rem, 0.5rem + 2vw, 1.5rem);
}
.home-hero-columns { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; }
.home-hero-text { flex: 1 1 50%; }
.home-hero-media {
  flex: 1 1 50%;
  aspect-ratio: 16 / 9;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--enine_site_shadow_1);
}
.home-hero-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.home-hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: var(--enine_site_tracking_tight); margin-bottom: 1rem; }
.home-hero-subtitle { font-size: clamp(1.75rem, 6vw, 2.25rem); letter-spacing: var(--enine_site_tracking_loose); font-weight: 400; margin-bottom: 1.25rem; }
/* Smaller scale when sharing the row with a hero image. */
.home-hero-columns .home-hero-title { font-size: clamp(1.75rem, 4vw, 3rem); }
.home-hero-columns .home-hero-subtitle { font-size: clamp(1.2rem, 4vw, 1.5rem); }

.home-hero-actions { display: flex; align-items: start; gap: 0.75rem; flex-wrap: wrap; }
.home-hero-cta, .home-hero-cta-alt {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: var(--bs-border-radius);
  font-size: 1rem;
  text-decoration: none;
}
/* :visited pinned explicitly to the same colors as the unvisited state —
   the CTA sits on .home-hero's own per-site configurable background, and
   without this, a visited CTA falls through to the global :visited fallback
   (common/css/site.css), invisible whenever that background is dark. Same
   fix bauhaus_enine's theme.css already carries for its own equivalent
   button; bauhaus is the fallback every other theme's homepage renders
   through when it ships no home.html of its own. */
.home-hero-cta, .home-hero-cta:visited { background: var(--bs-info); color: var(--bs-info-fg); --link-c: var(--bs-info-fg); }
.home-hero-cta-alt, .home-hero-cta-alt:visited { background: transparent; border: 1px solid var(--bs-info); color: var(--bs-info); --link-c: var(--bs-info); }
@media (max-width: 575px) {
  .home-hero-actions { flex-direction: column; align-items: stretch; }
}
@media (min-width: 992px) {
  .home-hero-columns { flex-direction: row; align-items: center; gap: 2.5rem; }
}

/* m/n/m: media + text panel, alternating sides. Hand-written flex
   layout, no Bootstrap grid/utility classes — one class per element.
   Section padding now comes from `.enine-section` (also on this
   `<section>`) instead of a hardcoded 3rem, so this cell respects
   `--enine-section-pad` like every other one. `.mnm-heading`/
   `.mnm-tagline` already carried the same margin/opacity/weight values
   `.enine-section-title`/`.enine-section-tagline` use, so left as their
   own classes rather than renamed — `.mnm-heading-link` needs its own
   selector regardless, and `.mnm-title`/`.mnm-text` (the child row) are
   a distinct, larger-scale treatment with no equivalent in the shared
   grid-card shape, so not migrated. */
.pnc-mnm { position: relative; }
.mnm-alt { background: var(--bs-secondary); color: var(--bs-secondary-fg); --link-c: var(--bs-secondary-fg); }
.mnm-heading { margin-bottom: 0.25rem; }
.mnm-heading-link { color: inherit; text-decoration: none; }
.mnm-tagline { margin-bottom: 0.5rem; opacity: 0.5; font-weight: 600; }
.mnm-intro { margin: 0.5rem 0 3rem; }

.mnm-list { display: flex; flex-direction: column; gap: 3rem; padding-bottom: 1rem; }
.mnm-row { display: flex; flex-direction: column; gap: 1.25rem; }
.mnm-row-alt { flex-direction: column; }

.mnm-media { border-radius: var(--bs-border-radius); overflow: hidden; background: #fff; box-shadow: var(--enine_site_shadow_1); aspect-ratio: 16 / 9; }
.mnm-image { width: 100%; height: 100%; object-fit: contain; display: block; }

.mnm-panel { display: flex; flex-direction: column; }
.mnm-title { font-weight: bold; font-size: clamp(1.125rem, 2vw, 1.5rem); margin: 0.75rem 0 0.5rem; }
.mnm-title-link { color: inherit; text-decoration: none; }
.mnm-text { margin: 0; }
.mnm-spacer { flex: 1 1 auto; min-height: 1rem; }
.mnm-cta {
  align-self: flex-start;
  margin-top: 0.75rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--bs-info);
  border-radius: var(--bs-border-radius);
  color: var(--bs-info); --link-c: var(--bs-info);
  text-decoration: none;
  font-size: 1rem;
}
.mnm-cta:hover { background: var(--bs-info); color: var(--bs-info-fg); --link-c: var(--bs-info-fg); }
.mnm-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (min-width: 768px) {
  .mnm-row, .mnm-row-alt { flex-direction: row; align-items: stretch; gap: 2.5rem; }
  .mnm-row-alt { flex-direction: row-reverse; }
  .mnm-media, .mnm-panel { flex: 1 1 50%; min-width: 0; }
}

/* ── Page shells (contact/policy/blog/catalog/artifact/tag) ──────────
   Hand-written, single class per element. Responsive behaviour lives in
   the media query below, not in stacked Bootstrap breakpoint classes. */
.page-hero {
  padding-block: 3rem;
  background: var(--bs-primary);
  color: var(--bs-primary-fg);
  --link-c: var(--bs-primary-fg);
  min-height: var(--enine_site_hero_section_min_h);
  display: flex;
  align-items: center;
}
.page-hero-title { margin-bottom: 1rem; }
.page-hero-tagline { margin: 0; font-size: 1.25rem; font-weight: 400; opacity: 0.75; }
.page-hero-columns { display: flex; flex-direction: column; gap: 1.5rem; width: 100%; }
.page-hero-text { flex: 1 1 50%; }
.page-hero-media {
  flex: 1 1 50%;
  aspect-ratio: 16 / 9;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--enine_site_shadow_1);
}
.page-hero-image { width: 100%; height: 100%; object-fit: contain; display: block; }

.page-section { padding-block: 3rem; }
.page-section-tagline { margin: 0 0 1.5rem; opacity: 0.5; font-weight: 600; }

.page-columns { display: flex; flex-direction: column; gap: 2rem; }
.page-column { flex: 1 1 50%; min-width: 0; }

.page-policy-block { margin-bottom: 1.5rem; }
.page-policy-heading { margin-bottom: 0.5rem; }
.page-policy-list { margin: 0; }

.blog-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.blog-card-solo { width: 100%; }
.blog-card { display: flex; flex-direction: column; height: 100%; cursor: pointer; }
.blog-card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--bs-border-radius); margin-bottom: 1rem; }
.blog-card-title { margin-bottom: 0.25rem; }
.blog-card-text { margin: 0 0 1rem; opacity: 0.75; }
.blog-card-link { margin: 0; text-decoration: underline; }

/* Blog-item hero: full-bleed background image (per-artifact, so the URL
   is set inline as a custom property) with a translucent text panel. */
.blog-hero {
  padding-block: 3rem;
  min-height: var(--enine_site_hero_min_h);
  display: flex;
  align-items: center;
  background-image: var(--blog-hero-bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.blog-hero-panel-overlay {
  background: var(--enine_site_overlay_bg_strong);
  padding: 1.5rem;
  color: var(--bs-white);
  --link-c: var(--bs-white);
}

@media (min-width: 992px) {
  .page-hero-columns { flex-direction: row; align-items: center; gap: 2.5rem; }
  .page-columns { flex-direction: row; gap: 3rem; }
  .blog-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Artifact image gallery — every image, no cap ────────
   One grid holds every ArtifactImage, 3 columns, then 4 from 1200px. */
.artifact-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.artifact-gallery-item {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bs-body-bg);
  border: 1px solid color-mix(in srgb, var(--bs-body-color), transparent 90%);
  border-radius: var(--bs-border-radius);
}
.artifact-gallery-img { display: block; width: 100%; height: 100%; object-fit: contain; }

@media (min-width: 1200px) {
  .artifact-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Gallery lightbox — full-viewport image viewer ────────────
   Built once by common/js/site.js and shared markup/classes across
   every theme; each theme restyles it from here. Circular buttons that
   pick up the brand primary color on hover, matching bauhaus's own
   `.enine_sites_jumbotron` accent treatment. */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1090;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}
.gallery-lightbox.is-open { display: flex; }
body.gallery-lightbox-locked { overflow: hidden; }

.gallery-lightbox-stage {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.gallery-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--bs-border-radius);
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: fixed;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover { background: var(--bs-primary); color: var(--bs-primary-fg, #fff); }

.gallery-lightbox-close { top: 1.5rem; right: 1.5rem; width: 2.75rem; height: 2.75rem; font-size: 1.25rem; }
.gallery-lightbox-prev,
.gallery-lightbox-next { top: 50%; transform: translateY(-50%); width: 3.5rem; height: 3.5rem; font-size: 1.5rem; }
.gallery-lightbox-prev { left: 1.5rem; }
.gallery-lightbox-next { right: 1.5rem; }

/* ── Blog (components/blog/): lead = the m/n/m row, grid = the t/n/m child ── */
.blog-meta { font-size: 1rem; opacity: 0.5; font-weight: 600; }
.blog-post-cover { border-radius: var(--bs-border-radius); box-shadow: var(--enine_site_shadow_1); }

/* t0: the self intro sits in a col-lg-8 measure, the same width in every stock theme. */
@media (min-width: 992px) {
  .pnc-t0 > .container > * { max-width: 66.6667%; }
}

/* Timelines: the card view is a horizontal track, the list view a vertical rail. */
.enine-timeline {
  --tl-line: var(--bs-border-color);
  --tl-line-w: 2px;
  --tl-dot: 0.875rem;
  --tl-dot-bg: var(--bs-info);
  --tl-dot-fg: var(--bs-info-fg, var(--bs-body-bg));
  --tl-dot-radius: 50%;
  list-style: none;
  margin: 0;
  padding: 0;
}
.enine-timeline-dot {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tl-dot);
  height: var(--tl-dot);
  border-radius: var(--tl-dot-radius);
  background: var(--tl-dot-bg);
  color: var(--tl-dot-fg);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}
.enine-timeline-dot--icon { --tl-dot: 2.25rem; }
.enine-timeline-gap { font-size: 0.75rem; white-space: nowrap; padding-inline: 0.5rem; opacity: 0.7; }
.enine-timeline-date { margin-bottom: 0.25rem; }
.enine-timeline-title { margin-bottom: 0.5rem; }
.enine-timeline-body > :last-child { margin-bottom: 0; }

.enine-timeline--h { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; }
.enine-timeline--h .enine-timeline-item { flex: 0 0 min(18rem, 80%); scroll-snap-align: start; }
.enine-timeline--h .enine-timeline-marker { display: flex; align-items: center; min-height: 2.25rem; margin-bottom: 1rem; }
.enine-timeline--h .enine-timeline-line { flex: 1 1 auto; border-top: var(--tl-line-w) solid var(--tl-line); }
.enine-timeline--h .enine-timeline-line--end { flex: 0 0 1rem; }
.enine-timeline--h .enine-timeline-content { padding-right: 1.5rem; }

.enine-timeline--v { --tl-when: 0rem; }
.enine-timeline--v .enine-timeline-item { position: relative; padding: 0 0 2.5rem calc(var(--tl-when) + 3rem); }
.enine-timeline--v .enine-timeline-item:last-child { padding-bottom: 0; }
.enine-timeline--v .enine-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-when) + 1.125rem - var(--tl-line-w) / 2);
  top: 0.25rem;
  bottom: -0.25rem;
  border-left: var(--tl-line-w) solid var(--tl-line);
}
.enine-timeline--v .enine-timeline-dot { position: absolute; top: 0.25rem; left: calc(var(--tl-when) + 1.125rem - var(--tl-dot) / 2); }
.enine-timeline--v .enine-timeline-when { margin-bottom: 0.5rem; }
.enine-timeline--v .enine-timeline-when .enine-timeline-gap { padding-inline: 0; }
@media (min-width: 768px) {
  .enine-timeline--v { --tl-when: 9rem; }
  .enine-timeline--v .enine-timeline-when { position: absolute; top: 0; left: 0; width: calc(var(--tl-when) - 0.5rem); text-align: end; margin-bottom: 0; }
}

.enine-timeline-date { font-family: var(--bs-font-monospace); }

.enine-section-title:not(:has(+ .enine-section-tagline)) { margin-bottom: max(1rem, .5em); }
