/* ============================================================
 * KRS GALLERY — COMBINED FRONT-END CSS
 *
 * Merge policy:
 * 1) Gallery-only/scoped additions come first.
 * 2) single-portfolio.css comes second and is authoritative.
 * 3) :where(.KrsGalleryPage) keeps Gallery scoping without adding
 *    specificity, so later single-portfolio declarations win when
 *    the same property conflicts.
 * ============================================================ */

/* ============================================================
 * KRS GALLERY PAGE TEMPLATE
 * Loaded only by template-krs-gallery.php.
 * ============================================================ */

/* FAIRWAY */
.postid-2942 .KrsBuildSection__overlay {
    background-color: rgba(0,0,0,.3)!important;
}



/* ============================================================
 * QUOTE IN HERO
 * ============================================================ */

.PQuoteDiv {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0;
    align-items: center;
    border-top: 1px solid var(--dk-line);
    padding-top: 1.375rem;
    margin-top: .375rem;
    max-width: 800px;    
}

.PQuote {
    grid-column: 1 / -1;
    width: 100%;
    color: var(--dark-ink) !important;
    margin: 0px auto 12px 0;
    font-family: Newsreader, Georgia, serif;
    font-style: italic;
    text-align: left;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1.2;
    max-width: 100%;
    text-wrap: pretty;    
}

