/* ============================================
   SYNAX — CSS
   Dark editorial. No gradients. No purple.
   ============================================ */

/* --- Custom Properties --- */
:root {
    --bg: #0a0a0a;
    --bg-elevated: #111111;
    --bg-card: #0f0f0f;
    --text: #e8e4df;
    --text-muted: #5a5a5a;
    --text-dim: #3a3a3a;
    --accent: #ff4d00;
    --border: #1e1e1e;
    --border-light: #2a2a2a;

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

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

html {
    scroll-behavior: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    cursor: none;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: none;
}

ul { list-style: none; }

button {
    font-family: inherit;
    cursor: none;
    border: none;
    background: none;
    color: inherit;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   LOADER
   ============================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1s var(--ease-in-out);
}

.loader.done {
    transform: translateY(-100%);
}

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

.loader-text {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text);
    display: block;
    margin-bottom: 2rem;
}

.loader-bar {
    width: 120px;
    height: 2px;
    background: var(--border);
    margin: 0 auto;
    border-radius: 1px;
    overflow: hidden;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    border-radius: 1px;
    transition: width 0.3s ease;
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease-out-expo),
                height 0.3s var(--ease-out-expo),
                background 0.3s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(232, 228, 223, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.4s var(--ease-out-expo),
                height 0.4s var(--ease-out-expo),
                border-color 0.3s ease,
                opacity 0.3s ease;
}

.cursor.hovering {
    width: 50px;
    height: 50px;
    background: transparent;
    border: 1px solid var(--accent);
    mix-blend-mode: normal;
}

.cursor-follower.hovering {
    width: 60px;
    height: 60px;
    border-color: transparent;
    opacity: 0;
}

/* ============================================
   GRAIN OVERLAY
   ============================================ */
.grain {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    opacity: 0.04;
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ============================================
   THREE.JS CANVAS
   ============================================ */
#canvas-container {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

#canvas-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ============================================
   NAVIGATION
   ============================================ */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    mix-blend-mode: difference;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--text);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.cta-nav {
    border: 1px solid rgba(232, 228, 223, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.nav-link.cta-nav::after { display: none; }

.nav-link.cta-nav:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   HERO
   ============================================ */
#hero {
    position: relative;
    z-index: 1;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: 0 3rem 4rem;
}

.hero-content {
    width: 100%;
    max-width: 1400px;
}

.hero-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
}

.hero-tag-line {
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.hero-tag-text {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 9vw, 9rem);
    font-weight: 700;
    line-height: 0.92;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

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

.title-line-inner {
    display: block;
    transform: translateY(110%);
}

.title-line.accent {
    color: var(--accent);
}

.dot {
    color: var(--text);
}

.hero-sub {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.3vw, 1.15rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 400px;
    opacity: 0;
}

.scroll-indicator {
    position: absolute;
    right: 3rem;
    bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
}

.scroll-indicator span {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    writing-mode: vertical-lr;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: var(--border-light);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    animation: scrollLine 2s var(--ease-in-out) infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    50% { top: 0%; }
    100% { top: 100%; }
}

/* ============================================
   MARQUEE
   ============================================ */
#marquee {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 0;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
}

.marquee-content span {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    white-space: nowrap;
}

.marquee-dot {
    font-size: 0.5rem !important;
    color: var(--accent) !important;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   SECTIONS — Shared
   ============================================ */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

.section-header {
    margin-bottom: 4rem;
}

.section-tag {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.tag-line {
    display: block;
    width: 30px;
    height: 1px;
    background: var(--accent);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* ============================================
   SERVICES
   ============================================ */
#work {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 8rem 0;
}

.services-list {
    border-top: 1px solid var(--border);
}

.service-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr 50px;
    align-items: start;
    gap: 2rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.4s ease;
    position: relative;
}

.service-row::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: var(--accent);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-row:hover::before {
    opacity: 0.03;
}

.service-row:hover {
    border-bottom-color: var(--border-light);
}

.service-index {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dim);
    padding-top: 0.3rem;
    transition: color 0.4s ease;
}

.service-row:hover .service-index {
    color: var(--accent);
}

.service-name {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    transition: color 0.4s ease;
}

.service-row:hover .service-name {
    color: var(--accent);
}

.service-desc {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 450px;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.3rem;
}

.service-tags li {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.service-row:hover .service-tags li {
    border-color: var(--border-light);
    color: var(--text);
}

.service-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-dim);
    transition: all 0.4s var(--ease-out-expo);
    margin-top: 0.15rem;
}

.service-row:hover .service-arrow {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    transform: rotate(0deg) scale(1.1);
}

/* ============================================
   ABOUT
   ============================================ */
#about {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 8rem 0 6rem;
}

.about-top {
    margin-bottom: 3rem;
}

.about-headline {
    margin-bottom: 5rem;
}

.about-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.about-title em {
    font-style: normal;
    color: var(--accent);
}

.about-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.about-text strong {
    color: var(--text);
    font-weight: 500;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: left;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 500;
    color: var(--text-muted);
}

.stat-label {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

/* ============================================
   CTA
   ============================================ */
#contact {
    position: relative;
    z-index: 2;
    background: var(--bg);
    padding: 10rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.cta-content {
    max-width: 900px;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.cta-sub {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    border: 1px solid var(--text);
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--text);
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    border-radius: 100px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out-expo);
    z-index: -1;
}

.cta-button:hover {
    border-color: var(--accent);
    color: var(--bg);
}

.cta-button:hover::before {
    transform: scaleX(1);
}

.cta-btn-icon {
    display: flex;
    transition: transform 0.4s var(--ease-out-expo);
}

.cta-button:hover .cta-btn-icon {
    transform: translate(3px, -3px);
}

/* ============================================
   FOOTER
   ============================================ */
#footer {
    position: relative;
    z-index: 2;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 2rem 3rem;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-link {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent);
}

/* ============================================
   REVEAL ANIMATIONS (GSAP Classes)
   ============================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
}

.reveal-fade {
    opacity: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .service-row {
        grid-template-columns: 60px 1fr 50px;
    }
    .service-tags {
        display: none;
    }
    .about-body {
        grid-template-columns: 1fr;
    }
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    #nav {
        padding: 1.25rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-link.cta-nav {
        display: none;
    }

    #hero {
        padding: 0 1.5rem 3rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 5rem);
    }

    .scroll-indicator {
        display: none;
    }

    .section-container {
        padding: 0 1.5rem;
    }

    #work { padding: 5rem 0; }
    #about { padding: 5rem 0 4rem; }

    .service-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-index {
        font-size: 0.75rem;
    }

    .service-arrow {
        display: none;
    }

    .about-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    #contact {
        padding: 6rem 1.5rem;
    }

    .cta-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    #footer {
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-right {
        gap: 1.5rem;
    }

    /* Hide custom cursor on touch devices */
    .cursor, .cursor-follower {
        display: none;
    }

    body {
        cursor: auto;
    }
    a, button { cursor: pointer; }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .service-name {
        font-size: 1.5rem;
    }
}
