/* ============================================
   RedCreative - Design System
   "Ajans puştluğu" - Clever, minimal, impactful
   ============================================ */

/* CSS Variables */
:root {
    --red: #FF2D2D;
    --red-dark: #CC0000;
    --red-glow: rgba(255, 45, 45, 0.3);
    --black: #0A0A0A;
    --black-light: #141414;
    --white: #FFFFFF;
    --white-dim: rgba(255, 255, 255, 0.6);
    --white-muted: rgba(255, 255, 255, 0.3);

    --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--red) var(--black);
}

body {
    font-family: var(--font-main);
    background: var(--black);
    color: var(--white);
    overflow-x: hidden;
    cursor: none;
}

::selection {
    background: var(--red);
    color: var(--white);
}

/* Noise Overlay - Film Grain Effect */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Custom Cursor */
.cursor {
    width: 12px;
    height: 12px;
    background: var(--red);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.1s var(--ease-out), width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: difference;
}

.cursor.hover {
    width: 40px;
    height: 40px;
    background: var(--white);
}

.cursor-trail {
    width: 30px;
    height: 30px;
    border: 1px solid var(--red);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.3s var(--ease-out), opacity 0.3s;
    opacity: 0.5;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    mix-blend-mode: difference;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.05em;
    position: relative;
}

.logo::after {
    content: attr(data-secret);
    position: absolute;
    bottom: -25px;
    left: 0;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--white-muted);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.4s var(--ease-out);
    white-space: nowrap;
}

.logo:active::after {
    opacity: 1;
    transform: translateY(0);
}

.logo-red {
    color: var(--red);
}

.logo-white {
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
    padding: 0.5rem 0;
}

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

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

/* Language Switcher */
.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lang-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--white-muted);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    border-radius: 2px;
}

.lang-current:hover {
    border-color: var(--red);
}

.lang-arrow {
    transition: transform 0.3s var(--ease-out);
}

.lang-switcher:hover .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--black-light);
    border: 1px solid var(--white-muted);
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s var(--ease-out);
    min-width: 80px;
    z-index: 100;
}

.lang-switcher:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: var(--white-dim);
    font-size: 0.8rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-option:hover {
    background: var(--red);
    color: var(--white);
}

.lang-option.active {
    color: var(--red);
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .nav {
    flex-direction: row-reverse;
}

html[dir="rtl"] .nav-right {
    flex-direction: row-reverse;
}

html[dir="rtl"] .section-header {
    flex-direction: row-reverse;
}

html[dir="rtl"] .work-info {
    left: auto;
    right: 1.5rem;
    text-align: right;
}

html[dir="rtl"] .about-text {
    text-align: right;
}

html[dir="rtl"] .footer {
    flex-direction: row-reverse;
}

html[dir="rtl"] .social-link::before {
    content: '←';
    left: auto;
    right: -20px;
    transform: translateX(10px);
}

html[dir="rtl"] .social-link:hover::before {
    transform: translateX(0);
}


/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 4rem;
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title .line {
    display: block;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: var(--red);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    color: #0ff;
    z-index: -1;
}

.glitch::after {
    color: #f0f;
    z-index: -2;
}

.glitch:hover::before {
    animation: glitch-1 0.3s infinite;
    opacity: 0.8;
}

.glitch:hover::after {
    animation: glitch-2 0.3s infinite;
    opacity: 0.8;
}

@keyframes glitch-1 {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 3px);
    }

    40% {
        transform: translate(-3px, -3px);
    }

    60% {
        transform: translate(3px, 3px);
    }

    80% {
        transform: translate(3px, -3px);
    }
}

@keyframes glitch-2 {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(3px, -3px);
    }

    40% {
        transform: translate(3px, 3px);
    }

    60% {
        transform: translate(-3px, -3px);
    }

    80% {
        transform: translate(-3px, 3px);
    }
}

.hero-subtitle {
    margin-top: 2rem;
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--white-dim);
}

.hero-cta {
    position: absolute;
    bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.scroll-hint {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--white-muted);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--red), transparent);
    animation: scroll-pulse 2s infinite;
}

@keyframes scroll-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scaleY(1);
    }

    50% {
        opacity: 0.5;
        transform: scaleY(0.5);
    }
}

.hero-reel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--black-light);
}

.reel-progress {
    height: 100%;
    width: 0%;
    background: var(--red);
    transition: width 0.1s linear;
}

