/* BamenCue public site stylesheet. */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --text: #1f2a24;
  --text-muted: #6b726e; /* 4.61:1 on --bg — passes AA */
  --border: #e6e0d8;
  --primary: #5e7d61;
  --primary-light: #e8f0e5;
  --accent: #c97a4a;

  --link: #4f6a52; /* 5.59:1 on --bg */

  --measure: 68ch;
  --radius: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI",
    Meiryo, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--link);
  padding: 12px 16px;
  border: 2px solid var(--link);
  border-radius: var(--radius);
  z-index: 10;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  min-height: 64px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand:hover {
  text-decoration: underline;
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
}

main {
  padding: 32px 0 8px;
}

h1 {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 21px;
  line-height: 1.4;
  font-weight: 700;
  margin: 40px 0 12px;
  padding-top: 4px;
}

h3 {
  font-size: 18px;
  line-height: 1.45;
  font-weight: 600;
  margin: 28px 0 8px;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 600;
}

.lede {
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 24px;
}

.doc-meta {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.muted {
  color: var(--text-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 24px 0 32px;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 0;
}

.card a {
  display: block;
  padding: 16px 18px;
  min-height: 44px;
  text-decoration: none;
  color: var(--text);
}

.card a:hover .card-title {
  text-decoration: underline;
}

.card-title {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--link);
  margin-bottom: 2px;
}

.card-desc {
  display: block;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
}

.note {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 24px 0;
}

.note > :last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 28px 0 40px;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 12px;
  padding: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
}

.site-footer p {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

@media (min-width: 700px) {
  body {
    font-size: 18px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 23px;
  }

  main {
    padding-top: 44px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
