/* ==========================================================================
   OUR WORK PAGE - Portfolio Grid
   Matches the homepage work showcase aesthetic
   ========================================================================== */

body {
    background: #000;
}

/* CSS Custom Properties */
.our-work-page {
    --accent: #fff;
    --accent-dim: rgba(255, 255, 255, 0.6);
    --accent-subtle: rgba(255, 255, 255, 0.1);
    --bg: #000;
    --transition-smooth: cubic-bezier(0.23, 1, 0.32, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

.our-work-page {
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Hero Header
   ========================================================================== */

.work-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.work-hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Gradient overlay for text readability */
.work-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.work-hero__inner {
    position: relative;
    z-index: 3;
}

/* Index badge */
.work-hero__index {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--accent-dim);
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s var(--transition-smooth) 0.1s forwards;
}

/* Title wrapper */
.work-hero__title-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 60px;
}

/* Giant display title */
.work-hero__title {
    margin: 0;
    line-height: 0.85;
}

.work-hero__title .title-line {
    display: block;
    overflow: hidden;
}

.work-hero__title .title-word {
    display: inline-block;
    font-family: "Lexend", sans-serif;
    font-size: clamp(80px, 15vw, 200px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(100%);
    animation: titleSlideUp 1s var(--transition-smooth) forwards;
}

.work-hero__title .title-word.filled {
    color: var(--accent);
    -webkit-text-stroke: none;
}

.work-hero__title .title-line:nth-child(1) .title-word { animation-delay: 0.2s; }
.work-hero__title .title-line:nth-child(2) .title-word { animation-delay: 0.35s; }

/* Meta block */
.work-hero__meta {
    flex-shrink: 0;
    max-width: 320px;
    padding-bottom: 30px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s var(--transition-smooth) 0.5s forwards;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 10px;
}

.work-hero__meta .ascii-decor {
    position: relative;
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
}
.work-hero__meta .ascii-decor::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(2px);
}

.work-hero__subtitle {
    font-family: "Lexend", sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--accent-dim);
    margin: 0;
}

/* Scroll hint */
.work-hero__scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeInUp 0.6s var(--transition-smooth) 1s forwards;
    z-index: 1;
}

.work-hero__scroll-hint .scroll-label {
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 1);
    transition: opacity 0.4s ease;
}

.work-hero__scroll-hint .scroll-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.4s ease;
}

.work-hero__scroll-hint.is-hidden .scroll-label,
.work-hero__scroll-hint.is-hidden .scroll-arrow {
    opacity: 0;
}

.work-hero__scroll-hint .scroll-arrow__line {
    width: 1px;
    height: 0;
    background: rgba(255, 255, 255, 1);
    transition: height 0.1s linear;
}

.work-hero__scroll-hint .scroll-arrow__head {
    font-size: 8px;
    color: rgba(255, 255, 255, 1);
    line-height: 1;
    margin-top: 2px;
}

/* ==========================================================================
   Projects Grid Section
   ========================================================================== */

.work-grid-section {
    position: relative;
    padding: 80px 0 100px;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ==========================================================================
   Project Card
   ========================================================================== */

.work-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.6s var(--transition-smooth),
        transform 0.6s var(--transition-smooth);
}

.work-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.work-card__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Visual layer */
.work-card__visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 12px;
}

.work-card__image-wrap {
    position: absolute;
    inset: -10px;
    transition: transform 0.6s var(--transition-smooth);
}

.work-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) saturate(1.1);
    transition: filter 0.6s var(--transition-smooth);
}

/* Gradient overlay */
.work-card__visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 30%,
        rgba(0, 0, 0, 0.9) 100%
    );
}

/* Shine effect */
.work-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        transparent 100%
    );
    opacity: 0;
    transform: translateX(-100%);
    transition:
        opacity 0.4s ease,
        transform 0.8s var(--transition-smooth);
    pointer-events: none;
}

/* Content layer */
.work-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px;
    z-index: 2;
}

.work-card__number {
    position: absolute;
    top: 28px;
    left: 28px;
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.4);
}

.work-card__category {
    display: inline-block;
    font-family: "Lexend", sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-dim);
    margin-bottom: 10px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    backdrop-filter: blur(10px);
}

.work-card__name {
    font-family: "Lexend", sans-serif;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 14px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.work-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--accent-dim);
    transition: color 0.3s ease;
}

