/* Inner listing & detail pages */

.page-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.page-top {
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
    border-bottom: 1px solid rgba(0, 6, 9, 0.08);
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.2s ease;
}

.back-link .arrow {
    color: var(--blue);
}

.back-link:hover {
    color: var(--blue);
}

.page-top h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.page-top .page-intro {
    max-width: 48rem;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.85;
    color: var(--muted);
}

/* UI listing — alternating rows */
.work-list {
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 8vw, 7rem);
}

.work-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease;
}

.work-item:hover {
    transform: translateY(-4px);
}

.work-item--reverse .work-item-visual {
    order: 2;
}

.work-item--reverse .work-item-copy {
    order: 1;
}

.work-item-visual {
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 6, 9, 0.06);
}

.work-item-visual img {
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.work-item:hover .work-item-visual img {
    transform: scale(1.02);
}

.work-item-copy h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.work-item-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.work-item-meta span {
    font-size: 0.95rem;
    color: var(--muted);
}

.work-item-meta .label {
    font-family: "Instrument Sans", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--blue);
}

.work-item-tags {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.work-item-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.work-item-cta .arrow {
    color: var(--blue);
    transition: transform 0.2s ease;
}

.work-item:hover .work-item-cta .arrow {
    transform: translateX(4px);
}

/* AI / Cultural listing — project grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.work-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 6, 9, 0.06);
    box-shadow: 0 6px 24px rgba(0, 6, 9, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.work-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0, 6, 9, 0.1);
}

.work-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg);
}

.work-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.work-card:hover .work-card-image img {
    transform: scale(1.04);
}

.work-card-body {
    padding: 1.25rem 1.35rem 1.5rem;
}

.work-card-category {
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

.work-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

/* Detail pages */
.detail-page {
    padding-bottom: var(--section-gap);
}

.detail-hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.detail-category {
    font-family: "Instrument Sans", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--blue);
    margin-bottom: 0.75rem;
}

.detail-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    max-width: 56rem;
}

.detail-intro {
    max-width: 48rem;
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.detail-hero-image {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 6, 9, 0.08);
}

.detail-hero-image img {
    width: 100%;
    height: auto;
}

.detail-video,
.detail-gallery,
.detail-note {
    max-width: var(--max-width);
    margin: clamp(2.5rem, 5vw, 4rem) auto 0;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.detail-video video {
    width: 100%;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 10px 40px rgba(0, 6, 9, 0.12);
}

.detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-gallery--group {
    margin-top: 0;
}

.detail-gallery--grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
}

.gallery-groups {
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 6vw, 5rem);
}

.gallery-group {
    max-width: var(--max-width);
    margin: clamp(2.5rem, 5vw, 4rem) auto 0;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.gallery-group__title {
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.gallery-group__subtitle {
    font-size: 0.95rem;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.detail-prompt,
.detail-keywords {
    max-width: 48rem;
    margin: 2rem auto 0;
    padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.detail-prompt p,
.detail-keywords p {
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--muted);
}

.detail-keywords p {
    font-weight: 600;
    color: var(--text);
}


.detail-gallery--grid .gallery-item {
    aspect-ratio: 2 / 3;
}

.detail-gallery--grid .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text);
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 6, 9, 0.06);
}

.gallery-item img {
    width: 100%;
    height: auto;
}

.detail-note {
    max-width: 48rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 6, 9, 0.08);
}

.detail-note p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--muted);
    font-style: italic;
}

@media (max-width: 1024px) {
    .work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .work-item,
    .work-item--reverse {
        grid-template-columns: 1fr;
    }

    .work-item--reverse .work-item-visual,
    .work-item--reverse .work-item-copy {
        order: initial;
    }

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

    .detail-gallery--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-item,
    .work-card,
    .work-item-visual img,
    .work-card-image img,
    .work-item-cta .arrow {
        transition: none;
    }
}
