/* =========================================================================
   OUAH Co. - Premium Design System
   ========================================================================= */

:root {
    /* Color Palette */
    --color-primary: #5c3ffc;
    --color-primary-dark: #4328d4;
    --color-primary-light: #ece9ff;

    --color-secondary: #00d2ff;

    --color-text-main: #1a1a24;
    --color-text-muted: #646473;

    --color-bg-base: #fafafc;
    --color-bg-card: #ffffff;

    --color-dark-purple: #130a2e;
    /* For section 3 authority */

    --color-white: #ffffff;
    --color-white-50: rgba(255, 255, 255, 0.5);

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Shadows & Glassmorphism */
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 30px rgba(92, 63, 252, 0.15);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-blur: blur(20px);

    /* Layout */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    --container-width: 1200px;
    --header-height: 80px;
}

/* =========================================================================
   Base Reset
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--color-text-main);
    background-color: var(--color-bg-base);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    line-height: 1.2;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 120px 0;
}

/* Language Toggling Utility */
[data-lang="kr"],
[data-lang="en"] {
    display: none;
}

html[lang="kr"] [data-lang="kr"] {
    display: inline-block;
}

html[lang="en"] [data-lang="en"] {
    display: inline-block;
}

/* Ensure block elements behave normally when visible */
html[lang="kr"] div[data-lang="kr"],
html[lang="kr"] p[data-lang="kr"],
html[lang="kr"] h1[data-lang="kr"],
html[lang="kr"] h2[data-lang="kr"],
html[lang="kr"] h3[data-lang="kr"] {
    display: block;
}

html[lang="en"] div[data-lang="en"],
html[lang="en"] p[data-lang="en"],
html[lang="en"] h1[data-lang="en"],
html[lang="en"] h2[data-lang="en"],
html[lang="en"] h3[data-lang="en"] {
    display: block;
}

/* =========================================================================
   Components
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #866eff);
    color: var(--color-white);
    box-shadow: 0 10px 20px rgba(92, 63, 252, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(92, 63, 252, 0.3);
}

.btn-icon {
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--shadow-subtle);
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.core-strengths-title {
    font-size: 2rem;
    margin-bottom: 24px;
}

.section-desc {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

/* =========================================================================
   0. Header (Global Navigation)
   ========================================================================= */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: transparent;
    transition: var(--transition-normal);
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.logo {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-main);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-primary);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 50px;
    background: var(--color-white);
    border: 1px solid #e1e1e8;
    color: var(--color-text-main);
    transition: var(--transition-fast);
}

.lang-btn:hover {
    border-color: var(--color-primary);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 8px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
}

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

.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.lang-option:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text-main);
    transition: var(--transition-fast);
}

/* =========================================================================
   1. Hero Section
   ========================================================================= */
