/* ═══════════════════════════════════════════════════════════════════════════
   Minimal Theme — style.css
   Design: Inter throughout, warm off-white background, pill system, 3-col grid
   ═══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Local aliases mapped to theme vars (injected by themeToCSS in base.njk) */
  --bg: var(--theme-color-bg);
  --ink: var(--theme-color-text);
  --accent: var(--theme-color-primary);
  --muted: var(--theme-color-secondary);
  --ink-mid: color-mix(in srgb, var(--theme-color-text) 72%, transparent);
  --radius: var(--theme-radius);
  --spacing: var(--theme-spacing);
  --rule: color-mix(in srgb, var(--theme-color-text) 12%, transparent);
  --hover: color-mix(in srgb, var(--theme-color-text) 4%, transparent);
  --card-bg: color-mix(in srgb, var(--theme-color-text) 4%, var(--theme-color-bg));
  --section-gap: clamp(6rem, 12vw, 10rem);
}

/* ── FOCUS VISIBLE (a11y baseline) ── */
*:focus { outline: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--theme-color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── SKIP LINK (WCAG) ── */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateY(-150%);
  padding: 12px 20px;
  background: var(--theme-color-primary);
  color: var(--theme-color-bg);
  font-family: var(--theme-font-body);
  font-weight: 600;
  text-decoration: none;
  z-index: 9999;
  transition: transform 120ms ease-out;
}
.skip-link:focus { transform: translateY(0); }

/* ── THEME TOGGLE BUTTON ── */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.theme-toggle__icon { width: 18px; height: 18px; }
.theme-toggle__icon--moon { display: none; }
html[data-theme="dark"] .theme-toggle__icon--sun { display: none; }
html[data-theme="dark"] .theme-toggle__icon--moon { display: block; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--theme-font-body);
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── PILL SYSTEM ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: transparent;
  color: var(--ink);
  cursor: default;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  line-height: 1;
  user-select: none;
}

.pill:hover {
  border-color: var(--ink-mid);
}

.pill-sm {
  font-size: 10px;
  padding: 4px 10px;
  letter-spacing: 0.06em;
}

.pill-number {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-color: var(--rule);
}

.pill-white {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
}

.pill-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.filter-pill {
  cursor: pointer;
}

/* ── LAYOUT ── */
.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── SECTION DIVIDER ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink);
}

.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ── NAV ── */
nav.minimal-nav {
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.nav-brand .status-dot {
  font-size: 9px;
  color: var(--ink);
  line-height: 1;
}

.nav-brand .status-text {
  font-weight: 400;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.nav-links a:hover {
  opacity: 0.45;
}

.nav-hamburger {
  display: none;
}

/* ── HERO ── */
.hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--rule);
}

.hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.hero-statement {
  font-family: var(--theme-font-heading);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 300;
  line-height: 1.35;
  max-width: 560px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ── INFO BAR ── */
.info-bar {
  border-bottom: 1px solid var(--rule);
}

.info-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.cta-arrow {
  display: inline-block;
  animation: bounce-arrow 1.8s ease-in-out infinite;
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 20px;
}

.filter-bar-left {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  max-width: 280px;
  line-height: 1.5;
}

.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── CARD GRID ── */
#work {
  padding-bottom: 80px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(var(--theme-grid-columns), 1fr);
  gap: var(--theme-grid-gap);
}

.card-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.project-card {
  aspect-ratio: 3 / 4;
  border-radius: var(--theme-image-radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-item:hover .project-card {
  transform: scale(1.02);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
}

.card-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.card-bg-placeholder {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #D4D2CF 0%, #BCBAB6 50%, #A8A6A2 100%);
  transition: transform 0.35s ease;
}

.card-item:hover .card-bg,
.card-item:hover .card-bg-placeholder {
  transform: scale(1.04);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.14) 52%,
    transparent 100%
  );
}

.card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 18px;
}

.card-title {
  font-size: 15px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.card-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.card-item:hover .card-pills {
  opacity: 1;
}

.card-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.55;
  padding: 0 2px;
}

/* ── INDEX FOOTER ── */
footer.minimal-footer {
  border-top: 1px solid var(--rule);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.footer-copy,
.footer-center {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.footer-up {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.footer-up:hover {
  opacity: 0.45;
}

/* ───────────────────────────────────────────
   PROJECT PAGE
─────────────────────────────────────────── */

/* ── BACK LINK ── */
.back-section {
  padding: 24px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.back-link:hover {
  color: var(--ink);
}

.back-link:hover .back-arrow {
  transform: translateX(-3px);
}

/* ── PROJECT HEADER ── */
.project-header {
  padding: 40px 0 56px;
}

.header-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.project-title {
  font-family: var(--theme-font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 16px;
}

.project-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
  max-width: 580px;
  margin-bottom: 32px;
}

.stats-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.stat-item:not(:last-child)::after {
  content: '';
  width: 1px;
  height: 12px;
  background: var(--rule);
  margin: 0 16px 0 0;
  flex-shrink: 0;
}

.stat-value {
  font-weight: 500;
  color: var(--ink);
}

/* ── COVER IMAGE ── */
.cover-section {
  padding-bottom: var(--section-gap);
}

.cover-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--theme-image-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s ease;
  display: block;
}

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

.cover-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--theme-image-radius);
  background: linear-gradient(145deg, #E2E0DC, #CCCAC6, #B8B6B2);
}

.cover-image:hover {
  transform: scale(1.01);
}

/* ── INFO GRID ── */
.info-section {
  padding-bottom: var(--section-gap);
}

.info-grid {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 48px;
  align-items: start;
}

.info-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.info-description {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink);
}

.info-description p + p {
  margin-top: 20px;
}

.metadata-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 28px;
}

.meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.meta-row:first-child {
  padding-top: 0;
}

.meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}

.meta-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

/* ── GALLERY ── */
.gallery-section {
  padding-bottom: var(--section-gap);
}

.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-row {
  display: grid;
  gap: 12px;
}

.gallery-row.two-col {
  grid-template-columns: 1fr 1fr;
}

.gallery-row.one-col {
  grid-template-columns: 1fr;
}

.gallery-img {
  border-radius: var(--theme-image-radius);
  overflow: hidden;
  cursor: pointer;
}

.gallery-img .img-inner {
  width: 100%;
  aspect-ratio: 4 / 3;
  transition: transform 0.3s ease;
  display: block;
  object-fit: cover;
}

.gallery-row.one-col .gallery-img .img-inner {
  aspect-ratio: 21 / 9;
}

.gallery-img:hover .img-inner {
  transform: scale(1.01);
}

/* fade-up on scroll */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── BLOCKS (shared content blocks) ── */
.project-blocks {
  padding-bottom: var(--section-gap);
}

.block-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 720px;
}

.block-text p {
  margin-bottom: 16px;
}

.block-text p + p {
  margin-top: 0;
}

.block-text h2 {
  font-family: var(--theme-font-heading);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
  margin: 28px 0 14px;
}

.block-text h3 {
  font-family: var(--theme-font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin: 20px 0 10px;
}

.block-text h4 {
  font-family: var(--theme-font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-mid);
  margin: 16px 0 8px;
}

.block-text ul,
.block-text ol {
  padding-left: 1.4rem;
  margin-bottom: 16px;
}

.block-text li {
  margin-bottom: 6px;
  line-height: 1.65;
}

.block-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--ink);
  transition: opacity 0.15s ease;
}

.block-text a:hover {
  opacity: 0.6;
}

.block-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.block-gallery figure {
  border-radius: var(--theme-image-radius);
  overflow: hidden;
}

.block-gallery figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.block-gallery figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.block-single-image {
  margin-bottom: 32px;
}

.block-single-image img {
  width: 100%;
  border-radius: var(--theme-image-radius);
  display: block;
}

.block-single-image figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  text-align: center;
}

.block-two-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.block-two-images figure {
  border-radius: var(--theme-image-radius);
  overflow: hidden;
}

.block-two-images figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.block-two-images figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.block-auto-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.block-auto-gallery figure {
  border-radius: var(--theme-image-radius);
  overflow: hidden;
}

.block-auto-gallery figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.block-auto-gallery figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.block-info {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 32px;
}

.block-info dt {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}

.block-info dt:first-child {
  margin-top: 0;
}

.block-info dd {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 4px;
}

.block-links {
  list-style: none;
  margin-bottom: 32px;
}

.block-links li + li {
  margin-top: 8px;
}

.block-links a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.15s ease;
}

.block-links a:hover {
  opacity: 0.6;
}

.block-video {
  margin-bottom: 32px;
}

.block-video__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--theme-image-radius);
  overflow: hidden;
}

.block-video__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.block-video__caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
}

.block-quote {
  border-left: 3px solid var(--rule);
  padding-left: 20px;
  margin-bottom: 32px;
  max-width: 720px;
}

.block-quote blockquote {
  font-size: 17px;
  font-weight: 300;
  font-style: italic;
  line-height: 1.65;
  color: var(--ink);
}

.block-quote cite {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  font-style: normal;
}

.block-separator {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

.block-code {
  background: var(--card-bg);
  border-radius: var(--theme-radius);
  padding: 20px;
  margin-bottom: 32px;
  overflow-x: auto;
}

.block-code pre {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
}

.block-before-after {
  margin-bottom: 32px;
}

.block-heading {
  margin-bottom: 32px;
}

.block-heading h2 {
  font-family: var(--theme-font-heading);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.block-heading h3 {
  font-family: var(--theme-font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}

.block-heading h4 {
  font-family: var(--theme-font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-mid);
}

.ba-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--theme-image-radius);
  aspect-ratio: 16 / 9;
  cursor: col-resize;
  user-select: none;
}

.ba-container img {
  display: block;
  width: 100%;
  height: auto;
}

.ba-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
}

.ba-overlay img {
  position: absolute;
  top: 0;
  left: 0;
  height: auto;
  max-width: none;
}

