/* ==========================================================================
   LOGWORK Blog — styles (静的サイト・自己完結)
   マガジン構成（英語ラベル＋日本語の二段見出し・サムネ主導カード）
   ブランドは公式LP(logpage.app/logwork)に準拠。ライト基調固定。
   Mobile-first (375px) → 768 / 1024+
   ========================================================================== */

:root {
  --bg:         #F6F7F8;
  --card:       #FFFFFF;
  --text:       #1D1D1F;
  --muted:      #5F6368;
  --muted-2:    #9AA0A6;

  --accent:     #d1490f;
  --accent-2:   #ef7a2e;
  --accent-3:   #d1490f;
  --accent-ink: #FFFFFF;
  --accent-soft:#FBEDE6;   /* 引用・ラベルの淡い暖色背景 */
  --grad-warm:  linear-gradient(135deg, var(--accent-2) 0%, var(--accent-3) 100%);

  --hairline:   #E7E9EC;
  --hairline-2: #EEF0F2;
  --footer-bg:  #161618;

  --r-sm: 12px;
  --r:    16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 2px 6px rgba(16,24,40,.05), 0 1px 2px rgba(16,24,40,.04);
  --shadow:    0 14px 36px rgba(16,24,40,.09), 0 5px 12px rgba(16,24,40,.05);
  --shadow-lg: 0 30px 70px rgba(16,24,40,.13), 0 12px 28px rgba(16,24,40,.08);

  --maxw: 1120px;
  --measure: 720px;          /* 記事本文の読みやすい行長 */
  --gutter: 22px;
  --header-h: 64px;

  --font-jp: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  --font-en: "Inter", var(--font-jp);
  --font: var(--font-jp);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  padding-top: var(--header-h);
  font-size: 16px; line-height: 1.75; letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4,p { margin: 0; }
ul,ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 50%, white); outline-offset: 3px; border-radius: 8px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, white); }

/* 数字・英字は Inter を優先 */
.num, time, .date, code, pre { font-family: var(--font-en); font-feature-settings: "tnum" 1; }

/* 英語ラベル（Inter・大文字・letter-spacing広め・オレンジ） — トバログ風の二段見出し上段 */
.label-en {
  font-family: var(--font-en); font-weight: 700; font-size: 11.5px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
  display: inline-block;
}

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ==========================================================================
   Header（公式LPと共通）
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent; transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--hairline); background: color-mix(in srgb, var(--bg) 86%, transparent); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; max-width: 1160px; height: var(--header-h); }
.brand { color: var(--text); display: inline-flex; align-items: center; position: relative; }
.brand .logo-wordmark { height: 22px; width: auto; transition: opacity .45s var(--ease); }
.brand .logo-symbol { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 36px; width: auto; opacity: 0; transition: opacity .45s var(--ease); }
.site-header.is-scrolled .brand .logo-wordmark { opacity: 0; }
.site-header.is-scrolled .brand .logo-symbol { opacity: 1; }
.header-cta {
  display: inline-flex; align-items: center; height: 42px; padding-inline: 18px;
  background: var(--grad-warm); color: var(--accent-ink); border: 0; border-radius: var(--r-pill);
  font-weight: 700; font-size: 14px; box-shadow: 0 8px 20px rgba(209,73,15,.26);
  flex: none; white-space: nowrap;
  transition: transform .14s var(--ease), box-shadow .25s var(--ease);
}
.header-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(209,73,15,.34); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding-inline: 26px; border-radius: var(--r-pill); font-weight: 700; font-size: 16px; border: 1.5px solid transparent; max-width: 100%; text-align: center; white-space: normal; transition: transform .14s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 38%, transparent); }
.btn-block { width: 100%; }

/* ==========================================================================
   Blog hero
   ========================================================================== */
.blog-hero { padding-top: 56px; padding-bottom: 8px; position: relative; overflow: clip; }
.blog-hero::before { content: ""; position: absolute; z-index: -1; top: -200px; right: -120px; width: 480px; height: 480px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%); filter: blur(20px); pointer-events: none; }
.blog-hero h1 { font-weight: 900; letter-spacing: -.01em; line-height: 1.16; font-size: clamp(34px, 9vw, 60px); margin-top: 14px; }
.blog-hero .lead { color: var(--muted); font-size: clamp(15px, 4vw, 18px); margin-top: 16px; max-width: 34em; }

