/* ==========================================================================
   1. SETUP & VARIABLES
   ========================================================================== */
:root {
    --font-display: 'Oswald', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --color-bg: #0D0D0D;
    --color-surface: #1A1A1A;
    --color-text: #E0E0E0;
    --color-text-muted: #888;
    --color-primary: #2f5cff;
    --color-secondary: #b61f2a;
    --color-white: #ffffff;
    --color-border: #333;

    --container-padding: 4rem;
}

/* ==========================================================================
   2. BASE & TYPOGRAPHY
   ========================================================================== */
body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    margin: 0;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: var(--color-white);
}

p {
    margin: 0 0 1rem 0;
    color: var(--color-text-muted);
    max-width: 65ch;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

main {
    padding: 0 var(--container-padding);
}

section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--color-border);
}

section:last-of-type {
    border-bottom: none;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
#main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem var(--container-padding);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo span {
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--color-white);
}

.btn-pill {
    background-color: var(--color-white);
    color: var(--color-bg);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn-pill:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-pill.btn-pill-alt {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-pill.btn-pill-alt:hover {
    background-color: var(--color-white);
    color: var(--color-bg);
}

.hamburger, .mobile-menu {
    display: none; /* Hidden for desktop */
}

/* ==========================================================================
   4. FOOTER
   ========================================================================== */
#contact {
    background-color: #000;
    padding: 5rem var(--container-padding) 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-logo-side h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-logo-side h2 span {
    color: var(--color-primary);
}

.footer-socials-row {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-column a:hover {
    color: var(--color-primary);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-form input,
.newsletter-form select,
.newsletter-form textarea {
    background: #222;
    border: 1px solid var(--color-border);
    padding: 12px 18px;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    border-radius: 4px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.newsletter-form input:focus,
.newsletter-form select:focus,
.newsletter-form textarea:focus {
    border-color: var(--color-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   5. PORTFOLIO PAGE
   ========================================================================== */
.portfolio-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.hero-title-main {
    font-size: 7vw;
    line-height: 1;
    text-transform: uppercase;
}

.blue-text { color: var(--color-primary); }
.outline-red {
    color: transparent;
    -webkit-text-stroke: 2px var(--color-secondary);
    text-stroke: 2px var(--color-secondary);
}

.hero-meta-right {
    text-align: right;
    max-width: 300px;
}

.hero-meta-right h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.case-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 8rem;
}

.case-row.reversed {
    direction: rtl;
}
.case-row.reversed > * {
    direction: ltr;
}

.case-image-placeholder {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    color: rgba(255,255,255,0.5);
    border-radius: 8px;
}

.case-num {
    font-family: var(--font-display);
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.case-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.case-link {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 600;
    color: var(--color-white);
}

.case-link:hover .arrow-icon {
    transform: translate(5px, -5px);
}

.arrow-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Other portfolio sections can be added here */

/* ==========================================================================
   6. ABOUT PAGE
   ========================================================================== */
.about-hero {
    text-align: center;
    padding: 4rem 0;
}

.about-hero h1 {
    font-size: 4.5rem;
    margin-bottom: 2rem;
}

.about-hero h1 span {
    color: var(--color-primary);
}

.about-hero p {
    font-size: 1.2rem;
    max-width: 60ch;
    margin: auto;
}

.about-values-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-value-card {
    background-color: var(--color-surface);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.about-value-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-process-header {
    text-align: center;
    margin-bottom: 4rem;
}

.about-process-header h2 {
    font-size: 3.5rem;
}

.about-process-header h2 span {
    color: var(--color-primary);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-step {
    text-align: center;
}

.step-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--color-primary);
    display: block;
    margin-bottom: 1rem;
}

.process-step h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.about-cta-section {
    text-align: center;
    background-color: var(--color-surface);
    padding: 4rem;
    border-radius: 12px;
}

.about-cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.about-cta-section .btn-pill {
    margin-top: 2rem;
}

/* ==========================================================================
   7. HOMEPAGE COMPONENTS
   ========================================================================== */
/* Marquee Edge Gradient Mask */
.marquee-wrapper {
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Pause marquee on hover */
.marquee-wrapper:hover .animate-marquee {
  animation-play-state: paused;
}

/* Dynamic Text Slot Animation */
.flip-text {
  display: inline-block;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: transform, opacity;
}

.flip-out {
  opacity: 0;
  transform: translateY(-12px);
}

.flip-in {
  opacity: 1;
  transform: translateY(0);
}

.flip-initial {
  opacity: 0;
  transform: translateY(12px);
}

/* ==========================================================================
   8. SCROLL ANIMATIONS
   ========================================================================== */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.fade-in-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   9. GLOBAL TRANSITIONS
   ========================================================================== */
/* Smooth theme change for all elements that use color properties */
*, *::before, *::after {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* ==========================================================================
   7. RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem;
    }

    .nav-links, .header-right {
        display: none;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        background: none;
        border: none;
    }

    .hamburger span {
        width: 25px;
        height: 2px;
        background-color: var(--color-white);
        display: block;
    }

    .case-row, .case-row.reversed {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .portfolio-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}