/* ============================================
   STUDIO ZERO — Case Study Styles
   Clean, column-aligned layout where all content
   (text + images) lives within a single column.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --color-bg: #fafafa;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-accent: #333333;
    --color-accent-light: #666666;
    --color-accent-soft: #f0f0f0;
    --color-border: rgba(0, 0, 0, 0.06);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --content-width: 720px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============================================
   BACK BUTTON
   ============================================ */
.back-button {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.back-button svg {
    flex-shrink: 0;
}

/* ============================================
   HERO SECTION — Text-only, dark gradient
   ============================================ */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(165deg, #0a0a0a 0%, #1a1a1a 30%, #2a2a2a 70%, #000000 100%);
    background-size: 200% auto;
    animation: gradientPan 6s ease forwards;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    max-width: var(--content-width);
    width: 100%;
    text-align: left;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    max-width: 540px;
}

/* ============================================
   INFO BAR
   ============================================ */
.info-bar {
    max-width: var(--content-width);
    margin: 3rem auto;
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.6s forwards;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.info-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

/* ============================================
   HERO CTA BUTTON
   ============================================ */
.hero-cta-button {
    display: inline-flex;
    align-items: center;
    background-color: #00c853; /* Vibrant Green */
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.25);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-cta-button:hover {
    background-color: #00e676;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 200, 83, 0.35);
}

.hero-cta-button svg {
    transition: transform 0.3s ease;
}

.hero-cta-button:hover svg {
    transform: translateX(4px);
}

.side-cta-wrapper {
    max-width: var(--content-width);
    margin: 0 auto;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease 0.6s forwards;
}

/* ============================================
   TEXT SECTIONS
   ============================================ */
.text-section {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1.5rem 0 1.25rem;
}

.content-col {
    margin-bottom: 2rem;
}

.section-number {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.text-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.text-section p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1rem;
}

.visit-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    background: var(--color-text);
    color: var(--color-bg);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.visit-button svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.visit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #000;
}

.visit-button:hover svg {
    transform: translateX(4px);
}

/* ============================================
   TECH STACK LOGOS
   ============================================ */
.tech-stack-logos img {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    will-change: transform;
}

.tech-stack-logos img:hover {
    transform: translateY(-6px) scale(1.04);
}

/* ============================================
   GRADIENT BORDER CARD -> ANIMATED GRADIENT CARD
   ============================================ */
.gradient-border-card {
    position: relative;
    background: rgba(0, 200, 83, 0.85); /* High opacity vibrant green to match button */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3.5rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 200, 83, 0.2), 0 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1;
    overflow: hidden;
    color: #fff;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Gradient Animation */
.gradient-border-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #00c853, #00e676, #059669, #00c853);
    background-size: 200% auto;
    opacity: 0.25; /* Increased glow intensity */
    z-index: -1;
    animation: rotateGradientStroke 6s linear infinite;
}

.gradient-border-card h2,
.gradient-border-card p {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    /* Slight shadow for text legibility over colors */
}

@keyframes rotateGradientStroke {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: -200% 50%;
    }
}

.visit-site-button {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background-color: #ffffff;
    color: #111111;
    padding: 1rem 2.25rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.visit-site-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    background-color: #f8f8f8;
}

.visit-site-button svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.visit-site-button:hover svg {
    transform: translateX(4px);
}

/* ============================================
   IMAGE / MOCKUP SHOWCASES
   ============================================ */
.mockup-row {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.mockup-row.two-up .mockup-frame {
    flex: 1;
    max-width: 50%;
}

.mockup-frame {
    flex: 1;
}

.mockup-frame img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s ease;
}

.mockup-frame:hover img {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.14),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   IMAGE ROW (For non-device, flat screenshots)
   ============================================ */
.image-row {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.image-row.two-up .image-frame {
    flex: 1;
    max-width: 50%;
}

.image-frame {
    flex: 1;
}

.image-frame img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s ease;
}

.image-frame:hover img {
    transform: translateY(-4px);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.14),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ============================================
   FOOTER
   ============================================ */
.project-footer {
    text-align: center;
    padding: 3rem 2rem 4rem;
    border-top: 1px solid var(--color-border);
    max-width: var(--content-width);
    margin: 2rem auto 0;
}

.footer-back {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-accent);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-back:hover {
    opacity: 0.7;
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */
@keyframes gradientPan {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg-dark {
    background: linear-gradient(165deg, #0a0a0a 0%, #1a1a1a 30%, #2a2a2a 70%, #000000 100%);
    background-size: 200% auto;
    animation: gradientPan 6s ease forwards;
}

.gradient-text-dark {
    background: linear-gradient(165deg, #333 0%, #555 30%, #111 70%, #0a0a0a 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientPan 6s ease forwards;
    display: inline-block;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-child:nth-child(1) {
    transition-delay: 0s;
}

.reveal-child:nth-child(2) {
    transition-delay: 0.12s;
}

.reveal-child:nth-child(3) {
    transition-delay: 0.24s;
}

.reveal-child.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LIGHTBOX — Click-to-zoom overlay
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    transition: transform 0.15s ease-out;
}

.lightbox.is-open .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 1001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}

.lightbox-img {
    user-select: none;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .hero {
        padding: 5rem 1.25rem 3rem;
    }

    .hero-title {
        font-size: 4.4rem;
    }

    .text-section {
        padding: 2.5rem 1.25rem 1.5rem;
    }

    .info-bar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
        margin: 0 0 2rem;
        border-radius: 16px;
        background: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    }

    .hero-cta-button {
        width: 100%;
        margin: 2rem 0 0;
        justify-content: center;
        padding: 1.25rem;
        font-size: 1.1rem;
    }

    .side-cta-wrapper {
        display: flex;
        flex-direction: column;
        margin-top: 2rem;
    }

    .mockup-row {
        flex-direction: column;
        gap: 1rem;
    }

    .mockup-row.two-up .mockup-frame {
        max-width: 100%;
    }

    .back-button {
        top: 16px;
        left: 16px;
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .project-footer {
        padding: 2rem 1.25rem 3rem;
        margin: 1rem 1.25rem 0;
    }
}