/* ==========================================================================
   1. Variables & Reset
   ========================================================================== */
:root {
    --primary-blue: #002B55; /* RSC Blue (Darker/Richer) */
    --accent-red: #D20010;   /* Nankodo Red (Slightly deeper) */
    --text-main: #050505;    /* Almost Black for main text */
    --text-sub: #333333;     /* Dark Gray for sub text */
    --bg-base: #E8EDF2;      /* Deeper grayish-blue background */
    
    /* Background Blobs Colors */
    --blob-1: #dbeafe; 
    --blob-2: #ffe4e6; 
    --blob-3: #d1fae5; 
}

html { 
    scroll-behavior: smooth; 
}

* { 
    box-sizing: border-box; 
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-base);
    line-height: 1.9;
    font-size: 18px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. Ambient Background (背景のぼやけた色)
   ========================================================================== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 0% 0%, var(--blob-1) 0%, transparent 60%),
                radial-gradient(circle at 100% 0%, var(--blob-2) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, var(--blob-1) 0%, transparent 60%),
                radial-gradient(circle at 0% 100%, var(--blob-3) 0%, transparent 60%);
    filter: blur(80px);
    opacity: 0.6;
}

/* ==========================================================================
   3. Typography & UI Components
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: 'Zen Old Mincho', serif;
    margin-top: 0;
    font-weight: 700;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 2.4rem;
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
}

.subtitle {
    color: var(--text-sub);
    margin-bottom: 2.5rem;
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: all 0.3s ease; 
}

.container {
    max-width: 1280px; 
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

/* Button Style */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 16px 45px;
    background: var(--accent-red);
    color: #fff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(210, 0, 16, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.05em;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(210, 0, 16, 0.4);
}
.btn i { margin-left: 12px; }

/* ==========================================================================
   4. Header
   ========================================================================== */
header {
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    /* 背景を白(透過92%)に設定し、ロゴが見やすいようにする */
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: background 0.3s ease, padding 0.3s ease;
}

/* スクロール時の変化（JSで制御） */
header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 10px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ロゴ画像のスタイル */
.header-logo {
    height: 40px; /* ロゴの高さ */
    width: auto;
    display: block;
}

.divider { 
    height: 24px; 
    width: 2px; 
    background: #999; 
}

.nav-menu {
    display: flex;
    gap: 40px;
}
.nav-menu a {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-sub);
    position: relative;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -6px;
    left: 0;
    background-color: var(--accent-red);
    transition: width 0.3s ease;
}
.nav-menu a:hover { color: var(--primary-blue); }
.nav-menu a:hover::after { width: 100%; }

/* ==========================================================================
   5. Hero Section
   ========================================================================== */
.hero {
    /* 余白調整: 上下を詰めてコンパクトに */
    padding: 150px 0 80px;
    display: flex;
    align-items: center;
    position: relative;
    min-height: 85vh; 
}

.hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hero-content {
    width: 60%;
    padding-right: 40px;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.15;
    color: var(--primary-blue);
    margin-bottom: 30px;
    text-align: left;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-sub);
    margin-bottom: 20px;
    text-align: left;
    font-weight: 500;
    line-height: 1.8;
}

.hero p:last-of-type {
    margin-bottom: 50px;
}

.hero-image-area {
    width: 40%;
    height: 500px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
    backdrop-filter: blur(30px);
    border-radius: 40px;
    transform: rotate(-5deg);
    box-shadow: 0 30px 80px rgba(0, 43, 85, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Zen Old Mincho', serif;
    font-size: 12rem;
    color: rgba(0, 43, 85, 0.05);
    font-weight: 900;
    overflow: hidden;
}
.hero-visual::before { content: 'RSC'; }

/* ==========================================================================
   6. Sections General
   ========================================================================== */
.section { 
    /* 余白調整: 80px -> 50px に短縮 */
    padding: 50px 0;
    position: relative; 
}

.disciplines-intro {
    text-align: center;
    margin-bottom: 50px;
}

.disciplines-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;
    margin: 40px auto 0;
}
.discipline-pill {
    padding: 16px 32px;
    background: #fff;
    border: 1px solid rgba(0, 43, 85, 0.2);
    border-radius: 50px;
    color: var(--text-sub);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: default; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-item {
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: var(--primary-blue);
}
.feature-icon {
    width: 60px; height: 60px;
    background: rgba(0, 43, 85, 0.08);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-blue);
    font-size: 1.8rem;
    margin-bottom: 25px;
}
.feature-item h3 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
}
.feature-item p {
    color: var(--text-sub);
    font-size: 1.1rem;
}

