/* ==========================================================================
   Deaf Navi Web — Beige × Botanical Edition
   Cream base / Sage accent / Elegant serif headings
   ========================================================================== */

:root {
  /* Backgrounds — warm cream beige */
  --bg-base:      #f5efe3;
  --bg-elevated:  #fbf7ee;
  --bg-raised:    #efe6d3;
  --bg-deep:      #e8dfc9;

  /* Text — espresso warm tones */
  --text-primary:   #3d2f1f;
  --text-secondary: #6b5842;
  --text-tertiary:  #7d694f;
  --text-on-accent: #ffffff;

  /* Accent — sage green (botanical) */
  --accent:       #7a9a65;
  --accent-deep:  #5a7a48;
  --accent-hover: #8fb279;
  --accent-muted: rgba(122, 154, 101, 0.18);
  --accent-soft:  rgba(122, 154, 101, 0.10);

  /* Borders */
  --border-subtle:  rgba(61, 47, 31, 0.08);
  --border-default: rgba(61, 47, 31, 0.15);
  --border-strong:  rgba(61, 47, 31, 0.25);

  /* Soft warm shadows */
  --shadow-sm: 0 1px 2px rgba(61, 47, 31, 0.04), 0 2px 8px rgba(61, 47, 31, 0.04);
  --shadow-md: 0 2px 4px rgba(61, 47, 31, 0.05), 0 8px 24px rgba(61, 47, 31, 0.06);

  /* Category palette — botanical tones */
  --cat-policy:    #8b6b93; /* lavender */
  --cat-medical:   #b35e4b; /* terracotta */
  --cat-education: #5a7a9a; /* dusty blue */
  --cat-culture:   #a66b73; /* muted rose-wine (arts) */
  --cat-sports:    #c28840; /* warm amber (energetic) */
  --cat-local:     #5a7a48; /* forest */
  --cat-general:   #7d694f; /* earth */

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic', 'Meiryo', system-ui, sans-serif;
  --font-serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 9999px;

  /* Spacing (8px grid) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-12: 48px;
  --s-16: 64px;

  --container: 1120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-base);
  /* Subtle paper-like texture */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(122, 154, 101, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(179, 94, 75, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(125, 105, 79, 0.02) 0%, transparent 70%);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--accent-deep);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover { color: var(--text-primary); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* [hidden]属性を必ず効かせる */
[hidden] { display: none !important; }

/* ---------- Utility ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  padding: var(--s-2) var(--s-4);
  background: var(--accent-deep);
  color: #fff;
  font-weight: 600;
  z-index: 1000;
  border-radius: var(--r-md);
}
.skip-link:focus { left: var(--s-3); top: var(--s-3); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  padding: var(--s-16) 0 var(--s-12);
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(ellipse at top right, rgba(122, 154, 101, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(179, 94, 75, 0.06) 0%, transparent 50%),
    var(--bg-base);
  overflow: hidden;
}

/* Decorative botanical leaf SVG */
.site-header__leaf {
  position: absolute;
  top: 32px;
  right: -40px;
  width: 280px;
  height: 280px;
  opacity: 0.18;
  transform: rotate(-18deg);
  pointer-events: none;
}

.site-header__leaf svg {
  width: 100%;
  height: 100%;
  color: var(--accent-deep);
}

@media (max-width: 720px) {
  .site-header__leaf {
    width: 180px;
    height: 180px;
    top: -20px;
    right: -60px;
  }
  .site-header { padding: var(--s-12) 0 var(--s-8); }
}

.site-title {
  display: flex;
  align-items: baseline;
  gap: var(--s-3);
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.10;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.site-title__brand { color: var(--text-primary); }

.site-title__sub {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--accent-muted);
  color: var(--accent-deep);
  border: 1px solid rgba(122, 154, 101, 0.30);
  border-radius: var(--r-pill);
  align-self: center;
}

.site-lead {
  position: relative;
  z-index: 1;
  margin-top: var(--s-4);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.70;
  max-width: 580px;
}

@media (max-width: 720px) {
  .site-title { font-size: 32px; }
}

/* ---------- Filters (sticky) ---------- */
.filters {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--s-3) 0;
  background: rgba(245, 239, 227, 0.88);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid var(--border-subtle);
}

.filters__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.filter {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  min-height: 36px;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.filter:hover {
  color: var(--text-primary);
  background: var(--accent-soft);
  border-color: rgba(122, 154, 101, 0.35);
}

.filter.is-active {
  background: var(--accent-deep);
  color: #fff;
  border-color: var(--accent-deep);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(90, 122, 72, 0.20);
}

/* About link — 区切りを強調して視覚的に分離 */
.filter--about {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  text-decoration: none;
  border-color: var(--border-subtle);
  background: transparent;
}

.filter--about svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.7;
}

.filter--about:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-color: rgba(122, 154, 101, 0.35);
}

@media (max-width: 600px) {
  .filter--about { margin-left: 0; }
}

/* ---------- Main ---------- */
main {
  padding: var(--s-6) var(--s-5) var(--s-12);
}

/* ---------- About page ---------- */
.site-header--slim { padding: var(--s-8) 0 var(--s-6); }
.site-title--small { font-size: 32px; }

.site-breadcrumb {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: var(--s-3);
  letter-spacing: 0.01em;
}