.PQuotePic {
    grid-column: 1;
    grid-row: 2;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.QuoteMeta {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    text-align: left;
    padding-left:12px; 
}

.PQouteName{
    font-size: 16px;
    line-height: 1em;
    padding:0;
    width: 100%;
    text-align: left;
    color: var(--dark-ink) !important;
    font-weight: 500;
    margin: 0 auto 4px auto;
    font-family: "IBM", Monospace;    
}

.PQouteTitle,
.PQouteCo {
    font-size: 14px;
    line-height: 1em;
    padding:0;
   width: 100%;    
    text-align: left;    
    font-family: "IBM", Monospace;
    color: var(--dk-muted) !important;
    margin: 0 auto 4px auto;
    letter-spacing: 0;
    font-weight: 400;

}





.KrsGalleryPage {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Gallery hero: true full viewport on desktop/landscape. */
.KrsPortfolioHero {
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 100vh;
}

/* Full-screen build/image rows. */
.KrsBuildSection {
    width: 100%;
    max-width: none;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.post-template-template-krs-gallery .KrsBuildSection{
    padding: 1rem!important;
}

/* The editor stores plain H2 and P tags: no extra classes are output. */
.KrsBuildSection__content > h2 {
    max-width: 100%;
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-wrap: pretty;
    color: var(--dark-ink);
}

.KrsBuildSection__content > p {
    max-width: 100%;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dark-ink);
}

/* Related projects retains the site's existing ScrollTo/LightRow styling. */
.KrsRelatedProjects {
    width: 100%;
}

/*
 * Tablet/phone portrait:
 * - turn off page snap scrolling
 * - hero becomes content-height
 * - image sections become full-width 16:9 panels
 */
@media (max-width: 1024px) and (orientation: portrait) {
    html {
        scroll-snap-type: none;
        scroll-behavior: auto;
    }

    .KrsPortfolioHero {
        width: 100%;
        height: auto;
        min-height: 0;
        scroll-snap-align: none;
    }

.KrsBuildSection {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        padding: 16px;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

.KrsBuildSection__content {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 16px;
        box-sizing: border-box;
    }


.KrsBuildSection__content > p {
        line-height: 1.4;
    }
}


/* ------------------------------------------------------------
   LIGHTBOX IMAGES — INSIGHTS + KRS GALLERY
   ------------------------------------------------------------ */

.InsightLightbox,
.KRS-Lightbox {
    width: 100%;
}

.InsightLightbox > a,
.KRS-Lightbox > a {
    display: block;
}

.InsightPic,
.KRS-Pic {
    display: block;
    width: 100%;
    border-radius: 12px;
    height: auto;
}

.InsightLightboxHidden,
.KRS-LightboxHidden {
    display: none;
}

.InsightCaption,
.KRS-Caption {
    font-size: .8125rem;
    color: var(--muted);
    margin: .4rem 0 1.5rem 0;
}

.InsightCaption a,
.KRS-Caption a {
    color: var(--link);
    text-decoration: none;
}

.InsightCaption a:hover,
.KRS-Caption a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Gallery uses the shared KRS lightbox markup as a full-screen image layer. */
.KRS-Lightbox {
    position: absolute;
    z-index: 0;
    inset: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.KRS-Lightbox > a {
    width: 100%;
    height: 100%;
}

:where(.KrsGalleryPage) .KRS-Pic {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: center center;
}

/* The visual overlay must not block clicks on the image/lightbox link. */
:where(.KrsGalleryPage) .KrsBuildSection__overlay {
    pointer-events: none;
}

/* ============================================================
 * SINGLE PORTFOLIO CSS — AUTHORITATIVE WHEN RULES CONFLICT
 * Source: attached single-portfolio(2).css
 * ============================================================ */

 html {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
    scroll-behavior: smooth;  
}

.ScrollTo{
    scroll-snap-align: start;
    scroll-snap-stop: always;
      width: 100%;
      min-height: 100vh;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      
}

/*------------------------------------------------------------------------
HEADINGS
------------------------------------------------------------------------*/

.PicRow .KrsBuildSection__heading,
.DarkRow .KrsBuildSection__heading  {
    max-width: 18ch;
    margin: 0;
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(30px, 3.2vw, 52px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-wrap: pretty;
    color:var(--dark-ink);
}

.LightRow .KrsBuildSection__heading {
    max-width: 18ch;
    margin: 0;
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(30px, 3.2vw, 52px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-wrap: pretty;
    color: var(--ink);
}

.PicRow .KrsBuildSection__description,
.DarkRow .KrsBuildSection__description{
    max-width: 44ch;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--dk-muted);
}

.LightRow .KrsBuildSection__description{
    max-width: 44ch;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted)
}

/*--------------------------------------------------------------------------
INLINE GALLERY + TEXT ROW
--------------------------------------------------------------------------*/


#portfolio-inline-gallery {
    align-self: center;
    justify-self: start;
}

.SectionGalleryLeft {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 4rem);
}

/*
Overrides the full-screen slideshow only when it is used
inside the text-and-gallery row.
*/

.KrsSlideshowSection--inline {
    width: 100%;
    max-width: 900px;
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 12px;
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

/* Image area maintains a true 16:9 ratio */
.KrsSlideshowSection--inline .KrsSlideshowSection__viewport {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}
/* Smaller controls for the inline version */

.KrsSlideshowSection--inline .KrsSlideshowSection__button {
    width: 44px;
    height: 44px;
}

.KrsSlideshowSection--inline
.KrsSlideshowSection__button--previous {
    left: 16px;
}

.KrsSlideshowSection--inline
.KrsSlideshowSection__button--next {
    right: 16px;
}

/* Compact footer so it does not consume the gallery */

.KrsSlideshowSection--inline .KrsSlideshowSection__footer {
    min-height: 58px;
    padding: 14px 3rem;
    gap: 20px;
}

.KrsSlideshowSection--inline .KrsSlideshowSection__caption {
    font-size: 1rem;
    color: var(--dk-muted)!important;
}

.KrsSlideshowSection--inline .KrsSlideshowSection__counter {
    font-size: 0.75rem;
    color: var(--dk-muted)!important;    
}

/* Existing content class retained */

.SectionGalleryLeft .SectionPicRight__content {
    width: 100%;
    min-width: 0;
}

/*--------------------------------------------------------------
MOBILE
--------------------------------------------------------------*/

@media (max-width: 768px) {
    .SectionGalleryLeft {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .KrsSlideshowSection--inline {
        grid-column: 1;
        grid-row: 1;
        max-width: 100%;
    }

    .SectionGalleryLeft .SectionPicRight__content {
        grid-column: 1;
        grid-row: 2;
    }
}






/*------------------------------------------------------------------------
LEFT and RIGHT PIC SECTIONS
------------------------------------------------------------------------*/


.SectionPicLeft,
.SectionPicRight {
    width: 100%;
    display: grid;
    align-items: center;
    gap: clamp(2rem, 4vw, 4rem);
}

/* Picture left: 60%, text right: 40% */
.SectionPicLeft {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

/* Text left: 40%, picture right: 60% */
.SectionPicRight {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.SectionPicLeft__picture,
.SectionPicRight__picture {
    width: auto;
    max-width: 100%;
    aspect-ratio: 16/9;
    height: auto;
    max-height:60vh;
    overflow: hidden;
    border-radius: 12px;
}

.SectionPicLeft__picture {
    justify-self: start;
}

.SectionPicRight__picture {
    justify-self: end;
}

.SectionPicLeft__image,
.SectionPicRight__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.SectionPicLeft__content,
.SectionPicRight__content {
    width: 100%;
    min-width: 0;
}

@media (max-width: 768px) {
    .SectionPicLeft,
    .SectionPicRight {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .SectionPicLeft__picture,
    .SectionPicRight__picture {
        width: 100%;
        max-width: none;
        height: 35vh;
        grid-column: 1;
        grid-row: 1;
        justify-self: stretch;
    }

    .SectionPicLeft__content,
    .SectionPicRight__content {
        grid-column: 1;
        grid-row: 2;
    }
}
/*------------------------------------------------------------------------
VIDEO ROW
------------------------------------------------------------------------*/

.KrsBuildSection {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    padding: 0 1.5rem 1.5rem 1.5rem;
    box-sizing: border-box;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--dark);
    color: var(--dark-ink);
}

.KrsBuildSection__image {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.KrsBuildSection__overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
}

.KrsBuildSection__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 48px;
    width: 100%;
    max-width: 600px;
    flex-direction: column!important;
    align-items: flex-start; 
    text-align: left; gap:0; 
    padding:2vh;
    background-color: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border: 1px solid rgba(255, 255, 255, 0.12); 
    border-radius: 8px; 
    margin: 0 auto 0 0;
}

.KrsBuildSection__content p{
    color: var(--dark-ink)!important;
}


/* Gallery image card — VIEW BRIEF trigger */
.KrsBuildSection__content > .TinyTitle[href="#krs-brief-modal"] {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    align-self: flex-end;
    width: fit-content;
    margin: 8px 0 0 auto;
    color: var(--dark-ink) !important;
    text-decoration: none;
    cursor: pointer;
}

.KrsBuildSection__content > .TinyTitle[href="#krs-brief-modal"] span {
    font-size: 1.05em;
    line-height: 1;
    transform: translateY(-.04em);
}

.KrsBuildSection__content > .TinyTitle[href="#krs-brief-modal"]:hover,
.KrsBuildSection__content > .TinyTitle[href="#krs-brief-modal"]:focus-visible {
    opacity: .72;
}

.KrsBuildSection__content > .TinyTitle[href="#krs-brief-modal"]:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* =====================================================
   BRIEF MODAL — MATCH CONTACT MODAL
   ===================================================== */

html.KrsBriefModalOpen {
    overflow: hidden;
}

.KrsBriefModal:not([open]) {
    display: none !important;
}

.KrsBriefModal[open] {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    box-sizing: border-box;
}

.KrsBriefModal::backdrop {
    background: transparent;
}

.KrsBriefModal__panel {
    position: relative;
    width: min(100%, 700px);
    height: auto;
    max-height: calc(100vh - 48px);
    padding: 2rem;
    overflow-y: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid var(--dk-muted);
    color: #fff;
    box-sizing: border-box;
}

.KrsBriefModal__body,
.KrsBriefModal__body .KrsBriefSection__summary {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border: none !important;
    background: transparent !important;
}

/* Keep the existing Brief typography, but use the dark-modal palette. */
.KrsBriefModal__body .KrsBriefSection__eyebrow,
.KrsBriefModal__body .KrsBriefSection__statNumber {
    color: #fff;
}

.KrsBriefModal__body .KrsBriefSection__description,
.KrsBriefModal__body .KrsBriefSection__statLabel {
    color: var(--dk-muted) !important;
}

.KrsBriefModal__body .KrsBriefSection__stat {
    border-top-color: var(--dk-line);
}

.KrsBriefModal__close {
    position: absolute;
    top: 3px;
    right: 3px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}

.KrsBriefModal__close:hover,
.KrsBriefModal__close:focus-visible {
    color: var(--accent, #f58220);
}

@media (max-width: 650px) {
    .KrsBriefModal[open] {
        padding: 16px;
    }

    .KrsBriefModal__panel {
        max-height: calc(100dvh - 32px);
        padding: 44px 16px 16px;
    }
}


/*----------------------------------------
TABLET
---------------------------------------*/

@media (max-width: 900px) {
    .KrsBuildSection {
        padding: 0 28px 56px;
    }

    .KrsBuildSection__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .KrsBuildSection__heading,
    .KrsBuildSection__description {
        max-width: 100%;
    }
}


/*-----------------------------------------
MOBILE
-----------------------------------------*/

@media (max-width: 600px) {
    .KrsBuildSection {
        padding: 0 20px 48px;
    }

    .KrsBuildSection__overlay {
        background: linear-gradient(
            transparent 30%,
            color-mix(
                in srgb,
                var(--dark) 92%,
                transparent
            )
        );
    }

    .KrsBuildSection__content {
        gap: 18px;
    }
}


/*--------------------------------------------------------------
WINGSTOP SLIDESHOW
--------------------------------------------------------------*/

.KrsSlideshowSection {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--dark);
    color: var(--dark-ink);
}

.KrsSlideshowSection__viewport {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.KrsSlideshowSection__slides {
    position: absolute;
    inset: 0;
}

.KrsSlideshowSection__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 500ms ease,
        visibility 500ms ease;
}

.KrsSlideshowSection__slide.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

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

.KrsSlideshowSection__button {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 1px solid var(--dk-line);
    border-radius: 999px;
    transform: translateY(-50%);
    background: color-mix(
        in srgb,
        var(--dark) 60%,
        transparent
    );
    color: var(--dark-ink);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    backdrop-filter: blur(6px);
    transition:
        color 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.KrsSlideshowSection__button--previous {
    left: 32px;
}

.KrsSlideshowSection__button--next {
    right: 32px;
}

.KrsSlideshowSection__button:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-50%) scale(1.08);
}

.KrsSlideshowSection__button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.KrsSlideshowSection__footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 82px;
    padding: 24px 4rem;
    box-sizing: border-box;
    border-top: 1px solid var(--dk-line);
}

.KrsSlideshowSection__caption {
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.375rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.3;
}

.KrsSlideshowSection__counter {
    flex: 0 0 auto;
    font-family: "IBM", monospace;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--dk-muted);
}


/*--------------------------------------------------------------
TABLET
--------------------------------------------------------------*/

@media (max-width: 900px) {
    .KrsSlideshowSection__button {
        width: 48px;
        height: 48px;
    }

    .KrsSlideshowSection__button--previous {
        left: 20px;
    }

    .KrsSlideshowSection__button--next {
        right: 20px;
    }

    .KrsSlideshowSection__footer {
        min-height: 76px;
        padding: 20px 28px;
    }

    .KrsSlideshowSection__caption {
        font-size: 1.125rem;
    }
}


/*--------------------------------------------------------------
MOBILE
--------------------------------------------------------------*/

@media (max-width: 600px) {
    .KrsSlideshowSection__button {
        top: auto;
        bottom: 18px;
        width: 44px;
        height: 44px;
        transform: none;
    }

    .KrsSlideshowSection__button:hover {
        transform: scale(1.08);
    }

    .KrsSlideshowSection__button--previous {
        left: 16px;
    }

    .KrsSlideshowSection__button--next {
        right: 16px;
    }

    .KrsSlideshowSection__footer {
        align-items: flex-start;
        gap: 16px;
        min-height: 96px;
        padding: 18px 20px;
    }

    .KrsSlideshowSection__caption {
        font-size: 1rem;
    }

    .KrsSlideshowSection__counter {
        font-size: 0.75rem;
    }
}


/*--------------------------------------------------------------
REDUCED MOTION
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
    .KrsSlideshowSection__slide,
    .KrsSlideshowSection__button {
        transition: none;
    }
}


/*--------------------------------------------------------------
OUTCOME SECTION
--------------------------------------------------------------*/

.KrsOutcomeSection {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    width: 100%;
    min-height: 100vh;
    padding-left:clamp(56px,7vw,96px)!important;
    padding-right:clamp(56px,7vw,96px)!important;
    padding-top: 90px; 
    padding-bottom: 90px;   
    box-sizing: border-box;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: var(--dark);
    color: var(--dark-ink);
    text-align: center;
}

.KrsOutcomeSection__image {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.KrsOutcomeSection__overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:rgba(0,0,0,.5);
}

.KrsOutcomeSection__label {
    position: relative;
    z-index: 2;
    font-family: "IBM", monospace;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.KrsOutcomeSection__statement {
    position: relative;
    z-index: 2;
    max-width: 30ch;
    margin: 0;
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(28px, 3vw, 44px);
    font-style: italic;
    font-weight: 400;
    line-height: 1.3;
    text-wrap: pretty;
    color: var(--dark-ink);
}

.KrsOutcomeSection__galleryLink {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 40px;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--dark-ink);
    text-decoration: none;
}

.KrsOutcomeSection__galleryLabel {
    font-family: "IBM", monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.KrsOutcomeSection__arrow {
    display: inline-flex;
    font-size: 1.125rem;
    line-height: 1;
    animation:
        krs-outcome-cue-bob
        1.8s
        ease-in-out
        infinite;
}

.KrsOutcomeSection__galleryLink:hover,
.KrsOutcomeSection__galleryLink:focus-visible {
    color: var(--accent);
}

.KrsOutcomeSection__galleryLink:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
}

@keyframes krs-outcome-cue-bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(7px);
    }
}