/* カテゴリナビ（チップ） */
.cat-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { display: inline-flex; align-items: center; height: 40px; padding-inline: 17px; border-radius: var(--r-pill); border: 1px solid var(--hairline); background: var(--card); color: var(--muted); font-size: 13.5px; font-weight: 700; cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease), background .15s var(--ease); }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ==========================================================================
   Section header（英語ラベル＋日本語の二段見出し）
   ========================================================================== */
.mag-section { padding-top: 64px; }
.mag-section:last-of-type { padding-bottom: 88px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.sec-head .titles .label-en { margin-bottom: 8px; }
.sec-head h2 { font-size: clamp(22px, 5.4vw, 30px); font-weight: 900; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.sec-head .sec-link { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 14px; white-space: nowrap; }
.sec-head .sec-link svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.sec-head .sec-link:hover svg { transform: translateX(3px); }

/* ==========================================================================
   サムネ主導カード（画像→英語ラベル→日本語タイトル→日付→抜粋）
   ========================================================================== */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-xs);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.post-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); box-shadow: var(--shadow); transform: translateY(-4px); }

/* サムネ 16:9 */
.thumb { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(150deg, #EEF0F3 0%, #E3E6EB 100%); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.post-card:hover .thumb img { transform: scale(1.04); }
/* ブランドテンプレ自動生成画像のプレースホルダ表現（オレンジ地＋ロゴ） */
.thumb-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background:
  radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 92%, white) 0%, var(--accent) 55%, color-mix(in srgb, var(--accent) 78%, black) 100%); color: #fff; padding: 22px; text-align: center; }
.thumb-ph .ph-logo { display: inline-flex; align-items: center; gap: 8px; color: #fff; opacity: .96; }
.thumb-ph .ph-logo .logo-symbol { height: 26px; }
.thumb-ph .ph-logo .logo-wordmark { height: 15px; }
.thumb-ph .ph-note { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: rgba(255,255,255,.78); }
.thumb .tag { position: absolute; left: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; height: 26px; padding-inline: 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.92); color: var(--accent); font-size: 11.5px; font-weight: 700; backdrop-filter: blur(4px); }

.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-card .label-en { font-size: 11px; }
.post-card h3 { font-size: clamp(17px, 4.4vw, 21px); font-weight: 800; line-height: 1.45; letter-spacing: -.005em; overflow-wrap: anywhere; transition: color .15s var(--ease); }
.post-card:hover h3 { color: var(--accent); }
.post-card .date { color: var(--muted-2); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; }
.post-card p { color: var(--muted); font-size: 14px; line-height: 1.8; margin-top: 2px; overflow-wrap: anywhere; }

/* NEW セクションの先頭カードを大きく（マガジン感） */
.featured .post-card { }
.featured .thumb-ph .ph-logo .logo-symbol { height: 34px; }
.featured .thumb-ph .ph-logo .logo-wordmark { height: 19px; }

/* ==========================================================================
   Article page
   ========================================================================== */
