/* necco.xyz family: cream paper + navy ink + blue-violet accent (same tokens as necco.xyz) */
:root {
  --bg: #f7f1ef;
  --paper: #fffbfa;
  --code-bg: #efe6e4;
  --ink: #2a2836;
  --ink-2: #5d5a6b;
  --ink-3: #736c7c;
  --line: #e6dad8;
  --accent: #6870c4;
  --accent-ink: #4e55a8;
  --tint: #ebe9fb;
  --tape: rgba(242, 176, 172, .62);
  --ok: #2f7d57;
  --ok-bg: #e2f2ea;
  --warn: #9a6216;
  --warn-bg: #f8ecd8;
  --err: #a8433a;
  --err-bg: #fbe7e4;
  --term-bg: #2e2f40;
  --term-head: #272836;
  --term-ink: #ece4e6;
  --term-hi: #a8b0f8;
  --term-dim: #8f8ca3;
  --term-ok: #8fd9b0;
  --term-del: #f0a49c;
  --btn-ink: #fffbfa;
  --r: 6px;
  --r-lg: 10px;
  --hh: 58px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b25;
    --paper: #262532;
    --code-bg: #2c2b3a;
    --ink: #f2e9e7;
    --ink-2: #c4b9bb;
    --ink-3: #8a8291;
    --line: #363444;
    --accent: #a8b0f8;
    --accent-ink: #b8befa;
    --tint: #2b2c45;
    --tape: rgba(224, 150, 150, .42);
    --ok: #8fd9b0;
    --ok-bg: #20352c;
    --warn: #f0c08a;
    --warn-bg: #382d22;
    --err: #f0a49c;
    --err-bg: #3a2526;
    --term-bg: #13121a;
    --term-head: #0e0d14;
    --term-ink: #ece4e6;
    --term-hi: #a8b0f8;
    --term-dim: #8f8ca3;
    --btn-ink: #1c1b25;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
}
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-style: wavy; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; }
code, pre { font-family: var(--mono); }
p code, li code {
  font-size: .84em;
  background: var(--code-bg);
  color: var(--ink);
  padding: .1em .38em;
  border-radius: var(--r);
}

/* one language at a time */
html[data-lang="ja"] .en, html[data-lang="en"] .ja { display: none; }

main, footer { max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* top bar (same as necco.xyz) */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px dashed var(--line);
  height: var(--hh);
}
.bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent-ink); }
.brand img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.brand b { font-weight: 700; color: var(--ink-3); }
nav { display: flex; align-items: center; gap: 20px; font-size: 14px; }
nav a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--accent-ink); text-decoration: underline wavy; text-underline-offset: 4px; }
.lang {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 4px 10px;
  cursor: pointer;
  line-height: 1.3;
}
.lang:hover { color: var(--accent-ink); border-color: var(--accent); }

/* hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 52px 0 44px;
}
.eyebrow { margin: 0 0 8px; font-size: 14px; color: var(--ink-3); }
h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 46px);
  line-height: 1.2;
  color: var(--ink);
  font-weight: 900;
}
.lead { margin: 0 0 24px; color: var(--ink-2); font-size: 16.5px; max-width: 35em; }
.install {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 440px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px 8px 8px 16px;
}
.install code { font-size: 14px; color: var(--ink); overflow-x: auto; white-space: nowrap; background: none; padding: 0; }
.install code::before { content: "$ "; color: var(--ink-3); }
.copy {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 5px 12px;
  cursor: pointer;
  min-width: 76px;
  line-height: 1.4;
}
.copy:hover { color: var(--accent-ink); border-color: var(--accent); }
.copy.done { color: var(--ok); background: var(--ok-bg); border-color: var(--ok); }
.copy.done .ja::after, .copy.done .en::after { content: " ✓"; }
.install-note { margin: 10px 0 24px; font-size: 13px; color: var(--ink-3); }
.cta { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-lg);
  font-weight: 700;
  font-size: 14px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--btn-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--btn-ink); }

/* terminal mock: necco.xyz dark mini-terminal palette */
.terminal {
  background: var(--term-bg);
  color: var(--term-ink);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  background: var(--term-head);
}
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.term-bar span { margin-left: 8px; font: 12px var(--mono); color: var(--term-dim); }
.term-body {
  padding: 18px 20px 16px;
  font: 14px/1.7 var(--sans);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.t-user {
  align-self: flex-end;
  background: rgba(168, 176, 248, .18);
  border: 1px solid rgba(168, 176, 248, .28);
  color: var(--term-ink);
  padding: 7px 14px;
  border-radius: 14px;
  max-width: 86%;
}
.t-muse { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--term-ink); margin-top: 2px; }
.dot { width: 18px; height: 18px; border-radius: 50%; background: var(--term-hi); display: inline-block; }
.t-tool { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--term-ink); }
.t-tool code {
  color: var(--term-hi);
  background: rgba(255, 255, 255, .06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.t-tool b { width: 6px; height: 6px; border-radius: 50%; background: var(--term-ok); display: inline-block; flex-shrink: 0; }
.add { color: var(--term-ok); font: 12px var(--mono); }
.del { color: var(--term-del); font: 12px var(--mono); }
.t-dim { color: var(--term-dim); }
.muted { color: var(--ink-3); }
.t-reply { color: var(--term-ink); }
.t-reply strong { color: #fff; font-weight: 700; }
.t-todo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--term-dim);
  border-top: 1px dashed rgba(255, 255, 255, .14);
  padding-top: 10px;
}
.t-todo i { width: 16px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .16); display: inline-block; }
.t-todo i.on { background: var(--term-ok); }
.t-todo span:first-child { margin-right: 8px; }
.green { color: var(--term-ok); margin-left: 8px; }
.t-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--term-head);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--r-lg);
  padding: 9px 12px;
  font-size: 13.5px;
}
.caret { width: 2px; height: 17px; background: var(--term-hi); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mode {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--term-hi);
  background: rgba(168, 176, 248, .14);
  padding: 2px 8px;
  border-radius: var(--r);
}

