/* =========================================================
   Iruk Homepage - Design System
   ========================================================= */

:root {
  /* Colors (light) */
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #1a2233;
  --text-muted: #5b6577;
  --border: #e2e8f2;

  --primary: #2f7fe0;      /* あお = blue */
  --primary-dark: #1f63b8;
  --primary-soft: #e8f1fd;
  --accent: #ff9f43;       /* warm accent */

  /* Category colors */
  --cat-aokun: #2f7fe0;
  --cat-board: #7b5cd6;
  --cat-life: #23b892;
  --cat-other: #8a94a6;

  /* Spacing / shape */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(24, 43, 77, 0.08);
  --shadow-hover: 0 12px 36px rgba(24, 43, 77, 0.14);
  --maxw: 1080px;
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP",
    "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --surface: #171e2c;
    --surface-2: #1f2838;
    --text: #eaf0fb;
    --text-muted: #9aa6bd;
    --border: #2a3446;
    --primary: #4f97ec;
    --primary-dark: #6aa9f0;
    --primary-soft: #1a2740;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 12px 36px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-title { font-size: 1.7rem; text-align: center; margin-bottom: 8px; }
.section-lead { text-align: center; color: var(--text-muted); margin-bottom: 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 700;
  border: 2px solid transparent; cursor: pointer; transition: all .2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--primary); }
.nav-links { display: flex; gap: 26px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; color: var(--text);
}
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 14px; border-top: 1px solid var(--border); }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.6rem; margin-bottom: 12px; }
.hero .tagline { color: var(--primary); font-weight: 700; margin-bottom: 20px; }
.hero p.lead { font-size: 1.05rem; color: var(--text-muted); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero-visual {
  aspect-ratio: 1/1; border-radius: 24px; background: linear-gradient(135deg, var(--primary-soft), var(--surface-2));
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); overflow: hidden;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .placeholder { color: var(--text-muted); font-size: .9rem; text-align: center; padding: 20px; }

@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero-visual { max-width: 260px; margin: 0 auto; }
}

/* ---------- Cards / App grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.app-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); text-decoration: none; }
.app-thumb {
  aspect-ratio: 16/10; background: var(--surface-2); display: flex; align-items: center;
  justify-content: center; color: var(--text-muted); font-size: .85rem;
}
.app-thumb img { width: 100%; height: 100%; object-fit: cover; }
.app-body { padding: 16px 18px 20px; }
.app-body h3 { font-size: 1.15rem; margin-bottom: 6px; color: var(--text); }
.app-body p { font-size: .9rem; color: var(--text-muted); margin: 0; }
.app-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }

/* Category badge */
.badge {
  display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 10px;
  border-radius: 999px; color: #fff; letter-spacing: .3px;
}
.badge.aokun { background: var(--cat-aokun); }
.badge.board { background: var(--cat-board); }
.badge.life  { background: var(--cat-life); }
.badge.other { background: var(--cat-other); }
.badge.dev   { background: var(--accent); }   /* 開発中ステータス */

/* ---------- Category filter ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.filter-btn {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; cursor: pointer;
  font-size: .9rem; transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--primary); }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.app-card.hide { display: none; }

/* ---------- App detail ---------- */
.detail-hero { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; padding: 48px 0; }
.detail-icon {
  width: 200px; height: 200px; border-radius: 44px; box-shadow: var(--shadow);
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .85rem; text-align: center; overflow: hidden;
}
.detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero h1 { font-size: 2.2rem; }
.store-badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.screenshots { display: flex; gap: 16px; overflow-x: auto; padding: 8px 0 16px; }
.screenshots .shot {
  flex: 0 0 auto; width: 200px; aspect-ratio: 9/19.5; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .8rem; text-align: center;
}
.screenshots .shot img { width: 100%; height: 100%; object-fit: cover; border-radius: 20px; }
.feature-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 16px; }
.feature-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.feature-list li strong { color: var(--primary); display: block; margin-bottom: 4px; }

@media (max-width: 640px) {
  .detail-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ---------- Contact form ---------- */
.form-card {
  max-width: 640px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.form-group label .req { color: #e0555f; font-size: .8rem; margin-left: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-note { font-size: .85rem; color: var(--text-muted); }

/* ---------- Legal / privacy ---------- */
.legal { max-width: 780px; margin: 0 auto; }
.legal h2 { font-size: 1.3rem; margin-top: 2em; border-left: 4px solid var(--primary); padding-left: 12px; }
.legal ul { padding-left: 1.4em; }
.legal .updated { color: var(--text-muted); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-grid h4 { margin: 0 0 10px; font-size: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: var(--text-muted); font-size: .9rem; }
.social { display: flex; gap: 12px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--text);
}
.social a:hover { background: var(--primary); color: #fff; text-decoration: none; }
.social svg { width: 20px; height: 20px; }
.copyright { text-align: center; color: var(--text-muted); font-size: .85rem; margin-top: 28px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--text-muted); padding: 18px 0 0; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
