/* ── Project Detail Page ── */

/* Body copy — used inside the story text column, and standalone for
   projects that don't have enough photos yet for the story/gallery split. */
.project-detail-copy { max-width: 72ch; margin: 2rem 0; }
.project-detail-copy p { margin-bottom: 1rem; }
.project-detail-copy h2, .project-detail-copy h3 { margin: 2rem 0 1rem; }
.project-detail-copy ul, .project-detail-copy ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.project-detail-copy a { text-decoration: underline; }
.project-detail-back { padding: 2rem; text-align: center; }

/* ── Intro v2 — big title left, description right, no hero image ── */
.project-intro { padding: 8.5rem 2rem 4rem; }

.project-intro-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(320px, 560px) 1fr;
  gap: 3rem;
  align-items: start;
}

.project-intro-title h1 {
  font-size: clamp(2.6rem, 4.5vw, 4.2rem);
  line-height: 1.05;
  color: var(--charcoal);
}
.project-intro-title h1 em { font-style: italic; color: var(--warm); }

.project-intro-copy { padding-top: 0.5rem; }
.project-intro-copy .project-detail-copy { margin: 0 0 2rem; max-width: 60ch; }
.project-intro-copy .project-detail-copy p { color: #6b635c; line-height: 1.8; font-size: 0.97rem; }

.btn-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--warm);
  padding: 0.85rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  transition: background 0.2s, color 0.2s;
}
.btn-pill:hover { background: var(--warm); color: var(--white); }

/* Quick-fact cards — playful, slightly-off grid under the title. */
.project-intro-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1.1rem;
  margin: 2rem 0 0;
}
.stat-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 10px 26px -12px rgba(44, 40, 36, 0.22);
  padding: 1.2rem 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:nth-child(1) { transform: rotate(-1.6deg) translateY(-3px); }
.stat-card:nth-child(2) { transform: rotate(1.4deg) translateY(3px); }
.stat-card:nth-child(3) { transform: rotate(1.2deg) translateY(-2px); }
.stat-card:nth-child(4) { transform: rotate(-1.8deg) translateY(2px); }
.stat-card:hover {
  transform: rotate(0deg) translateY(-4px) scale(1.04);
  box-shadow: 0 16px 32px -14px rgba(44, 40, 36, 0.32);
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.7rem;
}
.stat-icon svg { width: 15px; height: 15px; stroke: var(--white); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.stat-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 0.3rem;
}
.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.3;
}

@media (max-width: 768px) {
  .project-intro { padding: 6.5rem 1.5rem 3rem; }
  .project-intro-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-intro-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
  /* Stacked single column: the playful tilt is meant for cards seen side by
     side, so it's switched off here to keep a clean vertical list. */
  .project-intro-stats .stat-card { transform: none; }
}

/* ── Hero — split: text left, image carousel right ── */
.project-hero {
  display: grid;
  grid-template-columns: minmax(380px, 640px) 1fr;
  height: 90vh;
  min-height: 560px;
  overflow: hidden;
}

.project-hero-content {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 4rem 4rem 5rem;
  position: relative;
}

.project-hero-content::before {
  content: '';
  position: absolute;
  left: 2.5rem;
  top: 30%;
  bottom: 30%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--stone) 30%, var(--stone) 70%, transparent);
}

.project-hero-content .label {
  color: var(--warm);
  margin-bottom: 1.5rem;
}
.project-hero-content h1 {
  font-size: clamp(2.6rem, 4vw, 4.5rem);
  color: var(--charcoal);
  line-height: 1.1;
}
.project-hero-content h1 em { font-style: italic; color: var(--warm); }

.scroll-hint {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--stone);
}
.scroll-hint-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--stone));
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%       { transform: translateY(6px); opacity: 1; }
}
.scroll-hint svg { animation: bounceDown 2.2s ease-in-out infinite; }

/* ── Hero image carousel (right side) ── */
.project-hero-slides {
  position: relative;
  overflow: hidden;
}

@keyframes kenBurns {
  from { transform: scale(1); }
  to   { transform: scale(1.07); }
}

.ph-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.4s ease;
}
.ph-slide.active { opacity: 1; pointer-events: auto; }
.ph-slide picture { display: block; width: 100%; height: 100%; }
.ph-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.ph-slide.active img {
  animation: kenBurns 9s ease forwards;
}

