/* ========================================
   APPLE-STYLE ELITE DESIGN SYSTEM
   Modern, Minimalist, Premium
   ======================================== */

:root {
    /* ===== APPLE-INSPIRED COLOR PALETTE ===== */
    --apple-white: #ffffff;
    --apple-black: #000000;
    --apple-gray-50: #fafafa;
    --apple-gray-100: #f5f5f7;
    --apple-gray-200: #e8e8ed;
    --apple-gray-300: #d2d2d7;
    --apple-gray-400: #86868b;
    --apple-gray-500: #6e6e73;
    --apple-gray-600: #515154;
    --apple-gray-700: #424245;
    --apple-gray-800: #1d1d1f;
    --apple-gray-900: #000000;

    /* ===== APPLE TYPOGRAPHY SYSTEM ===== */
    /* Using system fonts for native Apple feel */
    --apple-font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --apple-font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* ===== APPLE SPACING SYSTEM (8px grid) ===== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;
    --space-32: 128px;

    /* ===== APPLE ANIMATION TIMING ===== */
    --apple-ease-in: cubic-bezier(0.42, 0, 1, 1);
    --apple-ease-out: cubic-bezier(0, 0, 0.58, 1);
    --apple-ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
    --apple-spring: cubic-bezier(0.16, 1, 0.3, 1);

    /* ===== THEME COLORS (DARK MODE DEFAULT) ===== */
    --bg-primary: var(--apple-black);
    --bg-secondary: var(--apple-gray-800);
    --bg-tertiary: var(--apple-gray-700);
    --text-primary: var(--apple-white);
    --text-secondary: var(--apple-gray-400);
    --text-tertiary: var(--apple-gray-500);
    --border-color: rgba(255, 255, 255, 0.1);
    --overlay-bg: rgba(0, 0, 0, 0.5);

    /* ===== GLASSMORPHISM ===== */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;
}



/* ========================================
   GLOBAL RESETS & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

body {
    font-family: var(--apple-font-text) !important;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    line-height: 1.5 !important;
    overflow-x: hidden;
    transition: background-color 0.3s var(--apple-ease-out), color 0.3s var(--apple-ease-out);
}

/* ========================================
   APPLE-STYLE NAVIGATION - STRONGER OVERRIDES
   ======================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: saturate(180%) blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur)) !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s var(--apple-ease-out);
    padding: 16px var(--content-margin) !important;
    mix-blend-mode: normal !important;
}

header::before,
header::after {
    display: block !important;
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--grid-line-color);
    z-index: 1001;
    pointer-events: none;
}

header::before {
    left: var(--grid-margin);
}

header::after {
    right: var(--grid-margin);
}

header.scrolled {
    backdrop-filter: saturate(180%) blur(calc(var(--glass-blur) * 1.5));
    -webkit-backdrop-filter: saturate(180%) blur(calc(var(--glass-blur) * 1.5));
    background-color: rgba(0, 0, 0, 0.8);
}

.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-10);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Syne', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    color: var(--text-primary);
    transition: opacity 0.2s var(--apple-ease-out);
}

.logo:hover {
    opacity: 0.7;
}

nav {
    display: flex;
    gap: var(--space-8);
    align-items: center;
}

nav a {
    font-family: var(--apple-font-text) !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.2s var(--apple-ease-out) !important;
    position: relative;
    border-radius: 0 !important;
    border: none !important;
    padding: 8px 16px !important;
    margin-left: 0 !important;
    background: transparent !important;
}

nav a:hover {
    opacity: 0.7 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 0 !important;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--text-primary);
    transform: scaleX(0);
    transition: transform 0.3s var(--apple-spring);
}

nav a:hover::after {
    transform: scaleX(1);
}



/* ========================================
   APPLE-STYLE HERO SECTION - REFINED (PRESERVING ORIGINAL FLOW)
   ======================================== */

.hero-section {
    /* Keep original layout, just refine spacing */
    padding-top: 120px !important;
    background: transparent !important;
}

/* PRESERVE flowing images - just add smoother animations */
.hero-scatter-container {
    opacity: 1 !important;
    filter: none !important;
    /* Add smooth transitions for scroll-based effects */
    transition: filter 0.3s ease-out, opacity 0.3s ease-out !important;
}