.ba-slider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: #fff;
  transform: translateX(-50%);
  cursor: col-resize;
}

.ba-slider::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ba-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.5;
  display: block;
}

/* ── PROCESS ── */
.process-section {
  padding-bottom: 64px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.process-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.process-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.process-card-number {
  margin-bottom: 16px;
}

.process-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.process-card-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.65;
}

/* ── NEXT PROJECT ── */
.next-section {
  border-top: 1px solid var(--rule);
  padding: 48px 0 64px;
}

.next-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.next-project-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}

.next-project-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.next-project-preview {
  width: 200px;
  height: 120px;
  border-radius: var(--theme-image-radius);
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.2s ease;
  background: linear-gradient(145deg, #DDDBD8, #C4C2BE);
}

.next-project-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.next-project-link:hover .next-project-preview {
  transform: scale(1.02);
}

.next-project-name {
  font-family: var(--theme-font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.next-project-meta {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.next-arrow {
  font-size: 2rem;
  font-weight: 300;
  color: var(--ink);
  display: inline-block;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.next-project-link:hover .next-arrow {
  transform: translateX(6px);
}

/* ── PROJECT-NAV (shared include) ── */
.project-nav {
  padding: 0 0 64px;
}

.project-nav .filet {
  border: none;
  border-top: 1px solid var(--rule);
  margin-bottom: 24px;
}

.project-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-nav__prev,
.project-nav__next {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.project-nav__prev:hover,
.project-nav__next:hover {
  color: var(--ink);
}

/* ── PAGE CONTENT (page.njk) ── */
.page-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 32px;
}

.page-content h1 {
  font-family: var(--theme-font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 32px;
}

/* ── PROSE ── */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  margin: 32px 0 16px;
}

.prose h3 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  margin: 24px 0 12px;
}

.prose p {
  margin-bottom: 16px;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  margin-bottom: 16px;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 4px;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose blockquote {
  border-left: 2px solid var(--rule);
  padding-left: 16px;
  color: var(--muted);
  margin-bottom: 16px;
}

.prose code {
  font-size: 0.875em;
  background: var(--card-bg);
  padding: 0.15em 0.3em;
}

.prose pre {
  background: var(--card-bg);
  padding: 16px;
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: var(--theme-radius);
}

/* ── FREE PAGE BLOCK OVERRIDES (.page-content scope) ── */
/* Gallery blocks in free pages are single-column */
.page-content .block-gallery {
  grid-template-columns: 1fr;
}

.page-content .block-auto-gallery {
  grid-template-columns: 1fr;
}

/* Single-image: full width of wrapper, no extra constraints */
.page-content .block-single-image {
  margin-left: 0;
  margin-right: 0;
}

/* Two-images stacked vertically on free pages */
.page-content .block-two-images {
  grid-template-columns: 1fr;
}

/* Text block: no internal max-width, uses full .page-content width */
.page-content .block-text {
  max-width: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .wrapper { padding: 0 20px; }

  .hero { padding: 48px 0 36px; }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }

  .hero-stats {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .filter-pills { justify-content: flex-start; }

  .footer-center { display: none; }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-row.two-col {
    grid-template-columns: 1fr;
  }

  .block-gallery,
  .block-two-images,
  .block-auto-gallery {
    grid-template-columns: 1fr;
  }

  .next-project-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .next-project-preview {
    width: 100%;
    height: 160px;
  }

  .next-project-link {
    flex-direction: column;
    align-items: flex-start;
  }

  .next-arrow { align-self: flex-end; }

  .stats-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .stat-item:not(:last-child)::after { display: none; }
  .stat-item { padding: 4px 0; }

  .footer-inner {
    height: auto;
    padding: 20px 0;
  }

  /* Mobile nav */
  .nav-links { display: none; }
  .nav-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-hamburger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--ink);
  }
  .nav-mobile {
    border-top: 1px solid var(--rule);
    padding: 16px 0;
  }
  .nav-mobile a {
    display: block;
    font-size: 14px;
    padding: 12px 0;
    color: var(--ink);
    text-decoration: none;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links a { min-height: 44px; }
  .back-link { padding: 12px 0; min-height: 44px; }
}

@media (max-width: 540px) {
  .card-grid { grid-template-columns: 1fr; }

  .hero-statement { font-size: clamp(1.75rem, 7vw, 2.5rem); }
}

@media (max-width: 480px) {
  .nav-brand .status-dot,
  .nav-brand .status-text { display: none; }

  .project-header { padding: 28px 0 40px; }
}

/* ── PAGE ENTRY ANIMATION ── */
body {
  animation: page-enter 0.4s ease-out both;
}
@keyframes page-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── REDUCED MOTION (phase 45 a11y baseline) ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { animation: none; }
  .fade-up,
  .scroll-reveal { opacity: 1 !important; transform: none !important; }
  .ba-slider__overlay,
  .ba-slider img,
  .ba-overlay img,
  .ba-overlay { transition: none !important; }
}