/* Prev / Next arrows */
.ph-prev, .ph-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(253, 250, 247, 0.42);
  background: rgba(253, 250, 247, 0.12);
  color: var(--cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: background 0.3s, border-color 0.3s, transform 0.25s;
}
.ph-prev { left: 1rem; }
.ph-next { right: 1rem; }
.ph-prev:hover, .ph-next:hover {
  background: rgba(253, 250, 247, 0.28);
  border-color: rgba(253, 250, 247, 0.85);
  transform: translateY(-50%) scale(1.08);
}
.ph-prev svg, .ph-next svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Dot navigation */
.ph-nav {
  position: absolute;
  bottom: 1.4rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  z-index: 3;
}
.ph-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(253, 250, 247, 0.45);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}
.ph-dot.active {
  background: var(--cream);
  transform: scale(1.55);
}

/* ── Meta strip — light style ── */
.project-meta {
  background: var(--bg);
  border-top: 1px solid var(--stone);
  border-bottom: 1px solid var(--stone);
}
.project-meta-inner {
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1fr;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.6rem 1.75rem;
  position: relative;
  cursor: default;
}
.meta-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 1px;
  background: rgba(139, 111, 94, 0.18);
}

.meta-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--warm);
  border: 1px solid var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.meta-icon svg {
  width: 17px;
  height: 17px;
  stroke: var(--white);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.meta-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.meta-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stone);
}
.meta-value {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--charcoal);
  line-height: 1.2;
}

/* ── Gallery — mosaic (tall accent tile + smaller tiles), no panoramic crop strip ── */
.project-gallery {
  background: var(--bg);
  padding: 3rem 2rem;
}

.gallery-label {
  display: block;
  max-width: 1600px;
  margin: 0 auto 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm);
}

/* Rhythm repeats every 5 photos so it works for any gallery length:
   tall accent tile, then four regular tiles. */
.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 240px;
  grid-auto-flow: dense;
  gap: 4px;
  max-width: 1600px;
  margin: 0 auto;
}

.gal-item {
  overflow: hidden;
  position: relative;
}
.gal-item picture { display: block; height: 100%; }
.gal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: var(--cursor-view);
  transition: transform 0.7s ease;
}
.gal-item:hover img { transform: scale(1.06); }

/* Phase tag (Realizace / Průběh / Návrh) — quiet label in the photo's corner. */
.gal-phase {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.4;
  color: #2b2b2b;
  background: rgb(255 255 255 / 0.82);
  pointer-events: none;
}

/* Only give the first tile the tall accent treatment once there are enough
   photos to fill the resulting grid — otherwise a small (1–4 photo) mosaic
   leaves an empty gap where a missing 3rd/4th tile would have gone.
   `:not(.is-filterable)` — gallery-filter.js adds that class only once it
   has actually taken over accenting (see the room-filterbar block below);
   without JS the mosaic never gets `.is-filterable` and this nth-child rule
   is what still draws the accent tile, so a no-JS visit looks unchanged. */
.gallery-mosaic:not(.is-filterable):has(.gal-item:nth-child(5)) .gal-item:nth-child(5n+1) { grid-column: span 2; grid-row: span 2; }

/* ── Gallery grid v2 — masonry rhythm built from row-groups that each sum
   to exactly 12 columns and share a matched row height, so grid rows tile
   without leftover slivers. Cycle repeats every 5 photos: a hero pair
   (7+5 cols, matched height) then a detail triple (4+4+4 cols, matched
   height). Because a gallery's photo count is rarely a multiple of 5, the
   ":last-child" / ":nth-last-child(2)" rules below re-pattern whatever is
   left over (1, 2, 3 or 4 trailing photos) into its own complete, matched
   row instead of leaving a lone/partial tile that can't fill 12 columns.
   Seams are drawn as a background-colored outline rather than `gap`, so
   tiles keep rounded corners. Preview-only on project-v2.njk for now. ── */
.gallery-grid-v2 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 1px;
  grid-auto-flow: dense;
  max-width: 1600px;
  margin: 0 auto;
  --g: 6px;
}

.grid-item {
  position: relative;
  outline: var(--g) solid var(--cream);
  outline-offset: calc(var(--g) * -1);
  border-radius: 4px;
  overflow: hidden;
  cursor: var(--cursor-view);
}
.grid-item picture { display: block; height: 100%; }
.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.grid-item:hover img { transform: scale(1.05); }