.hero-scatter-container img {
    transition: transform 0.8s var(--apple-spring), opacity 0.6s ease !important;
}

/* Keep original text positioning but refine typography */
.hero-text-area {
    /* Preserve original positioning */
    font-family: var(--apple-font-display) !important;
}

.hero-title {
    font-family: 'Syne', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em !important;
    transition: all 0.4s var(--apple-spring) !important;
}

.hero-subtitle {
    font-family: var(--apple-font-text) !important;
    transition: all 0.4s var(--apple-spring) !important;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 980px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s var(--apple-spring);
    animation: fadeInUp 1s var(--apple-spring) 0.4s forwards;
    opacity: 0;
}

.hero-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Hide item-7 for cleaner look */
.hero-grid-item.item-7 {
    display: none !important;
}

/* ========================================
   INTRO SECTION - APPLE REFINEMENT
   ======================================== */

.intro-section {
    padding: 100px var(--content-margin) !important;
    background: var(--bg-primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.hero-about-area {
    max-width: 950px;
}

.hero-about-area h2 {
    font-family: var(--apple-font-display) !important;
    font-size: clamp(2rem, 4vw, 3rem) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 20px !important;
    color: var(--text-primary) !important;
}

.hero-about-area p {
    font-family: var(--apple-font-text) !important;
    font-size: clamp(1rem, 1.5vw, 1.25rem) !important;
    line-height: 1.6 !important;
    color: var(--apple-gray-400) !important;
    max-width: 100% !important;
}

.intro-section .about-btn {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 !important;
    padding: 12px 32px !important;
    font-family: var(--apple-font-text) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: all 0.3s var(--apple-spring) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 32px !important;
}

.intro-section .about-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.02) !important;
}

/* ========================================
   SMOOTH ANIMATIONS & MICRO-INTERACTIONS
   ======================================== */

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes smoothSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth !important;
}

/* Add smooth transitions to all interactive elements */
a,
button,
.project-card,
.hero-scatter-container img {
    transition: all 0.4s var(--apple-spring) !important;
}

/* Enhance hover states with smooth scaling */
a:hover,
button:hover {
    transform: scale(1.02) !important;
}

/* Add subtle glow effect on focus */
a:focus,
button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3) !important;
    outline-offset: 4px !important;
    transition: outline 0.2s ease !important;
}

/* ========================================
   APPLE-STYLE PROJECT GRID
   ======================================== */

.work-section {
    padding: var(--space-32) var(--space-10);
    max-width: 1440px;
    margin: 0 auto;
}

/* ========================================
   WORK SECTION - PRESERVE GRID LINES
   ======================================== */

.work-showcase {
    /* Keep original grid structure, let redesign.css handle horizontal padding */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    /* removed — section ends at bottom border */
    position: relative;
    /* needed for the absolute line children */
    border-top: 1px solid var(--grid-line-color);
    border-bottom: 1px solid var(--grid-line-color);
}

/* Full-height vertical lines — independent of card heights */
.work-grid-lines {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--grid-margin);
    /* match global grid lines */
    right: var(--grid-margin);
    pointer-events: none;
    z-index: 0;
}

/* Two inner dividers for a 3-column grid */
.work-grid-lines::before,
.work-grid-lines::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--grid-line-color);
}

.work-grid-lines::before {
    left: 33.333%;
}

.work-grid-lines::after {
    left: 66.666%;
}

/* Ensure project grid and marquee header sit above the lines */
.work-showcase .clients-marquee-header,
.work-showcase .project-grid {
    position: relative;
    z-index: 1;
}

/* PRESERVE grid lines - don't override border */
.project-grid {
    /* Keep original grid with borders */
    transition: all 0.4s var(--apple-spring) !important;
    padding-bottom: 80px;
}

/* Refine project cards while keeping grid structure */
.project-card {
    /* Add smooth transitions without changing structure */
    transition: all 0.5s var(--apple-spring) !important;
    border-radius: 0 !important;
    border: none !important;
}