/* ==========================================================================
   7. Book Showcase
   ========================================================================== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.book-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.book-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
}

/* 画像エリアの設定 */
.book-image-box {
    width: 100%;
    /* 縦長になりすぎないよう高さを260pxに設定 */
    height: 260px;
    background: #f9f9f9;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0; 
    /* Flexboxで画像を中央に配置 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 画像自体の設定 */
.book-image-box img {
    /* 横幅40%で表示し、余白を持たせる */
    width: 40%; 
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.book-info { padding: 25px; flex-grow: 1; }
.book-category {
    font-size: 0.8rem; 
    color: var(--accent-red); 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.05em;
}
.book-name {
    font-size: 1.15rem; 
    font-weight: 700; 
    color: var(--text-main); 
    margin: 10px 0 5px; 
    line-height: 1.4;
    font-family: 'Zen Old Mincho', serif;
}

/* ==========================================================================
   8. Pricing
   ========================================================================== */
.pricing-card {
    background: #fff; 
    border-radius: 12px; 
    padding: 60px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); 
    position: relative; 
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}
.pricing-card::before {
    content: ''; 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 6px;
    background: var(--primary-blue);
}

/* 対象ユーザーのバッジスタイル */
.pricing-target {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.badge {
    background-color: var(--primary-blue);
    color: #fff;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 4px;
    font-weight: 700;
}

/* テーブルスタイル */
.modern-table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 700px; 
}
.modern-table th {
    text-align: left; 
    padding: 20px 15px; /* パディング調整 */
    color: var(--text-sub);
    font-size: 1rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.05em; 
    border-bottom: 2px solid #ddd;
}
.modern-table td { 
    padding: 25px 15px; /* パディング調整 */
    border-bottom: 1px solid #eee; 
    color: var(--text-main); 
    font-weight: 500; 
    font-size: 1.1rem; 
}

/* 価格強調・取り消し線 */
.price-highlight { 
    color: var(--accent-red); 
    font-weight: 800; 
    font-size: 1.3rem; 
    font-family: 'Zen Old Mincho', serif; 
}
.price-strike {
    text-decoration: line-through;
    color: #aaa;
    font-size: 0.95rem;
}

.pricing-note {
    margin-top: 30px; 
    padding: 25px; 
    background: #f5f7f9; 
    border-radius: 8px;
    font-size: 1rem; 
    color: var(--text-sub); 
    display: flex; 
    gap: 15px; 
    align-items: flex-start;
}

/* ==========================================================================
   9. Contact
   ========================================================================== */
.contact-section { 
    padding: 60px 0 80px;
    text-align: center; 
}
.contact-floater {
    width: 100%;
    margin: 0 auto;
    background: linear-gradient(135deg, #002B55 0%, #001A33 100%);
    color: #fff;
    padding: 80px 60px; 
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 43, 85, 0.3);
    position: relative;
    overflow: hidden;
}

.contact-floater h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 900;
}

.contact-floater p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    margin-bottom: 3rem;
    font-weight: 500;
}

.contact-link {
    font-size: 2rem; 
    font-weight: 700; 
    color: #fff; 
    border-bottom: 2px solid rgba(255,255,255,0.4); 
    padding-bottom: 5px;
    transition: all 0.3s;
    font-family: 'Noto Sans JP', sans-serif;
}
.contact-link:hover {
    color: #fff;
    border-color: #fff;
    opacity: 0.8;
}

.contact-dept { 
    font-size: 1.1rem; 
    color: rgba(255, 255, 255, 0.7); 
    font-weight: 500;
    margin-top: 20px; 
}

.rsc-external-link {
    margin-top: 50px; font-size: 1rem;
}
.rsc-external-link a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
}
.rsc-external-link a:hover { color: #fff; }

/* ==========================================================================
   10. Footer & Back to Top
   ========================================================================== */
footer { 
    text-align: center; 
    padding: 50px 0; 
    color: var(--text-sub); 
    font-size: 0.9rem; 
    background-color: #dce2e8;
}

#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    opacity: 0; 
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    border: none;
}
#back-to-top:hover {
    background-color: var(--accent-red);
    transform: translateY(-5px);
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   11. Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .hero .container { flex-direction: column; }
    .hero-content { width: 100%; padding-right: 0; margin-bottom: 40px; }
    .hero-image-area { width: 100%; height: 300px; }
    .hero-visual { transform: none; right: 0; left: 0; width: 100%; height: 100%; border-radius: 20px; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .hero h1 { font-size: 2.2rem; }
    .header-inner { flex-direction: column; gap: 15px; align-items: flex-start; }
    .nav-menu { gap: 15px; font-size: 0.9rem; flex-wrap: wrap; justify-content: flex-start; }
    .feature-item, .pricing-card, .contact-floater { padding: 30px 20px; }
    .btn { width: 100%; justify-content: center; }
    .modern-table th, .modern-table td { padding: 15px 10px; font-size: 0.9rem; }
    .contact-link { font-size: 1.4rem; word-break: break-all; }
    .contact-floater h2 { font-size: 2rem; }
    #back-to-top { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 1.2rem; }
    
    .pricing-target { font-size: 1rem; }
}