/* POCUS Focused case study (pocus-focused.html)
   Loads after new_style.css, which provides the shared showcase system (tokens, hero,
   sections, cards, pull quotes, metrics, reflections, closing, scroll nav). Only components unique
   to this page live here. See docs/showcase-implementation.md */

/* style.css styles bare p, ul, li and a for the older showcases. :where() keeps these resets at
   element-level specificity, so every class rule below still wins */
:where(.hero, .section, .closing) p {
    margin-bottom: 0;
}

:where(.hero, .section, .closing) ul {
    padding-left: 0;
}

:where(.hero, .section, .closing) li {
    font-size: inherit;
    margin-bottom: 0;
}

:where(.hero, .section, .closing) a {
    color: inherit;
}

/* The title is longer than Jatango's, so set it a step smaller and keep the stats clear of the previews */
.hero__title {
    font-size: clamp(2.3rem, 4.6vw, 4rem);
    max-width: 880px;
}

.hero__stats {
    column-gap: var(--space-md);
}

/* The design question card is dark, so its icon gets the light treatment too */
.problem-card--question .icon {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

/* Landscape before/after previews (desktop product) */

.hero__preview {
    position: absolute;
    right: 4%;
    bottom: 10%;
    width: 380px;
    height: 330px;
    z-index: 2;
    opacity: 0;
    animation: fadeUp 1s ease forwards 1s;
}

.hero__preview-card {
    position: absolute;
    width: 320px;
    height: 200px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px color-mix(in srgb, var(--color-brand-black) 45%, transparent);
}

.hero__preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__preview-card--before {
    top: 0;
    left: 0;
    background: var(--color-brand-brown);
    border: 1px solid color-mix(in srgb, var(--color-white) 8%, transparent);
}

.hero__preview-card--after {
    bottom: 0;
    right: 0;
    background: var(--color-brand-forest-green);
    border: 1px solid color-mix(in srgb, var(--color-white) 14%, transparent);
}

/* Single dashboard preview, sized to fill the preview area */
.hero__preview-card--solo {
    bottom: 0;
    right: 0;
    width: 560px;
    height: 400px;
    background: var(--color-brand-forest-green);
    border: 1px solid color-mix(in srgb, var(--color-white) 14%, transparent);
}

.hero__preview-label {
    position: absolute;
    top: auto;
    bottom: 10px;
    left: 10px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: color-mix(in srgb, var(--color-brand-black) 55%, transparent);
    padding: 4px 10px;
    border-radius: 4px;
}

@media (max-width: 1100px) {
    .hero__preview {
        display: none;
    }
}

/* =========================================================
     SECTIONS
  ========================================================= */

.subhead {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.subhead--sm {
    font-size: 1.1rem;
}

.body-copy {
    max-width: 680px;
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--color-text-light);
}

.section--dark .body-copy, .section--bark .body-copy {
    color: var(--color-brand-sea-foam);
}

.mono-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brand-burnt-orange);
    margin-bottom: 4px;
    display: block;
}

.section--dark .mono-label, .section--bark .mono-label {
    color: var(--color-brand-sand);
}

.icon-tile {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--color-brand-burnt-orange) 12%, transparent);
}

/* Inline placeholder text */

.ph {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--color-brand-burnt-orange);
    background: color-mix(in srgb, var(--color-brand-burnt-orange) 8%, transparent);
    border-radius: 4px;
    padding: 1px 6px;
}

.section--dark .ph, .section--bark .ph {
    color: var(--color-brand-sand);
    background: color-mix(in srgb, var(--color-brand-sand) 8%, transparent);
}

/* Screenshots. The width/height attributes on each img reserve a 1440x1024 box until the file
   exists, then the image's own proportions take over. The tint shows where a missing file goes */

.shot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--color-brand-black) 12%, transparent);
    background: color-mix(in srgb, var(--color-brand-black) 4%, transparent);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--color-brand-black) 10%, transparent);
    cursor: zoom-in;
}

.section--dark .shot, .section--bark .shot {
    border-color: color-mix(in srgb, var(--color-white) 12%, transparent);
    background: color-mix(in srgb, var(--color-white) 5%, transparent);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--color-brand-black) 35%, transparent);
}

.surface, .approach > *, .solution > *, .roles-layout > *, .enduser-grid > * {
    min-width: 0;
}

/* Pull quote */

.section--dark .pull-quote__text, .section--bark .pull-quote__text {
    color: var(--color-white);
}

.critiques-annotated {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.critique-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* =========================================================
     OVERVIEW CARDS
  ========================================================= */

.summary-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-card li {
    font-size: 0.93rem;
    color: var(--color-text-light);
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
}

.summary-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-brand-burnt-orange);
}

.summary-card li strong {
    color: var(--color-brand-black);
    font-weight: 600;
}

/* =========================================================
     DISCOVERY FINDINGS
  ========================================================= */

.findings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.finding {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    background: var(--color-parchment);
    border-radius: var(--border-radius);
    padding: var(--space-md);
}

.finding__title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1rem;
}

.finding__text {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.55;
}

.media-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* =========================================================
     USER TYPES — growth ring hierarchy
  ========================================================= */

