/* Blog styles for jihankiatlas.com/blog.
 * Self-contained (own tokens) so the blog pages scroll normally and
 * don't inherit the map app's fixed-shell overflow:hidden. Brutalist
 * Atlas aesthetic: paper background, hard ink borders, pink accents. */

:root {
    --ink: #16131f;
    --paper: #fff7df;
    --panel: #fffdf5;
    --muted: #6d657a;
    --line: #16131f;
    --pink: #ff4fab;
    --cyan: #10c7ff;
    --yellow: #ffd84d;
}

* { box-sizing: border-box; }

.blog-body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, "Noto Sans JP", system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---- Nav ---- */
.blog-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: var(--panel);
    border-bottom: 3px solid var(--ink);
}

.blog-nav-logo {
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 0.04em;
    color: var(--ink);
    text-decoration: none;
}

.blog-nav-links {
    display: flex;
    gap: 8px;
}

.blog-nav-links a {
    padding: 6px 12px;
    border: 2px solid var(--ink);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.blog-nav-links a[aria-current="page"] {
    background: var(--pink);
    color: #fff;
    box-shadow: 2px 2px 0 var(--ink);
}

.blog-nav-links a:hover { background: var(--yellow); }
.blog-nav-links a[aria-current="page"]:hover { background: var(--ink); }

/* ---- Index ---- */
.blog-index {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 64px;
}

.blog-index-title {
    font-size: clamp(2rem, 7vw, 3.2rem);
    font-weight: 900;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.blog-index-sub {
    color: var(--muted);
    margin: 0 0 32px;
    font-size: 1.05rem;
}

.blog-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.blog-index-card {
    display: flex;
    flex-direction: column;
    border: 3px solid var(--ink);
    background: var(--panel);
    text-decoration: none;
    color: var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    overflow: hidden;
}

.blog-index-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--ink);
}

.bic-image {
    display: block;
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    background-color: #16131f;
    border-bottom: 3px solid var(--ink);
}

.bic-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.bic-eyebrow { font-size: 0.68rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pink); }
.bic-title { font-size: 1.2rem; font-weight: 800; line-height: 1.25; }
.bic-dek { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.bic-meta { margin-top: 4px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }

/* ---- Post ---- */
.blog-post {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 20px 56px;
}

.blog-back {
    display: inline-block;
    margin-bottom: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}
.blog-back:hover { color: var(--ink); }

.blog-eyebrow {
    margin: 0 0 8px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pink);
}

.blog-title {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
}

.blog-dek {
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 16px;
}

.blog-byline {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin: 0 0 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--line);
}

.blog-hero {
    margin: 0 0 28px;
    border: 3px solid var(--ink);
    box-shadow: 6px 6px 0 var(--ink);
}

.blog-hero img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    background: #16131f;
}

.blog-hero figcaption {
    padding: 7px 12px;
    border-top: 2px solid var(--ink);
    background: var(--yellow);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink);
}

.blog-content { font-size: 1.12rem; }
.blog-content p { margin: 0 0 1.25em; }
.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 1.8em 0 0.5em;
    letter-spacing: -0.01em;
}
.blog-content a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--pink);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
    font-weight: 600;
}
.blog-content a:hover { background: var(--yellow); }

/* Inline product figures (e.g. the ice cream guide). Same brutalist
 * frame as the hero, sized for in-flow placement. */
.blog-content figure {
    margin: 1.6em 0;
    border: 3px solid var(--ink);
    box-shadow: 5px 5px 0 var(--ink);
}
.blog-content figure img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #16131f;
}
.blog-content figcaption {
    padding: 7px 12px;
    border-top: 2px solid var(--ink);
    background: var(--yellow);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink);
}

/* Portrait product shots (bottles/cans): a smaller centered card that
 * shows the whole product at its natural ratio, no crop. */
.blog-content figure.bottle {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}
.blog-content figure.bottle img {
    aspect-ratio: auto;
    height: auto;
    background: var(--panel);
}

/* ---- Machines in this story ---- */
.blog-machines {
    margin-top: 44px;
    padding-top: 28px;
    border-top: 3px solid var(--ink);
}

.blog-machines-label {
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 16px;
}

.blog-machines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.blog-machine-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 2px solid var(--ink);
    background: var(--panel);
    text-decoration: none;
    color: var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.blog-machine-card:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }

.bm-thumb {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    background-size: cover;
    background-position: center;
    background-color: #16131f;
    border: 2px solid var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bm-thumb-empty { background: var(--yellow); font-size: 1.2rem; }

.bm-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bm-body strong { font-size: 0.9rem; font-weight: 800; line-height: 1.2; }
.bm-meta { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 700; }

/* ---- Footer ---- */
.blog-foot {
    border-top: 3px solid var(--ink);
    background: var(--panel);
    padding: 36px 20px 48px;
    text-align: center;
}

.blog-foot-cta {
    display: inline-block;
    padding: 12px 22px;
    border: 3px solid var(--ink);
    background: var(--pink);
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--ink);
}
.blog-foot-cta:hover { background: var(--ink); }

.blog-foot-sub {
    margin: 20px auto 0;
    max-width: 480px;
    font-size: 0.9rem;
    color: var(--muted);
}
.blog-foot-sub a { color: var(--ink); font-weight: 700; }

@media (max-width: 520px) {
    .blog-index-grid { grid-template-columns: 1fr; }
    .blog-machines-grid { grid-template-columns: 1fr; }
}
