/* 紙文具研究室 — サイドバー＋濃紺基調（既存サイトの暖色・カード型と差別化） */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy: #0c1222;
    --navy-mid: #151d32;
    --navy-soft: #1e2942;
    --gold: #d4a853;
    --gold-dim: #b8923f;
    --paper: #f4f1ea;
    --paper2: #e8e4db;
    --ink: #1a1f2e;
    --muted: #5c6478;
    --line: rgba(212, 168, 83, 0.22);
    --shadow: 0 24px 60px rgba(8, 12, 22, 0.35);
    --sidebar-w: 280px;
    --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: "Noto Sans JP", system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.75;
    font-size: 16px;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: "Shippori Mincho", "Noto Serif JP", serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.35;
}

a { color: var(--navy-soft); transition: color 0.2s var(--ease); }
a:hover { color: var(--gold-dim); }

.app {
    display: flex;
    min-height: 100vh;
}

/* —— サイドバー —— */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--paper);
    padding: 1.75rem 1.25rem;
    z-index: 300;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar__brand {
    font-family: "Shippori Mincho", serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--paper);
    text-decoration: none;
    line-height: 1.45;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
}
.sidebar__brand small {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.75;
    letter-spacing: 0.12em;
    margin-top: 0.35rem;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sidebar__a {
    display: block;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    color: rgba(244, 241, 234, 0.82);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: background 0.2s var(--ease), border-color 0.2s, color 0.2s;
}
.sidebar__a:hover {
    background: rgba(212, 168, 83, 0.12);
    color: var(--paper);
}
.sidebar__a.is-on {
    background: rgba(212, 168, 83, 0.18);
    border-left-color: var(--gold);
    color: var(--paper);
    font-weight: 500;
}

.sidebar__foot {
    margin-top: auto;
    font-size: 0.72rem;
    opacity: 0.55;
    line-height: 1.55;
}

.sidebar__toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 400;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: var(--navy);
    color: var(--gold);
    cursor: pointer;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.sidebar__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--paper);
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
}
.sidebar__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar__toggle.is-open span:nth-child(2) { opacity: 0; }
.sidebar__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* —— メイン —— */
.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-width: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    left: var(--sidebar-w);
    top: 0.5rem;
    z-index: 500;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    background: var(--gold);
    color: var(--navy);
}

/* —— ヒーロー —— */
.hero {
    position: relative;
    min-height: 42vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(12, 18, 34, 0.88) 0%, rgba(12, 18, 34, 0.35) 55%, transparent 100%);
}
.hero__inner {
    position: relative;
    max-width: 920px;
    padding: 2.75rem 2rem 3rem;
    color: var(--paper);
}
.hero__tag {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.75rem;
}
.hero__h1 {
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.hero__lead {
    font-size: 1rem;
    max-width: 52ch;
    opacity: 0.92;
    line-height: 1.85;
}

.content {
    max-width: 920px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
}

.section {
    margin-bottom: 3rem;
}
.section__h2 {
    font-size: 1.45rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gold);
    display: inline-block;
}
.section__lead {
    color: var(--muted);
    margin-bottom: 1.25rem;
    font-size: 0.98rem;
}

/* —— カード（角丸小さめ・左ボーダー） —— */
.grid-asym {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 720px) {
    .grid-asym {
        grid-template-columns: 1fr 1fr;
    }
    .grid-asym .card--wide {
        grid-column: 1 / -1;
    }
}

.card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(12, 18, 34, 0.08);
    border-left: 4px solid var(--gold);
    transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(12, 18, 34, 0.12);
}
.card__img-wrap { overflow: hidden; aspect-ratio: 16 / 10; }
.card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease);
}
.card:hover .card__img { transform: scale(1.04); }
.card__body { padding: 1.15rem 1.25rem 1.35rem; }
.card__h3 {
    font-size: 1.1rem;
    margin-bottom: 0.45rem;
}
.card__p { font-size: 0.92rem; color: var(--muted); }
.card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--navy-mid);
}
.card__link:hover { color: var(--gold-dim); }

/* —— ホーム：統計チップ —— */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0 0;
}
.stat {
    background: var(--paper2);
    padding: 1rem 1.35rem;
    border-radius: 4px;
    min-width: 120px;
    border-top: 3px solid var(--gold);
}
.stat__num {
    font-family: "Shippori Mincho", serif;
    font-size: 1.75rem;
    color: var(--navy-mid);
    line-height: 1;
}
.stat__lbl {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

/* —— 本文ページ —— */
.article p { margin-bottom: 1.1rem; }
.article ul, .article ol { margin: 0 0 1.1rem 1.25rem; }
.article li { margin-bottom: 0.45rem; }

.pull-quote {
    margin: 1.75rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--paper2);
    border-right: 4px solid var(--gold);
    font-family: "Shippori Mincho", serif;
    font-size: 1.05rem;
    color: var(--navy-mid);
}

/* —— タブ（レイアウトページ） —— */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.tabs__btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-family: inherit;
    font-size: 0.88rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tabs__btn:hover { border-color: var(--gold); color: var(--ink); }
.tabs__btn.is-active {
    background: var(--navy-mid);
    color: var(--paper);
    border-color: var(--navy-mid);
}
.tab-panel { display: none; animation: fadeIn 0.45s var(--ease); }
.tab-panel.is-active { display: block; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* —— ギャラリー —— */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}
.gallery-grid button {
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1;
    display: block;
}
.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s var(--ease);
}
.gallery-grid button:hover img { transform: scale(1.06); }
.gallery-grid button::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 2px rgba(212, 168, 83, 0.4);
    opacity: 0;
    transition: opacity 0.25s;
}
.gallery-grid button:hover::after { opacity: 1; }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(12, 18, 34, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img {
    max-width: min(920px, 100%);
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: var(--shadow);
}
.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

/* —— お問い合わせ —— */
.contact-box {
    background: #fff;
    padding: 2rem;
    border-radius: 4px;
    border-left: 4px solid var(--gold);
    box-shadow: 0 8px 32px rgba(12, 18, 34, 0.08);
}
.contact-box a.email-link { font-weight: 500; word-break: break-all; }

/* —— フッター —— */
.site-ft {
    max-width: 920px;
    margin: 0 auto;
    padding: 2rem;
    border-top: 1px solid rgba(12, 18, 34, 0.08);
    font-size: 0.8rem;
    color: var(--muted);
}

/* —— 上へ戻る —— */
.to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--navy-mid);
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.25s;
    z-index: 250;
    box-shadow: var(--shadow);
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-3px); }

/* —— 表示アニメ —— */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal.is-inview {
    opacity: 1;
    transform: none;
}

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.35s var(--ease);
        box-shadow: none;
    }
    .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow); }
    .main-wrap { margin-left: 0; }
    .sidebar__toggle { display: flex; }
    .hero__inner { padding-top: 4rem; }
}