/* Section Styles */
section {
    padding: 8rem 4rem;
    min-height: 100vh;
}

.section-header {
    margin-bottom: 4rem;
    display: flex;
    align-items: baseline;
    gap: 2rem;
}

.section-number {
    font-size: 0.8rem;
    color: var(--red);
    font-weight: 500;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
}

/* Work Section */
.work {
    background: var(--black-light);
}

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

.work-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--black);
    border-radius: 4px;
}

.work-thumbnail {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--black-light) 0%, var(--black) 100%);
    position: relative;
    transition: transform 0.6s var(--ease-out);
}

.work-item:hover .work-thumbnail {
    transform: scale(1.05);
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
}

.work-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    color: var(--red);
    transition: transform 0.4s var(--ease-out);
}

.work-item:hover .work-play {
    transform: translate(-50%, -50%) scale(1);
}

.work-info {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
}

.work-info h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.work-category {
    font-size: 0.8rem;
    color: var(--white-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.service-item {
    padding: 2rem;
    border: 1px solid var(--white-muted);
    border-radius: 4px;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--red);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 0;
}

.service-item:hover::before {
    transform: translateY(0);
}

.service-item:hover {
    border-color: var(--red);
}

.service-item>* {
    position: relative;
    z-index: 1;
}

.service-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 1.5rem;
    position: relative;
}

.icon-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    margin-bottom: 8px;
    transition: width 0.3s var(--ease-out);
}

.service-item:hover .icon-line:nth-child(2) {
    width: 70%;
}

.service-item:hover .icon-line:nth-child(3) {
    width: 40%;
}

.icon-box {
    display: block;
    width: 30px;
    height: 30px;
    border: 2px solid var(--white);
    transition: transform 0.3s var(--ease-out);
}

.service-item:hover .icon-box {
    transform: rotate(45deg);
}

.icon-star {
    display: block;
    width: 30px;
    height: 30px;
    background: var(--white);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    transition: transform 0.3s var(--ease-out);
}

.service-item:hover .icon-star {
    transform: rotate(72deg);
}

.icon-circle {
    display: block;
    width: 30px;
    height: 30px;
    border: 2px solid var(--white);
    border-radius: 50%;
    position: relative;
}

.icon-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s var(--ease-out);
}

.service-item:hover .icon-circle::after {
    transform: translate(-50%, -50%) scale(1);
}

.service-item h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.service-item p {
    font-size: 0.9rem;
    color: var(--white-dim);
    transition: color 0.3s;
}

.service-item:hover p {
    color: var(--white);
}

/* About Section */
.about {
    background: var(--black-light);
}

.about-content {
    max-width: 800px;
}

.about-text {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.5;
    font-weight: 300;
}

.reveal-text {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

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

.reveal-text.highlight {
    color: var(--red);
    font-weight: 500;
}

.about-stats {
    margin-top: 4rem;
    display: flex;
    gap: 4rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--red);
}

.stat-number::after {
    content: '+';
}

.stat-label {
    font-size: 0.9rem;
    color: var(--white-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Contact Section */
.contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-content {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-email {
    display: inline-block;
    position: relative;
    cursor: pointer;
    padding: 1rem 2rem;
}

.email-text {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 500;
    transition: color 0.3s;
}

.contact-email:hover .email-text {
    color: var(--red);
}

.copy-hint,
.copy-success {
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--white-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s;
}

.copy-hint {
    opacity: 0;
}

.contact-email:hover .copy-hint {
    opacity: 1;
}

.copy-success {
    opacity: 0;
    color: var(--red);
}

.contact-email.copied .copy-success {
    opacity: 1;
}

.contact-email.copied .copy-hint {
    opacity: 0;
}

.contact-social {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-link {
    color: var(--white-dim);
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.social-link:hover {
    color: var(--white);
}

.social-link::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s var(--ease-out);
    color: var(--red);
}

.social-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
.footer {
    margin-top: auto;
    padding-top: 4rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--white-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .nav-links {
        display: none;
    }

    section {
        padding: 4rem 2rem;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
        gap: 2rem;
    }

    body {
        cursor: auto;
    }

    .cursor,
    .cursor-trail {
        display: none;
    }
}

/* Page Load Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.hero-title .line {
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) forwards;
}

.hero-title .line:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 0.6s forwards;
}