:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-primary);
    color: var(--color-gray-800);
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

body::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

html {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Scroll Snap handled by GSAP ScrollTrigger */

html::-webkit-scrollbar {
    display: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-secondary);
}

/* Sayfa Yükleme Animasyonu */
#pageTransition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.loader-logo {
    display: flex;
    flex-wrap: nowrap;
    position: relative;
    z-index: 2;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: flex;
    gap: clamp(5px, 2vw, 20px);
    pointer-events: none;
    font-size: clamp(2.5rem, 12vw, 7rem);
    font-weight: bold;
    color: var(--color-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.loader-logo span {
    margin: 0 2px;
    display: inline-block;
    will-change: transform, opacity;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(-8px);
}

/* Hidden by default; JS animation will reveal */
#egma-loader-blur {
    visibility: hidden;
}

/* Header'daki E harfi için stil */
#headerE {
    display: inline-block;
    transition: opacity 0.5s ease;
}

.hero-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)),
        url('https://images.unsplash.com/photo-1487958449943-2429e8be8625?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.6s ease-out;
}

.hero-preview.visible {
    opacity: 1;
    transform: scale(1);
}

@keyframes floatToHeader {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    30% {
        opacity: 1;
        transform: translateY(0);
    }

    80% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-30px);
    }
}

/* İçerik Yüklendikten Sonraki Animasyon */
.content-wrapper {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out 0s, transform 0.6s ease-out 0s;
}

.content-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Custom CSS for elements that might need more styling */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1487958449943-2429e8be8625?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
}

/* Hero Animations */
.hero-text h1 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.hero-text p {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.hero-buttons {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

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

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

/* Sayfa yüklendiğinde animasyonu kaldır */
body.loaded .page-transition {
    opacity: 0;
    pointer-events: none;
}

/* Typing subtitle under loader EGMA */
.loader-typing {
    position: fixed;
    top: calc(50% + 90px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    color: var(--color-white);
    text-align: center;
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    line-height: 1.5rem;
    white-space: nowrap;
    opacity: 0;
    animation: typingFadeIn 0.6s ease-out 0.4s forwards;
}

@media (min-width: 640px) {
    .loader-typing {
        font-size: 1rem;
        line-height: 1.5rem;
    }
}

@keyframes typingFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 6px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}


/* ========================================
   Header Base Styles (1920x1080)
   ======================================== */
#main-header nav>a {
    font-size: 2.5rem;
}

#main-header .lg\:flex a {
    font-size: 1.35rem;
}

#main-header .lg\:flex a:last-child {
    font-size: 1.35rem;
    padding: 0.875rem 2.5rem;
}

/* ========================================
   About Section Base Styles (1920x1080)
   ======================================== */
#about h2 {
    font-size: 3rem;
}

#about p {
    font-size: 1.25rem;
    line-height: 1.8;
}

#about ul li span {
    font-size: 1.125rem;
}

#about a {
    font-size: 1.125rem;
}

/* ========================================
   Team Section Base Styles (1920x1080)
   ======================================== */
#team .text-center.mb-16 h2 {
    font-size: 3.5rem;
}

#team .w-72 {
    width: 24rem;
    height: 24rem;
}

#team h3 {
    font-size: 2rem;
}

#team p {
    font-size: 1.125rem;
}

/* ========================================
   Portfolio Section Base Styles
   ======================================== */
#projects-scroll-container .absolute.top-0 {
    top: 1.5rem;
}

#projects-scroll-container h2 {
    font-size: 3.5rem;
}

.project-item {
    height: 55vh;
}

.project-item h3 {
    font-size: 2.25rem;
}

/* ========================================
   Comprehensive Mobile Responsive Styles
   ======================================== */

/* ----------------------------------------
   Short Screens / Laptops (max-height: 850px)
   Targets 14" laptops and similar devices with limited vertical space
   Keep snap behavior but make content fit within viewport
   ---------------------------------------- */