/* the unofficial notice */
.notice {
  margin: 0 0 40px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  font-size: 14px;
  color: var(--ink-2);
  background: var(--warn-bg);
  border: 1px solid var(--line);
  line-height: 1.75;
}
.notice strong { color: var(--warn); font-weight: 700; margin-right: 6px; }

/* Headings & sections */
h1, h2, h3 { font-feature-settings: "palt"; text-wrap: balance; }
p, li, figcaption { text-wrap: pretty; line-break: strict; }

section.ways, section.features, .start-wrap {
  border-top: 1px dashed var(--line);
  padding-top: 56px;
  margin-top: 56px;
}
section.ways, section.features { scroll-margin-top: calc(var(--hh) + 12px); }
section.start { scroll-margin-top: calc(var(--hh) + 12px); }

section h2 {
  display: inline-block;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.35;
  color: var(--ink);
  margin: 0 0 14px;
  position: relative;
  padding-bottom: 6px;
}
section h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 8px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q6 0 12 4 T24 4' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") repeat-x 0 0/24px 8px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q6 0 12 4 T24 4' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") repeat-x 0 0/24px 8px;
}
.sub { color: var(--ink-2); margin: 4px 0 0; max-width: 42em; }

/* three screens */
.way {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
  margin-top: 52px;
  padding-top: 52px;
  border-top: 1px dashed var(--line);
}
.ways .sub + .way { margin-top: 40px; padding-top: 40px; }
.way-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.way h3 { margin: 0 0 10px; font-size: 24px; font-weight: 900; line-height: 1.3; color: var(--ink); }
.way h3 small { font-size: 13px; color: var(--ink-3); font-weight: 400; font-family: var(--mono); margin-left: 8px; }
.way p { margin: 0; color: var(--ink-2); max-width: 32em; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--r);
  color: var(--ink-3);
  background: var(--code-bg);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.tag.ok { color: var(--ok); background: var(--ok-bg); font-weight: 600; }
.tag.ok::before { background: var(--ok); }

.shot { margin: 0; min-width: 0; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--term-head);
}
.shot figcaption { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }

.way-cli .shot { order: -1; }

/* GUI wide + inset card on paper */
.way-gui { display: block; }
.way-gui .way-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 28px;
}
.way-gui h3 { margin-bottom: 0; }
.gui-stack { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding-bottom: 68px; }
.gui-main { grid-column: 1 / 11; grid-row: 1; }
.gui-main figcaption { max-width: 52%; }
.gui-inset {
  grid-column: 8 / 13;
  grid-row: 1;
  align-self: end;
  translate: 0 68px;
  z-index: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px;
}
.gui-inset img { border-radius: var(--r); }

.way-phone { grid-template-columns: minmax(0, 1fr) auto; }
.phones { display: flex; justify-content: flex-end; gap: 18px; padding-top: 18px; }
.phones img {
  width: 210px;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.phones img:nth-child(2) { transform: translateY(-16px); }

/* features: dashed ruled sheet */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 36px;
  margin-top: 28px;
  border-bottom: 1px dashed var(--line);
}
.feat-grid article {
  border-top: 1px dashed var(--line);
  padding: 20px 0 28px;
}
.feat-grid h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.feat-grid p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }

/* getting started + taped safety panel */
.start-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 48px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 13px var(--mono);
  color: var(--accent-ink);
  border: 1px solid var(--line);
  background: var(--paper);
}
.steps li::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 36px;
  bottom: 6px;
  border-left: 1px dashed var(--line);
}
.steps li:last-child::after { display: none; }
.steps h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 30px; color: var(--ink); }
.steps p { margin: 0 0 6px; color: var(--ink-2); font-size: 14.5px; }
pre {
  margin: 10px 0 0;
  background: var(--term-bg);
  color: var(--term-ink);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  overflow-x: auto;
  line-height: 1.7;
}
pre code, li pre code { font-size: 13px; color: inherit; background: none; padding: 0; border-radius: 0; }

.safety-panel {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px 22px;
}
.safety-panel::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 32px;
  width: 68px;
  height: 18px;
  background: var(--tape);
  transform: rotate(-3deg);
}
.safety h2 { font-size: 20px; margin: 0 0 12px; }
.safety ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.safety li { padding-left: 18px; position: relative; color: var(--ink-2); font-size: 14.5px; line-height: 1.75; }
.safety li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-top: 72px;
  padding-top: 28px;
  padding-bottom: 44px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-3);
}
.foot-left { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
footer .links { display: flex; gap: 18px; }
footer .links a { color: var(--ink-2); text-decoration: none; }
footer .links a:hover { color: var(--accent-ink); text-decoration: underline wavy; text-underline-offset: 4px; }

/* paw print easter egg (same as necco.xyz) */
.paw {
  position: fixed;
  z-index: 30;
  width: 24px;
  height: 24px;
  pointer-events: none;
  color: var(--accent);
  animation: paw 1.1s ease-out forwards;
}
@keyframes paw {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.5) rotate(var(--r)); }
  20% { opacity: .85; transform: translate(-50%, -50%) scale(1) rotate(var(--r)); }
  100% { opacity: 0; transform: translate(-50%, -70%) rotate(var(--r)); }
}

/* ---------- motion ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms), transform .55s cubic-bezier(.2, .7, .2, 1) var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .phones img.reveal.in:nth-child(2) { transform: translateY(-16px); }

/* the hero terminal plays its session */
.js #term [data-step] { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.js #term [data-step].on { opacity: 1; transform: none; }
.js #term .t-tool b { background: var(--term-hi); }
.js #term .t-tool.on:not(.done) b { animation: pulse .7s ease-in-out infinite; }
.js #term .t-tool.done b { background: var(--term-ok); }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.js #term .t-reply.on:not(.typed) [data-type]::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: var(--term-hi);
  animation: blink 1s steps(1) infinite;
}
.js #term .t-todo i { transition: background .4s ease; }
.js #term .t-todo i.on { background: var(--term-ok); }
.js #term .t-todo i:not(.on) { background: rgba(255, 255, 255, .16); }
.js #term .t-reply { min-height: 3.4em; }
#term { transition: opacity .6s ease; }
#term.fade { opacity: .15; }

.phones img.in { animation: float 7s ease-in-out infinite; }
.phones img.in:nth-child(2) { animation-delay: -2.3s; }
.phones img.in:nth-child(3) { animation-delay: -4.6s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; }
  .feat-grid { grid-template-columns: 1fr; }
  nav a:not([href^="https"]) { display: none; }
  section.ways, section.features, .start-wrap { padding-top: 44px; margin-top: 44px; }
  .way, .way-phone, .way-gui .way-text, .start-wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .way { margin-top: 40px; padding-top: 40px; }
  .way-gui .way-text { gap: 12px; align-items: start; margin-bottom: 24px; }
  .way-gui h3 { margin-bottom: 0; }
  .way-cli .shot { order: 0; }
  .gui-stack { display: block; padding-bottom: 0; }
  .gui-main figcaption { max-width: none; }
  .gui-inset { translate: none; margin-top: 20px; }
  .start-wrap { gap: 40px; }
  .phones { justify-content: center; gap: 10px; }
  .phones img { width: 31%; border-radius: 16px; }
}
@media (max-width: 520px) {
  main, .bar, footer { padding-left: 18px; padding-right: 18px; }
  nav { gap: 12px; }
  .install code { font-size: 13px; }
  .phones img:nth-child(1) { display: none; }
  .phones img { width: 48%; }
  .t-user { max-width: 100%; }
  .term-body { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