.project-card:hover {
    transform: none !important;
    box-shadow: none !important;
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden;
    border-radius: 0 !important;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--apple-spring), filter 0.4s ease !important;
}

.project-card:hover .project-image img {
    transform: scale(1.07) !important;
}

.project-info {
    padding: 24px !important;
}

/* Refine typography in project cards */
.project-info h3 {
    font-family: var(--apple-font-display) !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    color: var(--text-primary) !important;
    transition: color 0.3s ease !important;
}

.project-info p {
    font-family: var(--apple-font-text) !important;
    font-size: 0.875rem !important;
    color: var(--apple-gray-400) !important;
    transition: color 0.3s ease !important;
}

/* ========================================
   FOOTER / CONTACT SECTION
   ======================================== */

.new-footer-section {
    background: var(--bg-primary) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    position: relative;
    z-index: 91;
    overflow: hidden;
}

/* ── Sol / Sağ dikey grid çizgileri ── */
.new-footer-section::before,
.new-footer-section::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--grid-line-color);
    pointer-events: none;
    z-index: 1;
}

.new-footer-section::before {
    left: var(--grid-margin);
}

.new-footer-section::after {
    right: var(--grid-margin);
}

/* ── Contact Form Block ── */
.contact-form-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    padding: 100px var(--content-margin) 80px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-left {
    display: flex;
    flex-direction: column;
}

.footer-eyebrow {
    font-family: 'Syne', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: var(--text-color);
}

.footer-email-link {
    display: flex;
    text-decoration: none;
    transition: opacity 0.3s ease;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-email-link:hover {
    opacity: 0.7;
}

.footer-email-text {
    font-family: 'Syne', sans-serif;
    font-size: 25px;
    font-weight: 700;
    color: var(--text-color);
    text-transform: lowercase;
    line-height: 1;
}

.contact-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-contact-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label {
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    padding: 0 0 16px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #fff;
    outline: none;
    transition: border-color 0.3s ease;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-bottom-color: #ff5e00;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.submit-btn {
    align-self: flex-start;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0 !important;
    padding: 12px 32px !important;
    font-family: var(--apple-font-text) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.1em;
    color: var(--text-primary) !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--apple-spring) !important;
    margin-top: 20px;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: var(--text-primary) !important;
    transform: scale(1.02) !important;
}

.footer-email-arrow {
    font-size: clamp(2.4rem, 5vw, 5rem);
    color: var(--text-color);
    opacity: 0.3;
    line-height: 1;
    flex-shrink: 0;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-email-link:hover .footer-email-arrow {
    opacity: 0.9;
    transform: translate(6px, -6px);
}

/* ── Divider ── */
.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 var(--content-margin);
}

/* ── Bottom bar ── */
.new-footer-layout {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 60px var(--content-margin);
    align-items: start;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col-logo h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-color);
    margin: 0 0 20px 0;
    line-height: 1;
}

.footer-col-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.5;
    margin: 0 0 24px 0;
}

.footer-col p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.8;
    margin: 0 0 16px 0;
}

.footer-nav-link {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.8;
    text-decoration: none;
    margin-bottom: 12px;
    transition: opacity 0.2s ease;
}