.grid-zoom {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(44, 40, 36, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.grid-item:hover .grid-zoom { opacity: 1; }
.grid-zoom svg { width: 14px; height: 14px; stroke: var(--white); fill: none; }

.grid-item:nth-child(5n+1) { grid-column: span 7; grid-row: span 480; }
.grid-item:nth-child(5n+2) { grid-column: span 5; grid-row: span 480; }
.grid-item:nth-child(5n+3) { grid-column: span 4; grid-row: span 360; }
.grid-item:nth-child(5n+4) { grid-column: span 4; grid-row: span 360; }
.grid-item:nth-child(5n) { grid-column: span 4; grid-row: span 360; }

/* Tail fixes — no matter how many photos a gallery has, the trailing
   remainder (mod 5) never leaves a partial row:
   remainder 1 or 3: the trailing photo is alone with no pair/triple-mate,
   so give it the full 12 columns instead of a short span.
   remainder 4: the trailing pair (positions 3 and 4 of the triple, missing
   their 5th) gets widened from 4+4 to 6+6 so they still sum to 12. */
.grid-item:last-child:nth-child(5n+1),
.grid-item:last-child:nth-child(5n+3) { grid-column: span 12; grid-row: span 480; }
.grid-item:nth-last-child(2):nth-child(5n+3),
.grid-item:last-child:nth-child(5n+4) { grid-column: span 6; grid-row: span 360; }

@media (max-width: 768px) {
  /* Mobile: drop the masonry rhythm (it's built for a fixed-width desktop
     grid) in favor of a single column of equal-size square tiles, stacked
     one per row — simplest thing that reads well at phone width regardless
     of how many photos the gallery has. Column/row spans from the desktop
     masonry rules above are cancelled since there's only one column here. */
  .gallery-grid-v2 {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    --g: 4px;
    gap: var(--g);
  }
  .grid-item {
    /* !important: the desktop masonry rules above target :nth-child /
       :last-child combinations, which carry higher selector specificity
       than a plain .grid-item rule can beat — needed to reliably cancel
       every one of them for this single-column mobile layout. */
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100%;
    aspect-ratio: 1;
  }
}

/* ── Next project ── */
/* Contained band (matches .section-inner's max-width/side gutter) with a
   square hero image in the same format as the Portfolio grid (.project-img
   in projects.css: aspect-ratio 1/1, object-fit cover, 0.7s scale(1.06)
   hover). No fixed band height — the square image sets it via aspect-ratio. */
.project-next {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  align-items: center;
  gap: 3rem;
  cursor: pointer;
  text-decoration: none;
  border-top: 1px solid rgba(196, 181, 165, 0.5);
}
.project-next-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.project-next-image picture { display: block; width: 100%; height: 100%; }
.project-next-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}
.project-next:hover .project-next-image img { transform: scale(1.06); }

.project-next-text {
  color: var(--charcoal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 4rem;
  gap: 1rem;
}
.project-next-text h3 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--charcoal);
}
.project-next-meta {
  color: #6b635c;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}
.project-next-text .arrow {
  font-size: 1.5rem;
  color: var(--warm);
  transition: transform 0.3s;
}
.project-next:hover .arrow { transform: translateX(6px); }

.project-next-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding: 0.9rem 2rem;
  background: #2C2824;
  color: #F5F0EA;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  align-self: flex-start;
  transition: background 0.25s;
}
.project-next-btn::after {
  content: '→';
  font-size: 1rem;
  letter-spacing: 0;
  transition: transform 0.3s;
}
.project-next:hover .project-next-btn {
  background: var(--warm);
}
.project-next:hover .project-next-btn::after {
  transform: translateX(5px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .project-hero {
    grid-template-columns: 1fr;
    grid-template-rows: 55vw auto;
    height: auto;
    min-height: 0;
  }
  .project-hero-slides { order: -1; min-height: 280px; }
  .project-hero-content {
    padding: 3rem 1.5rem 3.5rem;
    justify-content: flex-end;
  }
  .project-hero-content::before { display: none; }
  .scroll-hint { display: none; }

  /* Mobile: meta cards as a 2×2 grid — vertical divider between columns, horizontal under the first row */
  .project-meta-inner { grid-template-columns: 1fr 1fr; }
  .meta-item { gap: 0.7rem; padding: 1.1rem 1rem; }
  .meta-icon { width: 34px; height: 34px; }
  .meta-icon svg { width: 15px; height: 15px; }
  .meta-value { font-size: 0.95rem; }
  .meta-item:nth-child(even)::after { display: none; }
  .meta-item:nth-child(-n+2) {
    border-bottom: 1px solid rgba(139, 111, 94, 0.18);
  }

  /* Mobile: uniform 2-col square grid like the Portfolio cards — no 2×2 accent */
  .gallery-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 3px;
  }
  .gal-item { aspect-ratio: 1 / 1; }
  .gallery-mosaic:not(.is-filterable):has(.gal-item:nth-child(5)) .gal-item:nth-child(5n+1) { grid-column: auto; grid-row: auto; }

  .project-next { grid-template-columns: 1fr; padding: 0; }
  .project-next { padding-top: 2rem; }
  .project-next-text { order: 2; padding: 2rem; }
  /* Same size as one gallery tile: square, inset 2rem like the gallery mosaic */
  .project-next-image { order: 1; width: auto; margin-inline: 2rem; aspect-ratio: 1 / 1; }
}
/* Tablet: the gallery shows 2 columns here, so image and text sit side by side, each one tile wide */
@media (min-width: 601px) and (max-width: 768px) {
  .project-next { grid-template-columns: 1fr 1fr; gap: 4px; padding: 2rem; align-items: center; }
  .project-next-image { margin-inline: 0; }
  .project-next-text { padding: 1rem 0 1rem 2rem; }
}

