/*
Theme Name: OGAWA MFG. NOTES
Theme URI: https://ogawa-mfg.jp/
Author: OGAWA MFG.
Description: 小川製作所のための、写真を主役にしたシンプルなジャーナル・ブログテーマ。
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: ogawa-mfg
*/

:root {
    --ink: #172b40;
    --ink-soft: #33485d;
    --blue: #2d6f9f;
    --paper: #f5f6f7;
    --line: #e2e6e9;
    --muted: #7a8792;
    --white: #fff;
    --content: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    font-size: 15px;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { display: inline-flex; flex-direction: column; line-height: 1.2; }
.brand-name {
    color: var(--ink);
    font-size: 25px;
    font-weight: 850;
    letter-spacing: .055em;
}
.brand-tagline {
    margin-top: 7px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .19em;
}
.header-side { display: flex; align-items: center; gap: 22px; }
.header-note {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .08em;
}
.category-nav { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.category-nav a {
    color: #637180;
    font-size: 12px;
    font-weight: 650;
}
.category-nav a:hover { color: var(--blue); }
main { flex: 1; }
.page-intro { padding: 52px 0 30px; }
.page-kicker {
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .2em;
}
.page-title {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: clamp(27px, 4vw, 39px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.35;
}
.page-description { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 24px;
    padding: 12px 0 76px;
}
.post-card { min-width: 0; }
.post-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 1.48 / 1;
    background: #e5e9ec;
}
.post-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.post-card:hover .post-card-image img { transform: scale(1.035); }
.post-card-placeholder {
    width: 100%; height: 100%;
    display: grid; place-items: center;
    color: #9aa5ae; font-size: 11px; letter-spacing: .16em;
}
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: .04em;
}
.post-category {
    color: var(--blue);
    font-weight: 750;
}
.post-card-title {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 750;
    line-height: 1.55;
}
.post-card-title a:hover { color: var(--blue); }
.post-excerpt {
    margin: 8px 0 0;
    color: #6d7984;
    font-size: 12px;
    line-height: 1.8;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 0 0 76px;
}
.pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink-soft);
    font-size: 12px;
}
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination a:hover { border-color: var(--blue); color: var(--blue); }
.no-posts {
    padding: 55px 20px 90px;
    text-align: center;
    color: var(--muted);
}
.article-wrap { width: min(820px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 90px; }
.article-header { margin-bottom: 30px; }
.article-title {
    margin: 12px 0 0;
    color: var(--ink);
    font-size: clamp(27px, 4.5vw, 42px);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -.03em;
}
.article-thumbnail { margin: 0 0 36px; }
.article-thumbnail img { display: block; width: 100%; height: auto; }
.entry-content { color: #344657; font-size: 15px; line-height: 2.05; overflow-wrap: anywhere; }
.entry-content > * { margin-top: 0; margin-bottom: 1.5em; }
.entry-content h2, .entry-content h3, .entry-content h4 {
    color: var(--ink); line-height: 1.5; margin-top: 2.2em;
}
.entry-content h2 { padding-bottom: .45em; border-bottom: 1px solid var(--line); font-size: 25px; }
.entry-content h3 { font-size: 20px; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
    margin-inline: 0; padding: 18px 24px;
    border-left: 3px solid var(--blue); background: #edf2f5; color: #5d6c78;
}
.entry-content pre { overflow-x: auto; padding: 18px; background: #172b40; color: #fff; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px; border: 1px solid var(--line); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption { color: var(--muted); font-size: 12px; text-align: center; }
.article-footer { margin-top: 45px; padding-top: 22px; border-top: 1px solid var(--line); }
.article-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
    margin-top: 34px;
}
.article-nav > div { min-width: 0; }
.article-nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 76px;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    transition: border-color .2s ease, background .2s ease;
}
.article-nav a:hover {
    border-color: var(--blue);
    background: #fbfcfd;
    color: var(--blue);
}
.article-nav small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
    letter-spacing: .12em;
    margin-bottom: 5px;
}
.site-footer {
    padding: 32px 0;
    background: var(--ink);
    color: #d6e0e8;
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand { font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.footer-copy { color: #9eafbd; font-size: 10px; }
.search-form { display: flex; gap: 8px; margin-top: 22px; }
.search-form input {
    min-width: 0; width: 100%; padding: 12px 14px;
    border: 1px solid var(--line); background: #fff; font: inherit;
}
.search-form button {
    padding: 0 20px; border: 0; background: var(--ink); color: #fff;
    font: inherit; cursor: pointer;
}
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
@media (max-width: 850px) {
    .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
    .header-inner { min-height: 76px; }
}
@media (max-width: 560px) {
    .wrap { width: min(100% - 32px, var(--content)); }
    .header-inner { min-height: 70px; }
    .brand-name { font-size: 22px; }
    .header-note { display: none; }
    .page-intro { padding: 38px 0 20px; }
    .post-grid { grid-template-columns: 1fr; gap: 27px; padding-bottom: 55px; }
    .post-card-image { aspect-ratio: 1.55 / 1; }
    .post-card-title { font-size: 16px; }
    .article-wrap { width: calc(100% - 32px); padding-top: 38px; }
    .article-nav { grid-template-columns: 1fr; }
    .footer-inner { align-items: flex-start; flex-direction: column; gap: 6px; }
}


/* Sidebar: keep the blog's existing navigation and useful links visible. */
.content-layout { display:grid; grid-template-columns:minmax(0,1fr) 258px; gap:46px; align-items:start; padding-bottom:70px; }
.content-primary { min-width:0; }
.content-primary .post-grid { padding-bottom:35px; }
.sidebar { min-width:0; padding-top:18px; }
.side-widget { margin:0 0 27px; padding:0 0 23px; border-bottom:1px solid var(--line); }
.side-title { margin:0 0 13px; color:var(--ink); font-size:12px; font-weight:800; letter-spacing:.1em; }
.side-list { list-style:none; margin:0; padding:0; }
.side-list li { margin:0; padding:5px 0; }
.side-list a,.side-widget li a,.side-links a { color:#617181; font-size:12px; }
.side-list a:hover,.side-widget li a:hover,.side-links a:hover { color:var(--blue); }
.side-widget ul { list-style:none; margin:0; padding:0; }
.side-widget li { padding:5px 0; }
.side-widget select { width:100%; padding:9px 10px; border:1px solid var(--line); background:#fff; color:var(--ink); font:inherit; font-size:12px; }
.side-search { display:flex; gap:5px; }
.side-search input { min-width:0; width:100%; padding:9px; border:1px solid var(--line); font:inherit; font-size:12px; }
.side-search button { padding:0 12px; border:0; background:var(--ink); color:#fff; font-size:11px; cursor:pointer; }
.side-links a { display:block; padding:5px 0; }
.side-contact { color:#687783; font-size:11px; line-height:1.9; }
.side-contact strong { color:var(--ink); }
.side-contact a { color:var(--blue); }
.content-layout .article-wrap { width:auto; margin:0; padding:54px 0 0; }
@media(max-width:850px) { .content-layout { grid-template-columns:minmax(0,1fr) 220px; gap:28px; } }
@media(max-width:680px) { .content-layout { display:flex; flex-direction:column; gap:0; padding-bottom:45px; } .content-primary,.sidebar { width:100%; } .sidebar { padding-top:25px; } .content-layout .article-wrap { padding-top:30px; } }