.article-head { padding-top: 40px; position: relative; overflow: clip; }
.article-head::before { content: ""; position: absolute; z-index: -1; top: -220px; right: -140px; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 68%); filter: blur(20px); pointer-events: none; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 13px; font-weight: 600; }
.crumbs a { color: var(--muted); transition: color .15s var(--ease); }
.crumbs a:hover { color: var(--accent); }
.article-head .wrap { max-width: var(--measure); margin-inline: auto; }
.article-kicker { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.article-kicker .date { color: var(--muted); font-size: 13.5px; }
.article-kicker .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted-2); }
.article-head h1 { font-weight: 850; letter-spacing: 0; line-height: 1.36; font-size: clamp(25px, 6.1vw, 38px); margin-top: 14px; text-wrap: pretty; overflow-wrap: break-word; word-break: normal; line-break: strict; }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 13.5px; }
.article-meta .tag { display: inline-flex; align-items: center; height: 26px; padding-inline: 12px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.article-meta .reading svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; }
.article-cover { max-width: var(--measure); margin: 28px auto 0; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; position: relative; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover .thumb-ph { border-radius: var(--r-lg); }
.article-cover .thumb-ph .ph-logo .logo-symbol { height: 40px; }
.article-cover .thumb-ph .ph-logo .logo-wordmark { height: 22px; }

/* 本文タイポグラフィ（長文の読みやすさ最優先） */
.prose { max-width: var(--measure); margin: 0 auto; padding-top: 36px; padding-bottom: 24px; hanging-punctuation: first allow-end last; }
.prose > * + * { margin-top: 20px; }
.prose p { color: #2a2a2c; font-size: 16px; line-height: 1.85; letter-spacing: 0; text-wrap: auto; word-break: normal; line-break: strict; overflow-wrap: break-word; }
.prose .lead-p { font-size: 17px; color: var(--text); line-height: 1.82; }
.prose h2 { font-size: clamp(20px, 5vw, 26px); font-weight: 780; line-height: 1.42; letter-spacing: 0; margin-top: 50px; padding-top: 26px; border-top: 1px solid var(--hairline); overflow-wrap: break-word; word-break: normal; line-break: strict; }
.prose h3 { font-size: clamp(17px, 4.4vw, 20px); font-weight: 700; line-height: 1.45; margin-top: 34px; overflow-wrap: break-word; word-break: normal; line-break: strict; }
.prose h2 + p, .prose h3 + p { margin-top: 16px; }
.prose a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); transition: text-decoration-color .15s var(--ease); }
.prose a:hover { text-decoration-color: var(--accent); }
.prose strong { font-weight: 650; color: var(--text); }
.prose ul, .prose ol { display: grid; gap: 12px; padding-left: 0; }
.prose li { color: #2a2a2c; font-size: 16px; line-height: 1.82; min-width: 0; position: relative; word-break: normal; line-break: strict; overflow-wrap: break-word; }
.prose ul > li { padding-left: 22px; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: .78em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; padding-left: 34px; }
.prose ol > li::before { content: counter(li); position: absolute; left: 0; top: .18em; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-en); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.prose blockquote { margin: 0; padding: 18px 22px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.prose blockquote p { color: #5a2f1c; font-size: 15.5px; line-height: 1.85; font-weight: 500; margin: 0; word-break: normal; line-break: strict; overflow-wrap: break-word; }
.prose blockquote p + p { margin-top: 10px; }
.prose :not(pre) > code { font-size: .9em; background: #F0F1F3; color: #b5380c; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--hairline-2); }
.prose pre { background: #1D1D1F; color: #e9eaec; border-radius: var(--r-sm); padding: 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.prose pre code { font-family: var(--font-en); }
.prose img { width: 100%; border-radius: var(--r); border: 1px solid var(--hairline-2); }
.prose figure { margin: 0; }
.prose figcaption { color: var(--muted-2); font-size: 12.5px; text-align: center; margin-top: 10px; }
.prose hr { border: 0; height: 1px; background: var(--hairline); margin: 40px 0; }

/* 記事内CTAカード */
.post-cta { max-width: var(--measure); margin: 44px auto 0; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); display: grid; gap: 18px; overflow: hidden; }
.post-cta .cta-mark { display: inline-flex; align-items: center; gap: 9px; color: var(--text); }
.post-cta .cta-mark .logo-symbol { height: 26px; }
.post-cta .cta-mark .logo-wordmark { height: 16px; }
.post-cta h3 { font-size: 19px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.post-cta p { color: var(--muted); font-size: 14.5px; line-height: 1.8; overflow-wrap: anywhere; }

/* 一覧へ戻る */
.article-back { max-width: var(--measure); margin: 40px auto 0; }
.article-back a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 15px; }
.article-back svg { width: 18px; height: 18px; }

/* 関連記事 */
.related { padding-top: 64px; padding-bottom: 88px; border-top: 1px solid var(--hairline); margin-top: 64px; }
.related .wrap { max-width: var(--maxw); margin-inline: auto; }
.related .sec-head { margin-bottom: 28px; }

/* ==========================================================================
   Footer（公式LPと共通・濃色）
   ========================================================================== */
.site-footer { background: var(--footer-bg); color: #fff; padding-block: 56px 32px; }
.footer-top { display: flex; flex-direction: column; gap: 32px; }
.footer-brand .lockup { display: inline-flex; align-items: center; gap: 10px; color: #fff; }
.footer-brand .logo-symbol { height: 28px; }
.footer-brand .logo-wordmark { height: 18px; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: 13px; margin-top: 16px; max-width: 30em; }
.footer-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 18px; }
.footer-links a { color: rgba(255,255,255,.8); font-size: 14px; padding-block: 7px; display: inline-block; overflow-wrap: anywhere; transition: color .15s var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 10px; color: rgba(255,255,255,.5); font-size: 12.5px; }

/* ==========================================================================
   Reveal
   ========================================================================== */
[data-reveal] { transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
[data-reveal].pre { opacity: 0; transform: translateY(24px); }
[data-reveal].pre.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 767px) {
  :root { --gutter: 18px; }
  .article-head .wrap,
  .article-cover,
  .prose,
  .post-cta,
  .article-back {
    width: 100%;
  }
  .article-meta { gap: 10px; font-size: 12.5px; }
  .article-cover { margin-top: 24px; }
  .prose {
    padding-top: 32px;
    padding-bottom: 18px;
  }
  .prose > * + * { margin-top: 16px; }
  .prose p {
    font-size: 14px;
    line-height: 1.78;
    letter-spacing: 0;
  }
  .prose .lead-p {
    font-size: 14.5px;
    line-height: 1.78;
  }
  .prose h2 {
    font-size: 19.5px;
    line-height: 1.42;
    margin-top: 38px;
    padding-top: 22px;
  }
  .prose h3 {
    font-size: 16.5px;
    line-height: 1.45;
    margin-top: 28px;
  }
  .prose ul,
  .prose ol {
    gap: 10px;
    padding-left: 0;
  }
  .prose li {
    font-size: 14px;
    line-height: 1.76;
  }
  .prose ul > li::before {
    width: 6px;
    height: 6px;
    top: .72em;
  }
  .prose ol > li::before {
    width: 22px;
    height: 22px;
    font-size: 12px;
    top: .08em;
  }
  .prose blockquote {
    padding: 16px 18px;
  }
  .prose blockquote p {
    font-size: 14.5px;
    line-height: 1.8;
  }
  .post-cta {
    margin-top: 38px;
  }
}
@media (max-width: 380px) {
  :root { --gutter: 16px; --header-h: 60px; }
  .header-cta { height: 38px; padding-inline: 13px; font-size: 13px; }
  .blog-hero { padding-top: 44px; }
  .cat-nav { gap: 8px; }
  .chip { height: 38px; padding-inline: 13px; font-size: 13px; }
  .post-card .body { padding: 18px 18px 22px; }
  .article-cover { border-radius: var(--r); }
  .article-cover .thumb-ph { border-radius: var(--r); }
  .prose { padding-top: 32px; }
  .post-cta { padding: 22px; border-radius: var(--r); }
  .footer-links { grid-template-columns: 1fr; gap: 4px; }
}
@media (min-width: 768px) {
  .blog-hero { padding-top: 80px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  /* NEW: 先頭カードを2カラム幅で大きく */
  .featured .card-grid { grid-template-columns: 1fr 1fr; }
  .featured .card-grid > .post-card:first-child { grid-column: 1 / -1; flex-direction: row; }
  .featured .card-grid > .post-card:first-child .thumb { width: 56%; aspect-ratio: auto; flex: none; }
  .featured .card-grid > .post-card:first-child .body { justify-content: center; }
  .featured .card-grid > .post-card:first-child h3 { font-size: clamp(22px, 3vw, 28px); }
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
  .post-cta { grid-template-columns: 1fr auto; align-items: center; }
  .post-cta .post-cta-text { grid-column: 1; }
  .post-cta .btn { white-space: nowrap; }
}
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .featured .card-grid { grid-template-columns: repeat(2, 1fr); }
  .article-head { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .post-card:hover .thumb img { transform: none; }
}
