/* ==========================================================================
   Walking Ants Official Website
   外部フォント・外部ライブラリなし。1ファイルで全ページのスタイルを管理する。
   ========================================================================== */

:root {
  --bg: #fafaf7;
  --bg-sub: #f3f2ee;
  --surface: #ffffff;
  --text: #1f2328;
  --text-muted: #5b6470;
  --accent: #2f5d62;
  --accent-hover: #24494d;
  --accent-soft: #e9f0ef;
  --border: #e3e1da;

  --todo-bg: #fff4d6;
  --todo-text: #5c4300;

  --radius: 12px;
  --container: 1080px;
  --prose: 720px;
  --gutter: 20px;

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

  color-scheme: light;
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  line-break: strict;
}

:lang(en) body,
body:lang(en) {
  line-height: 1.7;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  line-height: 1.4;
  letter-spacing: 0.02em;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.nowrap {
  display: inline-block;
}

/* 日本語の文節単位の折り返し。
   keep-all で語の途中の改行を止め、HTML 側の <wbr> と句読点の位置でだけ改行する。
   1つの文節が1行に収まらない場合だけ anywhere で途中改行し、はみ出しを防ぐ。
   text-wrap / text-spacing-trim は対応ブラウザでのみ効く補助的な指定 */
.ja-wrap {
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  text-spacing-trim: trim-start;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.skip-link:focus {
  top: 8px;
}

.container {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

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

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  margin-right: auto;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.site-nav ul,
.lang-switch ul,
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.site-nav a {
  display: inline-block;
  padding: 6px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
  border-bottom: 2px solid transparent;
}

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

.site-nav a[aria-current] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.lang-switch ul {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.lang-switch li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--border);
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
}

.lang-switch a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.lang-switch a[aria-current] {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Common blocks ---------- */

main {
  display: block;
}

.section {
  padding: 96px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-sub {
  background: var(--bg-sub);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-title {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
}

.section-lead {
  max-width: 40em;
  margin-bottom: 40px;
  color: var(--text-muted);
}

/* 足あとのような点線（ブランドのモチーフ） */
.dots {
  width: 70px;
  height: 6px;
  margin: 0 0 24px;
  background-image: radial-gradient(circle, var(--accent) 2px, transparent 2.5px);
  background-size: 14px 6px;
  background-repeat: repeat-x;
  opacity: 0.55;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button-primary {
  background: var(--accent);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

.button-secondary:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
}

.text-link::after {
  content: " →";
}

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

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

.badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-sub);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.8;
  white-space: nowrap;
}

.badge-dev {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

/* ---------- Hero (top page) ---------- */

.hero {
  padding: 104px 0 96px;
}

.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5.2vw, 3.25rem);
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.hero-title:lang(en) {
  letter-spacing: 0;
}

.hero-sub {
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: 1.0625rem;
  letter-spacing: 0.04em;
}

.hero-lead {
  max-width: 34em;
  margin-bottom: 40px;
  font-size: 1.0625rem;
}

.hero-art {
  width: 100%;
  max-width: 440px;
  justify-self: end;
}

.hero-art .ground {
  stroke: var(--border);
}

.hero-art .path {
  stroke: var(--accent);
  opacity: 0.45;
}

.hero-art .goal {
  fill: var(--accent);
}

/* ゴールの丸の上に立つ王冠のアリ（ロゴと同じ形） */
.hero-art .king {
  fill: var(--accent);
}

.hero-art .crown {
  fill: #d9ae3a;
}

/* 背景色の縁取りで、ゴールのリングの線をアリの後ろで途切れさせる */
.hero-art .king circle {
  stroke: var(--bg);
  stroke-width: 1.6;
  paint-order: stroke;
}

.hero-art .king-halo {
  fill: none;
  stroke: var(--bg);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-art .king-limbs {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-art .goal-ring {
  stroke: var(--accent);
  opacity: 0.25;
}

/* ---------- App cards ---------- */

.app-list {
  display: grid;
  gap: 24px;
}

.app-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.app-icon svg {
  width: 40px;
  height: 28px;
}

.app-icon-lg {
  width: 88px;
  height: 88px;
  border-radius: 22px;
}

.app-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.app-card-title {
  margin: 0;
  font-size: 1.25rem;
}

.app-card-meta {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.app-card p.app-card-desc {
  margin-bottom: 16px;
}

.list-note {
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- About section (top page) ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px 64px;
}

.principles {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 28px;
}

.principles li {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
  gap: 4px 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.principles li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.principles .num {
  grid-row: span 2;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.principles h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.principles p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Contact band ---------- */

.contact-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
}

.contact-band h2 {
  margin: 0 0 8px;
  font-size: 1.375rem;
}

.contact-band p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Page header (sub pages) ---------- */

.page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 8px;
  color: var(--border);
}

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

.page-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.375rem);
}

.page-lead {
  max-width: 40em;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.page-body {
  padding: 64px 0 96px;
}

.page-body > .container > * + * {
  margin-top: 64px;
}

.block-title {
  margin: 0 0 24px;
  font-size: 1.375rem;
}

/* ---------- App detail ---------- */

.app-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.app-hero .page-title {
  margin: 0;
}

.app-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: var(--prose);
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* 「こんな方に」：丸付きチェックの線画アイコン＋見出し＋補足 */
.audience-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  max-width: var(--prose);
}

.audience-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 14px;
}

.audience-list svg {
  width: 22px;
  height: 22px;
  margin-top: 0.15em;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audience-title {
  display: block;
  font-weight: 700;
}

.audience-desc {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.feature-grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* 機能カードの線画アイコン（SVG を HTML に直接記述。色はアクセントカラー） */
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-grid h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.feature-grid p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.highlight {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 32px;
}

.highlight .block-title {
  margin-bottom: 16px;
}

.store-status {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.store-status li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.store-status .store-name {
  font-weight: 600;
}

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

.small {
  font-size: 0.875rem;
}

.mt-16 {
  margin-top: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-24 {
  margin-top: 24px;
}

.app-lead {
  margin-top: 24px;
}

.link-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.link-cards a {
  display: block;
  height: 100%;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.link-cards a::after {
  content: " →";
  color: var(--accent);
}

.link-cards a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.link-cards span {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

/* ---------- About page ---------- */

.info-table {
  margin: 0;
  max-width: var(--prose);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.info-table > div {
  display: grid;
  grid-template-columns: 11em minmax(0, 1fr);
  gap: 4px 24px;
  padding: 20px 28px;
}

.info-table > div + div {
  border-top: 1px solid var(--border);
}

.info-table dt {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9375rem;
}

.info-table dd {
  margin: 0;
}

.prose-block {
  max-width: var(--prose);
}

/* ---------- Contact page ---------- */

.contact-card {
  max-width: var(--prose);
}

.contact-email {
  margin: 8px 0 24px;
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.contact-email a {
  text-decoration: none;
}

.contact-email a:hover {
  text-decoration: underline;
}

.steps {
  margin: 0;
  padding-left: 1.4em;
  max-width: var(--prose);
}

.steps li + li {
  margin-top: 8px;
}

/* ---------- Policy (prose) ---------- */

.prose {
  max-width: var(--prose);
}

.prose h2 {
  margin: 56px 0 16px;
  padding-top: 8px;
  font-size: 1.1875rem;
  scroll-margin-top: 16px;
}

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

.prose h3 {
  margin: 28px 0 8px;
  font-size: 1rem;
}

.prose ol,
.prose ul {
  margin: 0 0 1em;
  padding-left: 1.6em;
}

.prose li + li {
  margin-top: 6px;
}

.prose ol.paren {
  list-style: none;
  padding-left: 0;
}

.prose ol.paren > li {
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr);
}

.prose ol.paren > li > .n {
  font-variant-numeric: tabular-nums;
}

.prose dl {
  margin: 0 0 1em;
}

.prose dl > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5em;
}

.prose dt {
  font-weight: 600;
}

.prose dd {
  margin: 0;
}

.toc {
  max-width: var(--prose);
  margin-bottom: 48px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 8px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.toc ol {
  list-style: none;
  margin: 0;
  padding-left: 0;
  columns: 2 16em;
  column-gap: 32px;
  font-size: 0.9375rem;
}

.toc li {
  break-inside: avoid;
}

.policy-meta {
  max-width: var(--prose);
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.policy-meta p {
  margin: 0;
}

/* ---------- Review markers (公開前にすべて削除する) ---------- */

.draft-notice {
  max-width: var(--prose);
  margin-bottom: 40px;
  padding: 16px 20px;
  border: 1px dashed #c9a43a;
  border-radius: var(--radius);
  background: var(--todo-bg);
  color: var(--todo-text);
  font-size: 0.9375rem;
}

.draft-notice strong {
  display: block;
  margin-bottom: 4px;
}

mark.todo {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--todo-bg);
  color: var(--todo-text);
  font-size: 0.875em;
  font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-sub);
  padding: 56px 0 32px;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.footer-tagline {
  margin: 12px 0 0;
  color: var(--text-muted);
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-links li + li {
  margin-top: 6px;
}

.footer-links a {
  color: var(--text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.copyright {
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ---------- 404 ---------- */

.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 0;
}

.notfound .dots {
  margin: 0 auto 32px;
}

.notfound h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.notfound .button-row {
  justify-content: center;
  margin-top: 32px;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero {
    padding: 64px 0 72px;
  }

  .hero .container,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    justify-self: start;
    max-width: 320px;
    order: 2;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 15px;
  }

  .site-header .container {
    min-height: 0;
    gap: 4px 16px;
  }

  .site-nav {
    order: 3;
    width: 100%;
  }

  .site-nav ul {
    gap: 4px 20px;
  }

  .section {
    padding: 64px 0;
  }

  .card,
  .highlight {
    padding: 24px 20px;
  }

  .app-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .app-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .app-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .page-header {
    padding: 40px 0 32px;
  }

  .page-body {
    padding: 40px 0 64px;
  }

  .page-body > .container > * + * {
    margin-top: 48px;
  }

  .info-table > div {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 20px;
  }

  .button-row .button {
    flex: 1 1 100%;
  }

  /* 320px 幅でもお問い合わせボタンの文言が1行に収まるよう、左右の余白を詰める */
  .contact-card .button {
    padding-left: 16px;
    padding-right: 16px;
  }

  .toc {
    padding: 20px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .toc {
    display: none;
  }

  body {
    background: #ffffff;
  }
}

/* アプリアイコン（画像）。角丸はアイコン画像自体に含まれる */
img.app-icon {
  background: none;
  border-radius: 0;
  object-fit: contain;
}

/* アプリ名の副題（2026-11-23 のアプリ名称変更以降、ページでは未使用） */
.app-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.page-title .app-subtitle {
  margin-top: 4px;
  font-size: 1rem;
}
