:root {
    /* Colors - Refined Deep Muted Slate Palette */
    --bg-main: #16181b;
    /* Deep Muted Slate */
    --bg-card: #1e2124;
    /* Muted Graphite */
    --accent: #8c7b6c;
    /* Antique Bronze */
    --accent-light: #a89f91;
    --highlight: #eeeae3;
    /* Muted Champagne / Linen */
    --text-main: #e5e5e5;
    --text-sub: rgba(255, 255, 255, 0.5);
    --border: rgba(140, 123, 108, 0.15);

    /* Typography - Impactful */
    --font-serif: 'Noto Serif KR', serif;
    --font-sans: 'Pretendard', sans-serif;

    --h1-size: 4rem;
    --h2-size: 3rem;
    --h3-size: 2rem;

    /* Layout tokens */
    --container-max: 1400px;
    --container-pad: 5vw;
    --header-h: 60px;
    --header-h-compact: 60px;
    --section-pad-y: 80px;
    --grid-gap: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html.snap-page {
    scroll-snap-type: y mandatory;
}

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

button {
    font-family: inherit;
}

/* --- Typography Utilities --- */
h1,
h2,
h3 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.snap-page section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

@media screen and (max-width: 1279px) {
    html.snap-page {
        scroll-snap-type: none;
    }

    .snap-page section {
        scroll-snap-align: initial;
        scroll-snap-stop: normal;
    }
}

/* --- Global Header --- */
/* --- Global Header (New GNB) --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.main-header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    padding: 0;
    height: var(--header-h-compact);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-inner {
    height: var(--header-h);
    display: grid;
    grid-template-columns: 1fr auto;
    /* Precise layout for alignment */
    align-items: center;
    gap: 16px;
    transition: height 0.4s ease;
}


.main-header.scrolled .header-inner {
    height: var(--header-h-compact);
}

/* Logo */
.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    display: block;
    height: auto;
    width: 120px;
    transition: width 0.4s ease;
}

/* Navigation */
.gnb {
    height: 100%;
    display: none;
    justify-content: center;
    /* Center menu within its grid area */
    align-items: center;
}

.gnb-list {
    display: flex;
    gap: 25px;
    /* Reduced gap */
    height: 100%;
}

.gnb-item {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
    /* Removed min-width to fix unequal spacing */
}


.gnb-item>a {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: -0.01em;
    transition: all 0.3s ease;
    padding: 10px 0;
    position: relative;
}

.gnb-item>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.gnb-item:hover>a,
.gnb-item.active>a {
    color: #fff;
}

.gnb-item:hover>a::after,
.gnb-item.active>a::after {
    width: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align to the right of its grid area */
    gap: 12px;
}


.btn-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.btn-contact svg {
    width: 16px;
    height: 16px;
}

.btn-contact .pc-icon {
    display: none;
}

.btn-text-pc {
    display: none;
}

.btn-text-mo {
    display: inline;
}

/* Mobile Toggle */
.m-menu-trigger {
    display: flex;
    background: none;
    border: none;
    width: 26px;
    height: 18px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-self: center;
}

.m-menu-trigger span {
    width: 100%;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* Mobile Menu Drawer */
#mobile-menu-container {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 85vw;
    max-width: 360px;
    height: 100vh;
    background: #15171a;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 3001;
    display: flex;
    flex-direction: column;
    padding: 24px 22px;
    pointer-events: auto;
}

.mobile-menu-drawer.active {
    transform: translateX(0);
}

.m-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 3000;
}

.m-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.m-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.m-menu-close {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    position: relative;
    cursor: pointer;
}

.m-menu-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    background: #fff;
    transform-origin: center;
}

.m-menu-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.m-menu-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.m-gnb-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.m-gnb-item a {
    display: block;
    padding: 12px 4px;
    font-size: 1.1rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.m-menu-footer {
    margin-top: auto;
    padding-top: 24px;
}

.m-menu-footer .btn-contact {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1.05rem;
    border-radius: 6px;
}

@media screen and (min-width: 1024px) {
    :root {
        --header-h: 90px;
        --header-h-compact: 90px;
    }

    .header-actions {
        gap: 25px;
    }

    .logo-img {
        width: 160px;
    }

    .btn-contact {
        padding: 10px 22px;
        font-size: 0.9rem;
        gap: 10px;
    }

    .m-menu-trigger {
        width: 30px;
        height: 20px;
    }

    #mobile-menu-container {
        display: none;
    }

    .header-inner {
        grid-template-columns: 250px 1fr 250px;
        gap: 0;
    }

    .gnb {
        display: flex;
    }

    .m-menu-trigger {
        display: none;
    }

    .btn-text-pc {
        display: inline;
    }

    .btn-text-mo {
        display: none;
    }

    .btn-contact .pc-icon {
        display: inline;
    }
}

/* Mega Menu styles removed */

/* Index page-specific sections (Hero, Case Selector, Success, Representative, Social, Practice Guide) moved to index.css */

/* --- Hyunmoon's Promise --- */
.section-promises {
    min-height: auto;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0d0e10 0%, #0a0b0d 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

/* Background text removed */
.section-promises::before {
    display: none;
}

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

.section-promises .section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #fff;
    position: relative;
}

.section-promises .section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 25px auto 0;
}

