/* =========================================================
   Free Geares — Design System
   フリーで高機能なアプリ＆サービス
   ========================================================= */

:root {
  /* Brand colors */
  --brand-1: #4f46e5;       /* indigo */
  --brand-2: #06b6d4;       /* cyan   */
  --brand-grad: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);

  /* Neutrals */
  --ink:      #0f172a;      /* near-black text */
  --ink-soft: #475569;      /* secondary text  */
  --line:     #e2e8f0;      /* borders         */
  --bg:       #ffffff;
  --bg-soft:  #f8fafc;
  --bg-card:  #ffffff;

  /* Accent / state */
  --accent:   #06b6d4;
  --shadow:   0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg:0 12px 40px rgba(79,70,229,.18);

  --radius:   16px;
  --radius-sm:10px;
  --maxw:     1120px;

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

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-lg); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-1); color: var(--brand-1); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand .logo { width: 32px; height: 32px; }
.brand b { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--brand-1); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; background: var(--bg-soft); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(6,182,212,.16), transparent 60%),
    radial-gradient(560px 320px at 5% 20%, rgba(79,70,229,.14), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 700; color: var(--brand-1);
  box-shadow: var(--shadow); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.25; letter-spacing: -.02em; }
.hero h1 .grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--ink-soft); font-size: clamp(15px, 2vw, 18px); margin: 20px auto 0; max-width: 600px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 48px; flex-wrap: wrap; }
.hero-stats .stat b { display: block; font-size: 28px; font-weight: 800; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats .stat span { font-size: 13px; color: var(--ink-soft); }

/* ---------- Section ---------- */
.section { padding: 76px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 48px; }
.section-head .eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.section-head h2 { font-size: clamp(24px, 3.5vw, 34px); line-height: 1.35; margin-top: 8px; letter-spacing: -.01em; }
.section-head p { color: var(--ink-soft); margin-top: 12px; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature .ico {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(79,70,229,.12), rgba(6,182,212,.12));
  color: var(--brand-1); margin-bottom: 16px;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* ---------- App cards ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.app-card {
  display: flex; flex-direction: column; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .2s ease;
}
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.app-thumb {
  aspect-ratio: 16 / 9; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; position: relative;
}
.app-thumb .glyph { font-size: 44px; font-weight: 800; opacity: .92; }
.app-body { padding: 20px 22px; display: flex; flex-direction: column; flex: 1; }
.app-tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand-1);
  background: rgba(79,70,229,.08); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
}
.app-body h3 { font-size: 19px; margin-bottom: 6px; }
.app-body p { color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.app-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.app-meta .platform { font-size: 13px; color: var(--ink-soft); }
.app-link { font-weight: 700; color: var(--brand-1); font-size: 14px; }

/* ---------- Ad slots ---------- */
.ad-slot {
  display: grid; place-items: center; text-align: center;
  background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: #94a3b8; font-size: 13px; min-height: 100px; margin: 0 auto;
}
.ad-slot small { display: block; font-size: 11px; letter-spacing: .04em; }
.ad-rail { padding: 28px 0; }
.ad-inline { max-width: 728px; margin: 0 auto; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-grad); color: #fff; text-align: center; padding: 64px 0; }
.cta-band h2 { font-size: clamp(24px, 3.5vw, 32px); }
.cta-band p { opacity: .92; margin: 12px auto 26px; max-width: 520px; }
.cta-band .btn-primary { background: #fff; color: var(--brand-1); box-shadow: 0 10px 30px rgba(0,0,0,.18); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid .brand { color: #fff; margin-bottom: 12px; }
.footer-grid .brand b { color: #fff; -webkit-text-fill-color: #fff; }
.footer-about { font-size: 14px; color: #94a3b8; max-width: 280px; }
.footer-col h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-col a { display: block; color: #94a3b8; font-size: 14px; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 22px; text-align: center; font-size: 13px; color: #64748b; }

/* ---------- Generic page (privacy / about / contact) ---------- */
.page { padding: 56px 0 72px; }
.page h1 { font-size: clamp(26px, 4vw, 36px); margin-bottom: 8px; letter-spacing: -.01em; }
.page .lead { color: var(--ink-soft); margin-bottom: 36px; }
.prose { max-width: 760px; }
.prose h2 { font-size: 21px; margin: 36px 0 12px; padding-top: 8px; }
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p { margin-bottom: 14px; color: var(--ink); }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--brand-1); text-decoration: underline; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--bg-soft); width: 32%; }

/* ---------- App detail page ---------- */
.breadcrumb { font-size: 13px; color: var(--ink-soft); padding: 20px 0 0; }
.breadcrumb a { color: var(--brand-1); }
.breadcrumb span { margin: 0 6px; color: #cbd5e1; }

.app-hero { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; padding: 28px 0 8px; }
.app-icon {
  width: 120px; height: 120px; border-radius: 26px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-size: 56px; box-shadow: var(--shadow-lg);
}
.app-hero .head h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -.01em; }
.app-hero .head .tag {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--brand-1);
  background: rgba(79,70,229,.08); padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.app-hero .head .sub { color: var(--ink-soft); margin-top: 8px; }
.app-hero .head .quick { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; color: var(--ink-soft); }
.app-hero .head .quick b { color: var(--ink); }

/* download box */
.dl-box {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 26px; margin: 28px 0;
}
.dl-box .dl-info { font-size: 14px; color: var(--ink-soft); }
.dl-box .dl-info b { color: var(--ink); font-size: 16px; }
.dl-box .btn-primary { font-size: 16px; padding: 14px 30px; }

/* screenshot gallery */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.shots .shot {
  aspect-ratio: 16 / 10; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(79,70,229,.06), rgba(6,182,212,.06));
  display: grid; place-items: center; color: #94a3b8; font-size: 13px; overflow: hidden;
}
.shots .shot img { width: 100%; height: 100%; object-fit: cover; }

/* changelog */
.changelog { border-left: 2px solid var(--line); padding-left: 22px; }
.changelog .entry { position: relative; padding-bottom: 20px; }
.changelog .entry::before {
  content: ""; position: absolute; left: -28px; top: 6px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--brand-1); box-shadow: 0 0 0 4px rgba(79,70,229,.12);
}
.changelog .ver { font-weight: 700; }
.changelog .date { font-size: 13px; color: var(--ink-soft); margin-left: 10px; }
.changelog ul { list-style: disc; padding-left: 20px; margin-top: 6px; color: var(--ink-soft); font-size: 14.5px; }

