/* ===== Variables ===== */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #16202e;
  --muted: #5b6879;
  --border: #e3e7ef;
  --brand: #3b6ef5;
  --brand-strong: #2a55cc;
  --accent: #10b981;
  --shadow: 0 10px 30px rgba(20, 32, 51, 0.08);
  --radius: 16px;
  --max: 1120px;
}

html[data-theme="dark"] {
  --bg: #0d1420;
  --surface: #151d2b;
  --text: #eaf0f9;
  --muted: #9aa8bb;
  --border: #263242;
  --brand: #7ea2ff;
  --brand-strong: #a9c0ff;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.hidden { display: none !important; }

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: .85rem;
  letter-spacing: .03em;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}
.nav a:hover { color: var(--brand); text-decoration: none; }

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--brand); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(900px 380px at 12% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(700px 320px at 92% 0%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
}

.hero-inner { max-width: 780px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .3rem .8rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.hero-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: clamp(.98rem, 2vw, 1.1rem);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .8rem 1.4rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--brand-strong); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ===== Stats ===== */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.stat {
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .85rem; }

/* ===== Sections ===== */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); border-block: 1px solid var(--border); }

.section-title {
  margin: 0 0 .75rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 60ch;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--brand); }
.card h3 { margin: .75rem 0 .4rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card-icon { font-size: 1.5rem; }

/* ===== Features ===== */
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.feature-list li {
  display: flex;
  gap: .75rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature-list b { display: block; margin-bottom: .2rem; }
.feature-list p { margin: 0; color: var(--muted); font-size: .9rem; }

.check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: .85rem;
}

/* ===== Form ===== */
.form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field { display: grid; gap: .35rem; }
.field label { font-size: .88rem; font-weight: 700; }

.field input,
.field textarea {
  width: 100%;
  padding: .7rem .85rem;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); opacity: .7; }

.form-error {
  margin: 0;
  min-height: 1.2em;
  color: #e0484d;
  font-size: .85rem;
}
.form-success {
  margin: 0;
  color: var(--accent);
  font-size: .9rem;
  font-weight: 700;
}

/* ===== Footer ===== */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.site-footer p { margin: 0; color: var(--muted); font-size: .88rem; }
.to-top { font-size: .88rem; font-weight: 600; }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
  .nav-toggle { display: block; }

  .nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 1rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .4rem 0; }
  .theme-toggle { width: 100%; }

  .stats { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
