/* ============================================
   Blue Lab - Upside Blue Lab Theme
   BLUE LEAF Design Format
   Elegant Serif — inspired by European club identity
   ============================================ */

:root {
    --bl-navy: #1a2e5a;
    --bl-navy-dark: #0f1d3d;
    --bl-navy-light: #2a4a8a;
    --bl-blue: #2e5090;
    --bl-gold: #c5a55a;
    --bl-gold-light: #d4bc7c;
    --bl-sky: #edf2f8;
    --bl-leaf: #e4ecf4;
    --bl-leaf-line: #c8d6e5;
    --bl-white: #ffffff;
    --bl-cream: #fafaf7;
    --bl-gray-50: #f7f8fa;
    --bl-gray-100: #eef0f4;
    --bl-gray-200: #dde1e8;
    --bl-gray-400: #8e95a2;
    --bl-gray-600: #5a6170;
    --bl-gray-800: #2c3040;
    --bl-text: #1c1f2a;
    --bl-text-light: #4a5060;

    --font-serif: 'Playfair Display', 'Noto Serif JP', 'Yu Mincho', 'Georgia', serif;
    --font-body: 'Noto Serif JP', 'Yu Mincho', 'Georgia', serif;
    --font-ui: 'Inter', 'Noto Sans JP', -apple-system, sans-serif;

    --max-width: 1140px;
    --header-height: 66px;
}

/* ============ Reset ============ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--bl-text);
    background: var(--bl-cream);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--bl-navy); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--bl-gold); }
img { max-width: 100%; height: auto; display: block; }

/* ============ Header ============ */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bl-navy-dark);
    height: var(--header-height);
    overflow: visible;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo { display: flex; align-items: center; }
.logo-img {
    height: 36px;
    width: auto;
    filter: brightness(0) invert(1);
}
.site-header .logo-img {
    height: 32px;
    width: auto;
    max-height: none;
    object-fit: initial;
}

.main-nav { display: flex; gap: 36px; }
.nav-link {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.3s;
}
.nav-link:hover { color: var(--bl-gold); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
}

/* ============ Main ============ */

.site-main { margin-top: var(--header-height); }
.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* ============ Hero ============ */

.hero {
    background: var(--bl-navy-dark);
    color: var(--bl-white);
    padding: 140px 32px 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Carousel background */
.hero-carousel {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
}

.hero-carousel-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-carousel-slide.active {
    opacity: 1;
}

.hero-carousel-slide video,
.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(15, 29, 61, 0.72) 0%,
        rgba(15, 29, 61, 0.55) 50%,
        rgba(15, 29, 61, 0.8) 100%
    );
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(42, 74, 138, 0.3) 0%, transparent 70%);
    z-index: 2;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.hero-badge { margin-bottom: 0; }
.hero-logo {
    height: auto;
    width: 200px;
    margin: 0 auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.hero-statement {
    font-family: var(--font-serif);
    font-size: 2.75rem;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 28px;
    letter-spacing: 0.04em;
}

.hero-lead {
    font-family: var(--font-body);
    font-size: 0.95rem;
    opacity: 0.6;
    line-height: 2;
    letter-spacing: 0.03em;
}

/* ============ Section Titles ============ */

.section-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--bl-navy);
    text-align: center;
    letter-spacing: 0.2em;
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-ui);
    color: var(--bl-gray-400);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-top: 6px;
    margin-bottom: 48px;
    text-transform: uppercase;
}

/* ============ BLUE LEAF Notepad Header ============ */

.leaf-header-notepad {
    max-width: 480px;
    margin: 0 auto 48px;
    background: #dce8f4;
    border-radius: 6px;
    padding: 24px 32px 20px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.06);
    position: relative;
    overflow: hidden;
}

/* Watermark: logo mark as large faint background */
.notepad-watermark {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    height: 80px;
    width: auto;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.notepad-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.notepad-crest {
    height: 24px;
    width: auto;
    opacity: 0.6;
}

.notepad-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--bl-navy);
    letter-spacing: 0.15em;
    margin: 0;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.notepad-rule {
    height: 1px;
    background: var(--bl-leaf-line);
    margin-bottom: 8px;
}

.notepad-subtitle {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--bl-gray-400);
    text-transform: uppercase;
    margin: 0;
    text-align: center;
}

/* Ruled lines for notepad feel */
.notepad-rules {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notepad-rules .rule-line {
    height: 1px;
    background: var(--bl-leaf-line);
    opacity: 0.6;
}


/* ============ Divider (decorative) — replaced by notepad ============ */

.section-latest::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--bl-gold);
    margin: 0 auto 48px;
}

/* ============ Article Grid ============ */

.section-latest { padding: 80px 0 60px; }

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ============ BLUE LEAF Card — Letter Concept ============ */

.card-leaf {
    background: #fdfcf9;
    border: 1px solid #e8e4da;
    border-radius: 2px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    box-shadow: 0 1px 4px rgba(26, 46, 90, 0.04);
}

.card-leaf:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(26, 46, 90, 0.1);
}

.card-leaf-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Letterhead — crest + BLUE LEAF */
.card-letterhead {
    padding: 14px 22px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8e4da;
}

.letterhead-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.letterhead-crest {
    height: 20px;
    width: auto;
    opacity: 0.35;
}

.letterhead-title {
    font-family: var(--font-serif);
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--bl-navy);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Image */
.card-leaf-image {
    padding: 0;
    margin-bottom: 0;
    position: relative;
}

.card-leaf-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* Pen meta line */
.card-pen-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 10px;
    font-family: 'Caveat', 'Klee One', cursive, serif;
    font-size: 0.85rem;
    color: var(--bl-navy-light);
    line-height: 1.4;
}

