/* 業務ツール実践ログ — メインスタイル（公開サイト用） */

:root {
  /* エディトリアル寄り: 暖かみのある紙＋単一アクセント（海外テックメディア系の王道） */
  --bg: #f6f4f1;
  --bg-elevated: #ebe8e3;
  --surface: #fffcf9;
  --surface-glass: rgba(255, 252, 249, 0.88);
  --text: #1c1917;
  --muted: #57534e;
  --accent: #4338ca;
  --accent-hover: #3730a3;
  --accent-soft: rgba(67, 56, 202, 0.1);
  --accent-border: rgba(67, 56, 202, 0.28);
  --accent-glow: rgba(67, 56, 202, 0.12);
  --border: rgba(28, 25, 23, 0.08);
  --border-strong: rgba(28, 25, 23, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 10px 28px rgba(28, 25, 23, 0.07), 0 2px 8px rgba(28, 25, 23, 0.04);
  --shadow-lg: 0 22px 48px rgba(28, 25, 23, 0.09), 0 6px 16px rgba(28, 25, 23, 0.05);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --font-sans: "Noto Sans JP", "Segoe UI", system-ui, -apple-system, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  font-size: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1.35rem;
}

/* 記事・一覧の sticky ナビ */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.site-topbar__inner {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0.7rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}

.site-topbar__brand {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-topbar__brand:hover {
  color: var(--accent);
}

.site-topbar__sep {
  color: var(--border-strong);
  font-size: 0.75rem;
  user-select: none;
}

.site-topbar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-left: auto;
}

.site-topbar__link {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.site-topbar__link:hover {
  color: var(--accent);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
  box-shadow: var(--shadow);
}

.site-title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.site-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

main {
  padding: 2rem 0 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.55rem;
  margin-bottom: 1.35rem;
  box-shadow: var(--shadow-md);
}

.page-home .card {
  transition: box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.page-home .card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tree {
  margin: 0;
  padding-left: 1.25rem;
}

.tree li {
  margin-bottom: 0.35rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: linear-gradient(180deg, #f5f3f0 0%, #ebe8e3 100%);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-weight: 500;
}

.post-teaser h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.post-teaser a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease-out);
}

.post-teaser a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.post-teaser a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.meta {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.post-teaser p:last-child {
  margin: 0;
}

.img-wrap {
  margin: 0.75rem 0 0;
}

.img-wrap img {
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2rem;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer__inner {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1.35rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-bottom: 0.65rem;
}

.site-footer__nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
}

.site-footer__nav a:hover {
  color: var(--accent);
}

.site-footer__credit {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.92;
}

/* 記事ページ */
.article-header {
  margin-bottom: 1.5rem;
}

.article-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.article-body h2 {
  margin: 1.35rem 0 0.75rem;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-table th,
.article-table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.article-table th {
  background: linear-gradient(180deg, #faf8f5 0%, #f0ebe5 100%);
  font-weight: 600;
}

.img-placeholder {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s var(--ease-out);
}

.back-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- トップページ --- */
.page-home {
  background: radial-gradient(ellipse 100% 70% at 50% -15%, var(--accent-glow), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 38%, var(--bg) 100%);
}

.wrap--home {
  max-width: 48rem;
}

.site-header--home {
  padding: 2.5rem 0 2.85rem;
  background: linear-gradient(145deg, #fffcf9 0%, #f8f6f2 42%, #eef0ff 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.site-header--home::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 12%, rgba(67, 56, 202, 0.08), transparent 42%),
    radial-gradient(circle at 8% 88%, rgba(99, 102, 241, 0.06), transparent 45%);
  pointer-events: none;
}

.site-header--home .wrap {
  position: relative;
  z-index: 1;
}

.home-masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 2rem;
}

.home-masthead__brand {
  flex: 1;
  min-width: min(100%, 16rem);
}

.site-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-masthead__title {
  margin: 0;
  font-size: clamp(1.7rem, 4.8vw, 2.2rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text);
  max-width: 15em;
}

.home-masthead__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.home-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.48rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.home-nav__link:hover {
  color: var(--accent-hover);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.home-hero__lede {
  margin: 1.35rem 0 0;
  max-width: 38em;
  line-height: 1.8;
  color: var(--muted);
  font-size: 1.02rem;
}

.main-home {
  padding-top: 1.75rem;
}

.home-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.home-heading__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

.card--featured {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(165deg, #fffcf9 0%, #faf8ff 52%, #f5f3ff 100%);
}

.recent-intro {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.recent-intro a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.recent-intro a:hover {
  text-decoration: underline;
}

.recent-more {
  margin: 1.35rem 0 0;
  padding-top: 0.25rem;
}

.recent-more__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.98rem;
}

.recent-more__link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.post-teaser--lead h3 {
  font-size: clamp(1.12rem, 2.8vw, 1.38rem);
  line-height: 1.35;
}

.post-teaser--lead {
  padding: 0;
  margin: 0;
}

.card--featured .post-teaser + .post-teaser {
  padding-top: 1.15rem;
  margin-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.post-teaser__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.hub-grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 34rem) {
  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.hub-tile {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out),
    background 0.22s var(--ease-out), transform 0.22s var(--ease-out);
}

.hub-tile:hover {
  border-color: var(--accent-border);
  background: linear-gradient(145deg, var(--accent-soft) 0%, var(--surface) 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.hub-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hub-tile__name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.hub-tile:hover .hub-tile__name {
  color: var(--accent-hover);
}

.hub-tile__desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.card--cases {
  background: linear-gradient(165deg, #fffcf9 0%, #f5f3f0 50%, #ebe8e3 100%);
}

.card--cases__lead {
  margin: 0;
  line-height: 1.65;
}

.cases-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.cases-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cases-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.cases-link__hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.95rem;
}

.card--about p:last-child {
  margin-bottom: 0;
}

.site-footer--home {
  margin-top: 0.5rem;
}

/* 記事一覧ページ */
.post-index-lead {
  margin: 0 0 1.75rem;
  line-height: 1.65;
  color: var(--text);
}

.post-index-lead a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.post-index-lead a:hover {
  text-decoration: underline;
}

.post-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-index-list__item {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

.post-index-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-index-list__date {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.post-index-list__tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.45rem;
}

.post-index-list__title {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.42;
  letter-spacing: -0.02em;
}

.post-index-list__title a {
  color: var(--accent);
  text-decoration: none;
}

.post-index-list__title a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.post-index-list__excerpt {
  margin: 0;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.58;
}

.page-home .card:hover {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .hub-tile:hover {
    transform: none;
  }
}