/* detail layout */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.detail-main h2 { font-size: 22px; margin: 36px 0 14px; }
.detail-main h2:first-child { margin-top: 0; }
.detail-main p { color: var(--ink); margin-bottom: 14px; }
.detail-main ul.feat { list-style: none; }
.detail-main ul.feat li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.detail-main ul.feat li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.detail-side { position: sticky; top: 84px; }
.spec { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec h3 { font-size: 15px; padding: 14px 18px; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.spec table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec th, .spec td { padding: 11px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--ink-soft); font-weight: 600; width: 42%; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

@media (max-width: 820px) {
  .app-hero { grid-template-columns: 84px 1fr; gap: 18px; }
  .app-icon { width: 84px; height: 84px; border-radius: 20px; font-size: 40px; }
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
  .detail-side { position: static; }
}

/* ---------- Contact form ---------- */
.form { max-width: 560px; }
.form .field { margin-bottom: 18px; }
.form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; background: #fff;
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--brand-1); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.form textarea { min-height: 140px; resize: vertical; }
.note { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .features, .app-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0;
    transform: translateY(-120%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 20px; width: 100%; }
  .nav-links .btn { margin: 10px 20px; justify-content: center; }
  .nav-toggle { display: block; }
  .features, .app-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .section { padding: 56px 0; }
}
