/* ASTRO自動売買 — サイト共通スタイル
   配色はアプリ本体(astro_bot/gui.py)のパレットをそのまま踏襲している。
   LPとアプリを行き来したときに同じ製品だと分かることを優先した。 */

:root {
  --bg: #131722;
  --bg-deep: #0d0f16;
  --panel: #1e222e;
  --panel-2: #262b3a;
  --border: #333748;
  --grid: #2a2e39;
  --fg: #d1d4dc;
  --fg-bright: #eef0f4;
  --muted: #787b86;
  --accent: #3b6cf6;
  --accent-hover: #5a85ff;
  --up: #26a69a;
  --down: #ef5350;
  --warn: #e2a03f;
  --line: #06c755; /* LINE brand green */

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sans: "Zen Kaku Gothic New", "Yu Gothic UI", "Hiragino Sans", sans-serif;

  --maxw: 1120px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  /* faint instrument-panel grid, like the chart background in the app */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  background-position: -1px -1px;
  background-attachment: fixed;
}

body::before {
  /* soften the grid so it reads as texture, not a table */
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(59, 108, 246, 0.10), transparent 70%), var(--bg);
  opacity: 0.94;
  z-index: -1;
}

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

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(19, 23, 34, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--fg-bright);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(150deg, var(--accent), #1c3fa8);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 14px; font-weight: 700;
  color: #fff;
  flex: none;
}

.site-nav { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .18s; }
.site-nav a:hover { color: var(--fg-bright); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: 9px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .16s, background .16s, border-color .16s;
  line-height: 1.4;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-line { background: var(--line); color: #05300f; }
.btn-line:hover { background: #19dd6b; }
.btn-ghost { border-color: var(--border); color: var(--fg); background: rgba(30, 34, 46, .6); }
.btn-ghost:hover { border-color: var(--accent); color: var(--fg-bright); }

/* ---------- hero ---------- */

.hero { padding: 92px 0 64px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(30px, 5.2vw, 54px);
  line-height: 1.28;
  margin: 0 0 22px;
  color: var(--fg-bright);
  letter-spacing: -0.01em;
  font-weight: 700;
}

.hero .lead { font-size: clamp(15px, 2vw, 18px); color: var(--fg); margin: 0 0 34px; max-width: 60ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }

.hero-note { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- sections ---------- */

section { padding: 64px 0; }
section.tight { padding: 44px 0; }

h2 {
  font-size: clamp(22px, 3.2vw, 30px);
  color: var(--fg-bright);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.section-lead { color: var(--muted); margin: 0 0 34px; max-width: 62ch; }

h3 { font-size: 18px; color: var(--fg-bright); margin: 0 0 8px; }

/* ---------- cards ---------- */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

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

.card .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .12em;
  display: block;
  margin-bottom: 12px;
}

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

/* ---------- pricing ---------- */

.price-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: stretch; margin-bottom: 26px; }

.plan {
  flex: 1 1 300px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(59,108,246,.25), 0 18px 50px -28px rgba(59,108,246,.6); }

.plan .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.plan.featured .tag { color: var(--accent); }

.plan .amount { font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--fg-bright); line-height: 1.2; }
.plan .amount small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.plan li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--fg); margin-bottom: 8px; }
.plan li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
.plan .btn { margin-top: auto; }

table.price {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}
table.price thead { background: var(--panel-2); }
table.price th, table.price td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.price th { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
table.price td { font-family: var(--mono); color: var(--fg-bright); }
table.price td:first-child { color: var(--fg); }
table.price tbody tr:last-child td { border-bottom: none; }
table.price tbody tr:hover { background: rgba(59,108,246,.07); }
.table-scroll { overflow-x: auto; }

/* ---------- steps ---------- */

.steps { counter-reset: step; display: grid; gap: 14px; }
.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  position: relative;
}
.step h3 { display: flex; align-items: baseline; gap: 12px; }
.step h3::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}
.step p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.step p + p { margin-top: 10px; }

/* ---------- callouts ---------- */

.note {
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 14.5px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.note strong { color: var(--fg-bright); }
.note.warn { border-color: rgba(226,160,63,.5); background: rgba(226,160,63,.07); }
.note.warn strong { color: var(--warn); }

kbd {
  font-family: var(--mono);
  font-size: 12.5px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--fg-bright);
}

/* ---------- legal / doc pages ---------- */

.doc { padding: 56px 0 80px; max-width: 780px; }
.doc h1 { font-size: clamp(24px, 4vw, 34px); color: var(--fg-bright); margin: 0 0 6px; }
.doc .updated { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 19px; margin: 40px 0 10px; padding-top: 20px; border-top: 1px solid var(--border); }
.doc h2:first-of-type { border-top: none; padding-top: 0; }
.doc p, .doc li { color: var(--fg); font-size: 15.5px; }
.doc ol, .doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }

table.spec { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 0; }
table.spec th, table.spec td { padding: 13px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.spec th { width: 34%; color: var(--muted); font-weight: 600; font-size: 14px; background: var(--panel); }
table.spec td { color: var(--fg-bright); }

.todo {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--warn);
  background: rgba(226,160,63,.1);
  border: 1px dashed rgba(226,160,63,.5);
  border-radius: 5px;
  padding: 2px 8px;
  display: inline-block;
}

/* ---------- CTA band ---------- */

.cta {
  background: linear-gradient(140deg, var(--panel), #171c28);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 46px 40px;
  text-align: center;
}
.cta h2 { margin-bottom: 10px; }
.cta p { color: var(--muted); margin: 0 auto 26px; max-width: 52ch; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding: 34px 0 46px;
  font-size: 13.5px;
  color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg-bright); text-decoration: underline; }
.site-footer .copy { margin-left: auto; font-family: var(--mono); font-size: 12px; }

/* ---------- risk disclosure ---------- */

.risk {
  border: 1px solid rgba(239,83,80,.4);
  background: rgba(239,83,80,.06);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.risk h3 { color: var(--down); margin-bottom: 10px; font-size: 16px; }
.risk p, .risk li { font-size: 14px; color: var(--fg); margin: 0 0 8px; }
.risk ul { margin: 0; padding-left: 20px; }

/* ---------- entrance motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .7s cubic-bezier(.22,.8,.3,1) both; }
  .reveal:nth-child(2) { animation-delay: .07s; }
  .reveal:nth-child(3) { animation-delay: .14s; }
  .reveal:nth-child(4) { animation-delay: .21s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 720px) {
  .site-nav { display: none; }
  .hero { padding: 60px 0 44px; }
  section { padding: 48px 0; }
  .cta { padding: 34px 22px; }
  table.spec th { width: 40%; }
}
