@import url(https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@1.0/nanumsquare.css);
@import url("https://cdn.jsdelivr.net/gh/moonspam/NanumBarunGothic@latest/nanumbarungothicsubset.css");
/* =========================================================
   TOKENS / BASE
========================================================= */
:root {
    --bg: #ffffff;
    --text: #0b1220;
    --muted: rgba(11, 18, 32, 0.68);

    --line: #e5e7eb;
    --line-soft: rgba(180, 180, 180, 0.23);

    --primary: #1d4ed8;
    --primary2: #2c53c0;
    --primary3: #5b7cff;
    --primary4: #5594d4;

    --accent: #7c5cff;
    --accent2: #36d6ff;
    --accent3: #4338ca;
    --dark-accent: #3a2491;
    --accent-background: #eef2ff;

    --highlight-h: linear-gradient(90deg, rgba(124, 92, 255, 0.92), rgba(54, 214, 255, 0.88));
    --highlight-v: linear-gradient(180deg, rgba(124, 92, 255, 0.92), rgba(54, 214, 255, 0.88));

    --radius: 18px;
    --shadow: 0 18px 50px rgba(2, 6, 23, 0.1);
    --shadow2: 0 14px 34px rgba(2, 6, 23, 0.12);

    --container: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: 'NanumSquare', sans-serif;
}

html,
body {
    min-height: 100%;
    scrollbar-width: none;
    touch-action: manipulation;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(1200px 700px at 20% -10%, rgba(124, 92, 255, 0.28), transparent 60%),
        radial-gradient(900px 600px at 90% 0%, rgba(54, 214, 255, 0.18), transparent 55%),
        var(--bg);
}

a.link {
    color: var(--primary2);
    text-decoration: none;
    font-weight: 500;
}

a.link:hover {
    /* color: var(--primary2); */
    text-decoration: underline;
    text-underline-offset: 4px;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 3px;
}

ol, ul {
    padding-left: 1.5rem;
}

/* =========================================================
   COMMON LAYOUT
========================================================= */
.container {
    width: min(var(--container), calc(100% - 40px));
    margin: 0 auto;
    padding: 0;
}

.section-title {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 28px);
    letter-spacing: -0.02em;
}

.menu-section {
    position: relative;
    background:
        radial-gradient(900px 500px at 10% 25%, rgba(124, 92, 255, 0.1), transparent 60%),
        radial-gradient(200px 200px at 40% 120px, rgba(117, 131, 255, 0.1), transparent 60%),
        radial-gradient(1000px 800px at 90% 20%, rgba(29, 78, 216, 0.1), transparent 60%),
        radial-gradient(1000px 1000px at 60% 60%, rgba(29, 78, 216, 0.1), transparent 60%),
        radial-gradient(1200px 200px at 40% 95%, rgba(124, 92, 255, 0.1), transparent 60%);
}

.menu-hero {
    max-width: var(--container);
    margin: 0 auto;
    padding: 72px clamp(20px, 2vw, 30px) 50px;
}

.menu-hero h2 {
    font-family: 'Nanum Gothic', 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    font-weight: 700;
    margin: 0;
    font-size: clamp(28px, 3vw, 35px);
    text-align: center;
}

.menu-hero-sub {
    margin-top: 18px;
    padding: 0 25px;
    text-align: center;
    font-size: clamp(14px, 2vw, 18px);
}

.menu-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 56px clamp(20px, 2vw, 30px);
}

.menu-content .container {
    width: 100%;
    max-width: var(--container);
}

/* =========================================================
   BUTTONS
========================================================= */
.btn {
    border: 1px solid #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    font-size: clamp(14px, 3vw, 18px);
    padding: clamp(5px, 2vh, 10px) clamp(10px, 5vh, 20px);
}

.btn:hover {
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.92), rgba(54, 214, 255, 0.88));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-color: var(--accent);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.08);
    text-decoration: none;
}

.btn-ghost {
    background: rgba(2, 6, 23, 0.02);
}

.btn-lg {
    font-size: clamp(18px, 3vw, 24px);
    padding: clamp(5px, 2vh, 10px) clamp(20px, 5vh, 30px);
    border-radius: 14px;
}

.btn-rounded {
    border-radius: 999px;
}

.theme-btn {
    position: relative;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    transition: opacity 0.3s ease;
}

.theme-btn:hover {
    color: rgba(255, 255, 255, 0);
    border-color: var(--accent);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.08);
    text-decoration: none;
}

.theme-btn:hover::before {
    opacity: 0;
}

/* =========================================================
   HEADER / NAV
========================================================= */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
}

header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background: linear-gradient(180deg,#ffffff 10%,rgba(255, 255, 255, 0.9) 40%,rgba(255, 255, 255, 0.8) 60%,rgba(255, 255, 255, 0) 100%);

    opacity: 0;
    transition: opacity 0.25s ease;
}

header.scrolled::before {
    opacity: 1;
}

.header-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 30px;
}