@media (max-height: 850px) and (min-width: 1024px) {

    /* Keep min-h-screen for snap, but use flexbox to center content */
    #services.snap-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Switch to 2-column grid for better vertical fit */
    #services .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    #services .grid>div {
        padding: 0.75rem;
    }

    /* Smaller icons */
    #services .grid>div>div:first-child {
        width: 2rem;
        height: 2rem;
        margin-bottom: 0.375rem;
    }

    #services .grid>div>div:first-child i {
        font-size: 1rem;
    }

    /* Service card text */
    #services .grid h3 {
        font-size: 1.1rem;
        margin-bottom: 0.125rem;
    }

    #services .grid p {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    /* Smaller section title */
    #services .text-center.mb-16 {
        margin-bottom: 1rem;
    }

    #services .text-center.mb-16 h2 {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }

    #services .text-center.mb-16 p {
        font-size: 0.8rem;
    }

    /* ---- Team Section Compact Styles ---- */
    #team.snap-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    #team .text-center.mb-16 {
        margin-bottom: 1.5rem;
    }

    #team .text-center.mb-16 h2 {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }

    #team .text-center.mb-16 p {
        font-size: 0.9rem;
    }

    /* Avatars and spacing */
    #team .flex-wrap {
        gap: 3rem !important;
    }

    #team .w-72 {
        width: 14rem !important;
        height: 14rem !important;
        margin-bottom: 1.5rem !important;
    }

    #team h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    #team p {
        font-size: 0.9rem !important;
    }

    /* ---- Portfolio Section Compact Styles ---- */
    #projects-scroll-container .absolute.top-0 {
        top: 1.5rem !important;
    }

    #projects-scroll-container h2 {
        font-size: 2.5rem !important;
    }

    .project-item {
        height: 55vh !important;
    }

    .project-item h3 {
        font-size: 1.75rem !important;
    }

    /* ---- Contact Section Compact Styles ---- */
    #contact.snap-section {
        padding-top: 1.5rem;
        padding-bottom: 1rem;
    }

    #contact h2 {
        font-size: 1.75rem !important;
        margin-bottom: 0.25rem !important;
    }

    #contact .text-lg {
        font-size: 0.85rem !important;
        margin-bottom: 1rem !important;
        line-height: 1.4 !important;
    }

    /* Compact contact info layout */
    #contact .space-y-8 {
        gap: 0.5rem !important;
    }

    #contact .space-y-8>div {
        margin-bottom: 0.5rem !important;
    }

    #contact .w-16.h-16 {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }

    #contact .w-16.h-16 i {
        font-size: 1rem !important;
    }

    #contact .ml-6 {
        margin-left: 0.75rem !important;
    }

    #contact .ml-6 h4 {
        font-size: 0.9rem !important;
        margin-bottom: 0 !important;
    }

    #contact .ml-6 p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }

    /* Compact working hours */
    #contact .mt-12 {
        margin-top: 0.75rem !important;
    }

    #contact .mt-12 h4 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    #contact .space-y-3 {
        gap: 0 !important;
    }

    #contact .space-y-3 li {
        padding-bottom: 0.25rem !important;
        margin-bottom: 0 !important;
        justify-content: center !important;
        gap: 2rem !important;
    }

    #contact .space-y-3 li span {
        font-size: 0.8rem !important;
    }

    /* Align days and hours in columns */
    #contact .space-y-3 li span:first-child {
        width: 8rem !important;
        text-align: right !important;
    }

    #contact .space-y-3 li span:last-child {
        width: 6rem !important;
        text-align: left !important;
    }
}

/* ----------------------------------------
   Tablets (max-width: 1024px)
   ---------------------------------------- */
@media (max-width: 1024px) {

    /* Remove min-height constraint for content-heavy sections */
    #services.snap-section,
    #about.snap-section,
    #team.snap-section,
    #contact.snap-section {
        min-height: auto !important;
        height: auto !important;
    }

    /* Services grid */
    #services .grid {
        gap: 1.5rem;
    }

    /* Team section avatars */
    #team .w-72 {
        width: 14rem;
        height: 14rem;
    }

    /* Projects section positioning */
    #projects-scroll-container .absolute.top-0.left-20 {
        left: 2.5rem;
    }
}

/* ----------------------------------------
   Large Phones / Small Tablets (max-width: 768px)
   ---------------------------------------- */