.footer-social-link {
    font-family: 'Syne', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-link-hover:hover {
    opacity: 1 !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-copyright {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem !important;
    color: var(--text-color);
    opacity: 0.4 !important;
    margin-top: 40px !important;
    line-height: 1.8 !important;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .footer-cta-block {
        padding: 64px 24px 48px;
    }

    .footer-email-text {
        font-size: 35px !important;
    }

    .footer-email-arrow {
        font-size: 2rem;
    }

    .footer-divider {
        margin: 0 24px;
    }

    .contact-form-block {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 60px 24px;
    }

    .contact-headline {
        margin-bottom: 40px;
    }

    .new-footer-layout {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 40px;
        border-top: none;
    }

    .footer-col-logo h2 {
        font-size: 2rem;
    }

    .footer-copyright {
        margin-top: 20px !important;
    }

    /* Hide the work-section column dividers on mobile */
    .work-grid-lines,
    .work-grid-lines::before,
    .work-grid-lines::after {
        display: none !important;
    }

    /* Hide the persistent vertical grid lines inside the footer on mobile */
    .new-footer-section .global-grid-lines,
    .new-footer-section .layout-grid-overlay {
        display: none !important;
    }

    /* Also hide the line-left / line-right within the footer area */
    .new-footer-section .line-left,
    .new-footer-section .line-right {
        display: none !important;
    }

    /* Hide the ::before / ::after pseudo-element vertical lines in footer on mobile */
    .new-footer-section::before,
    .new-footer-section::after {
        display: none !important;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .header-container {
        padding: var(--space-3) var(--space-5);
    }

    header {
        padding: 12px 20px !important;
    }

    nav {
        gap: var(--space-4);
    }

    nav a {
        font-size: 0.8125rem;
    }

    .hero-section {
        padding: 90px 20px 240px !important;
        /* Extra bottom padding — scatter için alan açılıyor */
        min-height: 100svh !important;
    }

    /* Mobil'de header sağ-sol çizgilerini kaldır */
    header::before,
    header::after {
        display: none !important;
    }

    .work-section {
        padding: var(--space-20) var(--space-5);
    }

    .intro-section {
        padding: 60px 20px !important;
        grid-template-columns: 1fr !important;
    }

    .work-showcase {
        padding-top: 0 !important;
        padding-bottom: 80px !important;
    }

    .project-grid {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .hero-title {
        font-size: 2rem !important;
        margin-top: 50px !important;
        /* Başlığı biraz aşağıya it */
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-10);
}

.text-center {
    text-align: center;
}

.mb-small {
    margin-bottom: var(--space-4);
}

.mb-medium {
    margin-bottom: var(--space-8);
}

.mb-large {
    margin-bottom: var(--space-16);
}

/* ========================================
   CLIENTS / REFERENCES STRIP
   ======================================== */

.clients-section {
    overflow-x: hidden;
    border-top: 1px solid var(--grid-line-color);
    border-bottom: 1px solid var(--grid-line-color);
    background: var(--bg-primary);
    position: relative;
    z-index: 70;
    /* Lower than global-grid-lines (80) so lines pass over it */
    padding: 0 var(--grid-margin);
    /* Snaps exactly to the left/right grid lines */
}

/* ── Marquee title header ── */
.clients-marquee-header {
    overflow: hidden;
    border-bottom: 1px solid var(--grid-line-color);
    padding: 28px 0;
}

.clients-marquee-track {
    display: flex;
    white-space: nowrap;
    width: max-content;
    will-change: transform;
    animation: none !important;
    /* JS handles movement via scroll */
}

.clients-marquee-track span {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-color);
    padding-right: 40px;
    display: inline-block;
}

@keyframes clients-header-scroll {
    0% {
        transform: translateX(0);
    }

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

/* ── Bordered grid ──
   Strategy: The grid container holds all 4 outer borders.
   Each cell contributes right + bottom borders as internal dividers.
   This works for any number of items. ── */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--grid-line-color);
    border-left: 1px solid var(--grid-line-color);
}

.clients-grid-item {
    font-family: 'Syne', sans-serif;
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-color);
    padding: 40px 30px;
    border-right: 1px solid var(--grid-line-color);
    border-bottom: 1px solid var(--grid-line-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    text-align: center;
    opacity: 0.6;
    transition: opacity 0.3s ease, background 0.3s ease;
    cursor: default;
}

.clients-grid-item:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.03);
}

.clients-grid-label {
    font-family: 'Syne', sans-serif;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.35;
    line-height: 1;
}

@media (max-width: 1200px) {
    .clients-section {
        padding: 0 60px;
        /* Snaps to 60px grid lines on smaller screens */
    }
}

@media (max-width: 768px) {
    .clients-section {
        padding: 0 20px;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile: 2-col grid — items keep their right+bottom borders, container has outer borders */
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clients-marquee-track span {
        font-size: 1.5rem;
    }
}

.clients-label {
    text-align: left;
    padding-left: var(--content-margin);
    padding-right: var(--content-margin);
    font-family: var(--apple-font-text);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 32px;
    opacity: 0.6;
}

[data-theme="light"] .clients-label {
    color: var(--apple-gray-500);
}

/* Edge fade masks */
.clients-track-wrapper {
    position: relative;
    overflow: hidden;
}

.clients-track-wrapper::before,
.clients-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.clients-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-primary) 0%, transparent 100%);
}