.hero {
    position: relative;
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(92, 63, 252, 0.1) 0%, rgba(0, 210, 255, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero h1 span {
    background: linear-gradient(to right, var(--color-text-main), var(--color-primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-visual {
    position: relative;
    height: 500px;
}

.main-card {
    position: absolute;
    width: 100%;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(60px);
    opacity: 0.7;
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 250px;
    height: 250px;
    background: var(--color-secondary);
    border-radius: 50%;
    top: -50px;
    left: -50px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    border-radius: 50%;
    bottom: -80px;
    right: -50px;
    animation-delay: -5s;
}

.glass-content {
    width: 100%;
    padding: 40px;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 3rem;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 8px;
}

.stat p {
    font-weight: 500;
    color: var(--color-text-main);
}

@keyframes float {

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

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* =========================================================================
   2. Core Strengths
   ========================================================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.feature-card {
    padding: 40px;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature-icon.icon-purple {
    background: #A393C2;
    color: var(--color-white);
}

.feature-card h3 {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--color-text-muted);
}

/* =========================================================================
   Brand Portfolio Section
   ========================================================================= */
.brand-portfolio {
    background-color: #0B1120;
    color: var(--color-white);
    padding: 100px 0;
}

.brand-portfolio .section-title {
    color: var(--color-white);
}

.brand-portfolio .section-desc {
    color: var(--color-white-50);
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 30px;
    margin-top: 60px;
}

.portfolio-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    width: calc(16.666% - 25px);
    /* default 6 per row */
    height: 90px;
}

.portfolio-logo {
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.5;
    transition: var(--transition-fast);
}

.portfolio-logo-wrapper:hover .portfolio-logo {
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .portfolio-logo-wrapper {
        width: calc(20% - 24px);
        /* 5 per row */
    }
}

@media (max-width: 768px) {
    .portfolio-logo-wrapper {
        width: calc(33.333% - 20px);
        /* 3 per row */
    }

    .portfolio-logo {
        max-height: 35px;
    }
}

@media (max-width: 480px) {
    .portfolio-logo-wrapper {
        width: calc(50% - 15px);
        /* 2 per row */
    }
}

/* =========================================================================
   3. Authority Section
   ========================================================================= */
.dark-section {
    background-color: var(--color-dark-purple);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.dark-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 100%, rgba(92, 63, 252, 0.2) 0%, transparent 60%);
    z-index: 1;
}

.dark-section .container {
    position: relative;
    z-index: 2;
}

.dark-section .section-title {
    color: var(--color-white);
}

.dark-section .section-desc {
    color: var(--color-white-50);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.partner-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    transition: var(--transition-normal);
}

.partner-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.partner-logo-box {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.partner-logo-box img {
    max-height: 50px;
    max-width: 150px;
    opacity: 0.9;
    filter: brightness(0) invert(1);
    transition: var(--transition-fast);
}

.partner-logo-box img.preserve-color {
    filter: none;
    opacity: 1;
}

.partner-card:hover .partner-logo-box img {
    opacity: 1;
}

.partner-type {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.partner-desc {
    font-size: 0.9rem;
    color: var(--color-white-50);
    line-height: 1.5;
}

/* =========================================================================
   4. Services Section
   ========================================================================= */
.flex-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.tag {
    padding: 8px 16px;
    background: var(--color-white);
    border: 1px solid #e1e1e8;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary-dark);
    box-shadow: var(--shadow-subtle);
}

.services-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-orbit {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px dashed rgba(92, 63, 252, 0.3);
    animation: spin 30s linear infinite;
}

.center-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: #A393C2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(163, 147, 194, 0.6);
    z-index: 2;
}

.center-orb-logo {
    width: 60px;
    height: auto;
    filter: brightness(0) invert(1);
}

.orbit-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: spin 30s linear infinite;
}

.satellite {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-main);
    box-shadow: var(--shadow-subtle);
    border: 1px solid #eee;

    /* Center it inside the orbit container first */
    top: 50%;
    left: 50%;
    /* Then move it OUT by the radius (150px) using negative margin */
    margin: -25px 0 0 -25px;
    /* Half of width/height */
}

/* 
  Position 6 satellites evenly around the 360 circle (radius = 150px)
  Use transform to push them outward.
*/
.sat-1 {
    transform: rotate(0deg) translate(150px);
}

.sat-2 {
    transform: rotate(60deg) translate(150px);
}

.sat-3 {
    transform: rotate(120deg) translate(150px);
}

.sat-4 {
    transform: rotate(180deg) translate(150px);
}

.sat-5 {
    transform: rotate(240deg) translate(150px);
}

.sat-6 {
    transform: rotate(300deg) translate(150px);
}

/* The text inside the satellite counter-rotates to stay upright */
.sat-text {
    display: block;
    animation: spin-reverse 30s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    100% {
        transform: rotate(-360deg);
    }
}

/* Initial state for satellite before animation overrides center */

/* =========================================================================
   5. Leadership Section
   ========================================================================= */
.bg-light {
    background-color: var(--color-primary-light);
}

.bg-white {
    background-color: var(--color-white);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.team-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
    transition: var(--transition-normal);
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.1);
}

.team-img-wrapper {
    height: 300px;
    overflow: hidden;
}

.team-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: var(--transition-slow);
}

.team-card:hover .team-img {
    transform: scale(1.05);
}

.team-info {
    padding: 30px;
}

.team-name {
    font-size: 1.25rem;
    margin-bottom: 4px;
    color: var(--color-primary-dark);
}

.team-title {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.team-desc p {
    color: #4A5568;
    line-height: 1.6;
}

.team-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

/* =========================================================================
   6. Contact Form Section
   ========================================================================= */
.contact-container {
    max-width: 800px;
}

.contact-card {
    padding: 60px;
}

.form-group {
    margin-bottom: 24px;
}

.row {
    display: flex;
    gap: 24px;
}

.col {
    flex: 1;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-main);
}

input,
textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #e1e1e8;
    border-radius: 12px;
    background: var(--color-bg-base);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.btn-block {
    width: 100%;
    margin-top: 16px;
}

/* =========================================================================
   7. Footer
   ========================================================================= */
.footer {
    background-color: var(--color-white);
    padding: 60px 0 30px;
    border-top: 1px solid #e1e1e8;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.bw-filter {
    filter: grayscale(100%);
    opacity: 0.6;
    margin-bottom: 16px;
}

.corp-name {
    font-weight: 700;
    color: var(--color-text-main);
}

.footer-contact {
    display: flex;
    gap: 60px;
}

.contact-item h4 {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-item a {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text-main);
    margin-bottom: 4px;
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--color-primary);
}

.contact-item span {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #f0f0f5;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* =========================================================================
   Animations
   ========================================================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

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

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .core-strengths-title {
        font-size: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.15rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--color-white);
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        transform: translateY(-150%);
        transition: var(--transition-normal);
        z-index: 999;
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .hero-container,
    .flex-container {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: calc(var(--header-height) + 40px);
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        margin: 0 auto 30px;
    }

    .hero-actions {
        justify-content: center;
    }

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

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

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

    .row {
        flex-direction: column;
        gap: 0;
    }

    .footer-top,
    .footer-contact {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

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

    .contact-card {
        padding: 30px 20px;
    }
}