.work-card__cta .cta-arrow {
    font-size: 10px;
    letter-spacing: -1px;
    transition:
        transform 0.4s var(--transition-smooth),
        letter-spacing 0.4s var(--transition-smooth);
}

/* Hover states */
.work-card__link:hover .work-card__image-wrap {
    transform: scale(1.05);
}

.work-card__link:hover .work-card__image {
    filter: brightness(0.4) saturate(1.2);
}

.work-card__link:hover .work-card__shine {
    opacity: 1;
    transform: translateX(100%);
}

.work-card__link:hover .work-card__cta {
    color: var(--accent);
}

.work-card__link:hover .work-card__cta .cta-arrow {
    transform: translateX(6px);
    letter-spacing: 2px;
}

/* Empty state */
.work-grid__empty {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 0;
}

.work-grid__empty .ascii-empty {
    font-family: "Courier New", monospace;
    font-size: 14px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   CTA Section - Interactive Grid Card
   ========================================================================== */

.work-cta {
    padding: 100px 0 120px;
}

.work-cta__card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 80px 60px;
    overflow: hidden;
}

/* Canvas background */
.work-cta__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.work-cta__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.work-cta__content {
    flex: 1;
    max-width: 500px;
}

.work-cta__label {
    display: inline-block;
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
}

.work-cta__title {
    font-family: "Lexend", sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--accent);
    margin: 0 0 16px 0;
}

.work-cta__text {
    font-family: "Lexend", sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--accent-dim);
    margin: 0;
}

/* Action area */
.work-cta__action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

/* Creative Button */
.work-cta__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 18px 32px;
    text-decoration: none;
    overflow: hidden;
}

.work-cta__btn .btn-border {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

.work-cta__btn .btn-bg {
    position: absolute;
    inset: 0;
    background: var(--accent);
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--transition-smooth);
}

.work-cta__btn .btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.work-cta__btn .btn-text {
    font-family: "Lexend", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--accent);
    transition: color 0.3s ease;
}

.work-cta__btn .btn-arrow {
    display: flex;
    align-items: center;
    gap: 0;
    overflow: hidden;
}

.work-cta__btn .arrow-line {
    width: 0;
    height: 1px;
    background: var(--accent);
    transition:
        width 0.4s var(--transition-smooth),
        background 0.3s ease;
}

.work-cta__btn .arrow-head {
    font-family: "Courier New", monospace;
    font-size: 20px;
    font-weight: 300;
    color: var(--accent);
    transition:
        transform 0.3s var(--transition-smooth),
        color 0.3s ease;
}

/* Glitch layer */
.work-cta__btn .btn-glitch {
    position: absolute;
    top: 50%;
    left: 32px;
    transform: translateY(-50%);
    font-family: "Lexend", sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: transparent;
    pointer-events: none;
    opacity: 0;
}

/* Button hover states */
.work-cta__btn:hover .btn-border {
    border-color: var(--accent);
}

.work-cta__btn:hover .btn-bg {
    transform: scaleX(1);
}

.work-cta__btn:hover .btn-text {
    color: #000;
}

.work-cta__btn:hover .arrow-line {
    width: 24px;
    background: #000;
}

.work-cta__btn:hover .arrow-head {
    color: #000;
    transform: translateX(2px);
}

/* Glitch effect on hover */
.work-cta__btn:hover .btn-glitch {
    animation: btnGlitch 0.4s ease forwards;
}

@keyframes btnGlitch {
    0% {
        opacity: 0.8;
        color: rgba(255, 0, 0, 0.6);
        transform: translateY(-50%) translateX(-2px);
        clip-path: inset(20% 0 60% 0);
    }
    20% {
        opacity: 0.6;
        color: rgba(0, 255, 255, 0.6);
        transform: translateY(-50%) translateX(2px);
        clip-path: inset(60% 0 10% 0);
    }
    40% {
        opacity: 0.4;
        color: rgba(255, 0, 255, 0.4);
        transform: translateY(-50%) translateX(-1px);
        clip-path: inset(40% 0 30% 0);
    }
    60% {
        opacity: 0.2;
        transform: translateY(-50%) translateX(1px);
        clip-path: inset(10% 0 70% 0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(0);
    }
}

.work-cta__hint {
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes titleSlideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 1200px) {
    .work-hero__title-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }

    .work-hero__meta {
        max-width: 100%;
        padding-bottom: 0;
    }
}

