/* ==========================================================================
   DESIGN SYSTEM CASE STUDY SPECIFIC STYLES (styles-sistema-de-diseno.css)
   ========================================================================== */

/* Project Hero Background - Exact Pragma Purple #330072 */
.project-hero {
    background-color: #330072;
}

/* ==========================================================================
   El Reto Layout (styles-sistema-de-diseno.css)
   ========================================================================== */

.el-reto-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
    max-width: 1040px;
    margin: 0 auto;
}

.el-reto-title h2 {
    font-family: var(--font-main);
    font-size: var(--font-size-h2);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.5px;
    color: var(--text-dark);
}

.reto-desc {
    font-size: var(--font-size-p);
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 300;
}

.reto-desc strong {
    font-weight: 600;
}

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


/* Design System Solution Sections */
.ds-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.ds-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.ds-grid.reverse {
    grid-template-columns: 1fr 1.2fr;
}

.ds-grid.reverse> :nth-child(1) {
    order: 2;
}

.ds-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.2s;
}

.ds-section.active .ds-text,
.reveal.active .ds-text {
    opacity: 1;
    transform: translateY(0);
}

.ds-text h3 {
    letter-spacing: 0.3em;
    font-weight: 800;
    color: var(--process-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.ds-text p {
    line-height: 1.6;
    color: var(--text-dark);
}

/* Color Marquee */
.color-swatches {
    height: 600px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #f0f0f0;
    border-radius: 12px;
}

.color-marquee-inner {
    display: flex;
    flex-direction: column;
    animation: verticalMarquee 20s linear infinite;
}

@keyframes verticalMarquee {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.color-swatch {
    height: 300px;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2rem;
    text-align: left;
}

/* Only active when section is active */
.ds-section.active .color-marquee-inner {
    animation-play-state: running;
}

.ds-section:not(.active) .color-marquee-inner {
    animation-play-state: paused;
}

/* Disable generic slide-up of parent */
.ds-section.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.color-swatch span {
    display: block;
    color: white;
    font-weight: 500;
    font-size: 11px;
}

.color-swatch span.hex {
    font-weight: 300;
    opacity: 0.8;
    font-size: 8px;
    margin-top: 0.2rem;
}

/* Contrast adjustment for light colors */
.c-indigo span,
.c-fuchsia span,
.c-yellow span {
    color: var(--bg-dark) !important;
}

.c-purple-1 {
    background-color: #6429CD;
}

.c-purple-2 {
    background-color: #9610FF;
}

.c-indigo {
    background-color: #BDBDFF;
    color: var(--process-primary);
}

.c-indigo span {
    color: var(--process-primary);
}

.c-fuchsia {
    background-color: #E4A4FF;
    color: var(--process-primary);
}

.c-fuchsia span {
    color: var(--process-primary);
}

.c-yellow {
    background-color: #F8AF3C;
    color: var(--process-primary);
}

.c-yellow span {
    color: var(--process-primary);
}

.c-gray {
    background-color: #1D1D1B;
}

/* Typography Visual Box */
.typo-visual {
    background: white;
    border-radius: 12px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    color: var(--bg-dark);
}

.typo-header {
    display: flex;
    align-items: flex-start;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.typo-name {
    font-size: 3rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -1px;
}

.typo-body {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex: 1;
}

.typo-body .aa {
    font-size: clamp(15rem, 25vw, 25rem);
    font-weight: 500;
    line-height: 0.8;
    letter-spacing: -0.05em;
    margin-bottom: -1rem;
}

/* Grids Visual Box */
.grids-visual {
    background: white;
    border-radius: 12px;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.grids-top {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    width: 100%;
    justify-content: center;
}

.grid-box {
    border: 2px solid #E4A4FF;
    border-radius: 6px;
    display: flex;
    padding: 4px;
    gap: 4px;
    background: white;
    position: relative;
}

.grid-box::before {
    content: attr(data-size);
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.7rem;
    color: var(--bg-dark);
    font-weight: 500;
}

.grid-box i {
    background: #fdf5ff;
    flex: 1;
    border-radius: 2px;
}

.gb-1 {
    height: 320px;
    width: 40%;
}

.gb-2 {
    height: 260px;
    width: 25%;
}

.gb-3 {
    height: 220px;
    width: 20%;
}

.gb-4 {
    height: 300px;
    width: 8%;
    border-color: #BDBDFF;
}

.gb-4 i {
    background: #f4f3ff;
}

.project-process {
    padding-bottom: 2rem;
}

.project-solution {
    padding: 2rem 0 4rem;
}

/* Implementation: UI Library Showcase Gallery */
.libreria-section {
    background-color: var(--bg-light);
    color: var(--text-dark);
    position: relative;
    padding: 4.5rem 0 5.5rem;
}

.libreria-section .ds-text {
    opacity: 1;
    transform: none;
    transition: none;
}

.lib-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.lib-header .section-title {
    font-size: var(--font-size-h2);
    font-weight: 400;
    margin-bottom: 1.25rem;
    font-family: var(--font-main);
    color: var(--text-dark);
}

.lib-desc {
    font-size: var(--font-size-p);
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 300;
}

/* UI Library Showcase Gallery Card Styling */
.lib-slide-card {
    flex: 0 0 calc(80cqi - 0.5rem);
    width: calc(80cqi - 0.5rem);
    max-width: 960px;
    height: 480px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid rgba(33, 30, 73, 0.08);
    box-shadow: 0 8px 26px rgba(33, 30, 73, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
    transition: box-shadow 0.3s ease;
}

.lib-slide-card:hover {
    box-shadow: 0 12px 32px rgba(33, 30, 73, 0.12);
}

.lib-slide-canvas {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1.5rem 0;
}

.lib-slide-img {
    max-width: 85%;
    max-height: 260px;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.lib-slide-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(33, 30, 73, 0.08);
}

.lib-slide-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lib-component-name {
    font-family: var(--font-main);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.lib-component-caption {
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(33, 30, 73, 0.72);
    font-weight: 300;
    margin: 0;
}

.lib-component-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bg-dark);
    background: rgba(33, 30, 73, 0.08);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Fullscreen Modal Component Stages */
.lib-modal-canvas {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 2.5rem;
}

.lib-modal-canvas img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .lib-slide-card {
        flex: 0 0 calc(86cqi - 0.5rem);
        width: calc(86cqi - 0.5rem);
        height: 400px;
        padding: 1.75rem 1.5rem;
    }

    .lib-slide-img {
        max-height: 190px;
    }

    .lib-slide-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .lib-modal-canvas {
        height: 220px;
        padding: 1.5rem;
    }
}

/* Footer for Design System to match light page colors */
footer.ds-footer {
    background-color: var(--bg-light);
    color: var(--text-dark);
    opacity: 1;
}

footer.ds-footer .footer-content {
    border-top: 1px solid rgba(33, 30, 73, 0.15);
    padding-top: 1.5rem;
}

/* Responsive adjustments for grids */
@media (max-width: 992px) {

    .ds-grid,
    .el-reto-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .ds-grid.reverse> :nth-child(1) {
        order: 0;
    }
}