.promise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.promise-card {
    background: linear-gradient(180deg, #151619 0%, #0c0d0f 100%);
    border: 1px solid rgba(140, 123, 108, 0.3);
    border-top: 4px solid var(--accent);
    padding: 40px 25px 35px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.promise-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(140, 123, 108, 0.15), transparent 70%);
    /* Stronger hover glow */
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.promise-card:hover::after {
    opacity: 1;
}

.promise-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    /* Full accent color on hover */
    background: #1a1b1e;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}



.promise-card .card-header {
    background: none;
    /* Removed red background */
    color: var(--accent);
    padding: 0;
    font-weight: 700;
    font-size: 1.25rem;
    /* Slightly reduced for better fit */
    font-family: var(--font-serif);
    margin-bottom: 30px;
    position: relative;
    word-break: keep-all;
    /* Prevent single character breaks */
    line-height: 1.4;
}

.promise-card .card-body {
    padding: 0;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #999;
    word-break: keep-all;
}

/* --- Location Section (Redesigned) --- */
.section-location {
    position: relative;
    width: 100%;
    height: auto;
    padding: 60px var(--container-pad);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
}

.location-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    height: auto;
    background: #0a0b0d;
    border: 1px solid rgba(140, 123, 108, 0.2);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

/* Map Area (Top 60%) */
.location-map-area {
    width: 100%;
    flex: 1;
    position: relative;
    border-bottom: 1px solid rgba(140, 123, 108, 0.15);
    height: 300px;
}

.location-map-area iframe {
    width: 100%;
    height: 100%;
    display: block;
    filter: grayscale(100%) contrast(1.1) brightness(0.9);
    opacity: 0.9;
    transition: all 0.5s ease;
}

.location-map-area:hover iframe {
    filter: grayscale(0%);
    opacity: 1;
}

/* Info Area (Bottom 40%) */
.location-info-area {
    width: 100%;
    height: auto;
    min-height: auto;
    background: var(--bg-card);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 30px 20px;
    position: relative;
    flex-direction: column;
}

/* Decorative vertical line between blocks */
.location-info-area::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.05);
    display: none;
}

.info-block {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    padding-top: 20px;
    align-items: center;
    text-align: center;
}

.block-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 35px;
    font-weight: 400;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.block-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 1px;
    background: var(--accent);
}

.block-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: baseline;
}

.info-key {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    font-weight: 600;
    text-align: left;
}

.info-val {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    color: #dedede;
    line-height: 1.6;
    margin: 0;
    font-weight: 300;
}

.info-val .sub {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

/* --- 7. Footer Section --- */
.footer {
    background: #0f1113;
    /* Even deeper version of main bg for the very bottom */
    padding: var(--section-pad-y) 0 56px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.footer-container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.footer-top {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 40px;
}

.footer-brand {
    flex: none;
}

@media screen and (min-width: 768px) {
    .location-map-area {
        height: 50vh;
    }

    .location-info-area {
        padding: 50px 5%;
    }
}

@media screen and (min-width: 1024px) {
    .section-location {
        height: 100vh;
        padding: 5% 5%;
    }

    .location-wrapper {
        height: 80vh;
    }

    .location-map-area {
        height: auto;
    }

    .location-info-area {
        flex-direction: row;
        gap: 8vw;
        padding: 40px 5%;
    }

    .location-info-area::before {
        display: block;
    }

    .info-block {
        align-items: flex-start;
        text-align: left;
    }

    .info-row {
        grid-template-columns: 60px 1fr;
    }
}


/* --- Location Section (Dark Theme Default) --- */
/* Removing light theme overrides. 
   Base location styles in this file (lines ~1300) are already dark.
   Ensuring it matches the flow. */
#location {
    background: url('../assets/images/bg_texture.jpg') no-repeat center center/cover;
    position: relative;
    z-index: 1;
    border-bottom: 1px solid rgba(140, 123, 108, 0.1);
}

#location::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 14, 16, 0.9);
    /* Heavy dark overlay */
    z-index: -1;
}

#location .info-container {
    background: transparent;
}

#location .info-block {
    color: #fff;
    border-right: none;
}

#location .info-block:last-child {
    border-right: none;
}

#location .info-label {
    color: var(--accent);
    /* Keep accent */
}

#location .info-value,
#location .info-address {
    color: #fff;
}

#location .info-sub {
    color: #888;
}

#location .transport-item .line {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media screen and (min-width: 768px) {
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

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

    .location-map-area {
        height: 400px;
    }

    .tab-btn {
        font-size: 1rem;
        margin-right: 35px;
    }
}

@media screen and (min-width: 1024px) {
    .section-promises {
        min-height: 100vh;
        padding: 100px 0;
    }

    .section-promises .section-title {
        font-size: 3rem;
        margin-bottom: 80px;
    }

    .promise-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }

    .promise-card {
        padding: 60px 30px 50px;
    }

    .location-map-area {
        height: 45vh;
    }

    .location-info-area {
        min-height: 350px;
        gap: 40px;
        padding: 40px 20px;
    }
}


.footer-logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    font-family: var(--font-serif);
}

.footer-logo-img {
    width: auto;
    height: 80px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.footer-tagline {
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    flex: 1;
}

.footer-col {
    text-align: left;
}

.col-title {
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: left;
}

.col-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.col-list li {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 12px;
    line-height: 1.6;
    text-align: left;
}

.col-list li strong {
    color: #555;
    margin-right: 8px;
    font-weight: 500;
}

.col-text {
    font-size: 0.95rem;
    color: #888;
    line-height: 1.6;
    text-align: left;
}

.col-text.sub {
    font-size: 0.85rem;
    color: #555;
    margin-top: 4px;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid #111;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.footer-legal {
    display: flex;
    gap: 30px;
}

.footer-legal a {
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #fff;
}

.footer-copyright {
    font-size: 0.85rem;
    color: #333;
}

@media screen and (min-width: 768px) {
    .footer-top {
        flex-direction: row;
        align-items: flex-start;
        gap: 40px;
    }

    .footer-brand {
        flex: 0 0 240px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
}

@media screen and (min-width: 1024px) {
    .footer-brand {
        flex: 0 0 320px;
    }

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