/*
 * アプリ紹介ポートフォリオの共通スタイル（テンプレート）。
 * 他アプリへ流用するときは、原則として :root の「アプリごとに変える値」だけを差し替える。
 * 外部フォント・外部スクリプトは読み込まない（閲覧者の情報を第三者へ送らないため）。
 */

:root {
  /* ---- アプリごとに変える値 ---- */
  --accent: #00897b;
  --accent-strong: #00695c;
  --accent-soft: #e0f2f1;

  /* ---- 共通の値 ---- */
  --bg: #f7f9fa;
  --surface: #ffffff;
  --text: #1b2327;
  --muted: #55646b;
  --border: #dde3e6;
  --radius: 16px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #4db6ac;
    --accent-strong: #80cbc4;
    --accent-soft: #12302d;
    --bg: #0f1417;
    --surface: #171e22;
    --text: #e8eef0;
    --muted: #a2b1b7;
    --border: #2a353b;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-strong);
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* ---- ヘッダー ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
}

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

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

/* 言語の切り替え（JavaScript を使わず、もう一方の言語のページへのリンクにする）。スマホ幅でもナビゲーションと違って隠さない */
.lang-switch {
  flex: none;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 14px;
}

.lang-switch:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* ---- ヒーロー ---- */
.hero {
  padding: 72px 0 56px;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.hero .lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.1rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

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

.button:hover {
  filter: brightness(1.05);
}

.meta {
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-visual img {
  width: min(100%, 300px);
  margin-inline: auto;
  filter: drop-shadow(0 24px 40px rgb(0 0 0 / 0.18));
}

/* ---- セクション共通 ---- */
section {
  padding: 56px 0;
}

section h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.section-lead {
  margin: 0 0 32px;
  color: var(--muted);
}

/* ---- 機能のカード ---- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

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

.card .tag {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ---- 図 ---- */
.figure {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.figure figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---- 手順 ---- */
.steps {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 16px 20px 16px 64px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---- 注意書き ---- */
.notice {
  padding: 20px 24px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}

.notice p {
  margin: 0;
}

.plain-list {
  margin: 0;
  padding-left: 1.2em;
}

/* ---- 仕様の表 ---- */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.spec th,
.spec td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.spec th {
  width: 30%;
  color: var(--muted);
  font-weight: 600;
}

/* ---- フッター ---- */
.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ---- スマホ幅 ---- */
@media (max-width: 760px) {
  .nav {
    display: none;
  }

  .hero {
    padding-top: 40px;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .spec th {
    width: 38%;
  }
}

/* ---- 余白の調整 ---- */
.spaced {
  margin-top: 28px;
}