.roles-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl);
}

@media (max-width: 860px) {
    .roles-layout {
        grid-template-columns: 1fr;
    }
}

.rings-figure {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.rings-figure svg {
    width: 100%;
    height: auto;
    display: block;
}

.rings-figure figcaption {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
    text-align: center;
    margin-top: var(--space-sm);
}

.ring-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.role-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.role-item {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: var(--space-sm);
    align-items: start;
}

.role-item__swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-top: 6px;
}

.role-item__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
}

.role-item__name small {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
    font-weight: 400;
    margin-left: 6px;
}

.role-item__desc {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.55;
}

.enduser-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

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

.enduser-col__head {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-brand-burnt-orange);
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid color-mix(in srgb, var(--color-brand-black) 8%, transparent);
}

.user-card {
    background: var(--color-parchment);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.user-card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.user-card__text {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.55;
}

.approach {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

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

.approach > .pull-quote {
    align-self: center;
    margin: 0;
}

/* End-user access matrix, generated from images/pf/user_role_matrix.csv */

.role-matrix {
    margin-top: var(--space-lg);
    background: var(--color-white);
    border: 1px solid color-mix(in srgb, var(--color-brand-black) 10%, transparent);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--color-brand-black) 6%, transparent);
}

.role-matrix__stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    margin: var(--space-sm) 0 var(--space-md);
}

@media (max-width: 640px) {
    .role-matrix__stats {
        grid-template-columns: 1fr 1fr;
    }
}

.role-matrix__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: var(--space-sm);
    border-left: 2px solid color-mix(in srgb, var(--color-brand-forest-green) 35%, transparent);
}

.role-matrix__value {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-brand-forest-green);
}

.role-matrix__label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

/* Below ~900px the chart keeps a readable size and scrolls sideways inside its card */
.role-matrix__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.role-matrix__chart {
    display: block;
    width: 100%;
    min-width: 860px;
    height: auto;
}

.role-matrix__chart text {
    fill: var(--color-brand-black);
}

.mx-section {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
}

.mx-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    fill: var(--color-text-light) !important;
}

.mx-family {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    fill: var(--color-brand-burnt-orange) !important;
}

.mx-variant {
    font-family: var(--font-body);
    font-size: 13px;
}

.mx-total {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
}

.mx-bracket {
    fill: none;
    stroke: color-mix(in srgb, var(--color-brand-black) 25%, transparent);
    stroke-width: 1;
}

.mx-band {
    fill: var(--color-parchment);
}

.mx-y {
    fill: var(--color-brand-forest-green);
}

.mx-c circle {
    fill: var(--color-white);
    stroke: var(--color-brand-burnt-orange);
    stroke-width: 2;
}

.mx-c .mx-c__dot {
    fill: var(--color-brand-burnt-orange);
    stroke: none;
}

.mx-p {
    fill: none;
    stroke: color-mix(in srgb, var(--color-brand-black) 45%, transparent);
    stroke-width: 1.5;
    stroke-dasharray: 2 2;
}

.mx-n {
    fill: color-mix(in srgb, var(--color-brand-black) 18%, transparent);
}

.mx-ref {
    stroke: color-mix(in srgb, var(--color-brand-black) 15%, transparent);
    stroke-dasharray: 2 3;
}

.mx-bar {
    fill: color-mix(in srgb, var(--color-brand-forest-green) 35%, transparent);
}

.mx-bar--all {
    fill: var(--color-brand-forest-green);
}

.role-matrix__chart circle[class], .role-matrix__chart .mx-c, .mx-bar {
    transition: opacity 0.15s ease;
}

.role-matrix__chart:hover :is(.mx-y, .mx-c, .mx-p, .mx-bar) {
    opacity: 0.55;
}

.role-matrix__chart :is(.mx-y, .mx-c, .mx-p, .mx-bar):hover {
    opacity: 1;
}

.role-matrix__caption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xs) var(--space-md);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid color-mix(in srgb, var(--color-brand-black) 8%, transparent);
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.role-matrix__legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs) var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.role-matrix__legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-matrix__legend svg {
    width: 14px;
    height: 14px;
}

/* =========================================================
     FEATURE DEEP DIVE
  ========================================================= */

.feature-title {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 600;
    margin-bottom: var(--space-md);
    max-width: 760px;
    line-height: 1.3;
}

.section__title em{
    color: var(--color-leaf);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.problem-card {
    background: var(--color-white);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    border: 1px solid color-mix(in srgb, var(--color-brand-black) 5%, transparent);
}

.problem-card .icon-tile {
    margin-bottom: var(--space-sm);
}

.problem-card__text {
    font-size: 0.93rem;
    line-height: 1.6;
}

.problem-card--question {
    background: var(--color-undercanopy);
    color: var(--color-white);
    border: none;
}

.problem-card--question .mono-label {
    color: var(--color-brand-sand);
}

.problem-card--question .problem-card__text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.5;
}

.problem-card--question .icon-tile {
    background: color-mix(in srgb, var(--color-brand-sand) 12%, transparent);
}