/*--------------------------------------------------------------
TABLET
--------------------------------------------------------------*/

@media (max-width: 900px) {
    .KrsOutcomeSection {
        gap: 28px;
        padding: 96px 28px 48px;
    }
}


/*--------------------------------------------------------------
MOBILE
--------------------------------------------------------------*/

@media (max-width: 600px) {
    .KrsOutcomeSection {
        gap: 24px;
        padding: 80px 20px 48px;
    }

    .KrsOutcomeSection__galleryLink {
        bottom: 28px;
    }
}


/*--------------------------------------------------------------
REDUCED MOTION
--------------------------------------------------------------*/

@media (prefers-reduced-motion: reduce) {
    .KrsOutcomeSection__arrow {
        animation: none;
    }
}



/*--------------------------------------------------------------
HERO
--------------------------------------------------------------*/

.KrsPortfolioHero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    min-height: 100vh;
    padding-left:clamp(56px,7vw,96px)!important;
    padding-right:clamp(56px,7vw,96px)!important;
    padding-top: 90px; 
    padding-bottom: 90px;   
    box-sizing: border-box;
    overflow: hidden;
    scroll-snap-align: start;
    background: var(--dark);
    color: var(--dark-ink);
}

.KrsPortfolioHero__image {
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.KrsPortfolioHero__overlay {
    position: absolute;
    z-index: 1;
    inset: 0;
    background:rgba(0,0,0,.5);
}

.KrsPortfolioHero__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
    width: 100%;
    margin: 0 auto;
    padding:0;
}

