/* ============================================================
   Anchor Network Service Blog — Shared Styles
   Design Contract: examples/anchor-net-blog/DESIGN.md
   ============================================================ */

/* --- Tokens ------------------------------------------------- */
:root {
  --color-primary:        #004d97;
  --color-primary-hover:  #0084cc;
  --color-accent:         #339dd6;
  --color-navy:           #052e5b;
  --color-dark-blue:      #115697;

  --color-text:           #222222;
  --color-text-secondary: #666666;
  --color-text-muted:     #999999;
  --color-border:         #d1d1d1;
  --color-bg:             #f4f4f4;
  --color-surface:        #ffffff;
  --color-blue-tint:      #dee8f9;

  --font-sans:    "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  --font-serif:   "Shippori Mincho", "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --font-display: "Poppins", "Noto Sans JP", sans-serif;
  --font-mono:    "BIZ UDGothic", "SFMono-Regular", Consolas, monospace;

  --container:  1100px;
  --reading:    44em;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
}

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

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 2.0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

/* Override WordPress-generated block gap (:where has zero specificity) */
.wp-site-blocks > * {
  margin-block-start: 0;
}

/* ============================================================
   Global Bar — corporate site link
   ============================================================ */
.global-bar {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1;
}

.global-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 36px;
}

.global-bar__name {
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.global-bar__link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  transition: color 200ms ease;
}

.global-bar__link:hover {
  color: #fff;
  text-decoration: none;
}

.global-bar__link svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

/* ============================================================
   Blog Header
   ============================================================ */
.blog-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.blog-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
}

.blog-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.blog-logo:hover { text-decoration: none; }

.blog-logo__img {
  height: 28px;
  width: auto;
}

.blog-logo__divider {
  width: 1px;
  height: 24px;
  background: var(--color-border);
}

.blog-logo__label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-primary);
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}

.blog-nav a {
  color: var(--color-text);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 200ms ease, color 200ms ease;
}

.blog-nav a:hover,
.blog-nav a[aria-current="page"] {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  text-decoration: none;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb li::after {
  content: ">";
  margin-left: 4px;
  color: var(--color-border);
}

.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: underline; }

/* ============================================================
   Category Label (shared)
   ============================================================ */
.category-label {
  display: inline-block;
  padding: 4px 12px;
  background: var(--color-blue-tint);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

/* ============================================================
   Image Placeholder (preview only)
   ============================================================ */
.image-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 30% 40%, rgba(0, 77, 151, 0.12), transparent 50%),
    linear-gradient(135deg, #dee8f9 0%, #f0f4fa 50%, #e8eef6 100%);
  border: 1px solid #d8e2f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

/* ============================================================
   Cards (shared between listing & related)
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 200ms ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card a { color: inherit; text-decoration: none; display: block; }

.card__thumb {
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 40% 50%, rgba(0, 77, 151, 0.1), transparent 60%),
    linear-gradient(135deg, #e8eef6 0%, #f0f4fa 100%);
  overflow: hidden;
}

.card__body { padding: 20px; }

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.card__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.card__excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   CTA Section (shared)
   ============================================================ */
.cta-section {
  padding: 40px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-blue) 100%);
  border-radius: var(--radius-lg);
  text-align: center;
  color: #fff;
}

.cta-section__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
}

.cta-section__text {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: 14px 40px;
  background: #fff;
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background 200ms ease, transform 200ms ease;
}

.cta-button:hover {
  background: var(--color-blue-tint);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ============================================================
   Footer
   ============================================================ */
.blog-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.7;
}

.blog-footer__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.blog-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blog-footer__brand img {
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

.blog-footer__brand p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.blog-footer__heading {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 0.04em;
}

.blog-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-footer li { margin-bottom: 8px; }

.blog-footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 200ms ease;
}

.blog-footer a:hover { color: #fff; text-decoration: none; }

.blog-footer__corporate {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.blog-footer__corporate a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.blog-footer__bottom {
  grid-column: 1 / -1;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   Responsive — shared
   ============================================================ */
@media (max-width: 768px) {
  .global-bar__inner { padding: 0 16px; }

  .blog-header__inner { height: 56px; padding: 0 16px; }
  .blog-logo__img { height: 22px; }
  .blog-logo__label { font-size: 13px; }
  .blog-nav { display: none; /* Hamburger in production */ }

  .breadcrumb { font-size: 12px; padding: 12px 16px; }

  .cta-section { padding: 28px 20px; }
  .cta-section__title { font-size: 18px; }

  .blog-footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 16px 24px;
  }
}

@media (max-width: 576px) {
  .global-bar__name { display: none; }
}

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

/* ============================================================
   Print
   ============================================================ */
@media print {
  .global-bar, .blog-header, .blog-nav, .cta-section, .blog-footer { display: none; }
}
