/* Three ways to explore the work, on the shared page grid. */
/* Rendering: projects alternate on a 12-column grid. */
.showcase-rendering-hero .hero__copy > p { text-wrap: pretty; }
.showcase-intro { display: grid; gap: 32px; }
.showcase-intro > div { min-width: 0; }
.showcase-intro h2 { max-width: 12ch; }
.showcase-intro__copy p { margin-bottom: 24px; text-wrap: pretty; }
.showcase-intro__copy > :last-child { margin-bottom: 0; }
.showcase-projects { display: grid; gap: 64px; }
.showcase-project { display: grid; gap: 24px; margin: 0; min-width: 0; }
.showcase-project figcaption { margin: 0; }
.compare figcaption { font-weight: 700; }
.showcase-project h2 { font-size: var(--step-1); line-height: 1.05; }
.showcase-project .compare__frame { position: relative; display: grid; grid-template-columns: 1fr; gap: 16px; width: 100%; max-width: 480px; min-width: 0; overflow: hidden; border: 0; border-radius: var(--r-md); background: var(--blush-soft); box-shadow: var(--shadow-soft); }
.showcase-project .compare__img { display: block; grid-column: 1; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.showcase-project .compare__img--before { grid-row: 1; z-index: 1; }
.showcase-project .compare__img--after { grid-row: 2; }
.showcase-project .compare__tag { position: absolute; top: 16px; z-index: 2; margin: 0; padding: 8px 16px; border-radius: var(--r-pill); background: var(--white); color: var(--ink); box-shadow: var(--shadow-chip); font: 700 .875rem/1.4 var(--font-text); transform: none; }
.showcase-project .compare__tag--before { left: 16px; right: auto; }
.showcase-project .compare__tag--after { top: calc(50% + 24px); left: 16px; right: auto; }
.showcase-project--single .compare__frame { display: block; padding: 0; }
.showcase-project--single img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center; }

/* Portfolio: sticky filters and a complete mosaic at every count. */
.showcase-gallery-heading { position: sticky; top: var(--header-h); z-index: 5; background: var(--white); padding-block: 16px; display: grid; align-items: center; gap: 16px; margin-bottom: 24px; }
.showcase-gallery-heading h1 { margin: 0; font-size: var(--step-1); line-height: 1; }
.showcase-gallery-section .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; margin: 0; padding-block: 8px; background: var(--white); }
.showcase-gallery-section .filter-bar[hidden] { display: none; }
.showcase-gallery-section .filter-bar button { flex: 0 0 auto; min-height: 44px; padding: 8px 16px; border: 0; border-radius: var(--r-pill); background: var(--blush); color: var(--ink); box-shadow: none; font: 500 .9375rem/1.4 var(--font-text); white-space: nowrap; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast); }
.showcase-gallery-section .filter-bar button[aria-pressed="true"] { color: var(--white); background: var(--raspberry); }
.showcase-gallery-section .filter-bar button:focus-visible { outline-offset: -4px; }
.showcase-gallery-section .filter-bar button[aria-pressed="true"]:focus-visible { outline-color: var(--white); }
.showcase-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.showcase-gallery .gallery-card { min-width: 0; margin: 0; }
.showcase-gallery .gallery-card, .showcase-gallery a { scroll-margin-top: calc(var(--header-h) + var(--step-1) + 108px); }
.showcase-gallery .gallery-card[hidden] { display: none; }
.showcase-gallery .gallery-card:nth-child(odd of :not([hidden])):nth-last-child(1 of :not([hidden])) { grid-column: span 2; }
.showcase-gallery a { display: block; overflow: hidden; border-radius: var(--r-md); background: var(--blush); cursor: pointer; }
.showcase-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--t-med) var(--ease-out); }
.showcase-gallery figcaption { padding-top: 16px; font-size: .9375rem; line-height: 1.5; text-wrap: pretty; }
.showcase-gallery-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 24px 32px; margin-top: 48px; }
.showcase-gallery-actions .button[hidden] { display: none; }