/* ── Project showcase — "Variant B" (sticky sidebar) ──────────────────
   Shared by project-v3.njk and project.njk via
   _includes/partials/project-showcase.njk. Description text in a sticky
   left column (~34%) beside the gallery mosaic (~66%, 3 columns instead
   of the default 4 so tiles aren't too small); when there's no text the
   mosaic runs full width at its normal 4 columns; when there's no gallery
   the text renders at normal reading width, not as a sidebar.
   --nav-h is the rendered height of #nav (nav-inner's 1.2rem top/bottom
   padding + the 1.3rem/line-height:1.7 .nav-logo + 1px border ≈ 74.8px),
   measured against the built site in headless Chrome; the ~2rem after it
   is breathing room so the sticky text doesn't touch the nav on scroll. ── */
.project-showcase-b {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
  background: var(--bg);
}

.showcase-layout {
  display: grid;
  grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);  /* minmax(0,…): the nowrap chip row must not widen the column */
  gap: 3rem;
  align-items: start;
}

.showcase-text {
  position: sticky;
  top: calc(var(--nav-h, 4.7rem) + 2rem);
  align-self: start;
  max-width: none;
  margin: 0;
}
.showcase-text p { color: #6b635c; line-height: 1.8; font-size: 0.97rem; }

.showcase-gallery .gallery-mosaic {
  grid-template-columns: repeat(3, 1fr);
  max-width: none;
  padding: 0;
}

/* Text-only case (no gallery): normal reading width, not a sidebar. */
.showcase-text-only { max-width: 65ch; margin: 0 auto; }
.showcase-text-only p { color: #6b635c; line-height: 1.8; font-size: 0.97rem; }

@media (max-width: 768px) {
  .showcase-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .showcase-text { position: static; }
  .showcase-gallery .gallery-mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; padding: 0; }
}

/* ── Room filter bar — chips above the mosaic, one per distinct room
   present in this gallery (rendered server-side by project-showcase.njk
   only when ≥2 rooms exist), filtered client-side by gallery-filter.js.
   Sticky under the fixed nav, same offset math as .showcase-text above. ── */
.room-filterbar {
  position: sticky;
  top: var(--nav-h, 4.7rem);  /* flush under the nav, which nav.js keeps visible while the gallery is on screen */
  z-index: 5;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  padding: 0.85rem 0;
  margin-bottom: 1rem;
}
.room-filterbar::-webkit-scrollbar { display: none; }

.room-chip {
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid var(--stone);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.room-chip:hover:not(.is-active) { color: var(--warm); border-color: var(--warm); }
.room-chip.is-active { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.room-chip-count { opacity: 0.65; margin-left: 0.35em; font-size: 0.9em; }
.room-chip.is-active .room-chip-count { opacity: 0.8; }

/* Filtering transition — only while gallery-filter.js has taken over (it
   adds `.is-filterable`, see the nth-child rules above). Hidden items are
   removed from grid flow, so no holes; the fade is a visual transition on
   the way out/in only. `.is-accent` is applied by JS to the 5n+1 tile among
   the currently VISIBLE items, recomputed on every filter change. */
.gallery-mosaic.is-filterable .gal-item {
  transition: opacity 250ms ease, transform 250ms ease;
}
.gallery-mosaic.is-filterable .gal-item.is-accent {
  grid-column: span 2;
  grid-row: span 2;
}
.gallery-mosaic.is-filterable .gal-item.is-leaving,
.gallery-mosaic.is-filterable .gal-item.is-entering {
  opacity: 0;
  transform: scale(0.94);
}
@media (prefers-reduced-motion: reduce) {
  .gallery-mosaic.is-filterable .gal-item { transition: none; }
}

/* ── Service page — numbered sections with two-column eyebrow rows ── */
.service-section-head { display: flex; align-items: baseline; gap: 1rem; margin: 3rem 0 0.5rem; }
.service-section-head:first-child { margin-top: 0; }
.service-section-num {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--warm);
  line-height: 1;
}
.service-section-head h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--charcoal);
}

