:root {
    --color-bg: #f7f5f1;
    --color-bg-alt: #efeae2;
    --color-text: #1c1c1c;
    --color-muted: #5c5c5c;
    --color-accent: #1f4f6b;
    --color-accent-dark: #16384d;
    --color-header: rgba(255, 255, 255, 0.94);
    --header-height: 72px;
    --content-width: 1200px;
    --font: "Noto Sans KR", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    scroll-padding-top: var(--header-height);
    overflow-x: clip;
}

body {
    margin: 0;
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    overflow-x: clip;
    width: 100%;
}

main {
    overflow-x: clip;
}

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

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

.content-wrap {
    width: min(100% - 40px, var(--content-width));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--color-header);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
    width: min(100% - 40px, var(--content-width));
    height: 100%;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    width: 134px;
    height: 48px;
    object-fit: contain;
}

.top-nav ul {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.top-nav a {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--color-text);
    transition: color 0.2s ease;
}

.top-nav a:hover,
.top-nav a.is-active {
    color: var(--color-accent);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    padding: 10px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--color-text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 780;
    min-height: 420px;
    margin-top: var(--header-height);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #1f4f6b 0%, #2a6f8f 45%, #c9b59a 100%);
    scroll-margin-top: var(--header-height);
}

.hero-slider,
.hero-fallback,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(22, 56, 77, 0.72), rgba(31, 79, 107, 0.4));
}

.hero-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(100% - 40px, var(--content-width));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-inline: auto;
}

.hero-copy {
    max-width: min(640px, 100%);
    text-align: right;
    min-width: 0;
}