.pen-icon {
    margin-right: 6px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.pen-label {
    font-weight: 400;
}

.pen-sep {
    margin: 0 5px;
    opacity: 0.4;
}

.pen-date {
    font-weight: 400;
    opacity: 0.7;
}

.placeholder-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(160deg, var(--bl-sky) 0%, var(--bl-leaf) 100%);
}

/* Card Body */
.card-leaf-body {
    padding: 16px 22px 12px;
}

/* (postmark + seal removed, replaced by typewriter bar) */

/* Title */
.card-title {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.65;
    margin-bottom: 8px;
    color: var(--bl-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Letter opening line */
.card-opening {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--bl-text-light);
    line-height: 1.8;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ruled lines — stationery feel */
.card-leaf-lines {
    padding: 4px 22px 18px;
}

.leaf-line {
    height: 1px;
    background: #ddd8cc;
    margin-bottom: 10px;
    opacity: 0.4;
}

/* ============ Category Grid ============ */

.section-categories {
    padding: 60px 0 80px;
    background: var(--bl-white);
    border-top: 1px solid var(--bl-gray-200);
    border-bottom: 1px solid var(--bl-gray-200);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    display: block;
    padding: 36px 24px;
    border: 1px solid var(--bl-gray-200);
    border-radius: 2px;
    background: var(--bl-white);
    color: var(--bl-text);
    transition: all 0.3s;
    text-decoration: none;
}

.category-card:hover {
    border-color: var(--bl-navy);
    background: var(--bl-navy);
    color: white;
    transform: translateY(-2px);
}

.cat-number {
    font-family: var(--font-serif);
    font-size: 0.7rem;
    color: var(--bl-gold);
    letter-spacing: 0.1em;
}

.cat-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    margin: 10px 0 4px;
    letter-spacing: 0.04em;
}

.cat-label {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: var(--bl-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 14px;
}

.category-card:hover .cat-label { color: rgba(255,255,255,0.6); }
.category-card:hover .cat-number { color: var(--bl-gold-light); }

.cat-desc {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--bl-text-light);
    line-height: 1.7;
}

.category-card:hover .cat-desc { color: rgba(255,255,255,0.8); }

/* ============ Statement ============ */

.section-statement {
    padding: 120px 32px;
    background: var(--bl-navy-dark);
    color: white;
    text-align: center;
}

.statement-block p {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 2.2;
    letter-spacing: 0.06em;
    opacity: 0.85;
}

/* ============ Single Article (BLUE LEAF) ============ */

.single-leaf {
    padding: 48px 0 80px;
    background: var(--bl-white);
}

.single-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 32px;
}

.leaf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--bl-leaf-line);
    margin-bottom: 36px;
}

.leaf-header-centered {
    text-align: center;
    margin-bottom: 36px;
}

.leaf-gold-line {
    width: 60px;
    height: 1px;
    background: var(--bl-gold);
    margin: 0 auto 24px;
}

.single-letterhead {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bl-leaf-line);
}

.single-letterhead .letterhead-crest {
    height: 20px;
    width: auto;
    opacity: 0.35;
}

.single-letterhead .letterhead-title {
    font-family: var(--font-serif);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--bl-navy);
    opacity: 0.5;
    text-transform: uppercase;
}

.article-header { margin-bottom: 36px; }

.article-header .card-pen-meta {
    margin-bottom: 14px;
}

.article-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 16px 0 18px;
    letter-spacing: 0.02em;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--bl-gray-400);
    letter-spacing: 0.03em;
}

.article-hero {
    margin: 0 -32px 36px;
}

.article-hero img {
    width: 100%;
}

.article-content {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 2;
    letter-spacing: 0.01em;
}

.article-content h2 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 400;
    margin: 56px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bl-leaf-line);
    color: var(--bl-navy);
    letter-spacing: 0.03em;
}

.article-content h3 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 400;
    margin: 40px 0 14px;
    color: var(--bl-navy);
}

.article-content p {
    margin-bottom: 22px;
}

.article-content img {
    margin: 28px 0;
}

.article-content blockquote {
    border-left: 3px solid var(--bl-gold);
    padding: 20px 28px;
    margin: 28px 0;
    background: var(--bl-sky);
    font-style: italic;
}

.leaf-lines-bottom {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--bl-leaf-line);
}

/* ============ Archive ============ */

.archive-page { padding: 60px 0 80px; }

.archive-header {
    text-align: center;
    margin-bottom: 52px;
}

.archive-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--bl-navy);
    letter-spacing: 0.05em;
}

.archive-desc {
    font-family: var(--font-body);
    color: var(--bl-gray-600);
    margin-top: 10px;
}

/* ============ Related ============ */

.section-related {
    padding: 60px 0 80px;
    background: var(--bl-gray-50);
}

/* ============ Footer ============ */

.site-footer {
    background: var(--bl-navy-dark);
    color: white;
    padding: 64px 0 40px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
    text-align: center;
}

.footer-logo {
    height: 28px;
    margin: 0 auto 16px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-size: 0.85rem;
    opacity: 0.45;
    margin-bottom: 28px;
    letter-spacing: 0.06em;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 36px;
}

.footer-links a {
    font-family: var(--font-ui);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--bl-gold); }

.footer-copy {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    opacity: 0.35;
    letter-spacing: 0.05em;
}

/* ============ Page ============ */

.page-content { padding: 60px 0 80px; }
.page-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    color: var(--bl-navy);
    margin-bottom: 36px;
}

/* ============ Responsive ============ */

@media (max-width: 768px) {
    .main-nav { display: none; }
    .nav-toggle { display: block; }

    .main-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bl-navy-dark);
        padding: 28px 32px;
        gap: 18px;
    }

    .hero { padding: 100px 24px 80px; }
    .hero-statement { font-size: 1.8rem; }

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

    .statement-block p { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr; }
}
