/* Basic Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-text-color: #333;
    --secondary-text-color: #666;
    --background-color: #f7f7f7;
    --light-gray-border: #eee;
    --accent-color: #007bff; /* SAOPS의 강조색으로 사용 */
    --white: #fff;
    --dark-footer: #222;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-text-color: #eee;
        --secondary-text-color: #bbb;
        --background-color: #1a1a1a;
        --light-gray-border: #444;
        --accent-color: #61dafb; /* 다크 모드에서 잘 보이는 강조색 */
        --white: #222; /* 흰색 요소는 어둡게 */
        --dark-footer: #000;
    }
}

body {
    font-family: 'Noto Sans KR', 'Malgun Gothic', sans-serif; /* 한국어 친화적인 폰트 */
    line-height: 1.6;
    color: var(--primary-text-color);
    background-color: var(--background-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease; /* 부드러운 전환 효과 */
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: auto;
    overflow: hidden;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-text-color);
    margin-bottom: 15px;
    line-height: 1.2;
    transition: color 0.3s ease;
}

p {
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

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

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.section-description {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    margin-bottom: 50px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    transition: color 0.3s ease;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header */
header {
    background: var(--white);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--light-gray-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

header .logo {
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

header nav ul li a {
    color: var(--primary-text-color);
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

header nav ul li a:hover {
    color: var(--accent-color);
}

/* Buttons */
.btn {
    display: inline-block;
    color: var(--white);
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    background: var(--accent-color);
}

.btn:hover {
    background: #0056b3; /* 기본 호버 색상 */
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.hero-background-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.7;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--primary-text-color);
    text-align: center;
}

.hero-content .main-title {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: -2px;
    transition: color 0.3s ease;
}

.hero-content .sub-title {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}

/* Common Section Padding */
.section-padded {
    padding: 100px 0;
}

/* Intro Section (About Us) */
.intro-section {
    background-color: var(--white);
    transition: background-color 0.3s ease;
}

.intro-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}

.intro-image-wrapper {
    flex: 1;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(180deg, #2d2d2d 0%, #1f1f1f 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.intro-image-wrapper img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 524px;
    display: block;
    object-fit: contain;
    object-position: center center;
    border-radius: 18px;
}

.intro-content {
    flex: 1;
}

.intro-content .section-title {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.intro-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

/* Solutions Showcase Section */
.solution-showcase-section {
    background: #020202;
    padding: 80px 0 100px;
    color: var(--white);
}

.solution-text-overlay {
    text-align: center;
    margin-bottom: 44px;
}

.solution-text-overlay h3 {
    font-size: 2.6rem;
    color: #ffffff;
    margin-bottom: 18px;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.solution-text-overlay p {
    font-size: 1.18rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.75;
}

.solution-workflow-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.workflow-card {
    background: #212121;
    border-radius: 16px;
    padding: 38px 30px 32px;
    text-align: center;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.workflow-icon {
    width: 92px;
    height: 92px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ffffff;
    border-radius: 20px;
    background: linear-gradient(135deg, #0e1b3c 0%, #2744a3 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.workflow-card h4 {
    font-size: 1.95rem;
    color: #ffffff;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.workflow-card p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
    word-break: keep-all;
}

/* Best Services / Core Offerings Section */
.best-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card img {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

.service-card p {
    font-size: 1rem;
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.process-item {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.process-item i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.process-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-text-color);
    transition: color 0.3s ease;
}

.process-item p {
    font-size: 0.95rem;
    color: var(--secondary-text-color);
    transition: color 0.3s ease;
}

/* Cases / Gallery Section */
#cases {
    background: #1f1f1f;
    color: #ffffff;
}

#cases .section-title {
    color: #ffffff;
}

#cases .section-description {
    color: rgba(255, 255, 255, 0.72);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 50px;
}

.case-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.case-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.case-item img:hover {
    transform: scale(1.05);
}

/* Contact Section */
.contact-section {
    background-color: var(--background-color);
    transition: background-color 0.3s ease;
}

.contact-grid {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.contact-info-text {
    flex: 1;
}

.contact-info-text .section-title {
    text-align: left;
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.contact-info-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-text-color);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.contact-form-wrapper {
    flex: 1;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--light-gray-border);
    border-radius: 5px;
    font-size: 1rem;
    color: var(--primary-text-color);
    background-color: var(--white);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: var(--dark-footer);
    color: var(--white);
    text-align: center;
    padding: 2.5rem 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-content .main-title {
        font-size: 3.5rem;
    }
    .hero-content .sub-title {
        font-size: 1.2rem;
    }
    .intro-grid, .contact-grid {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    .intro-content, .contact-info-text, .contact-form-wrapper {
        text-align: center;
    }
    .intro-content .section-title, .contact-info-text .section-title {
        text-align: center;
    }
    .section-title {
        font-size: 2.2rem;
    }
    .section-description {
        font-size: 1rem;
    }
    .best-services-grid, .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header nav ul {
        display: none;
    }
    header .container {
        justify-content: center;
    }
    .hero-section {
        height: 60vh;
    }
    .hero-content .main-title {
        font-size: 3rem;
    }
    .hero-content .sub-title {
        font-size: 1rem;
    }
    .section-padded {
        padding: 60px 0;
    }
    .best-services-grid, .process-grid, .cases-grid {
        grid-template-columns: 1fr;
    }
    .solution-workflow-grid {
        grid-template-columns: 1fr;
    }
    .solution-text-overlay h3 {
        font-size: 2.1rem;
    }
    .solution-text-overlay p {
        font-size: 1rem;
    }
    .workflow-card {
        padding: 28px 22px 24px;
    }
    .workflow-card h4 {
        font-size: 1.65rem;
    }
}

@media (max-width: 480px) {
    .hero-content .main-title {
        font-size: 2.5rem;
    }
    .hero-content .sub-title {
        font-size: 0.9rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .intro-content .section-title, .contact-info-text .section-title {
        font-size: 1.8rem;
    }
    .intro-content p, .contact-info-text p {
        font-size: 0.9rem;
    }
    .service-card h3, .process-item h3 {
        font-size: 1.2rem;
    }
    .service-card p, .process-item p {
        font-size: 0.85rem;
    }
    .contact-form input, .contact-form textarea {
        padding: 10px;
    }
    .contact-form .btn {
        padding: 12px;
        font-size: 1rem;
    }
}


@media (max-width: 768px) {
    .intro-image-wrapper {
        min-height: 420px;
        padding: 14px;
        border-radius: 18px;
    }

    .intro-image-wrapper img {
        max-height: 392px;
    }
}