/* Asterism website — shared styles (dark only: the product is dark-first) */
:root {
  --bg: #070a14;
  --bg-2: #0b1020;
  --surface: #0f1528;
  --surface-2: #141b33;
  --line: #1f2945;
  --text: #e6ecf5;
  --muted: #94a0b8;
  --dim: #66728c;
  --accent: #3ddc97;
  --accent-2: #5cffb0;
  --accent-ink: #04140c;
  --warn: #f5d67a;
  --danger: #ff6b7a;
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sans: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ja"] body { line-height: 1.85; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video { max-width: 100%; display: block; }
code, kbd, .mono { font-family: var(--mono); }

/* starfield behind the hero */
#sky {
  position: absolute; inset: 0 0 auto 0; height: 980px; width: 100%;
  z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; position: relative; z-index: 1; }
section { padding: 96px 0; position: relative; }
.section-label {
  font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px;
}
.section-label::before { content: "// "; color: var(--dim); }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
h3 { font-size: 18px; margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0; }
p { margin: 0 0 12px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 10, 20, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(31, 41, 69, .7);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; }
.logo:hover { text-decoration: none; }
.logo img { width: 26px; height: 26px; border-radius: 6px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav .lang { font-size: 14px; color: var(--muted); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); color: var(--text); background: var(--surface);
  cursor: pointer; font-family: inherit; transition: transform .12s, background .12s, border-color .12s;
}
.btn:hover { text-decoration: none; border-color: #2e3b63; background: var(--surface-2); transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 0 24px rgba(61, 220, 151, .35); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-sm { padding: 7px 14px; font-size: 14px; }

/* hero */
.hero { padding: 88px 0 40px; text-align: center; }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: 14px; margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px); font-weight: 800; letter-spacing: -0.025em;
  background: linear-gradient(180deg, #fff 30%, #a9f5cc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 20px;
}
html[lang="ja"] .hero h1 { letter-spacing: 0; font-size: clamp(32px, 5.4vw, 58px); }
.hero .lead { margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.specbar {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  margin-top: 30px; padding: 10px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(15, 21, 40, .6);
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.specbar b { color: var(--text); font-weight: 600; }

/* three cards */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; text-align: left; }
.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.card .ico { font-family: var(--mono); color: var(--accent); font-size: 20px; margin-bottom: 10px; display: block; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- interactive demo ---------- */
.demo-head { text-align: center; margin-bottom: 28px; }
.demo-head .lead { margin: 0 auto; }
.term {
  --t-bg: #0a0e1a; --t-fg: #7cf5a8; --t-accent: #3ddc97; --t-glow: rgba(61, 220, 151, .55);
  border-radius: 12px; overflow: hidden; border: 1px solid #263152;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .02), 0 0 60px rgba(61, 220, 151, .08);
  background: #0c1120; font-family: var(--mono); font-size: 13.5px;
  transition: box-shadow .3s;
}
.term-bar {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px;
  background: #0d1222; border-bottom: 1px solid #1d2640; font-size: 12.5px; color: var(--muted);
}
.term-brand { color: var(--t-accent); font-weight: 700; white-space: nowrap; }
.term-groups { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.term-groups::-webkit-scrollbar { display: none; }
.grp {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 4px 10px; border-radius: 7px; border: 1px solid transparent;
  background: transparent; color: var(--muted); font: inherit; cursor: pointer;
}
.grp .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gc, #3ddc97); box-shadow: 0 0 6px var(--gc, #3ddc97); }
.grp.on { color: var(--text); background: #161e36; border-color: #26304f; }
.grp:hover { color: var(--text); }
.term-tools { margin-left: auto; display: flex; gap: 4px; }
.tbtn {
  font: inherit; font-size: 12px; color: var(--muted); background: transparent; border: 1px solid transparent;
  border-radius: 6px; padding: 4px 8px; cursor: pointer; white-space: nowrap;
}
.tbtn:hover { color: var(--text); background: #161e36; }
.tbtn.on { color: var(--t-accent); border-color: #26304f; background: #121a30; }

.term-body { display: flex; height: 440px; position: relative; }
.panes { flex: 1; display: flex; min-width: 0; position: relative; }
.pane { flex: 1; position: relative; min-width: 0; overflow: hidden; background: var(--t-bg); transition: background .3s; }
.pane + .pane { border-left: 1px solid #26304f; }
.pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pane.focus { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t-accent) 55%, transparent); }
.screen {
  position: absolute; inset: 0; padding: 14px 16px; overflow-y: auto; overflow-x: hidden;
  color: var(--t-fg); text-shadow: 0 0 6px var(--t-glow); white-space: pre-wrap; word-break: break-all;
  scrollbar-width: thin; scrollbar-color: #26304f transparent;
}
.screen .p1 { color: var(--t-accent); }
.screen .p2 { color: #6ca8ff; }
.screen .muted { color: #6b7894; text-shadow: none; }
.screen .ok { color: #5cffb0; }
.screen .err { color: #ff6b7a; }
.screen .warn { color: #f5d67a; }
.cursor {
  display: inline-block; width: .6em; height: 1.15em; vertical-align: text-bottom;
  background: var(--t-accent); box-shadow: 0 0 8px var(--t-glow); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.drawer {
  width: 0; overflow: hidden; background: #0d1222; border-left: 1px solid #1d2640;
  transition: width .35s cubic-bezier(.2, .8, .2, 1); flex-shrink: 0;
}
.drawer.open { width: 300px; }
.drawer-in { width: 300px; height: 100%; display: flex; flex-direction: column; }
.dtabs { display: flex; border-bottom: 1px solid #1d2640; }
.dtab {
  flex: 1; font: inherit; font-size: 12px; padding: 10px 4px; background: none; border: 0;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent;
}
.dtab.on { color: var(--text); border-bottom-color: var(--t-accent); }
.dpanel { flex: 1; overflow-y: auto; padding: 8px; display: none; scrollbar-width: thin; scrollbar-color: #26304f transparent; }
.dpanel.on { display: block; }
.ditem {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  font: inherit; font-size: 12px; color: var(--text); background: none;
  border: 1px solid transparent; border-radius: 8px; padding: 8px; cursor: pointer;
}
.ditem:hover { background: #141b33; border-color: #222c4a; }
.ditem .meta { color: var(--dim); font-size: 11px; display: block; }
.ditem .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ditem .run { color: var(--t-accent); }
.badge { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: #1a2240; color: var(--muted); white-space: nowrap; }
.badge.ok { color: #5cffb0; } .badge.err { color: #ff6b7a; } .badge.live { color: #f5d67a; }
.dhint { color: var(--dim); font-size: 11px; padding: 4px 8px 8px; margin: 0; }
.snipform { padding: 8px; border: 1px solid #222c4a; border-radius: 8px; margin: 6px 0; font-size: 12px; display: none; }
.snipform.on { display: block; }
.snipform label { display: block; color: var(--muted); margin-bottom: 4px; }
.snipform input {
  width: 100%; font: inherit; background: #0a0e1a; color: var(--text); border: 1px solid #26304f;
  border-radius: 6px; padding: 6px 8px; margin-bottom: 8px;
}
.snipform .preview { color: var(--t-accent); word-break: break-all; margin-bottom: 8px; }
.proc { padding: 8px; border-radius: 8px; border: 1px solid #1d2640; margin-bottom: 6px; font-size: 12px; }
.proc .row { display: flex; justify-content: space-between; gap: 8px; }
.proc .cmd { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proc .sub { color: var(--dim); font-size: 11px; }

.term-status {
  display: flex; gap: 16px; align-items: center; height: 28px; padding: 0 14px; font-size: 11.5px;
  color: var(--dim); background: #0d1222; border-top: 1px solid #1d2640; white-space: nowrap; overflow: hidden;
}
.term-status .st-host { color: var(--t-accent); }
.term-status .sp { margin-left: auto; }

.demo-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: center; margin-top: 20px; font-size: 14px; color: var(--muted); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
  background: radial-gradient(circle at 35% 35%, var(--fg) 0 30%, var(--bgc) 32%);
  box-shadow: 0 0 0 1px #26304f;
}
.sw.on { border-color: var(--text); }
.demo-note { text-align: center; color: var(--dim); font-size: 13px; margin-top: 14px; }

/* video */
.video-wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: center; }
.video-wrap video { border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); width: 100%; background: #000; }
.small { font-size: 13px; color: var(--dim); }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.feature { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }
.feature .tag { font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 12px; }

/* keyboard */
.kbd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; margin-top: 36px; }
.kbd-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.kbd-row span { color: var(--muted); font-size: 15px; }
.keys { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; color: var(--dim); font-size: 12px; }
kbd {
  font-size: 12px; padding: 3px 8px; border-radius: 6px; color: var(--text);
  background: var(--surface); border: 1px solid #2a3558; border-bottom-width: 2px; white-space: nowrap;
}

/* themes */
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 36px; }
.theme {
  border-radius: 12px; overflow: hidden; border: 1px solid var(--line); cursor: pointer;
  background: var(--tb); font-family: var(--mono); font-size: 12px; transition: transform .15s;
  text-align: left; padding: 0; color: inherit;
}
.theme:hover { transform: translateY(-2px); }
.theme .tp { padding: 14px; color: var(--tf); min-height: 92px; }
.theme .tp .a { color: var(--ta); }
.theme .tn { padding: 8px 14px; background: rgba(0, 0, 0, .35); color: #cfd6e4; font-family: var(--sans); font-size: 13px; }

/* privacy */
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.plist li { padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); color: var(--muted); font-size: 15px; }
.plist b { color: var(--text); display: block; margin-bottom: 2px; }

/* pricing */
.pricing { text-align: center; }
.pricing .lead { margin: 0 auto; }
.price-card {
  max-width: 460px; margin: 40px auto 0; padding: 32px; border-radius: 18px; text-align: left;
  border: 1px solid #2a4a3e; background: linear-gradient(180deg, #0f1f1c, var(--bg-2) 60%);
  box-shadow: 0 0 60px rgba(61, 220, 151, .1);
}
.price-card h3 { color: var(--muted); font-weight: 600; font-size: 15px; }
.price { font-size: 52px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 2px; }
.price small { font-size: 15px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.tbd { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--warn); border: 1px dashed var(--warn); border-radius: 6px; padding: 1px 7px; vertical-align: middle; }
.checks { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 8px; }
.checks li { padding-left: 26px; position: relative; color: var(--muted); font-size: 15px; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.price-card .btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.steps { display: flex; justify-content: center; gap: 12px 36px; flex-wrap: wrap; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: s; color: var(--muted); font-size: 15px; }
.steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; }
.steps li::before {
  content: counter(s); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; color: var(--accent); border: 1px solid #2a4a3e;
}

/* maker */
.maker { display: flex; gap: 24px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); max-width: 760px; margin: 0 auto; }
.avatar { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 24px; color: var(--accent); background: radial-gradient(circle at 30% 30%, #1d3a30, #0a0e1a); border: 1px solid #2a4a3e; }
.maker p { color: var(--muted); font-size: 15px; }

/* faq */
.faq { max-width: 820px; margin: 36px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--mono); color: var(--accent); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; }

/* closing cta */
.cta-band {
  text-align: center; padding: 64px 24px; border-radius: 22px; border: 1px solid #2a4a3e;
  background: radial-gradient(ellipse at 50% 0%, rgba(61, 220, 151, .16), transparent 60%), var(--bg-2);
}
.cta-band p { color: var(--muted); margin: 0 0 24px; }

.share { text-align: center; padding: 56px 0 0; }
.share h3 { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* footer */
footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 48px 0 40px; font-size: 14px; color: var(--muted); }
.foot { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { font-size: 13px; color: var(--text); margin: 0 0 12px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }
.copy { margin-top: 40px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--dim); font-size: 13px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .cursor { animation: none; }
}

/* responsive */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav .lang { margin-left: auto; }
  .cards3, .features { grid-template-columns: 1fr; }
  .themes { grid-template-columns: repeat(2, 1fr); }
  .video-wrap, .privacy, .kbd-grid { grid-template-columns: 1fr; }
  .video-wrap { gap: 24px; }
  .foot { grid-template-columns: 1fr 1fr; }
  section { padding: 72px 0; }
  .term-body { height: 400px; }
  .drawer.open { width: 240px; }
  .drawer-in { width: 240px; }
  .tbtn .lbl { display: none; }
}
@media (max-width: 560px) {
  .term { font-size: 11.5px; }
  .term-body { height: 360px; }
  .drawer.open { position: absolute; right: 0; top: 0; bottom: 0; width: 82%; z-index: 3; box-shadow: -10px 0 30px rgba(0, 0, 0, .5); }
  .drawer-in { width: 100%; }
  .term-status .hide-sm { display: none; }
  .maker { flex-direction: column; text-align: center; }
  .nav .btn { display: none; }
}