.left-section {
    min-width: 0;
}

.right-section {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.5;
}

.logo svg {
    width: 50px;
    height: 50px;
}

.logo-main {
    /* fill: #222; */
    /* stroke: #222; */
    color: #222;
}

.lab-name {
    display: none;
}

.navigation a {
    font-family: 'Nanum Gothic', 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    font-size: 15px;
    color: #777;
    letter-spacing: 0.02em;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.navigation a:hover {
    opacity: 0.5;
}

.nav-desktop a {
    position: relative;
    margin-left: 20px;
    text-decoration: none;
    color: #444;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    width: 25px;
    height: 25px;
    padding: 0;

    border: none;
    background: none;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;

    background: #333333;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.nav-mobile {
    display: none;
}

/* =========================================================
   HOME — HERO
========================================================= */
.hero {
    position: relative;
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 350px;
    max-height: 500px;
    aspect-ratio: 16 / 7;

    padding: 68px clamp(28px, 0vh, 48px) clamp(40px, 5vh, 64px);
    overflow-x: clip;
}

.hero::after {
    content: "";
    position: absolute;
    inset: -40% -20%;
    transform: rotate(10deg);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: 920px;
}

.hero-title {
    margin: 0 0 12px;
    font-size: clamp(26px, 4.6vw, 50px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero-title-blue {
    color: #2c53c0;
}

.hero-subtitle {
    max-width: 72ch;
    color: var(--muted);
    font-size: clamp(14px, 1.85vw, 18px);
    line-height: 1.65;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.highlight {
    background: linear-gradient(90deg, rgba(124, 92, 255, 0.92), rgba(54, 214, 255, 0.88));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* =========================================================
   HOME — RESEARCH SLIDER
========================================================= */
.research {
    padding: 0 0 62px;
}

.fullbleed {
    width: 100%;
    max-width: 1400px;
    margin: 0;
}

.research-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 15px;
}

.slider-controls {
    display: flex;
    gap: 20px;
}

.slider-btn {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.slider-btn svg {
    color: black;
    display: block;
    width: 20px;
    height: 20px;
    transition: opacity 0.12s ease;
}

.slider-btn svg:hover {
    opacity: 0.6;
}

.research-slider {
    display: grid;
    grid-auto-flow: column;
    gap: 14px;
    grid-auto-columns: 48%;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 20px;

    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.research-slider.dragging{
    cursor: grabbing;
}

/* .research-slider::-webkit-scrollbar {
    height: 10px;
}

.research-slider::-webkit-scrollbar-thumb {
    background: rgba(2, 6, 23, 0.12);
    border-radius: 999px;
}

.research-slider::-webkit-scrollbar-track {
    background: rgba(2, 6, 23, 0.05);
    border-radius: 999px;
} */

.banner{
    display:flex;
    flex-direction:column;
    justify-content:space-between;

    min-height:260px;

    padding:clamp(20px,3vw,32px);

    /* background:#fff; */
    border:1px solid var(--line);
    border-radius: 10px;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.banner:hover{
    transform:translateY(-4px);
    box-shadow:0 8px 24px rgba(15, 23, 42,.04);
    border-color:#d8d8d8;
}

.banner-title{
    margin:0;
    font-size:clamp(22px,2.4vw,30px);
    line-height:1.15;
    letter-spacing:-.03em;
}

.banner-desc{
    margin-top:16px;
    color:var(--muted);
    font-size:clamp(14px,1.2vw,16px);
    line-height:1.7;
}

.banner-divider{
    width:52px;
    height:1px;
    background:#d9dde6;
    margin:22px 0;
}

.banner-list{
    margin:0;
    padding-left:18px;
    font-size:clamp(13px,1vw,15px);
    line-height:1.9;
}

.banner-link{
    margin-top:auto;
    padding-top:28px;

    color:#222;
    text-decoration:none;
    font-weight:600;
}

.banner:hover .banner-link{
    color:var(--accent);
}


/* =========================================================
   HOME — JOIN US
========================================================= */
.joinus {
    margin: 20px 0;
    padding: 50px 30px 50px;

    text-align: center;
    border-top: 1px solid var(--line);

    background:
        radial-gradient(1000px 520px at 80% 0%, rgba(29, 78, 216, 0.08), transparent 60%),
        radial-gradient(820px 520px at 20% 10%, rgba(124, 92, 255, 0.1), transparent 60%);
}

.joinus-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: center;
}

.joinus-desc {
    padding: 30px 0;
}

/* =========================================================
   FOOTER
========================================================= */
.footer-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 50px;

    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas:
        "logo logo logo"
        "nav  addr  hours";
    gap: 24px 48px;
    align-items: start;
}

.footer-left {
    display: contents;
}

.footer-logo-text { grid-area: logo; }
.nav-footer       { grid-area: nav; }
.footer-addr      { grid-area: addr; }
.footer-hours     { grid-area: hours; }

.footer-addr,
.footer-hours {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.nav-footer p {
    font-size: 13px;
}

.nav-footer p + p {
    margin-top: 12px;
}

.footer-bottom {
    padding: 20px 0 30px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

a.footer-link {
    color: var(--muted);
    text-decoration: none;
}

/* =========================================================
   TOP BUTTON
========================================================= */
.top-btn {
    position: fixed;
    right: 40px;
    bottom: 35px;
    z-index: 1000;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 999px;
    background: #111827;
    cursor: pointer;

    box-shadow: 0 5px 10px rgba(15, 23, 42, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.top-btn svg {
    display: block;
    width: 15px;
    height: 15px;
    margin: 0 auto;
}

.top-btn svg path {
    fill: #ffffff;
}

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

.top-btn:hover {
    background: #1f2937;
}

/* =========================================================
   ERROR PAGE
========================================================= */
.error-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

.error-section h2 {
    font-family: 'Nanum Gothic', 'Pretendard', 'Apple SD Gothic Neo', sans-serif;
    font-weight: 700;
    margin: 0;
    font-size: clamp(28px, 3vw, 35px);
    text-align: center;
}

.error-name {
    margin-top: 15px;
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 600;
}

.error-desc {
    color: #555555;
    margin-top: 18px;
    padding: 0 25px;
    text-align: center;
    font-size: clamp(15px, 2vw, 18px);
}

.error-go-home {
    margin-top: 50px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (min-width: 900px) {
    .fullbleed {
        margin: 0 auto;
    }

    .banner {
        min-height: 240px;
    }

    .banner-text {
        padding: 32px 28px;
    }

    .banner-title {
        font-size: 28px;
    }

    .banner-desc {
        font-size: 16px;
    }
}

@media (max-width: 900px) {
    .header-container {
        padding: 10px 15px;
    }

    .header-container:has(.nav-mobile.open) {
        padding-bottom: 30px;
        background: linear-gradient(180deg,#ffffff 90%,rgba(255, 255, 255, 0.9) 95%,rgba(255, 255, 255, 0) 100%);
    }

    .logo,
    .logo:hover {
        color: var(--text);
        text-decoration: none;
    }

    .lab-name {
        display: block;
        font-size: 13px;
    }

    .nav-desktop {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-mobile {
        display: block;
        width: 100%;
        max-height: 0;

        overflow: hidden;
        opacity: 0;
        transform: translateY(-8px);

        border-top: 1px solid transparent;
        transition:
            max-height 0.4s ease,
            opacity 0.3s ease,
            transform 0.3s ease;
    }

    .nav-mobile.open {
        max-height: 420px;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-mobile-inner {
        padding: 8px 0 4px;
    }

    .nav-mobile a {
        display: block;
        padding: 10px 8px;
        line-height: 1.35;
        text-decoration: none;
        transition: color 0.15s ease, padding-left 0.15s ease;
        color: #444;
    }

    .nav-mobile a + a {
        border-top: 1px solid #f1f5f9;
    }

    .nav-mobile a:hover {
        opacity: 0.6;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "left addr"
            "left hours";
        gap: 24px 48px;
        padding: 40px 30px 50px;
    }

    .footer-left {
        display: flex;
        flex-direction: column;
        gap: 15px;
        grid-area: left;
    }

    .nav-footer {
        padding: 0;
    }

    .footer-bottom {
        font-size: 8px;
    }

    .top-btn {
        right: 25px;
        bottom: 25px;
        width: 40px;
        height: 40px;
    }

    .top-btn svg {
        width: 12px;
        height: 12px;
    }

    .banner{
        min-height:220px;
    }

    .banner-title{
        font-size:24px;
    }

    .banner-divider{
        margin:18px 0;
    }

    .banner-link{
        padding-top:20px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 320px;
        max-height: none;
        aspect-ratio: auto;
        align-items: flex-start;
    }

    .hero-title {
        font-size: clamp(24px, 7vw, 34px);
        line-height: 1.14;
    }

    .hero-subtitle {
        font-size: 14px;
        line-height: 1.6;
    }

    .footer-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "left"
            "addr"
            "hours";
        gap: 28px;
        padding: 45px 20px 40px;
    }

    .research-slider {
        grid-auto-columns: 92%;
        cursor: grab;
    }

    /* .research-slider.dragging{
        cursor: grabbing;
        scroll-snap-type: none;
        scroll-behavior: auto;
    } */

    .banner{
        min-height:auto;
        padding:22px;
    }

    .banner-title{
        font-size:21px;
    }

    .banner-desc{
        margin-top:12px;
    }

    .banner-list{
        line-height:1.7;
    }
    
    .logo svg {
        width: 40px;
        height: 40px;
    }
        
    .footer-addr,
    .footer-hours {
        font-size: 12px;
    }
}

.fu-container {
    opacity: 0;
    animation: containerFadeUp 0.45s ease forwards;
    animation-delay: var(--delay, 0ms);
}

@keyframes containerFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}