/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    /* Colors - Deep Premium Dark Theme */
    --primary: #1A1E29;
    --primary-light: #2A2F40;
    --secondary: #B89758;
    /* Matt Gold */
    --secondary-light: #C5A059;

    --text-main: #f5f5f5;
    /* Soft white */
    --text-muted: #a0a0a0;
    --text-light: #ffffff;

    --bg-main: #1A1E29;
    /* Deep Dark Navy */
    --bg-light: #12151D;
    /* Darker Navy for sections */
    --bg-dark: #0A0C11;
    /* Pitch Navy/Black */

    /* Typography */
    --font-kr: 'Pretendard', sans-serif;
    --font-en: 'Oswald', sans-serif;

    /* Spacing & Layout */
    --max-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-kr);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.text-light-gray {
    color: #a0aec0;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
    line-height: 1.3;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.bg-dark h2 {
    color: var(--text-main);
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
    margin: 1.5rem auto;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border-color: var(--text-main);
    color: var(--text-main);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: var(--primary);
}

.header.scrolled .btn-outline {
    border-color: var(--secondary);
    color: var(--secondary);
}

.header.scrolled .btn-outline:hover {
    background-color: var(--secondary);
    color: var(--primary);
}

.btn-text {
    background: transparent;
    color: var(--secondary);
    padding: 0;
    font-weight: 700;
}

.btn-text:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background-color: var(--primary);
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary);
}

.header.scrolled .logo a {
    color: var(--text-main);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-list a:not(.btn) {
    font-weight: 500;
    color: var(--text-main);
}

.nav-list a:not(.btn):hover {
    color: var(--secondary);
}

.header.scrolled .nav-list a:not(.btn) {
    color: rgba(255, 255, 255, 0.9);
}

.header.scrolled .nav-list a:not(.btn):hover {
    color: var(--secondary);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
}

.header.scrolled .mobile-menu-toggle span {
    background-color: white;
}

/* ==========================================================================
   Hero Section (Wide Redesign)
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('./배경 이미지/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle gradient to ensure text readability on the left, and blend the portrait on the right */
    background: linear-gradient(90deg, rgba(26, 30, 41, 0.95) 0%, rgba(26, 30, 41, 0.7) 40%, rgba(10, 12, 17, 0.3) 100%);
    z-index: 1;
}

.hero-container-wide {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 80px);
}