.exploration-card__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.exploration-card--final {
    border-color: var(--color-leaf);
    box-shadow: 0 0 0 1px var(--color-leaf);
}

.exploration-card--final .mono-label {
    color: var(--color-leaf);
}

.solution {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-lg);
}

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

.callout {
    display: flex;
    gap: var(--space-xs);
    align-items: flex-start;
}

.callout__title {
    font-weight: 600;
    margin-bottom: 2px;
}

.outcomes ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.outcomes li {
    font-size: 0.95rem;
    line-height: 1.6;
}

.outcomes li strong {
    font-weight: 600;
    color: var(--color-darkestbrown);
}

/* =========================================================
     TWO SURFACES
  ========================================================= */

.surfaces {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

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

.surface {
    background: color-mix(in srgb, var(--color-white) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-white) 9%, transparent);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.surface__head {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.surface__head .icon-tile {
    background: color-mix(in srgb, var(--color-brand-sand) 12%, transparent);
}

.surface__title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

.surface__problem {
    font-size: 0.93rem;
    color: var(--color-brand-sea-foam);
    padding: var(--space-sm);
    background: color-mix(in srgb, var(--color-brand-black) 18%, transparent);
    border-radius: 8px;
    line-height: 1.55;
}

.surface__problem strong {
    color: var(--color-brand-sand);
    font-weight: 600;
}

.surface__items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.surface__items li {
    padding-left: var(--space-sm);
    border-left: 2px solid color-mix(in srgb, var(--color-brand-sand) 35%, transparent);
}

.surface__items strong {
    display: block;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 2px;
}

.surface__items span {
    font-size: 0.92rem;
    color: var(--color-brand-sea-foam);
    line-height: 1.55;
}

/* Screenshots sit at the bottom of each card so both line up regardless of copy length */
.surface .shot {
    margin-top: auto;
}

/* =========================================================
     PROCESS — cards + overlapping timeline
  ========================================================= */

.info-card {
    background: var(--color-parchment);
    border-radius: var(--border-radius);
    padding: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.info-card__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.info-card__text {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text-light);
}

.process-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.process-cards .info-card {
    background: var(--color-white);
}

.gantt {
    margin: var(--space-md) 0 var(--space-lg);
}

.gantt__axis, .gantt__row {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: var(--space-sm);
    align-items: center;
}

.gantt__ticks {
    position: relative;
    height: 22px;
    border-bottom: 1px solid color-mix(in srgb, var(--color-brand-black) 12%, transparent);
}

.gantt__tick {
    position: absolute;
    bottom: 4px;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--color-text-light);
}

.gantt__row {
    margin-top: var(--space-sm);
}

.gantt__label {
    font-weight: 600;
    font-size: 0.95rem;
}

.gantt__label small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-light);
    font-weight: 400;
}

.gantt__track {
    position: relative;
    height: 34px;
    background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--color-brand-black) 4%, transparent) 0, color-mix(in srgb, var(--color-brand-black) 4%, transparent) 1px, transparent 1px, transparent calc(100% / 9));
    border-radius: 6px;
}

.gantt__bar {
    position: absolute;
    top: 5px;
    bottom: 5px;
    border-radius: 6px;
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.9s cubic-bezier(.2,.7,.2,1);
}

.visible .gantt__bar {
    transform: scaleX(1);
}

.gantt__bar--discovery {
    background: var(--color-brand-rust);
}

.gantt__bar--design {
    background: var(--color-leaf);
}

.gantt__bar--design-ongoing {
    background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--color-leaf) 45%, transparent) 0 6px, color-mix(in srgb, var(--color-leaf) 18%, transparent) 6px 12px);
}

.gantt__bar--build {
    background: var(--color-brand-burnt-orange);
}

.gantt__row:nth-child(3) .gantt__bar {
    transition-delay: 0.15s;
}

.gantt__row:nth-child(4) .gantt__bar {
    transition-delay: 0.3s;
}

.gantt__row:nth-child(5) .gantt__bar {
    transition-delay: 0.45s;
}

@media (max-width: 640px) {
    .gantt__axis, .gantt__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .gantt__axis > span {
        display: none;
    }
}

.phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
}

.phase {
    border-top: 3px solid;
    padding-top: var(--space-sm);
}

.phase--discovery {
    border-color: var(--color-brand-rust);
}

.phase--design {
    border-color: var(--color-leaf);
}

.phase--build {
    border-color: var(--color-brand-burnt-orange);
}

.phase__title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.phase__text {
    font-size: 0.92rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.overview-container {
    background-color: var(--color-whitebrown);
    padding: 1rem;
    border-radius: 0.5rem;
    img {
        max-width: 100%;
        height: auto;
        border-radius: 0.25rem;
    }
}

/* =========================================================
     REFLECTIONS
  ========================================================= */

.reflection__title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.closing-para {
    font-size: 1rem;
    line-height: 1.75;
    max-width: 760px;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid color-mix(in srgb, var(--color-brand-black) 8%, transparent);
    color: var(--color-text-light);
}

/* =========================================================
     MOTION
  ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .gantt__bar {
        transform: scaleX(1);
    }
}