.clients-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-primary) 0%, transparent 100%);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    animation: clients-scroll 28s linear infinite;
    will-change: transform;
}

.clients-track:hover {
    animation-play-state: paused;
}

.client-item {
    display: inline-flex;
    align-items: center;
    padding: 0 48px;
    font-family: 'Syne', var(--apple-font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0.35;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    position: relative;
}

.client-item:hover {
    opacity: 1;
}

/* Dot separator */
.client-item::after {
    content: '·';
    position: absolute;
    right: 0;
    opacity: 0.4;
    font-size: 1.5rem;
    transform: translateX(50%);
}

@keyframes clients-scroll {
    0% {
        transform: translateX(0);
    }

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

[data-theme="light"] .clients-track-wrapper::before {
    background: linear-gradient(to right, #F1F0EC 0%, transparent 100%);
}

[data-theme="light"] .clients-track-wrapper::after {
    background: linear-gradient(to left, #F1F0EC 0%, transparent 100%);
}

/* ========================================
   SCROLL REVEAL
   ======================================== */

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

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

/* Stagger children inside project grid */
.work-showcase.reveal.visible .project-card {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   PAGE TRANSITION OVERLAY
   ======================================== */

.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    /* starts covered */
    display: block;
}

.page-transition-overlay.pt-fade-out {
    animation: pt-fadeout 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-transition-overlay.pt-fade-in {
    opacity: 0;
    animation: pt-fadein 0.45s cubic-bezier(0.42, 0, 1, 1) forwards;
}

@keyframes pt-fadeout {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes pt-fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================================
   TAKT-STYLE HEADER — MENU BUTTON
   ======================================== */

header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* MENU Button */
.menu-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    font-family: 'Syne', var(--apple-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 10px 22px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.3s var(--apple-spring);
    line-height: 1;
}

.menu-btn:hover {
    background: var(--text-primary) !important;
    color: var(--bg-primary) !important;
    border-color: var(--text-primary) !important;
    transform: none !important;
    /* override global a/button hover scale */
}

[data-theme="light"] .menu-btn {
    border-color: rgba(0, 0, 0, 0.2);
}

/* ========================================
   FULL-SCREEN MENU OVERLAY
   ======================================== */

.menu-overlay {
    position: fixed;
    top: 60px;
    /* start below the fixed header */
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 60px);
    background: #0a0a0a;
    z-index: 999;
    /* stay BELOW the header (z-index: 1000) */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 80px var(--content-margin);
    /* slide up from bottom to open */
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.menu-overlay.is-open {
    clip-path: inset(0 0 0% 0);
    pointer-events: auto;
}

/* Navigation links */
.menu-overlay-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    flex: 1 !important;
    justify-content: flex-end !important;
    padding-bottom: 40px !important;
    /* Override style.css mobile nav { visibility:hidden; opacity:0 } */
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: auto !important;
    background: transparent !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: auto !important;
    transition: none !important;
}

.menu-overlay-link {
    font-family: 'Syne', var(--apple-font-display) !important;
    font-size: clamp(3.5rem, 8vw, 8rem) !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: -0.03em !important;
    line-height: 1.05 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 24px 0 !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    box-sizing: content-box !important;
    position: relative;
    /* Stagger animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.3s ease;
    width: 100% !important;
    margin: 0 !important;
}

.menu-overlay.is-open .menu-overlay-nav .menu-overlay-link:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.menu-overlay.is-open .menu-overlay-nav .menu-overlay-link:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.22s;
}

.menu-overlay.is-open .menu-overlay-nav .menu-overlay-link:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.29s;
}

.menu-overlay-link:hover {
    color: rgba(255, 255, 255, 0.4) !important;
    transform: translateX(12px) !important;
    background: transparent !important;
    opacity: 1 !important;
}

/* Overlay meta (email + socials) */
.menu-overlay-meta {
    margin-top: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.4s, transform 0.5s ease 0.4s;
}

.menu-overlay.is-open .menu-overlay-meta {
    opacity: 1;
    transform: translateY(0);
}

.menu-overlay-email {
    font-family: var(--apple-font-text);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
}

.menu-overlay-email:hover {
    color: #fff !important;
    transform: none !important;
}

.menu-overlay-socials {
    display: flex;
    gap: 28px;
}

.menu-overlay-socials a {
    font-family: var(--apple-font-text);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.menu-overlay-socials a:hover {
    color: #fff !important;
    transform: none !important;
}

/* Close button inside overlay */
.menu-overlay-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-family: 'Syne', var(--apple-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 10px 22px;
    cursor: pointer;
    border-radius: 100px;
    transition: all 0.3s var(--apple-spring);
    line-height: 1;
    opacity: 0;
    transition: opacity 0.4s ease 0.3s;
}

.menu-overlay.is-open .menu-overlay-close {
    opacity: 1;
}

.menu-overlay-close:hover {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
    transform: none !important;
}

@media (max-width: 768px) {
    .menu-overlay {
        padding: 60px 24px 40px;
    }

    .menu-overlay-link {
        font-size: clamp(2rem, 7vw, 2.5rem) !important;
        padding: 16px 0;
    }

    .menu-overlay-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .menu-overlay-close {
        top: 16px;
        right: 16px;
    }
}

/* ========================================
   TAKT-STYLE LIGHT SECTIONS (Intro + Clients)
   ======================================== */

/* Light section: intro */
.intro-section[data-bg="light"] {
    background-color: #F2F2F0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .intro-section[data-bg="light"] {
    background-color: #EBEBEA !important;
}

/* Light section text overrides */
.intro-section[data-bg="light"] #home-about-title,
.intro-section[data-bg="light"] #home-about-text,
.intro-section[data-bg="light"] h2,
.intro-section[data-bg="light"] p {
    color: #000 !important;
}

.intro-section[data-bg="light"] .about-btn {
    color: #000 !important;
    border-color: rgba(0, 0, 0, 0.3) !important;
}

.intro-section[data-bg="light"] .about-btn:hover {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* Light clients section */
.clients-section[data-bg="light"] {
    background-color: #F2F2F0 !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .clients-section[data-bg="light"] {
    background-color: #EBEBEA !important;
}

.clients-section[data-bg="light"] .clients-label {
    color: rgba(0, 0, 0, 0.4) !important;
}

.clients-section[data-bg="light"] .client-item {
    color: #000 !important;
}

.clients-section[data-bg="light"] .clients-track-wrapper::before {
    background: linear-gradient(to right, #F2F2F0 0%, transparent 100%) !important;
}

.clients-section[data-bg="light"] .clients-track-wrapper::after {
    background: linear-gradient(to left, #F2F2F0 0%, transparent 100%) !important;
}

/* ========================================
   SECTION EYEBROW LABEL  (SELECTED WORKS)
   ======================================== */

.section-eyebrow {
    font-family: var(--font-heading, 'Syne', sans-serif);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-color);
    padding: 60px 0 30px 25px;
    /* Added 25px left padding to match 125px total (100px from container + 25px here) */
    margin-bottom: 0;
    opacity: 1;
}

/* ========================================
   PROJECT GRID — ABOVE GRID LINES
   Grid lines are z-index: 900
   Cards sit at 960 so images cover lines
   ======================================== */
#project-grid,
.project-card,
.demo-card {
    position: relative !important;
    z-index: 960 !important;
}

/* ========================================
   SMOOTH SECTION BACKGROUND COLOR TRANSITION
   Takt-style: body bg transitions on scroll
   ======================================== */

/* Smooth transition on body bg */
/* section-active-light removed — scroll-to-white disabled */

/* ========================================
   DEMO CARD OVERRIDE
   redesign.css .project-card has aspect-ratio: 1/1.2
   which overrides JS height:fit-content.
   Reset only for demo-card class.
   ======================================== */
.demo-card {
    aspect-ratio: unset !important;
    height: fit-content !important;
    overflow: visible !important;
}