/* ============================================
   VESPA & APRILIA — Case Study Styles
   A split-brand aesthetic:
   Aprilia → bold red/black/white (racing)
   Vespa   → colorful, playful, lifestyle
   ============================================ */

@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-border: rgba(0, 0, 0, 0.06);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --content-width: 720px;

    --aprilia-red: #FF0000;
    --aprilia-dark: #0a0a0a;
    --aprilia-mid: #1a1a1a;

    /* Vespa brand */
    --vespa-green: #3BB273;
    --vespa-purple: #61D790;
    --vespa-yellow: #F5C400;
    --vespa-orange: #F07D00;
}

*,
*::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.85);
    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.06);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

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

/* ============================================
   HERO — Split dual-brand header
   ============================================ */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--aprilia-dark);
    padding: 7rem 2rem 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Aprilia red accent stripe */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--aprilia-red) 0%, var(--aprilia-red) 50%, var(--vespa-green) 50%, var(--vespa-green) 100%);
}

/* Subtle noise texture */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(232, 0, 29, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 15% 60%, rgba(59, 178, 115, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

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

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.75rem;
}

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

.hero-title .aprilia-accent {
    color: var(--aprilia-red);
}

.hero-title .vespa-accent {
    color: var(--vespa-green);
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.65);
    max-width: 520px;
}

/* ============================================
   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.07);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.65s 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);
}

/* ============================================
   BRAND DIVIDER — visual separator between brands
   ============================================ */
.brand-divider {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 0 1rem;
}

.brand-divider-line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.brand-divider-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
}

/* ============================================
   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;
    margin-bottom: 0.75rem;
}

.section-number.red  { color: var(--aprilia-red); }
.section-number.purple { color: var(--vespa-purple); }
.section-number.default { color: #555; }

.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;
}

/* ============================================
   IMAGE GRID
   ============================================ */
.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;
    border-radius: 14px;
    overflow: hidden;
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
    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);
}

/* ============================================
   BRAND HIGHLIGHT BLOCKS
   ============================================ */
.brand-highlight {
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: var(--content-width);
    position: relative;
    overflow: hidden;
}

.brand-highlight.aprilia-block {
    background: var(--aprilia-dark);
    color: #fff;
}

.brand-highlight.aprilia-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--aprilia-red);
}

.brand-highlight.aprilia-block h3 {
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.brand-highlight.aprilia-block p {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.95rem;
    line-height: 1.75;
}

.brand-highlight.aprilia-block .highlight-accent {
    color: #00B4DC;
    font-weight: 700;
}

.brand-highlight.vespa-block {
    background: linear-gradient(135deg, #f0fdf4 0%, #faf5ff 100%);
    border: 1.5px solid rgba(59, 178, 115, 0.2);
}

.brand-highlight.vespa-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--vespa-green), var(--vespa-purple));
}

.brand-highlight.vespa-block h3 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--vespa-purple);
}

.brand-highlight.vespa-block p {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.75;
}

.brand-highlight.vespa-block .highlight-accent {
    color: var(--vespa-green);
    font-weight: 700;
}

/* ============================================
   COLOR PALETTE SWATCHES
   ============================================ */
.palette-row {
    display: flex;
    gap: 0.75rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.swatch-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.swatch-name {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* ============================================
   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: #555;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

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

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    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
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.88);
    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 {
    width: 90vw;
    height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 24px 80px rgba(0, 0, 0, 0.4));
    transform: scale(0.92);
    transition: transform 0.15s ease-out;
    user-select: none;
}

.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.22);
}

.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);
}

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

    .info-bar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.75rem;
        margin: 1.5rem 1.25rem;
    }

    .text-section {
        padding: 2rem 1.25rem 1rem;
    }

    .brand-highlight {
        margin: 1.5rem 1.25rem;
        padding: 2rem 1.5rem;
    }

    .brand-divider {
        padding: 2rem 1.25rem 0.5rem;
    }

    .image-row {
        flex-direction: column;
    }

    .image-row.two-up .image-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;
    }

    .palette-row { gap: 0.5rem; }
    .swatch-circle { width: 40px; height: 40px; }
}