.site-breadcrumb a {
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--border-default);
  padding-bottom: 1px;
}

.site-breadcrumb a:hover {
  color: var(--accent-deep);
  border-bottom-color: var(--accent-deep);
}

.about {
  max-width: 760px;
  padding: var(--s-8) var(--s-5) var(--s-12);
}

.about section {
  margin-bottom: var(--s-8);
}

.about__h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: -0.005em;
}

.about__h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--s-4) 0 var(--s-2);
}

.about p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: var(--s-3);
}

.about p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about ul {
  padding-left: var(--s-5);
  margin-bottom: var(--s-3);
}

.about li {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.about li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about a {
  color: var(--accent-deep);
  border-bottom: 1px dotted var(--border-default);
  padding-bottom: 1px;
}

.about a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent-deep);
}

.about__back {
  margin-top: var(--s-8);
  padding-top: var(--s-4);
  border-top: 1px dashed var(--border-default);
  font-size: 14px;
}

#articles-heading {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.articles-head {
  margin: var(--s-3) 0 var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.meta {
  font-size: 13px;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
}

.meta strong {
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meta time {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ---------- Articles Grid ---------- */
.articles {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

@media (min-width: 720px) {
  .articles { grid-template-columns: repeat(2, 1fr); gap: var(--s-5); }
}

@media (min-width: 1024px) {
  .articles { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Card ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-5) var(--s-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  position: relative;
  overflow: hidden;
}

/* Subtle botanical edge accent */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.card:hover {
  border-color: var(--border-default);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card:hover::before { opacity: 1; }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

/* Category chip: dot + text color（色依存にしない配慮） */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: var(--r-pill);
  background: var(--bg-raised);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cat-general);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.chip--policy::before    { background: var(--cat-policy); }
.chip--medical::before   { background: var(--cat-medical); }
.chip--education::before { background: var(--cat-education); }
.chip--culture::before   { background: var(--cat-culture); }
.chip--sports::before    { background: var(--cat-sports); }
.chip--local::before     { background: var(--cat-local); }
.chip--general::before   { background: var(--cat-general); }

.chip--policy    { color: var(--cat-policy); }
.chip--medical   { color: var(--cat-medical); }
.chip--education { color: var(--cat-education); }
.chip--culture   { color: var(--cat-culture); }
.chip--sports    { color: var(--cat-sports); }
.chip--local     { color: var(--cat-local); }
.chip--general   { color: var(--text-secondary); }

.card__time {
  font-size: 12px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  font-family: var(--font-sans);
}

.card__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

.card__title a {
  color: inherit;
  display: block;
}

.card__title a:hover { color: var(--accent-deep); }

.card__summary {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__summary:empty { display: none; }

.card__foot {
  margin-top: auto;
  padding-top: var(--s-2);
  border-top: 1px dashed var(--border-default);
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card__source {
  color: var(--text-tertiary);
  font-weight: 500;
}

.card__source:hover { color: var(--accent-deep); }

/* ---------- Empty state ---------- */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--s-12) 0;
  color: var(--text-tertiary);
  font-size: 14px;
}

/* ---------- Load more ---------- */
.load-more-wrap {
  margin-top: var(--s-8);
  display: flex;
  justify-content: center;
}

.load-more-btn {
  appearance: none;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--r-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  justify-content: center;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  box-shadow: var(--shadow-sm);
}

.load-more-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(122, 154, 101, 0.40);
  color: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.load-more-btn:active {
  transform: translateY(0);
}

.load-more-btn__remain {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.meta__sep {
  color: var(--border-default);
  margin: 0 6px;
}

/* ---------- App CTA (app.deaf-navi) ---------- */
.app-cta {
  margin-top: var(--s-12);
  padding: var(--s-8) var(--s-6);
  background:
    radial-gradient(ellipse at right, rgba(122, 154, 101, 0.10) 0%, transparent 60%),
    var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.app-cta__text {
  flex: 1 1 320px;
}

.app-cta__label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--accent-muted);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-bottom: var(--s-2);
}

.app-cta__title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.30;
  color: var(--text-primary);
  margin-bottom: var(--s-2);
}

.app-cta__desc {
  font-size: 14px;
  line-height: 1.70;
  color: var(--text-secondary);
}

.app-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 14px 24px;
  background: var(--accent-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-md);
  box-shadow: 0 2px 6px rgba(90, 122, 72, 0.22);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  flex-shrink: 0;
}

.app-cta__btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 122, 72, 0.28);
}

.app-cta__btn svg {
  width: 16px;
  height: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--s-12);
  padding: var(--s-8) 0 var(--s-12);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-raised);
  color: var(--text-secondary);
}

.site-footer p {
  font-size: 13px;
  line-height: 1.80;
  color: var(--text-secondary);
  margin-bottom: var(--s-1);
}

.site-footer a {
  color: var(--accent-deep);
  border-bottom: 1px dotted var(--border-default);
  padding-bottom: 1px;
}

.site-footer a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent-deep);
}

.site-footer__divider {
  margin: var(--s-5) 0;
  border: 0;
  border-top: 1px dashed var(--border-default);
}

.site-footer__copyright {
  margin-top: var(--s-4);
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.site-footer__copyright .dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
  .app-cta__btn:hover { transform: none; }
}