/* ZGC 公開サイト（LP・入会申請・運営応募）共通デザインシステム — Apple/HIG風・ダーク基調 */

:root {
  color-scheme: dark;
  /* Apple System Colors（ダーク・レイヤー階層） */
  --bg: #1c1c1e;         /* systemBackground */
  --bg-tint: #2a2e45;    /* ヒーローのグラデ上部（控えめな寒色） */
  --surface: #2c2c2e;    /* secondary（カード） */
  --surface-2: #3a3a3c;  /* tertiary */
  --border: rgba(84, 84, 88, 0.5); /* separator（dark） */
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-faint: rgba(255, 255, 255, 0.4);
  --accent: #0a84ff;         /* Apple Blue（dark）＝システムのプライマリ */
  --accent-hover: #409cff;
  --brand-discord: #5865f2;  /* Discord招待CTA専用のブランド色 */
  --brand-discord-hover: #4a55e0;
  --danger: #ff453a;         /* Apple Red（dark） */

  /* Ambient shadows */
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 12px 32px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.35), 0 24px 56px rgba(0, 0, 0, 0.45);

  /* Glass */
  --glass-bg: rgba(14, 16, 24, 0.6);
  --glass-blur: 20px;

  /* 角丸 */
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* モーション */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --dur: 0.24s;
  --dur-fast: 0.15s;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* ---- 共通ヘッダー（グラス・sticky） ---- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 16px 22px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: saturate(180%) blur(var(--glass-blur));
  backdrop-filter: saturate(180%) blur(var(--glass-blur));
  border-bottom: 1px solid var(--border);
}
header.site .brand {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

/* ---- Hero（トップ） ---- */
.hero {
  padding: 104px 0 72px;
  text-align: center;
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-tint) 0%, var(--bg) 68%);
}
.hero .brand {
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 18px;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0 auto 34px;
  max-width: 36em;
}

/* ---- CTA / ボタン（ピル型） ---- */
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---- 共通のボタンシステム（admin.css と同一仕様。既定=角丸長方形） ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast) ease, border-color var(--dur-fast) ease,
    box-shadow var(--dur) var(--ease-out);
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.97); }
/* Discordに参加する＝ブランド色（青紫）を維持 */
.btn-primary { background: var(--brand-discord); border-color: var(--brand-discord); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-discord-hover); transform: scale(1.02); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { transform: scale(1.02); background: #3a3a3c; }
.btn-danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; }
/* サイズ・形の修飾子 */
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn-pill { border-radius: var(--radius-pill); }

/* ---- セクション / カード ---- */
section { padding: 64px 0; border-top: 1px solid var(--border); }
section h2 {
  font-size: 27px;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 22px;
}
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease-spring),
    box-shadow var(--dur) var(--ease-out), border-color var(--dur) ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(255, 255, 255, 0.16); }
.card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--text-muted); font-size: 15px; }

ol.steps { padding-left: 1.25em; margin: 0; }
ol.steps li { margin-bottom: 12px; color: var(--text-muted); }
.recruit-note { color: var(--text-muted); }

/* ---- フォームカード（入会申請・運営応募） ---- */
main.wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px 72px;
}
body.form-page {
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 120% at 50% 0%, var(--bg-tint) 0%, var(--bg) 60%);
}
.form-card {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.form-card h1 {
  font-size: 25px;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 12px;
}
.form-card p { color: var(--text-muted); margin: 8px 0; }
.form-card label { display: block; margin-top: 18px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.form-card input,
.form-card textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.form-card textarea { resize: vertical; }
.form-card input:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.32);
}
.form-card label input[type="checkbox"] {
  width: auto;
  margin: 0 8px 0 0;
  vertical-align: middle;
}
.form-card button[type="submit"],
.form-card a.cta {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) ease;
}
.form-card button[type="submit"]:hover,
.form-card a.cta:hover { background: var(--accent-hover); }
.form-card button[type="submit"]:active,
.form-card a.cta:active { transform: scale(0.98); }
.form-card .back { display: inline-block; margin-bottom: 4px; color: var(--text-faint); font-size: 14px; }

/* ---- フッター ---- */
footer { padding: 48px 0 72px; color: var(--text-faint); font-size: 14px; text-align: center; }
footer a { color: var(--text-faint); }

@media (max-width: 520px) {
  .hero { padding: 76px 0 52px; }
  .form-card { padding: 24px; }
}

/* ---- Icons（SF Symbols風・currentColorで色追従） ---- */
.icon { display: inline-block; vertical-align: -0.15em; }
.back .icon { margin-right: 2px; }

/* ---- ページ遷移（フェード＋下からのスライドイン） ---- */
@keyframes zgc-fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.hero, main, .form-card { animation: zgc-fade-in-up 0.4s var(--ease-out) both; }

/* ---- アクセシビリティ：モーション削減設定を尊重 ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