@media (max-width: 768px) {

    /* General section padding adjustments */
    #services.snap-section,
    #about.snap-section,
    #team.snap-section,
    #contact.snap-section {
        min-height: auto !important;
        height: auto !important;
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    /* ---- Header & Navigation ---- */
    #mobile-menu a {
        padding: 0.75rem 1.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* ---- Hero Section ---- */
    #hero {
        padding-top: 5rem;
        padding-bottom: 3rem;
    }

    #hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    #hero p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        padding: 0 2rem;
    }

    .hero-buttons a {
        width: 100%;
        text-align: center;
    }

    /* ---- About Section ---- */
    #about .lg\:w-1\/2 {
        width: 100%;
        padding-right: 0;
    }

    #about .lg\:pr-10 {
        padding-right: 0;
    }

    #about img {
        margin-top: 2rem;
    }

    /* Show the experience badge on mobile */
    #about .absolute.-bottom-6.-right-6 {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        display: block !important;
        margin-top: 1rem;
        text-align: center;
    }

    /* ---- Team Section ---- */
    #team .flex-wrap {
        flex-direction: column;
        gap: 3rem;
    }

    #team .w-72 {
        width: 12rem;
        height: 12rem;
    }

    #team h3 {
        font-size: 1.25rem;
    }

    /* ---- Services Section ---- */
    #services .grid {
        gap: 1rem;
        grid-template-columns: 1fr;
    }

    #services .grid>div {
        padding: 1.25rem;
    }

    #services .grid>div>div:first-child {
        width: 3rem;
        height: 3rem;
        margin-bottom: 0.75rem;
    }

    #services .grid>div>div:first-child i {
        font-size: 1.25rem;
    }

    #services .grid h3 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    #services .grid p {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    /* ---- Projects/Portfolio Section ---- */
    #projects-scroll-container {
        height: 200vh;
    }

    #projects-scroll-container .sticky {
        padding-top: 4rem;
    }

    #projects-scroll-container .absolute.top-0 {
        top: 1rem;
        left: 1rem !important;
    }

    #projects-scroll-container h2 {
        font-size: 1.75rem;
    }

    #projects-scroll-container .text-sm {
        font-size: 0.75rem;
    }

    .project-item {
        width: 80vw !important;
        height: 45vh !important;
    }

    .project-item h3 {
        font-size: 1.5rem;
    }

    .project-item .absolute.-bottom-12 {
        bottom: -2rem;
    }

    #projects-scroll-container .absolute.bottom-10 {
        bottom: 1.5rem;
        left: 1rem !important;
    }

    /* ---- Contact Section ---- */
    #contact .max-w-2xl {
        text-align: left;
        padding: 0 1rem;
    }

    #contact .flex.items-start {
        width: 100%;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }

    #contact .space-y-6 .flex.items-start>div.ml-4 {
        margin-left: 0 !important;
        margin-top: 0.75rem;
    }

    #contact .space-y-6 {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #contact h2 {
        text-align: center;
    }

    #contact .space-y-6>div {
        padding: 0.5rem 0;
    }

    /* ---- Footer ---- */
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    footer .flex.items-start,
    footer .flex.items-center {
        justify-content: center;
    }

    footer address {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    footer .flex.space-x-4 {
        justify-content: center;
    }

    /* ---- Floating Section Navigator ---- */
    #section-nav {
        display: none !important;
    }
}

/* ----------------------------------------
   Small Phones (max-width: 480px)
   ---------------------------------------- */
@media (max-width: 480px) {

    /* Further reduce section padding */
    #services.snap-section,
    #about.snap-section,
    #team.snap-section,
    #contact.snap-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* Hero adjustments */
    #hero h1 {
        font-size: 1.75rem;
    }

    #hero p {
        font-size: 0.9rem;
    }

    .hero-buttons {
        padding: 0 1rem;
    }

    .hero-buttons a {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    /* Section headers */
    #about h2,
    #team h2,
    #services h2,
    #contact h2 {
        font-size: 1.5rem !important;
    }

    #services .text-center.mb-16 {
        margin-bottom: 2rem;
    }

    /* Team avatars */
    #team .w-72,
    #team .w-48 {
        width: 10rem;
        height: 10rem;
    }

    /* Projects text */
    #projects-scroll-container h2 {
        font-size: 1.5rem;
    }

    .project-item {
        width: 85vw !important;
        height: 40vh !important;
    }

    .project-item h3 {
        font-size: 1.25rem;
    }

    /* Contact working hours table */
    #contact ul.space-y-2 li {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}

/* ----------------------------------------
   Extra Small Phones (max-width: 375px)
   ---------------------------------------- */
@media (max-width: 375px) {

    #hero h1 {
        font-size: 1.5rem;
    }

    #hero p {
        font-size: 0.85rem;
    }

    #team .w-72 {
        width: 8rem;
        height: 8rem;
    }

    #team h3 {
        font-size: 1rem;
    }

    .project-item h3 {
        font-size: 1rem;
    }

    #about h2,
    #team h2,
    #services h2,
    #contact h2 {
        font-size: 1.25rem !important;
    }
}

/* ----------------------------------------
   Touch-friendly improvements
   ---------------------------------------- */
@media (hover: none) and (pointer: coarse) {

    /* Larger tap targets for touch devices */
    a,
    button {
        min-height: 44px;
    }

    /* Remove hover-dependent animations on touch */
    .project-item:hover img {
        transform: none;
    }

    /* Disable pulse animation on mobile for performance */
    .animate-pulse-glow {
        animation: none;
    }
}

/* ----------------------------------------
   14" 1920x1200 Screen Specifics
   ---------------------------------------- */
@media (min-width: 1200px) {
    #services .container {
        max-width: 1200px !important;
        /* Constrain width to 1200px to ensure large side gaps on 1920px screens */
    }

    #services .grid {
        gap: 2rem;
    }

    /* Decrease About section text size */
    #about h2 {
        font-size: 2.25rem !important;
    }

    #about p {
        font-size: 1rem !important;
        line-height: 1.6;
    }

    #about ul li span,
    #about a {
        font-size: 0.95rem !important;
    }
}