/*
Theme Name: Nagano Letter
Theme URI: https://value-cpa.com/letter/
Author: Teal NEXT
Description: 永野会計事務所「事務所便り」専用テーマ。静的サイト（Astro）本体とデザインを合わせた最小構成。紺×ゴールド×明朝、オレンジのアクセントCTA。
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: nagano-letter
*/

:root {
  --ink: #13243B;
  --paper: #FCFAF6;
  --paper-2: #F3F6EE;
  --white: #FFFFFF;
  --green: #5F7D58;
  --green-deep: #47603F;
  --green-tint: #EAF0E4;
  --gold: #A6843C;
  --gold-soft: #C7A85E;
  --text: #414B58;
  --muted: #7A8290;
  --line: #E6E2D8;
  --font-serif: "Noto Serif JP", "Yu Mincho", serif;
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --radius: 10px;
  --shadow: 0 12px 32px rgba(19, 36, 59, 0.08);
  --header-h: 68px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.9;
  color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; letter-spacing: 0.02em;
}
img { max-width: 100%; height: auto; }
a { color: var(--green-deep); text-decoration: none; }
a:hover { opacity: 0.85; }
h1, h2, h3, h4 { font-family: var(--font-serif); color: var(--ink); line-height: 1.5; margin: 0; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { max-width: 1080px; margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: 800px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 34px; border-radius: 999px; border: 0; white-space: nowrap;
  background: linear-gradient(135deg, #F3A24C 0%, #E36F2E 100%);
  color: #fff; font-weight: 600; font-size: 15px; box-shadow: 0 6px 18px rgba(227, 111, 46, 0.28);
  cursor: pointer; transition: box-shadow .25s, transform .2s, filter .25s;
}
.btn:hover { filter: brightness(1.05); opacity: 1; transform: translateY(-1px); }
.btn--ghost { background: transparent; box-shadow: none; border: 1.5px solid rgba(19,36,59,.35); color: var(--ink); }
.btn--ghost:hover { background: rgba(19,36,59,.05); border-color: var(--ink); filter: none; }
.btn--small { padding: 10px 22px; font-size: 13.5px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(252,250,246,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-bars { width: 30px; height: 22px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-ja { font-family: var(--font-serif); font-size: 17.5px; font-weight: 600; color: var(--ink); }
.brand-en { font-size: 8.5px; letter-spacing: .24em; color: var(--gold); margin-top: 2px; }
.gnav ul { display: flex; gap: 24px; }
.gnav a { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.header-tel { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); font-family: var(--font-serif); font-size: 16px; font-weight: 600; white-space: nowrap; }
.header-tel svg { width: 15px; height: 15px; color: var(--green); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
.mnav { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.mnav ul { padding: 12px 24px 20px; }
.mnav a { display: block; padding: 12px 4px; font-size: 15.5px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--line); }

@media (max-width: 920px) {
  .gnav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .site-header.open .mnav { display: block; }
}

/* page hero */
.page-hero { background: var(--paper-2); padding: clamp(48px, 7vw, 72px) 0; }
.page-hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .22em; color: var(--green); text-transform: uppercase; margin-bottom: 10px; }
.page-hero .eyebrow::before { content: ""; width: 26px; height: 1.5px; background: var(--green); }
.page-hero h1 { font-size: clamp(26px, 4vw, 36px); }
.page-hero-lead { margin: 12px 0 0; font-size: 14.5px; color: var(--text); }

/* breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb .sep { opacity: .5; }

/* letter cards */
.list-wrap { padding-block: clamp(48px, 7vw, 72px); }
.letter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.letter-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .25s, box-shadow .25s; }
.letter-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); opacity: 1; }
.letter-thumb { aspect-ratio: 3 / 2; background: var(--ink); overflow: hidden; }
.letter-thumb img { width: 100%; height: 100%; object-fit: cover; }
.letter-thumb-fallback { display: flex; align-items: center; justify-content: center; height: 100%; color: rgba(252,250,246,.4); font-size: 12px; letter-spacing: .15em; }
.letter-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.letter-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.letter-cat { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: #fff; background: var(--green); border-radius: 4px; padding: 3px 10px; }
.news-date { font-size: 13px; color: var(--muted); font-feature-settings: "tnum"; }
.letter-title { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.55; color: var(--ink); margin: 0 0 10px; }
.letter-desc { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.letter-author { margin-top: auto; font-size: 12px; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.empty-note { font-size: 14px; color: var(--muted); padding: 16px 4px; }

/* news list (お知らせ一覧) */
.news-rows li { border-bottom: 1px solid var(--line); }
.news-rows li:first-child { border-top: 1px solid var(--line); }
.news-rows a { display: flex; gap: 20px; padding: 16px 6px; align-items: baseline; color: var(--text); }
.news-rows a:hover { background: var(--paper-2); opacity: 1; }
.news-rows .news-date { flex: none; }
.news-rows .news-title { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.pagination { display: flex; gap: 10px; justify-content: center; margin-top: 44px; flex-wrap: wrap; }
.pagination .page-numbers { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 14px; }
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* single article */
.article { padding-block: clamp(48px, 7vw, 72px); }
.article-meta { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; display: flex; align-items: center; gap: 14px; }
.article h1 { font-size: clamp(24px, 3.6vw, 32px); margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); line-height: 1.5; }
.article-cover { width: 100%; border-radius: var(--radius); margin-bottom: 28px; }
.article-body { font-size: 15.5px; }
.article-body h2 { font-size: 21px; margin: 2em 0 .8em; padding-left: 14px; border-left: 4px solid var(--green); }
.article-body h3 { font-size: 17.5px; margin: 1.6em 0 .6em; }
.article-body ul { list-style: disc; padding-left: 1.4em; margin-bottom: 1em; }
.article-body ol { list-style: decimal; padding-left: 1.4em; margin-bottom: 1em; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: var(--radius); }
.article-body figure { margin: 0 0 1.4em; }
.article-signature { text-align: right; font-family: var(--font-serif); color: var(--ink); font-size: 14.5px; margin: 32px 0 0; }
.inline-cta { margin: 40px 0 0; background: var(--green-tint); border-radius: var(--radius); padding: 26px 28px; text-align: center; }
.inline-cta p { font-size: 14.5px; color: var(--ink); margin: 0 0 16px; }
.inline-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.article-back { margin-top: 48px; display: flex; gap: 12px; flex-wrap: wrap; }

/* footer */
.site-footer { background: var(--ink); color: rgba(252,250,246,.82); padding: clamp(48px,7vw,72px) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px,5vw,64px); padding-bottom: 48px; }
.footer-brand img { width: min(240px, 60vw); }
.footer-address { font-size: 13.5px; line-height: 2; margin-top: 22px; font-style: normal; }
.footer-address a { color: inherit; }
.footer-nav { display: flex; gap: clamp(24px,4vw,56px); justify-content: flex-end; }
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: rgba(252,250,246,.75); font-size: 13.5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: 12px; color: rgba(252,250,246,.5); display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }

/* mobile sticky cta */
.msc { display: none; }
@media (max-width: 720px) {
  .msc { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -6px 20px rgba(19,36,59,.15); }
  .msc a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 15px 8px; font-size: 14.5px; font-weight: 600; }
  .msc a svg { width: 18px; height: 18px; }
  .msc-tel { background: var(--ink); color: #fff; }
  .msc-form { background: linear-gradient(135deg, #F3A24C 0%, #E36F2E 100%); color: #fff; }
  body { padding-bottom: 56px; }
}

@media (max-width: 900px) { .letter-grid { grid-template-columns: 1fr; } }
@media (min-width: 901px) and (max-width: 1040px) { .letter-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } .footer-nav { justify-content: flex-start; flex-wrap: wrap; } }