.hero-text-content {
    flex: 1;
    max-width: 600px;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-main-title {
    font-size: 4rem;
    line-height: 1.25;
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
}

.hero-main-title .muted-text {
    font-size: 2.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.hero-main-title .highlight-text {
    color: var(--secondary);
    font-weight: 800;
}

.hero-sub-title {
    font-size: 1.5rem;
    line-height: 1.6;
    color: var(--text-main);
    margin-bottom: 3rem;
    font-weight: 400;
}

.hero-sub-title strong {
    color: var(--secondary-light);
    font-weight: 700;
}

.hero-profile-info {
    border-left: 3px solid var(--secondary);
    padding-left: 1.5rem;
}

.hero-profile-info .info-header {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

.hero-profile-info .firm-name {
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.hero-profile-info .lawyer-name {
    font-size: 2rem;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 2px;
}

.hero-profile-info .info-list {
    margin-top: 1rem;
}

.hero-profile-info .info-list li {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.hero-portrait {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    position: absolute;
    right: 0;
    bottom: 0;
    width: 55%;
    max-width: 800px;
    pointer-events: none;
}

.hero-portrait .portrait-img {
    height: 85vh;
    width: auto;
    object-fit: contain;
    object-position: bottom right;
    filter: drop-shadow(-15px 0px 30px rgba(0, 0, 0, 0.6));
    animation: float 6s ease-in-out infinite;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 2rem;
    margin-top: 3rem;
}

.box-card {
    background: linear-gradient(145deg, #222736 0%, #1A1E29 100%);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.box-card h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    position: relative;
    display: inline-block;
}

.box-card h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary);
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 2px;
    background-color: rgba(26, 54, 93, 0.1);
}

.timeline li {
    position: relative;
    margin-bottom: 2rem;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--secondary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px rgba(197, 169, 119, 0.3);
}

.timeline h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.timeline p {
    color: var(--text-muted);
}

.highlight-card {
    background-color: var(--primary);
    color: white;
}

.highlight-card h3 {
    color: white;
}

.highlight-card blockquote {
    font-family: var(--font-en);
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.highlight-card blockquote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: -10px;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.1);
    font-family: var(--font-en);
    z-index: -1;
}

/* ==========================================================================
   Expertise Section
   ========================================================================== */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.expertise-card {
    background: linear-gradient(145deg, #1E2331 0%, #151822 100%);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(197, 169, 119, 0.1);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.expertise-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.result-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    margin-bottom: 1rem;
}

.result-success {
    background-color: rgba(197, 169, 119, 0.2);
    color: #977d4c;
}

/* ==========================================================================
   Law Firm Section
   ========================================================================== */
.firm-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.firm-content h2 {
    font-family: var(--font-en);
    color: rgba(255, 255, 255, 0.1);
    font-size: 4rem;
    margin-bottom: -1rem;
    position: relative;
    z-index: 1;
}

.firm-content h3 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.firm-details {
    margin-top: 2rem;
}

.firm-details li {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.firm-details strong {
    color: var(--secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.firm-images {
    position: relative;
    height: 400px;
}

.office-img-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 90%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.office-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Removing logo-wrapper styles since it's deleted */

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item .label {
    display: block;
    color: var(--secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.contact-item .value {
    font-size: 1.125rem;
    font-weight: 500;
}

.contact-form-wrapper {
    background: var(--bg-light);
    padding: 3rem;
    border-radius: 8px;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-status {
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

.status-success {
    color: #38a169;
}

.status-error {
    color: #e53e3e;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #000;
    color: white;
    padding: 2rem 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {

    .hero-container-wide {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-bg-overlay {
        background: linear-gradient(180deg, rgba(26, 30, 41, 0.95) 0%, rgba(26, 30, 41, 0.7) 50%, rgba(10, 12, 17, 0.5) 100%);
    }

    .hero-text-content {
        z-index: 3;
        margin-top: 2rem;
    }

    .hero-main-title {
        font-size: 2.5rem;
    }

    .hero-main-title .muted-text {
        font-size: 1.5rem;
    }

    .hero-sub-title {
        font-size: 1.25rem;
    }

    .hero-profile-info {
        border-left: none;
        border-top: 3px solid var(--secondary);
        padding-left: 0;
        padding-top: 1.5rem;
        display: inline-block;
        text-align: left;
        margin: 0 auto;
    }

    .hero-portrait {
        position: relative;
        right: 0;
        width: 100%;
        justify-content: center;
        z-index: 2;
        margin-top: -10vh;
    }

    .hero-portrait .portrait-img {
        height: 70vh;
        object-position: top center;
        transform: translateY(10vh);
    }

    .about-content,
    .firm-container,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .nav {
        display: none;
        /* simple hidden for mobile, can add JS toggle */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-main);
        /* Changed from white to dark theme bg */
        padding: 1rem;
        box-shadow: var(--shadow-md);
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        /* subtle separation */
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .header.scrolled .nav-list a:not(.btn) {
        color: var(--text-main);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .firm-images {
        height: 300px;
    }

    .office-img-wrapper {
        width: 100%;
    }

    .logo-wrapper {
        width: 200px;
        padding: 1rem;
    }
}

/* ==========================================================================
   Dialog / Modal
   ========================================================================== */
.privacy-dialog {
    margin: auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    max-width: 500px;
    width: 90%;
}

.privacy-dialog::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.privacy-dialog-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    color: var(--text-main);
}