/* ==========================================================================
   Cas Clients Archive - Row-based layout with expandable panels
   ========================================================================== */

/* Page container */
.cc-archive-page {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Section */
.cc-archive-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: end;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e5e7eb;
}

.cc-archive-header .cc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.cc-archive-header .cc-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.05;
    margin: 0;
}

.cc-archive-header .cc-hero-title .cc-outline {
    -webkit-text-stroke: 1.5px currentColor;
    -webkit-text-fill-color: transparent;
}

.cc-header-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cc-header-description {
    font-size: 1.05rem;
    line-height: 1.7;
}

.cc-header-stats {
    display: flex;
    gap: 2rem;
}

.cc-stat {
    display: flex;
    flex-direction: column;
}

.cc-stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.cc-stat-asterisk {
    position: relative;
    text-decoration: none;
    font-size: 0.75em;
    vertical-align: super;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    position: relative;
}

.cc-stat-asterisk:hover {
    opacity: 1;
    text-decoration: none;
}

.cc-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    white-space: nowrap;
    max-width: 90vw;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cc-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a1a1a;
}

.cc-stat-asterisk:hover .cc-tooltip {
    opacity: 1;
}

.cc-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    margin-top: 0.15rem;
}

/* Filters */
.cc-filters {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2rem 0 0;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cc-filters::-webkit-scrollbar {
    display: none;
}

.cc-filter-tab {
    position: relative;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: none;
    transition: color 0.25s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.cc-filter-tab:hover {
    opacity: 0.85;
}

.cc-filter-tab.active {
    border-bottom-color: currentColor;
    font-weight: 600;
}

.cc-filter-tab .cc-filter-count {
    font-size: 0.7rem;
    opacity: 0.75;
    margin-left: 0.35rem;
}

/* Column Headers */
.cc-column-headers {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 0.6fr 48px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.45;
    margin-top: 1rem;
}

/* Project Rows */
.cc-rows-container {
    position: relative;
}

.cc-project-row {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s ease;
}

.cc-project-row:first-child {
    border-top: 1px solid #e5e7eb;
}

.cc-row-header {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 0.6fr 48px;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    position: relative;
    transition: padding-left 0.3s ease;
}

.cc-row-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--pole-color, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.cc-project-row:hover .cc-row-header::before,
.cc-project-row.is-open .cc-row-header::before {
    opacity: 1;
}

.cc-project-row:hover {
    background-color: var(--pole-color-hover, rgba(0,0,0,0.03));
}

.cc-project-row.is-open {
    background-color: var(--pole-color-hover, rgba(0,0,0,0.03));
}

.cc-project-row:hover .cc-row-title {
    color: var(--pole-color) !important;
    transition: color 0.3s ease;
}

.cc-project-row:hover .cc-row-toggle {
    border-color: var(--pole-color, #6646ff);
    color: var(--pole-color, #6646ff);
    background-color: var(--pole-color-hover, rgba(0,0,0,0.03));
}

/* Row cells */
.cc-row-metric {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    display: flex;
    flex-direction: column;
}

.cc-row-metric-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.6;
    margin-top: 0.2rem;
    line-height: 1.3;
}

.cc-row-project {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.cc-row-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.cc-row-subtitle {
    font-size: 0.85rem;
    font-style: italic;
    opacity: 0.6;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cc-row-pole {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.cc-row-pole-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    width: fit-content;
}

.cc-row-year {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.6;
}

.cc-row-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1;
    color: inherit;
}

.cc-row-toggle:hover {
    border-color: var(--pole-color, #6646ff);
    color: var(--pole-color, #6646ff);
}

.cc-project-row.is-open .cc-row-toggle {
    transform: rotate(45deg);
    border-color: var(--pole-color, #6646ff);
    color: var(--pole-color, #6646ff);
}

/* Expandable Panel */
.cc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-project-row.is-open .cc-panel {
    max-height: 2000px;
}

.cc-panel-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 0 1.5rem 2rem;
}

.cc-panel-image {
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.cc-panel-image img,
.cc-panel-image picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cc-panel-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
}

.cc-panel-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.45;
}

.cc-panel-text {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.75;
}

.cc-panel-metrics {
    display: flex;
    gap: 2rem;
    padding-top: 0.5rem;
}

.cc-panel-metric {
    display: flex;
    flex-direction: column;
}

.cc-panel-metric-number {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.cc-panel-metric-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    margin-top: 0.1rem;
}

.cc-panel-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    padding-top: 0.5rem;
    transition: gap 0.25s ease;
}

.cc-panel-cta:hover {
    gap: 0.75rem;
    text-decoration: none;
}

/* CTA Section */
.cc-cta-section {
    margin-top: 4rem;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
    background: #000;
    color: #fff;
}

.cc-cta-section h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    color: #fff;
}

.cc-cta-section p {
    font-size: 1rem;
    opacity: 0.7;
    margin: 0 0 1.5rem;
    color: #fff;
}

.cc-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: #fff;
    color: #000;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.cc-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.15);
    text-decoration: none;
    color: #000;
}

/* Row entrance animation */
.cc-project-row {
    opacity: 0;
    transform: translateY(12px);
}

.cc-project-row.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* No results */
.cc-no-results {
    text-align: center;
    padding: 4rem 1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
    .cc-archive-header {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cc-column-headers {
        grid-template-columns: 1.2fr 2fr 48px;
    }

    .cc-column-headers > :nth-child(3),
    .cc-column-headers > :nth-child(4) {
        display: none;
    }

    .cc-row-header {
        grid-template-columns: 1.2fr 2fr 48px;
    }

    .cc-row-pole,
    .cc-row-year {
        display: none;
    }

    .cc-panel-inner {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .cc-tooltip {
        white-space: normal;
        max-width: 250px;
        text-align: center;
    }

    .cc-archive-header .cc-hero-title {
        font-size: 2rem;
    }

    .cc-header-stats {
        gap: 1.5rem;
    }

    .cc-stat-number {
        font-size: 1.35rem;
    }

    .cc-column-headers {
        display: none;
    }

    .cc-row-header {
        display: grid;
        grid-template-columns: 5.5rem 1fr 2rem;
        grid-template-rows: auto auto;
        gap: 0.25rem 0.75rem;
        padding: 1rem;
        align-items: center;
    }

    .cc-row-header::before {
        top: 0;
        bottom: 0;
    }

    .cc-row-metric {
        font-size: 1.25rem;
        grid-row: 1;
        grid-column: 1;
    }

    .cc-row-metric-label {
        display: none;
    }

    .cc-row-project {
        grid-row: 1;
        grid-column: 2;
        min-width: 0;
    }

    .cc-row-title {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cc-row-subtitle {
        display: none;
    }

    .cc-row-toggle {
        grid-row: 1;
        grid-column: 3;
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .cc-row-pole {
        display: block;
        grid-row: 2;
        grid-column: 2;
    }

    .cc-row-pole-tag {
        font-size: 0.65rem;
        padding: 0.2rem 0.6rem;
    }

    .cc-row-year {
        display: block;
        grid-row: 2;
        grid-column: 3;
        font-size: 0.8rem;
        text-align: center;
    }

    .cc-panel-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem 1.5rem;
    }

    .cc-panel-metrics {
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
    }

    .cc-cta-section {
        padding: 2rem 1.5rem;
        margin-top: 3rem;
    }

    .cc-cta-section h2 {
        font-size: 1.5rem;
    }

    .cc-filters {
        padding-top: 1.5rem;
    }

    .cc-filter-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .cc-disclaimer-inner {
        flex-direction: column;
        gap: 2.5rem;
    }

    .cc-disclaimer-tags {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .cc-disclaimer-tag {
        width: auto;
    }
}

/* ==========================================================================
   Disclaimer / NDA Section
   ========================================================================== */

.cc-disclaimer {
    margin-top: 4rem;
    padding-top: 4rem;
}

.cc-disclaimer-inner {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.cc-disclaimer-content {
    flex: 1;
    min-width: 0;
}

.cc-disclaimer-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.cc-disclaimer-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
}

.cc-disclaimer-text {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.75;
    margin: 0 0 2rem 0;
    max-width: 600px;
}

.cc-disclaimer-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 2rem;
    background: #1a1a1a;
    color: white;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.cc-disclaimer-cta:hover {
    background: #333;
    color: white;
    text-decoration: none;
}

.cc-disclaimer-tags {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
    width: 240px;
    padding-top: 0.5rem;
}

.cc-disclaimer-tag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
}

.cc-disclaimer-tag-dash {
    width: 16px;
    height: 2px;
    border-radius: 1px;
    opacity: 0.3;
    flex-shrink: 0;
}
