/* /assets/css/layout.css */

/* ===== Header (capsule) ===== */
.capsuleHeaderWrap {
    position: fixed;
    top: 18px;
    left: 0;
    right: 0;
    z-index: 50;
    pointer-events: none;
    transition: transform .35s var(--ease);
}

.capsuleHeader {
    pointer-events: auto;
    width: min(1320px, calc(100% - 56px));
    margin: 0 auto;
    height: 72px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px 0 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: height .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
    position: relative;
    z-index: 2;
}

.capsuleHeader::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 999px;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255, 46, 46, .18), rgba(255, 90, 90, .14));
    opacity: 0;
    transition: opacity .35s var(--ease);
    mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
    padding: 1px;
}

.capsuleHeader:hover::after {
    opacity: .55;
}

.headerCompact .capsuleHeader {
    height: 62px;
    box-shadow: var(--shadow2);
    transform: translateY(-2px);
}

.headerCompact .brand b {
    font-size: 16px;
}

.headerCompact .brand span {
    font-size: 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.brand .name {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand b {
    font-size: 18px;
    letter-spacing: .02em;
}

.brand span {
    font-size: 11px;
    color: var(--muted2);
    font-weight: 800;
    letter-spacing: .06em;
}

.nav {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.nav a {
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .04em;
    padding: 10px 12px;
    border-radius: 999px;
    transition: background .25s var(--ease), transform .25s var(--ease);
    color: #111;
}

.nav a:hover {
    background: #f6f6f6;
    transform: translateY(-1px);
}

.nav a:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.headerRight {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.pillBtn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 999px;
    border: 1px solid #dcdcdc;
    background: #fff;
    font-weight: 900;
    letter-spacing: .02em;
    cursor: pointer;
    transition: transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
    user-select: none;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.pillBtn:hover {
    transform: translateY(-2px);
    background: #fff;
    border-color: #d0d0d0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .06);
}

.pillBtn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.pillBtn.primary {
    border-color: rgba(255, 46, 46, .35);
    background: linear-gradient(135deg, rgba(255, 46, 46, .12), rgba(255, 90, 90, .10));
}

.menuBtn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
    position: relative;
    overflow: hidden;
}

.menuBtn:hover {
    transform: translateY(-1px);
    background: #fafafa;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .06);
}

.menuBtn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.menuIcon {
    width: 18px;
    height: 12px;
    position: relative;
}

.menuIcon span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: #111;
    opacity: .9;
}

.menuIcon span:nth-child(1) {
    top: 0;
}

.menuIcon span:nth-child(2) {
    top: 5px;
    opacity: .75;
}

.menuIcon span:nth-child(3) {
    top: 10px;
}

/* ===== TOP button ===== */
.toTop {
    position: fixed;
    right: 18px;
    top: 50%;
    width: 66px;
    height: 66px;
    border-radius: 999px;
    background: var(--orange2);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 18px 50px rgba(255, 90, 90, .26);
    z-index: 60;
    transition: transform .25s var(--ease), opacity .25s var(--ease);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(-50%);
}

.toTop:hover {
    transform: translateY(-50%) translateY(-2px);
}

.toTop svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #0b0b0b;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== Drawer ===== */
.drawer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 80;
    display: none;
}

.drawerPanel {
    width: min(520px, calc(100% - 24px));
    margin: 90px auto 0;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 26px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(10px);
    opacity: 0;
    transition: transform .35s var(--ease), opacity .35s var(--ease);
}

.drawer.isOpen .drawerPanel {
    transform: translateY(0);
    opacity: 1;
}

.drawerTop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #efefef;
}

.drawerTop b {
    font-weight: 1000;
}

.drawerLinks {
    padding: 10px;
}

.drawerLinks a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px;
    border-radius: 16px;
    font-weight: 1000;
    color: #111;
}

.drawerLinks a:hover {
    background: #f7f7f7;
}

.drawerLinks .mini {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--orange);
    box-shadow: 0 0 14px rgba(255, 46, 46, .35);
}

/* ===== Footer ===== */
footer {
    margin-top: 68px;
    padding: 54px 0 30px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.sitemap {
    width: min(1320px, calc(100% - 56px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
    align-items: start;
}

.col h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 1000;
    letter-spacing: .02em;
    display: inline-block;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--orange);
}

.col a {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #222;
    font-weight: 900;
    opacity: .92;
}

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

.footBottom {
    width: min(1320px, calc(100% - 56px));
    margin: 22px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    color: #666;
    font-size: 12px;
    flex-wrap: wrap;
}

/* ===== Responsive ===== */
@media (max-width:980px) {
    .capsuleHeader {
        height: 64px;
    }

    .nav {
        display: none;
    }

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

    /* mobile: toTop bottom right */
    .toTop {
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .toTop:hover {
        transform: translateY(-2px);
    }
}