/* FAQ: topic navigation beside grouped native disclosures. */
.showcase-faq-hero .hero__photo .hero-photo { width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 320px; object-fit: cover; object-position: center; }
.showcase-faq-layout { display: grid; gap: 32px; }
.showcase-faq-layout > h2 { margin: 0; font-size: var(--step-1); }
.showcase-faq-topics { display: flex; gap: 8px; min-width: 0; overflow-x: auto; padding: 4px; margin: -4px; }
.showcase-faq-topics a { display: flex; flex: 0 0 auto; align-items: center; min-height: 48px; padding: 12px 20px; border: 1px solid var(--blush); border-radius: var(--r-pill); background: var(--white); color: var(--raspberry); font: 600 1rem/1.4 var(--font-text); text-decoration: none; white-space: nowrap; }
.showcase-faq-topics a:active { background: var(--blush); }
.showcase-questions { display: grid; gap: 48px; min-width: 0; max-width: 70ch; }
.showcase-faq-group > h3 { margin-bottom: 24px; font-size: var(--step-2); line-height: 1.1; scroll-margin-top: 16px; }
.showcase-faq .faq-list { display: grid; gap: 16px; max-width: none; margin: 0; }
.showcase-faq .faq-list details { min-width: 0; border: 0; border-radius: var(--r-md); background: var(--white); box-shadow: none; }
.showcase-faq .faq-list summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-height: 88px; padding: 28px 24px; border-radius: var(--r-md); color: var(--ink); font: 600 1.25rem/1.3 var(--font-display); list-style: none; cursor: pointer; }
.showcase-faq .faq-list summary::-webkit-details-marker { display: none; }
.showcase-faq .faq-list summary::after { content: none; }
.showcase-faq .faq-list details[open] summary { color: var(--raspberry); background: var(--blush); border-radius: var(--r-md) var(--r-md) 0 0; }
.showcase-faq-icon { position: relative; flex: 0 0 32px; height: 32px; border-radius: var(--r-pill); background: var(--blush); }
.showcase-faq-icon::before, .showcase-faq-icon::after { content: ""; position: absolute; top: 15px; left: 9px; width: 14px; height: 2px; background: var(--raspberry); transition: transform var(--t-fast) var(--ease-out); }
.showcase-faq-icon::after { transform: rotate(90deg); }
.showcase-faq details[open] .showcase-faq-icon::after { transform: rotate(0); }
.showcase-faq .faq-list .faq-answer { padding: 24px; }
.showcase-faq .faq-answer p { text-wrap: pretty; }
.showcase-faq .faq-answer > :last-child { margin-bottom: 0; }
/* Answers open and close smoothly where the browser can animate details content; elsewhere
   they stay instant. The + turns into − as the icon makes a half turn. */