@media (max-width: 900px) {
    .work-hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .work-hero__title .title-word {
        font-size: clamp(56px, 12vw, 100px);
    }

    .work-hero__stats {
        gap: 20px;
    }

    .work-hero__stats .stat__number {
        font-size: 24px;
    }

    .work-hero__scroll-hint {
        display: none;
    }

    .work-grid {
        gap: 16px;
    }

    .work-card__content {
        padding: 24px;
    }

    .work-card__number {
        top: 24px;
        left: 24px;
    }
}

@media (max-width: 768px) {
    .work-hero {
        padding: 80px 0 50px;
    }

    .work-hero__index {
        margin-bottom: 30px;
    }

    .work-hero__title .title-word {
        font-size: clamp(48px, 14vw, 72px);
        -webkit-text-stroke-width: 1.5px;
    }

    .work-hero__title-wrap {
        margin-bottom: 40px;
    }

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

    .work-card {
        aspect-ratio: 16 / 11;
    }

    .work-card__shine {
        display: none;
    }

    .work-card__image {
        filter: brightness(0.55) saturate(1.1);
    }

    .work-cta {
        padding: 80px 0 100px;
    }

    .work-cta__card {
        padding: 50px 40px;
        border-radius: 16px;
    }

    .work-cta__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 40px;
    }

    .work-cta__content {
        max-width: 100%;
    }

    .work-cta__title {
        font-size: clamp(24px, 6vw, 32px);
    }

    .work-cta__btn .btn-glitch {
        display: none;
    }

    .work-cta__btn .arrow-line {
        width: 16px;
    }
}

@media (max-width: 480px) {
    .work-hero {
        padding: 70px 0 40px;
    }

    .work-hero__index {
        font-size: 12px;
        margin-bottom: 24px;
    }

    .work-hero__title .title-word {
        font-size: clamp(40px, 15vw, 56px);
    }

    .work-hero__meta .ascii-decor {
        font-size: 11px;
    }

    .work-hero__subtitle {
        font-size: 14px;
    }

    .work-hero__stats .stat__number {
        font-size: 20px;
    }

    .work-hero__stats .stat__label {
        font-size: 10px;
    }

    .work-grid-section {
        padding: 60px 0 80px;
    }

    .work-card {
        aspect-ratio: 16 / 12;
        border-radius: 10px;
    }

    .work-card__visual {
        border-radius: 10px;
    }

    .work-card__content {
        padding: 20px;
    }

    .work-card__number {
        top: 20px;
        left: 20px;
        font-size: 11px;
    }

    .work-card__category {
        font-size: 9px;
        padding: 4px 10px;
    }

    .work-card__name {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .work-card__cta {
        font-size: 11px;
    }

    .work-cta {
        padding: 60px 0 80px;
    }

    .work-cta__card {
        padding: 40px 24px;
        border-radius: 14px;
    }

    .work-cta__inner {
        gap: 32px;
    }

    .work-cta__label {
        font-size: 10px;
    }

    .work-cta__title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .work-cta__text {
        font-size: 14px;
    }

    .work-cta__btn {
        padding: 14px 20px;
    }

    .work-cta__btn .btn-text {
        font-size: 13px;
    }

    .work-cta__btn .arrow-head {
        font-size: 18px;
    }

    .work-cta__hint {
        font-size: 11px;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .work-hero__index,
    .work-hero__title .title-word,
    .work-hero__meta,
    .work-hero__stats,
    .work-hero__scroll-hint {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .work-hero__scroll-hint .scroll-line {
        animation: none;
    }

    .work-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .work-card__image-wrap,
    .work-card__image,
    .work-card__shine,
    .work-card__cta,
    .work-card__cta .cta-arrow,
    .work-cta__btn,
    .work-cta__btn .btn-bg,
    .work-cta__btn .btn-border,
    .work-cta__btn .btn-text,
    .work-cta__btn .arrow-line,
    .work-cta__btn .arrow-head {
        transition: none;
    }

    .work-cta__btn .btn-glitch {
        display: none;
    }

    .work-cta__btn .arrow-line {
        width: 16px;
    }
}
