/* ==============================================
   CASE STUDY SHARED STYLES
   Depends on: style.css (loaded first)
   Used by: luma.html, pronto.html
   ============================================== */

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

/* ==============================================
   DOCUMENT CARD LAYOUT
   ============================================== */

.document-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 3px;
    box-shadow: 3px 4px 0 var(--color-border-dim);
    display: grid;
    grid-template-columns: 240px 1fr;
    max-width: var(--max-width);
    width: calc(100% - 96px);
    margin: 48px auto;
    position: relative;
}

/* ==============================================
   LEFT COLUMN — Sidebar Navigation
   ============================================== */

.nav-col {
    border-right: 1px solid var(--color-border-dim);
    background: var(--color-callout-bg);
    padding: 36px 28px 48px 36px;
}

.nav-inner {
    position: sticky;
    top: 88px;
}

/* Breadcrumb */
.breadcrumb {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border-dim);
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-back {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.breadcrumb-back:hover {
    color: var(--color-red);
}

.breadcrumb-separator {
    font-size: var(--fs-xs);
    color: rgba(0, 0, 0, 0.2);
}

.breadcrumb-current {
    font-size: 14px;
    font-weight: 400;
    color: #aaaaaa;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile breadcrumb (shown only on small screens) */
.mobile-breadcrumb {
    display: none;
    margin-bottom: 28px;
}

/* TOC label */
.nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #bbbbbb;
    margin-bottom: 10px;
    display: block;
}

/* TOC links — scoped to .nav-col to avoid colliding with the pill nav */
.nav-col .nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}

.nav-col .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #aaaaaa;
    padding: 8px 0 8px 14px;
    border-left: 2px solid transparent;
    border-radius: 0 3px 3px 0;
    transition: all 0.2s ease;
    /* Reset pill-nav styles from style.css */
    background: transparent;
    white-space: normal;
}

.nav-col .nav-link:hover {
    color: var(--color-dark);
    background: rgba(0, 0, 0, 0.03);
}

.nav-col .nav-link.active {
    color: var(--color-red);
    border-left-color: var(--color-red);
    font-weight: 600;
    background: var(--color-red-bg);
}

/* ==============================================
   RIGHT COLUMN — Content
   ============================================== */

.content-col {
    padding: 64px 72px 96px 56px;
    min-width: 0;
}

/* ==============================================
   HERO BLOCK
   ============================================== */

.hero-block {
    margin-bottom: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--color-border-dim);
}

.hero-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    color: var(--color-red);
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
}

/* Case study title — smaller than homepage section headings */
.hero-block .hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    color: var(--color-dark);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 32px;
    /* Reset any hero-section styles from style.css */
    clip-path: none;
    object-fit: unset;
    width: auto;
    height: auto;
}

.hero-block .hero-title em {
    font-style: italic;
    color: var(--color-red);
}

/* Project metadata row */
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 28px;
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.meta-divider {
    width: 1px;
    background: var(--color-border);
}

.meta-label {
    color: #9e9e9e;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.meta-value {
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--color-dark);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    background: var(--color-dark);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background-color: var(--color-green);
    border-radius: 50%;
    margin-right: 8px;
    animation: luma-pulse 2s infinite ease-in-out;
    opacity: 0.4;
}

@keyframes luma-pulse {
    0%   { opacity: 0.4; transform: scale(0.95); }
    50%  { opacity: 1;   transform: scale(1.1); }
    100% { opacity: 0.4; transform: scale(0.95); }
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-text-meta);
    border-radius: 2px;
    text-transform: uppercase;
    font-size: 11px;
    padding: 4px 8px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.tag.tag--red {
    background: var(--color-red-bg);
    color: var(--color-red);
}

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

.content-section {
    margin-bottom: 72px;
    scroll-margin-top: 88px;
    position: relative;
}

/* Rule separator between sections */
.content-section::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: var(--color-border-light);
    margin-top: 72px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section:last-child::after {
    display: none;
}

/* Section eyebrow and heading inside .content-col are smaller than the homepage variants */
.content-col .section-eyebrow {
    font-size: var(--fs-xs);
    margin-bottom: 12px;
}

.content-col .section-heading {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    margin-bottom: 24px;
}

/* ==============================================
   PROSE & CONTENT ELEMENTS
   ============================================== */

.prose {
    font-size: var(--fs-base);
    color: var(--color-text-body);
    line-height: 1.8;
    margin-bottom: 24px;
}

.prose:last-of-type {
    margin-bottom: 0;
}

/* Red callout box */
.callout-red {
    background: var(--color-callout-bg);
    border: 1px solid var(--color-border-dim);
    border-left: 3px solid var(--color-red);
    border-radius: 3px;
    padding: 20px 24px;
    margin: 32px 0;
}

.callout-red-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    color: var(--color-red);
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.callout-red-text {
    font-size: var(--fs-base);
    color: var(--color-callout-text);
    line-height: 1.75;
}

/* Dark callout box */
.callout-dark {
    background: var(--color-dark);
    border-radius: 3px;
    padding: 24px 28px;
    margin: 32px 0;
}

.callout-dark-label {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.callout-dark-text {
    font-size: var(--fs-base);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

.callout-dark-text strong {
    color: #ffffff;
    font-weight: 500;
}

/* Two-column nested grid */
.nested-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 32px 0;
}

.nested-card {
    background: var(--color-callout-bg);
    border: 1px solid var(--color-border-dim);
    border-radius: 3px;
    padding: 18px 20px;
}

.nested-card-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.nested-card-text {
    font-size: var(--fs-base);
    color: var(--color-text-body);
    line-height: 1.6;
}

/* Pull quote */
.pull-quote {
    font-family: var(--font-hand);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-red);
    line-height: 1.4;
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin: 40px 0;
    text-align: center;
}

/* Placeholder block (for future visuals) */
.section-image {
    width: 100%;
    height: auto;
    display: block;
    margin: 32px 0;
    border-radius: 3px;
}

.placeholder-block {
    background: #ede9e4;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    height: 200px;
    margin: 32px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.placeholder-label {
    font-family: var(--font-hand);
    font-size: 1.5rem;
    color: var(--color-text-muted2);
    margin-bottom: 8px;
}

.placeholder-sub {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #999999;
    font-weight: 600;
}

/* Spacing between alternating block types */
.prose + .callout-red,   .callout-red + .prose,
.prose + .nested-grid,   .nested-grid + .prose,
.prose + .placeholder-block, .placeholder-block + .prose,
.prose + .pull-quote,    .pull-quote + .prose,
.prose + .callout-dark,  .callout-dark + .prose {
    margin-top: 32px;
}

/* ==============================================
   RESPONSIVE
   ============================================== */

@media (max-width: 860px) {
    .document-card {
        width: calc(100% - 48px);
    }
}

@media (max-width: 768px) {
    .mobile-breadcrumb {
        display: flex;
    }

    .nav-wrapper {
        width: calc(100% - 2rem);
    }

    .nav-wrapper .nav-links {
        display: none;
    }

    .nav-pill {
        padding: 6px 6px 6px 16px;
    }

    .document-card {
        grid-template-columns: 1fr;
        width: calc(100% - 4rem);
        margin: 5rem auto 6rem;
    }

    .nav-col {
        display: none;
    }

    .content-col {
        padding: 32px 24px 64px;
    }

    .meta-divider {
        display: none;
    }

    .meta-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .nested-grid {
        grid-template-columns: 1fr;
    }
}