.KrsPortfolioHero__main {
    display: flex;
    flex: 1 1 640px;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.KrsPortfolioHero__back {
    width: fit-content;
    font-family: "IBM", monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--dk-muted);
    text-decoration: none;
    transition: color 180ms ease;
}

.KrsPortfolioHero__back:hover,
.KrsPortfolioHero__back:focus-visible {
    color: var(--accent);
}

.KrsPortfolioHero__title {
    max-width: 16ch;
    margin: 0;
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(40px, 4.8vw, 80px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-wrap: pretty;
    text-shadow: 0 2px 22px color-mix(in srgb, var(--dark) 55%, transparent);
}

.KrsPortfolioHero__title span {
    color: var(--accent);
}

.KrsPortfolioHero__copy{
    color: var(--paper);
}

.KrsPortfolioHero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 48px;
    max-width: 900px;
    padding-top: 22px;
    margin-top: 6px;
    border-top: 1px solid var(--dk-line);
}

.KrsPortfolioHero__stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.KrsPortfolioHero__statNumber {
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(34px, 3vw, 48px);
    font-weight: 400;
    line-height: 1;
}

.KrsPortfolioHero__statText {
    font-size: 14px;
    line-height: 1.45;
    color: var(--dk-muted);
}

.KrsPortfolioHero__details {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-self: flex-end;
    gap: 10px 32px;
    max-width: 440px;
    margin: 0;
    font-size: 14px;
}