@media (prefers-reduced-motion: no-preference) {
  .showcase-faq .faq-list { interpolate-size: allow-keywords; }
  .showcase-faq .faq-list details::details-content {
    block-size: 0; overflow: clip;
    transition: block-size .3s var(--ease-out), content-visibility .3s allow-discrete;
  }
  .showcase-faq .faq-list details[open]::details-content { block-size: auto; }
  .showcase-faq .faq-list .faq-answer { opacity: 0; transform: translateY(-4px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
  .showcase-faq .faq-list details[open] .faq-answer { opacity: 1; transform: none; }
  @starting-style { .showcase-faq .faq-list details[open] .faq-answer { opacity: 0; transform: translateY(-4px); } }
  .showcase-faq-icon { transition: transform .3s var(--ease-out); }
  .showcase-faq details[open] .showcase-faq-icon { transform: rotate(180deg); }
}
.showcase-faq ol.showcase-faq__steps { list-style: decimal; display: grid; gap: 24px; margin-block: 32px; padding-left: 24px; }
.showcase-faq__steps li { padding-left: 8px; }
.showcase-faq__steps li::marker { color: var(--raspberry); font-weight: 700; }
.showcase-faq__steps h4 { margin-bottom: 8px; font: 600 var(--step-3)/1.3 var(--font-text); }
.showcase-faq summary:active, .showcase-gallery-section .filter-bar button:active { background: var(--blush); }
.showcase-gallery-section .filter-bar button[aria-pressed="true"]:active { background: var(--raspberry-deep); }

@media (max-width: 599.98px) {
  .showcase-gallery-heading { display: contents; }
  .showcase-gallery-heading h1 { padding-block: 16px; }
  .showcase-gallery-section .filter-bar { position: sticky; top: var(--header-h); z-index: 5; margin-bottom: 32px; }
  .showcase-gallery .gallery-card, .showcase-gallery a { scroll-margin-top: calc(var(--header-h) + 60px); }
}
@media (min-width: 600px) {
  .showcase-gallery { gap: 32px; }
}
@media (max-width: 767px) {
  .showcase-gallery-heading { margin-bottom: 16px; }
  .showcase-gallery-section .filter-bar { flex-wrap: nowrap; overflow-x: auto; }
  .showcase-faq .faq-answer p a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: anywhere; }
}
@media (min-width: 768px) {
  .showcase-project .compare__frame { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .showcase-project .compare__img--after { grid-row: 1; grid-column: 2; }
  .showcase-project .compare__tag--after { top: 16px; right: 16px; left: auto; }
}
@media (max-width: 1023px) {
  .showcase-rendering-hero .hero__grid, .showcase-faq-hero .hero__grid { gap: 24px; }
  .showcase-faq-hero .hero__copy .lead { margin-bottom: 0; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .showcase-faq-hero .hero__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: none; gap: 24px 32px; }
  .showcase-faq-hero .hero__copy { grid-column: 1 / 4; grid-row: 1; }
  .showcase-faq-hero .hero__media { grid-column: 4 / -1; grid-row: 1; align-self: center; }
  .showcase-faq-hero .hero__photo .hero-photo { max-height: none; aspect-ratio: 392 / 413; }
}
@media (min-width: 1024px) {
  .showcase-rendering-hero { padding-bottom: var(--space-section); }
  .showcase-intro, .showcase-project { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; }
  .showcase-intro > :first-child { grid-column: span 5; }
  .showcase-intro__copy { grid-column: 7 / -1; }
  .showcase-project { align-items: center; }
  .showcase-projects { gap: 80px; }
  .showcase-project figcaption { grid-column: 1 / 8; grid-row: 1; }
  .showcase-project .compare__frame { grid-column: 8 / -1; grid-row: 1; justify-self: end; }
  .showcase-project:nth-child(even) figcaption { grid-column: 6 / -1; }
  .showcase-project:nth-child(even) .compare__frame { grid-column: 1 / 6; justify-self: start; }
  .showcase-gallery-heading { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; margin-bottom: 32px; }
  .showcase-gallery-heading h1 { grid-column: span 4; }
  .showcase-gallery-section .filter-bar { grid-column: 5 / -1; }
  .showcase-gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .showcase-gallery .gallery-card { grid-column: span 2; }
  .showcase-gallery .gallery-card, .showcase-gallery a { scroll-margin-top: calc(var(--header-h) + max(var(--step-1), 60px) + 32px); }
  .showcase-gallery .gallery-card:nth-child(-n+2 of :not([hidden])) { grid-column: span 3; }
  .showcase-gallery .gallery-card:nth-child(3n of :not([hidden])):nth-last-child(1 of :not([hidden])) { grid-column: span 6; }
  .showcase-gallery .gallery-card:nth-child(3n of :not([hidden])):nth-last-child(2 of :not([hidden])),
  .showcase-gallery .gallery-card:nth-child(3n+1 of :not([hidden])):nth-last-child(1 of :not([hidden])) { grid-column: span 3; }
  .showcase-gallery .gallery-card:nth-child(3n+2 of :not([hidden])):nth-last-child(1 of :not([hidden])) { grid-column: span 2; }
  .showcase-gallery .gallery-card:nth-child(2 of :not([hidden])) { grid-column: span 3; }
  .showcase-gallery:has(> .gallery-card:nth-child(3n of :not([hidden])):nth-last-child(1 of :not([hidden]))) > .gallery-card:not([hidden]) { grid-column: span 2; }
  .showcase-gallery img { aspect-ratio: 4 / 3; }
  .showcase-faq-hero .hero__photo .hero-photo { max-height: 480px; aspect-ratio: 1 / 1; }
  .showcase-faq { padding-top: var(--space-section); }
  .showcase-faq-layout { grid-template-columns: minmax(180px, 240px) minmax(0, 760px); justify-content: space-between; column-gap: 64px; row-gap: 48px; }
  .showcase-faq-layout > h2 { grid-column: 2; grid-row: 1; }
  .showcase-faq-topics { position: sticky; top: calc(var(--header-h) + 24px); display: grid; grid-column: 1; grid-row: 2; align-self: start; overflow: visible; }
  .showcase-questions { grid-column: 2; grid-row: 2; gap: 64px; }
  .showcase-faq .faq-list summary { font-size: 1.375rem; }
}
@media (hover: hover) and (pointer: fine) {
  .showcase-gallery-section .filter-bar button:hover { background: var(--blush-soft); color: var(--raspberry); }
  .showcase-gallery-section .filter-bar button[aria-pressed="true"]:hover { background: var(--raspberry-deep); color: var(--white); }
  .showcase-faq .faq-list summary:hover { background: var(--blush); }
  .showcase-faq-topics a:hover { background: var(--blush); }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .showcase-gallery a:is(:hover, :focus-visible) img { transform: scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .showcase-gallery img, .showcase-faq-icon::before, .showcase-faq-icon::after { transition: none; }
}
