/* ===================================
   DR소프트 - 메인 스타일시트
   style.css
   =================================== */

/* Import Variables */
@import url('variables.css');

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-black);
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-light);
}

/* ===================================
   Layout Components
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--spacing-4xl) 0;
}

.section-lg {
    padding: var(--spacing-5xl) 0;
}

/* ===================================
   Skip Navigation
   =================================== */
.skip-nav {
    position: absolute;
    top: -100px;
    left: 0;
    z-index: var(--z-tooltip);
}

.skip-nav a {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-nav a:focus {
    position: fixed;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    z-index: var(--z-tooltip);
}

/* ===================================
   Header Styles
   =================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: var(--z-sticky);
    transition: var(--transition-base);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.logo img {
    height: 40px;
    margin-right: var(--spacing-md);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-menu a {
    display: block;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: var(--transition-fast);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: var(--font-size-2xl);
    color: var(--text-primary);
    cursor: pointer;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    transform: rotate(180deg);
    opacity: 0.1;
    animation: wave 20s linear infinite;
}

@keyframes wave {
    0% {
        transform: rotate(180deg) translateX(0);
    }
    100% {
        transform: rotate(180deg) translateX(-50%);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-black);
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-light);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.8;
    max-width: 600px;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

.btn-primary:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ===================================
   Service Cards
   =================================== */
.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-3xl);
}

.service-card {
    background: var(--white);
    padding: var(--spacing-2xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-base);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    color: var(--white);
    margin-bottom: var(--spacing-lg);
}

.service-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    line-height: var(--line-height-relaxed);
}

/* ===================================
   Features Section
   =================================== */
.features {
    position: relative;
    overflow: hidden;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-4xl);
    align-items: center;
    margin-top: var(--spacing-3xl);
}

.feature-content h3 {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-lg);
}

.feature-list {
    list-style: none;
    margin-top: var(--spacing-xl);
}

.feature-list li {
    display: flex;
    align-items: start;
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
    position: relative;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--gradient-secondary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
}

.feature-image {
    position: relative;
    height: 500px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===================================
   Footer
   =================================== */
footer {
    background: var(--bg-dark);
    color: var(--gray-300);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
    color: var(--white);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-700);
    text-align: center;
    color: var(--gray-500);
}

/* ===================================
   Floating Buttons
   =================================== */
.floating-buttons {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    z-index: var(--z-fixed);
}

.floating-buttons a {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
}

.floating-buttons a:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.btn-top {
    opacity: 0;
    pointer-events: none;
}

.btn-top.show {
    opacity: 1;
    pointer-events: auto;
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 1s ease-out;
}

.animate-fadeIn {
    animation: fadeIn 1s ease-out;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--white);
        flex-direction: column;
        padding: var(--spacing-xl);
        transition: var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero Adjustments */
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Floating Buttons */
    .floating-buttons {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .section {
        padding: var(--spacing-2xl) 0;
    }
    
    h2 {
        font-size: var(--font-size-3xl);
    }
    
    h3 {
        font-size: var(--font-size-2xl);
    }
}