.KrsPortfolioHero__details dt {
    margin: 0;
    font-family: "IBM", monospace;
    font-size: 12px;
    font-weight: 400;
    line-height: inherit;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dk-muted);
}

.KrsPortfolioHero__details dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.KrsPortfolioHero__cue {
    position: absolute;
    z-index: 2;
    bottom: 18px;
    left: 50%;
    display: inline-flex;
    transform: translateX(-50%);
    animation: krs-portfolio-cue-bob 1.8s ease-in-out infinite;
    font-size: 18px;
    line-height: 1;
    color: var(--dk-muted);
}

.KrsPortfolioContent {
    margin-inline: auto;
}

@keyframes krs-portfolio-cue-bob {
    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 7px);
    }
}

@media (max-width: 900px) {
    .KrsPortfolioHero {
        padding: 96px 28px 64px;
    }

    .KrsPortfolioHero__inner {
        gap: 34px;
    }

    .KrsPortfolioHero__details {
        align-self: stretch;
        max-width: none;
    }
}

@media (max-width: 700px) {
    .KrsPortfolioHero {
        min-height: 100vh;
        padding: 88px 20px 56px;
    }

    .KrsPortfolioHero__heading {
        font-size: clamp(38px, 12vw, 60px);
    }

    .KrsPortfolioHero__stats {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .KrsPortfolioHero__stat {
        display: grid;
        grid-template-columns: minmax(64px, 20%) minmax(0, 1fr);
        align-items: baseline;
        gap: 14px;
    }

    .KrsPortfolioHero__details {
        grid-template-columns: minmax(84px, auto) minmax(0, 1fr);
        gap: 8px 20px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .KrsPortfolioHero__cue {
        animation: none;
    }
}



/*-------------------------------------------------------------------------------
THE BRIEF
-------------------------------------------------------------------------------*/

.KrsBriefSection {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-content: center;
    gap: 64px;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto;

}

.KrsBriefSection__summary {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
}

.KrsBriefSection__eyebrow {
    margin: 0;
    font-family: "IBM", monospace;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.KrsBriefSection__stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.KrsBriefSection__statNumber {
    font-family: "Newsreader", Georgia, serif;
    font-size: clamp(56px, 5.5vw, 88px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.02em;
}

.KrsBriefSection__statLabel {
    font-family: "IBM", monospace;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.KrsBriefSection__source {
    width: fit-content;
    margin-top: 4px;
    font-family: "IBM", monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--link);
    text-decoration: none;
    transition:
        color 180ms ease,
        opacity 180ms ease;
}

.KrsBriefSection__source:hover,
.KrsBriefSection__source:focus-visible {
    color: var(--accent);
}

.KrsBriefSection__source:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.KrsBriefSection__description {
    margin: 0;
    font-size: 0.9375rem!important;
    line-height: 1.3!important;
    color: var(--muted)!important;
}

.KrsBriefSection__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.KrsBriefSection__statement {
    margin: 0!important;
    font-family: "Newsreader", Georgia, serif;
    font-size: 1.7rem!important;
    font-weight: 400;
    line-height: 1.35!important;
    letter-spacing:0;
    text-wrap: pretty;
}

.KrsBriefSection__media {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
}


.KrsBriefSection__video {
    width: 100%;
    aspect-ratio: 16 / 9;
    align-self: flex-start;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
}


.KrsBriefSection__video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.KrsBriefSection__caption {
    font-family: "Newsreader", Georgia, serif;
    font-size: 0.9375rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--muted);
}


/*--------------------------------------------------------------
TABLET
--------------------------------------------------------------*/

@media (max-width: 900px) {
    .KrsBriefSection {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 48px;
        min-height: auto;
        padding: 96px 28px 64px;
    }

    .KrsBriefSection__video {
        max-height: none;
    }
}


/*--------------------------------------------------------------
MOBILE
--------------------------------------------------------------*/

@media (max-width: 600px) {
    .KrsBriefSection {
        gap: 40px;
        padding: 80px 20px 48px;
    }

    .KrsBriefSection__summary {
        gap: 24px;
    }

    .KrsBriefSection__statement {
        font-size: clamp(24px, 8vw, 32px);
    }

    .KrsBriefSection__video {
        border-radius: 8px;
    }
}

/*-----------------------------------------------------------------------------
DOTS
-----------------------------------------------------------------------------*/
                                        
.KrsPortfolioDots {
    position: fixed;
    z-index: 1000;
    top: 50%;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transform: translateY(-50%);
}

.KrsPortfolioDots[hidden] {
    display: none;
}

.KrsPortfolioDots__dot {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    appearance: none;
}

.KrsPortfolioDots__dot::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;

    /* Fallback */
    background: rgba(138, 138, 138, 0.45);

    background: color-mix(
        in srgb,
        rgb(138 138 138) 55%,
        transparent
    );

    content: "";
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.KrsPortfolioDots__dot:hover::before {
    transform: scale(1.3);
}

.KrsPortfolioDots__dot.is-active::before {
    background-color: var(--accent)!important;
    transform: scale(1.35);
}

.KrsPortfolioDots__dot:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .KrsPortfolioDots {
        right: 8px;
        gap: 9px;
    }

    .KrsPortfolioDots__dot {
        width: 16px;
        height: 16px;
    }

    .KrsPortfolioDots__dot::before {
        width: 7px;
        height: 7px;
    }
}                                        


/*=============================================================================
SECTION GALLERY LEFT — NATIVE CAROUSEL
Supports markup using .SectionGalleryLeft__* classes.
This coexists with the .KrsSlideshowSection__* carousel styles above.
=============================================================================*/

.SectionGalleryLeft__gallery {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.SectionGalleryLeft__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: var(--dark);
}

.SectionGalleryLeft__slides {
    position: absolute;
    inset: 0;
}

.SectionGalleryLeft__slide {
    position: absolute;
    inset: 0;
    margin: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 500ms ease,
        visibility 500ms ease;
}

.SectionGalleryLeft__slide.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

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

.SectionGalleryLeft__button {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--dk-line);
    border-radius: 999px;
    transform: translateY(-50%);
    background: color-mix(
        in srgb,
        var(--dark) 60%,
        transparent
    );
    color: var(--dark-ink);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    backdrop-filter: blur(6px);
    transition:
        color 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.SectionGalleryLeft__button--previous {
    left: 16px;
}

.SectionGalleryLeft__button--next {
    right: 16px;
}

.SectionGalleryLeft__button:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-50%) scale(1.08);
}