.service-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(139, 111, 94, 0.18);
}
.service-section-head + .service-row { border-top: none; }

.service-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm);
  line-height: 1.6;
}
.service-copy { max-width: 60ch; }
.service-copy p { color: #6b635c; line-height: 1.8; margin: 0; }

.service-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--charcoal);
  text-align: center;
  margin: 2.5rem auto;
}

@media (max-width: 640px) {
  .service-row { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.25rem 0; }
}

/* ── Service page — benefit grid ("Proč byste mi měli svěřit...") ── */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem 2.5rem;
  margin: 2rem 0;
}
.benefit-grid .benefit-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.benefit-grid .benefit-card:last-child:nth-child(odd) .benefit-text { max-width: 60ch; }

.benefit-card { display: flex; gap: 1.1rem; align-items: flex-start; }
.benefit-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.benefit-icon svg { width: 20px; height: 20px; stroke: var(--white); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.benefit-text h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}
.benefit-text p { font-size: 0.9rem; color: #6b635c; line-height: 1.65; }

@media (max-width: 700px) {
  .benefit-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .benefit-grid .benefit-card:last-child:nth-child(odd) .benefit-text { max-width: none; }
}

/* Mobile square grid: cancel the JS-assigned accent tile too (this rule must
   come after the .is-filterable .is-accent rule above to win the cascade). */
@media (max-width: 768px) {
  .gallery-mosaic.is-filterable .gal-item.is-accent { grid-column: auto; grid-row: auto; }
}

/* Phones: one square photo per row */
@media (max-width: 600px) {
  .gallery-mosaic,
  .showcase-gallery .gallery-mosaic { grid-template-columns: 1fr; }
}

/* ── FAQ page (/caste-otazky/) — expandable questions, first one open ── */
.faq-page { padding-top: 9rem; }
.faq-page h1 { margin-bottom: 0.5rem; }
.faq-list { max-width: 820px; margin: 2.5rem 0 3.5rem; border-top: 1px solid rgba(196, 181, 165, 0.6); }
.faq-item { border-bottom: 1px solid rgba(196, 181, 165, 0.6); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.3;
}
.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  color: var(--warm);
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover h2 { color: var(--warm); }
.faq-item summary:focus-visible { outline: 2px solid var(--warm); outline-offset: 4px; }
.faq-answer { padding: 0 0 1.5rem; max-width: 70ch; }
.faq-answer p { color: #6b635c; line-height: 1.8; }
.faq-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.faq-cta p { font-family: var(--font-heading); font-size: 1.4rem; font-style: italic; }
/* ── Legal pages (/ochrana-osobnich-udaju/) ── */
.legal-page { padding-top: 9rem; padding-bottom: 4rem; }
.legal-page h1 { margin-bottom: 0.5rem; }
.legal-updated { font-size: 0.85rem; color: var(--stone); }
.legal-page .project-detail-copy { line-height: 1.8; }
.legal-page .project-detail-copy li { margin-bottom: 0.4rem; }

@media (max-width: 768px) {
  .legal-page { padding-top: 7rem; }
  .faq-page { padding-top: 7rem; }
  .faq-item summary { padding: 1.1rem 0; }
}

/* Form success page (/dekuji/) — reuses the legal-page frame */
.thank-you-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