.hero-brand {
    margin: 0 0 18px;
    font-size: clamp(2.88rem, 5.6vw, 4.16rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.hero-lead {
    margin: 0;
    display: grid;
    gap: 6px;
}

.hero-lead-line {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 300;
    opacity: 0.92;
    line-height: 1.55;
}

.hero-brand.anim-hero-text,
.hero-lead-line.anim-hero-text {
    animation: textRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand.anim-hero-text {
    animation-delay: 0s;
}

.hero-lead-line.anim-hero-text {
    animation-delay: var(--hero-delay, 0.15s);
}

.hero-slide.is-active .hero-bg {
    animation: heroZoom 6s ease both;
}

@keyframes heroZoom {
    from { transform: scale(1.08); }
    to { transform: scale(1); }
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.hero-dot.is-active {
    background: #fff;
}

/* Sections */
.section {
    padding: 96px 0;
    scroll-margin-top: var(--header-height);
    overflow-x: clip;
}

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

.section-title {
    margin: 0 0 12px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-accent);
}

.section-desc {
    margin: 0 0 40px;
    color: var(--color-muted);
    font-size: 1.05rem;
}

.empty-front {
    margin: 0;
    color: var(--color-muted);
}

/* Business */
.business-list {
    display: grid;
    gap: 64px;
}

.business-row {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
    align-items: center;
}

.business-row.is-right .business-media {
    order: 2;
}

.business-row.is-right .business-copy {
    order: 1;
}

.business-media {
    overflow: visible;
    border-radius: 0;
    background: transparent;
}

.business-media img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    background: transparent;
}

.business-en {
    margin: 0 0 8px;
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.business-ko {
    margin: 0 0 10px;
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.business-size {
    margin: 0 0 16px;
    color: var(--color-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.business-desc {
    margin: 0 0 20px;
    color: var(--color-text);
    line-height: 1.75;
}

.business-copy {
    display: flex;
    flex-direction: column;
}

.business-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-end;
    margin-top: 4px;
    font-weight: 700;
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: none;
    padding-bottom: 0;
}

.business-link-arrow {
    font-size: 1.05em;
    line-height: 1;
}

.business-link:hover {
    opacity: 0.8;
}

/* Project */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 28px 20px;
}

.project-card {
    display: block;
    text-align: center;
    transition: transform 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-thumb {
    overflow: hidden;
    border-radius: 4px;
    background: #ddd;
    margin-bottom: 10px;
}

.project-thumb img {
    width: 100%;
    aspect-ratio: 160 / 100;
    object-fit: cover;
}

.project-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Section heading (Business / Project / History) */
.section-heading {
    position: relative;
    margin: 20px 0 68px;
    text-align: center;
    padding-top: 56px;
    overflow: visible;
}

.section-watermark {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    font-size: clamp(calc(2.2rem + 8px), calc(5.5vw + 8px), calc(4.2rem + 10px));
    font-weight: 800;
    letter-spacing: -0.03em;
    color: rgba(0, 0, 0, 0.06);
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
}

.section-heading-title {
    position: relative;
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111;
    text-align: center;
}

/* History */
.history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
}

.history-list li {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.history-list .year {
    font-weight: 800;
    color: var(--color-accent);
    font-size: 1.05rem;
}

.history-content {
    color: var(--color-text);
    line-height: 1.7;
}

/* Contact */
.contact-section {
    background: #f0f0f0;
    padding: 110px 0;
    overflow-x: clip;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 48px;
    align-items: center;
}

.contact-heading {
    position: relative;
    margin-top: 20px;
    margin-bottom: 56px;
    padding-top: 56px;
    overflow: visible;
}

.contact-watermark {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    font-size: clamp(calc(2.2rem + 8px), calc(5.5vw + 8px), calc(4.2rem + 10px));
    font-weight: 800;
    letter-spacing: -0.03em;
    color: rgba(0, 0, 0, 0.06);
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.contact-title {
    position: relative;
    margin: 0 0 12px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111;
}

.contact-sub {
    position: relative;
    margin: 0;
    color: #777;
    font-size: 1.05rem;
}

.contact-lines {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.contact-lines li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 0.98rem;
    line-height: 1.55;
}

.contact-label {
    color: #1f4f6b;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.contact-value {
    color: #222;
    word-break: keep-all;
}

.contact-value a {
    color: inherit;
}

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

.contact-map-col {
    min-width: 0;
}

.kakao-map-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.kakao-map {
    display: block;
    width: 100%;
    height: 460px;
    min-height: 460px;
    border: 0;
    background: #e5e5e5;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.kakao-map-empty {
    display: grid;
    place-items: center;
    margin: 0;
    min-height: 460px;
    padding: 24px;
    color: #888;
    font-size: 0.95rem;
    background: #e8e8e8;
}

/* Back to top */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--color-accent-dark);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent);
}

.back-to-top span {
    display: block;
    width: 12px;
    height: 12px;
    margin: 4px auto 0;
    border-right: 2px solid #fff;
    border-top: 2px solid #fff;
    transform: rotate(-45deg);
}

/* Footer */
.site-footer {
    padding: 56px 0;
    background: var(--color-accent-dark);
    color: rgba(255, 255, 255, 0.88);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand {
    margin: 0 0 10px;
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-meta {
    margin: 0 0 6px;
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.footer-sep {
    opacity: 0.55;
    margin: 0 2px;
}

.footer-meta a {
    color: inherit;
}

.footer-copy {
    margin: 16px 0 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-family-title {
    margin: 0 0 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.footer-family ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.footer-family a {
    opacity: 0.85;
    font-size: 0.9rem;
}

.footer-family a:hover {
    opacity: 1;
    text-decoration: underline;
}

img.lazy-img {
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

img.lazy-img.is-loaded {
    opacity: 1;
    transform: scale(1);
}

/* Scroll reveal — text & blocks */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-48px);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(48px);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.92);
    transition:
        opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-zoom.is-visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

.business-media img,
.project-thumb img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease;
}

.reveal.is-visible .business-media img,
.reveal-zoom.is-visible .project-thumb img,
.reveal-left.is-visible .business-media img,
.reveal-right.is-visible .business-media img {
    animation: imgPop 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes imgPop {
    from {
        opacity: 0;
        transform: scale(1.08);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textRise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section / Contact 제목 등장 */
.section-heading.reveal .section-watermark,
.section-heading.reveal .section-heading-title,
.contact-info-col.reveal-left .contact-watermark,
.contact-info-col.reveal-left .contact-title,
.contact-info-col.reveal-left .contact-sub {
    opacity: 0;
}

.section-heading.reveal.is-visible .section-watermark,
.contact-info-col.reveal-left.is-visible .contact-watermark {
    animation: textRise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section-heading.reveal.is-visible .section-heading-title,
.contact-info-col.reveal-left.is-visible .contact-title {
    animation: textRise 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.contact-info-col.reveal-left.is-visible .contact-sub {
    animation: textRise 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.reveal.is-visible .business-en,
.reveal.is-visible .business-ko,
.reveal.is-visible .business-desc,
.reveal.is-visible .business-link,
.reveal-left.is-visible .business-en,
.reveal-left.is-visible .business-ko,
.reveal-left.is-visible .business-desc,
.reveal-left.is-visible .business-link,
.reveal-right.is-visible .business-en,
.reveal-right.is-visible .business-ko,
.reveal-right.is-visible .business-desc,
.reveal-right.is-visible .business-link {
    animation: textRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal.is-visible .business-en,
.reveal-left.is-visible .business-en,
.reveal-right.is-visible .business-en { animation-delay: 0.05s; }

.reveal.is-visible .business-ko,
.reveal-left.is-visible .business-ko,
.reveal-right.is-visible .business-ko { animation-delay: 0.12s; }

.reveal.is-visible .business-desc,
.reveal-left.is-visible .business-desc,
.reveal-right.is-visible .business-desc { animation-delay: 0.2s; }

.reveal.is-visible .business-link,
.reveal-left.is-visible .business-link,
.reveal-right.is-visible .business-link { animation-delay: 0.28s; }

/* Responsive */
@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .top-nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

    .top-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .top-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 20px 16px;
    }

    .top-nav a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 4px 14px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        font-weight: 800;
    }

    .top-nav a::after {
        content: "";
        width: 8px;
        height: 8px;
        margin-left: 12px;
        border-right: 2px solid currentColor;
        border-top: 2px solid currentColor;
        transform: rotate(45deg);
        flex-shrink: 0;
        opacity: 0.45;
    }

    .hero {
        aspect-ratio: auto;
        height: auto;
        min-height: min(56vw, 520px);
    }

    .hero-slide,
    .hero-fallback {
        position: relative;
        min-height: min(56vw, 520px);
        padding: 64px 0;
    }

    .business-row,
    .business-row.is-right {
        grid-template-columns: 1fr;
    }

    .business-row.is-right .business-media,
    .business-row.is-right .business-copy {
        order: initial;
    }

    .section {
        padding: 72px 0;
    }

    .reveal-left {
        transform: translateX(-24px);
    }

    .reveal-right {
        transform: translateX(24px);
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .kakao-map {
        min-height: 320px;
    }

    .history-list li {
        grid-template-columns: 72px 1fr;
    }
}

@media (max-width: 600px) {
    :root {
        --header-height: 64px;
    }

    .logo img {
        width: 111px;
        height: 40px;
    }

    .content-wrap {
        width: min(100% - 28px, var(--content-width));
    }

    .hero,
    .hero-slide,
    .hero-fallback {
        min-height: 360px;
    }

    .hero-brand {
        font-size: clamp(1.92rem, 8vw, 2.88rem);
    }

    .hero-lead-line {
        font-size: clamp(1.2rem, 4.2vw, 1.5rem);
    }

    .section-heading {
        margin: 10px 0 58px;
    }

    .contact-heading {
        margin-top: 10px;
        margin-bottom: 46px;
    }

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

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-zoom,
    img.lazy-img,
    .section-heading.reveal .section-watermark,
    .section-heading.reveal .section-heading-title,
    .contact-info-col.reveal-left .contact-watermark,
    .contact-info-col.reveal-left .contact-title,
    .contact-info-col.reveal-left .contact-sub,
    .anim-hero-text {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .hero-slide {
        transition: none;
    }
}