.SectionGalleryLeft__button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.SectionGalleryLeft__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 58px;
    padding: 14px 20px;
    box-sizing: border-box;
    border-top: none;
}

.SectionGalleryLeft__caption {
    min-width: 0;
    font-family: "Newsreader", Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.3;
    color: var(--dk-muted);    
}

.SectionGalleryLeft__counter {
    flex: 0 0 auto;
    font-family: "IBM", monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--dk-muted);
}

.SectionGalleryLeft__content {
    width: 100%;
    min-width: 0;
}

@media (max-width: 768px) {
    .SectionGalleryLeft__gallery {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
    }

    .SectionGalleryLeft__content {
        grid-column: 1;
        grid-row: 2;
    }
}

@media (max-width: 600px) {
    .SectionGalleryLeft__viewport {
        border-radius: 8px;
    }

    .SectionGalleryLeft__button {
        top: auto;
        bottom: 16px;
        width: 40px;
        height: 40px;
        transform: none;
    }

    .SectionGalleryLeft__button:hover {
        transform: scale(1.08);
    }

    .SectionGalleryLeft__footer {
        align-items: flex-start;
        gap: 16px;
        min-height: 72px;
        padding: 14px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .SectionGalleryLeft__slide,
    .SectionGalleryLeft__button {
        transition: none;
    }
}

/* ============================================================
   KRS GALLERY — PORTRAIT IMAGE + CONTENT STACK
   ============================================================ */

@media (max-width: 1024px) and (orientation: portrait) {

    html {
        scroll-snap-type: none;
        scroll-behavior: auto;
    }

    .KrsGalleryPage .KrsBuildSection {
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: auto;
        margin: 0;
        padding: 0;
        overflow: visible;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .KrsGalleryPage .KRS-Lightbox {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin: 0;
        overflow: hidden;
    }

    .KrsGalleryPage .KRS-Lightbox > a {
        display: block;
        width: 100%;
        height: 100%;
    }

    .KrsGalleryPage .KrsBuildSection__overlay {
        display: none;
    }

    .KrsGalleryPage .KrsBuildSection__content {
        position: relative;
        width: calc(100% - 20px);
        max-width: none;
        box-sizing: border-box;
        margin: 5px 10px;
        padding: 12px;
    }

}
